From 130d3bf63997aaab6050a1fb8a433f6ed019d78f Mon Sep 17 00:00:00 2001 From: michael mccune Date: Wed, 31 Jan 2024 14:03:10 -0500 Subject: [PATCH 01/44] add informer argument to clusterapi provider builder This change adds the informer factory as an argument to the `buildCloudProvider` function for clusterapi so that building with tags will work properly. --- cluster-autoscaler/cloudprovider/builder/builder_clusterapi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_clusterapi.go b/cluster-autoscaler/cloudprovider/builder/builder_clusterapi.go index bde3853def33..7c3d615e6841 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_clusterapi.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_clusterapi.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/clusterapi" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for machineapi-only build. const DefaultCloudProvider = cloudprovider.ClusterAPIProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.ClusterAPIProviderName: return clusterapi.BuildClusterAPI(opts, do, rl) From bbda0babc931d67cd2d1172ba0e2f5a8786f4584 Mon Sep 17 00:00:00 2001 From: shubham82 Date: Thu, 1 Feb 2024 16:50:33 +0530 Subject: [PATCH 02/44] Add informer argument to the CloudProviders builder. --- cluster-autoscaler/cloudprovider/builder/builder_alicloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_aws.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_azure.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_baiducloud.go | 3 ++- .../cloudprovider/builder/builder_bizflycloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_brightbox.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_cherry.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_civo.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_cloudstack.go | 3 ++- .../cloudprovider/builder/builder_digitalocean.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_exoscale.go | 3 ++- .../cloudprovider/builder/builder_externalgrpc.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_gce.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_hetzner.go | 3 ++- .../cloudprovider/builder/builder_huaweicloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_ionoscloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_kamatera.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_kubemark.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_linode.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_magnum.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_oci.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_ovhcloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_packet.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_rancher.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_scaleway.go | 3 ++- .../cloudprovider/builder/builder_tencentcloud.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_volcengine.go | 3 ++- cluster-autoscaler/cloudprovider/builder/builder_vultr.go | 3 ++- 28 files changed, 56 insertions(+), 28 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_alicloud.go b/cluster-autoscaler/cloudprovider/builder/builder_alicloud.go index 38748c5f8ec2..566cfeb9264b 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_alicloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_alicloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/alicloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for alicloud-only build is alicloud. const DefaultCloudProvider = cloudprovider.AlicloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.AlicloudProviderName: return alicloud.BuildAlicloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_aws.go b/cluster-autoscaler/cloudprovider/builder/builder_aws.go index f1258215d9dc..e13c60c2412d 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_aws.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_aws.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for AWS-only build is AWS. const DefaultCloudProvider = cloudprovider.AwsProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.AwsProviderName: return aws.BuildAWS(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_azure.go b/cluster-autoscaler/cloudprovider/builder/builder_azure.go index 06e2d6b3a88a..7812ab138b48 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_azure.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_azure.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider on Azure-only build is Azure. const DefaultCloudProvider = cloudprovider.AzureProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.AzureProviderName: return azure.BuildAzure(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_baiducloud.go b/cluster-autoscaler/cloudprovider/builder/builder_baiducloud.go index 61645c019dbc..05e4669486d1 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_baiducloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_baiducloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/baiducloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for baiducloud-only build is baiducloud. const DefaultCloudProvider = cloudprovider.BaiducloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.BaiducloudProviderName: return baiducloud.BuildBaiducloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_bizflycloud.go b/cluster-autoscaler/cloudprovider/builder/builder_bizflycloud.go index 6d9739aa02bf..35797f766ad3 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_bizflycloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_bizflycloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/bizflycloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the Bizflycloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider build is Bizflycloud.. const DefaultCloudProvider = cloudprovider.BizflyCloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.BizflyCloudProviderName: return bizflycloud.BuildBizflyCloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_brightbox.go b/cluster-autoscaler/cloudprovider/builder/builder_brightbox.go index 2445edbb51ba..ba1936d9f454 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_brightbox.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_brightbox.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/brightbox" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the brightbox cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is Brightbox const DefaultCloudProvider = cloudprovider.BrightboxProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.BrightboxProviderName: return brightbox.BuildBrightbox(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_cherry.go b/cluster-autoscaler/cloudprovider/builder/builder_cherry.go index 4f16b8b903be..7b5de93f3d08 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_cherry.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_cherry.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" cherry "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/cherryservers" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for Cherry-only build is Cherry const DefaultCloudProvider = cherry.ProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cherry.ProviderName: return cherry.BuildCherry(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_civo.go b/cluster-autoscaler/cloudprovider/builder/builder_civo.go index 24cf7c9abc08..e51e86f63b83 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_civo.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_civo.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/civo" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the digtalocean cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for civo-only build is Civo. const DefaultCloudProvider = cloudprovider.CivoProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.CivoProviderName: return civo.BuildCivo(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_cloudstack.go b/cluster-autoscaler/cloudprovider/builder/builder_cloudstack.go index 3090faf150b0..5151b9954c3b 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_cloudstack.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_cloudstack.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/cloudstack" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for cloudstack-only build is cloudstack. const DefaultCloudProvider = cloudprovider.CloudStackProviderName -func BuildCloudStack(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func BuildCloudStack(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.CloudStackProviderName: return cloudstack.BuildCloudStack(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_digitalocean.go b/cluster-autoscaler/cloudprovider/builder/builder_digitalocean.go index 00dcfb2125c1..46988780349c 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_digitalocean.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_digitalocean.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/digitalocean" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the digtalocean cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for do-only build is DigitalOcean. const DefaultCloudProvider = cloudprovider.DigitalOceanProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.DigitalOceanProviderName: return digitalocean.BuildDigitalOcean(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_exoscale.go b/cluster-autoscaler/cloudprovider/builder/builder_exoscale.go index 5454ecaa69cf..f6b078f8f49a 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_exoscale.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_exoscale.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/exoscale" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the Exoscale cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is Exoscale. const DefaultCloudProvider = cloudprovider.ExoscaleProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.ExoscaleProviderName: return exoscale.BuildExoscale(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_externalgrpc.go b/cluster-autoscaler/cloudprovider/builder/builder_externalgrpc.go index 5c2e8b574d9a..4e5dfdd2374b 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_externalgrpc.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_externalgrpc.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/externalgrpc" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for externalgrpc-only build is externalgrpc. const DefaultCloudProvider = cloudprovider.ExternalGrpcProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.ExternalGrpcProviderName: return externalgrpc.BuildExternalGrpc(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_gce.go b/cluster-autoscaler/cloudprovider/builder/builder_gce.go index d4fbc93a271f..504eb3e8cf4c 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_gce.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_gce.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/gce" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is GCE. const DefaultCloudProvider = cloudprovider.GceProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.GceProviderName: return gce.BuildGCE(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_hetzner.go b/cluster-autoscaler/cloudprovider/builder/builder_hetzner.go index 156a132c48f8..28c5931cf631 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_hetzner.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_hetzner.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/hetzner" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the Hetzner cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is Hetzner. const DefaultCloudProvider = cloudprovider.HetznerProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.HetznerProviderName: return hetzner.BuildHetzner(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_huaweicloud.go b/cluster-autoscaler/cloudprovider/builder/builder_huaweicloud.go index 7b7b1dc7bf82..c7a5007e5f98 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_huaweicloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_huaweicloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for huaweicloud-only build is huaweicloud. const DefaultCloudProvider = cloudprovider.HuaweicloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.HuaweicloudProviderName: return huaweicloud.BuildHuaweiCloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_ionoscloud.go b/cluster-autoscaler/cloudprovider/builder/builder_ionoscloud.go index 3ddfcafa5f20..a75817d2016e 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_ionoscloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_ionoscloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for IonosCloud-only build is ionoscloud. const DefaultCloudProvider = cloudprovider.IonoscloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.IonoscloudProviderName: return ionoscloud.BuildIonosCloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_kamatera.go b/cluster-autoscaler/cloudprovider/builder/builder_kamatera.go index 968962961964..ca0f2ae92c72 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_kamatera.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_kamatera.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/kamatera" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the Kamaterea cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is Kamatera. const DefaultCloudProvider = cloudprovider.KamateraProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.KamateraProviderName: return kamatera.BuildKamatera(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_kubemark.go b/cluster-autoscaler/cloudprovider/builder/builder_kubemark.go index 5ad33d38c357..a8ee0fcc1e8a 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_kubemark.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_kubemark.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/kubemark" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for Kubemark-only build is Kubemark. const DefaultCloudProvider = cloudprovider.KubemarkProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.KubemarkProviderName: return kubemark.BuildKubemark(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_linode.go b/cluster-autoscaler/cloudprovider/builder/builder_linode.go index cb3856a06ae8..b8af94e1f679 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_linode.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_linode.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/linode" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for linode-only build is linode. const DefaultCloudProvider = cloudprovider.LinodeProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.LinodeProviderName: return linode.BuildLinode(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_magnum.go b/cluster-autoscaler/cloudprovider/builder/builder_magnum.go index 796987310e35..a79aaa19bdd2 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_magnum.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_magnum.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/magnum" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for OpenStack-only build is OpenStack. const DefaultCloudProvider = cloudprovider.MagnumProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.MagnumProviderName: return magnum.BuildMagnum(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_oci.go b/cluster-autoscaler/cloudprovider/builder/builder_oci.go index c226384f462b..fb33f55719b4 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_oci.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_oci.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" oci "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/instancepools" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for oci-only build is oci. const DefaultCloudProvider = cloudprovider.OracleCloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.OracleCloudProviderName: return oci.BuildOCI(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_ovhcloud.go b/cluster-autoscaler/cloudprovider/builder/builder_ovhcloud.go index 413c5bbf3e59..8198a3288162 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_ovhcloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_ovhcloud.go @@ -22,6 +22,7 @@ package builder import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the OVHcloud cloud provider builder. @@ -32,7 +33,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is OVHcloud. const DefaultCloudProvider = cloudprovider.OVHcloudProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.OVHcloudProviderName: return ovhcloud.BuildOVHcloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_packet.go b/cluster-autoscaler/cloudprovider/builder/builder_packet.go index 9ff5f6cc574f..5fc36299e8c5 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_packet.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_packet.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/equinixmetal" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -34,7 +35,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for Packet-only build is Packet. const DefaultCloudProvider = cloudprovider.EquinixMetalProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.PacketProviderName, cloudprovider.EquinixMetalProviderName: return equinixmetal.BuildCloudProvider(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_rancher.go b/cluster-autoscaler/cloudprovider/builder/builder_rancher.go index ee8019e21dce..ba240e62e954 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_rancher.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_rancher.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/rancher" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for rancher-only build is rancher. const DefaultCloudProvider = cloudprovider.RancherProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.RancherProviderName: return rancher.BuildRancher(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_scaleway.go b/cluster-autoscaler/cloudprovider/builder/builder_scaleway.go index 558fb3e0af76..e52f78ccbf2e 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_scaleway.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_scaleway.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/scaleway" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the scaleway cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for do-only build is Scaleway. const DefaultCloudProvider = cloudprovider.ScalewayProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.ScalewayProviderName: return scaleway.BuildScaleway(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go b/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go index f8c8e9f19a3f..3d190e270e60 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_tencentcloud.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/tencentcloud" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider is TKE. const DefaultCloudProvider = cloudprovider.TkeProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.TencentcloudProviderName: return tencentcloud.BuildTencentcloud(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_volcengine.go b/cluster-autoscaler/cloudprovider/builder/builder_volcengine.go index 78e728dd1d17..4be39817f923 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_volcengine.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_volcengine.go @@ -23,6 +23,7 @@ import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/volcengine" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -33,7 +34,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for volcengine-only build is volcengine. const DefaultCloudProvider = cloudprovider.VolcengineProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.VolcengineProviderName: return volcengine.BuildVolcengine(opts, do, rl) diff --git a/cluster-autoscaler/cloudprovider/builder/builder_vultr.go b/cluster-autoscaler/cloudprovider/builder/builder_vultr.go index e6c20b814031..da98eb363c0e 100644 --- a/cluster-autoscaler/cloudprovider/builder/builder_vultr.go +++ b/cluster-autoscaler/cloudprovider/builder/builder_vultr.go @@ -22,6 +22,7 @@ package builder import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/config" + "k8s.io/client-go/informers" ) // AvailableCloudProviders supported by the cloud provider builder. @@ -32,7 +33,7 @@ var AvailableCloudProviders = []string{ // DefaultCloudProvider for linode-only build is linode. const DefaultCloudProvider = cloudprovider.VultrProviderName -func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { +func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, _ informers.SharedInformerFactory) cloudprovider.CloudProvider { switch opts.CloudProviderName { case cloudprovider.VultrProviderName: return vultr.BuildLinode(opts, do, rl) From 4ffc3ff840034355bd2ce51077aa0bf2f98785b5 Mon Sep 17 00:00:00 2001 From: Anish Shah Date: Thu, 15 Feb 2024 14:27:37 -0800 Subject: [PATCH 03/44] CA: GCE: add pricing for new Z3 machines --- cluster-autoscaler/cloudprovider/gce/gce_price_info.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go index 5763c7cb02cc..ad0e3fa4e8af 100644 --- a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go +++ b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go @@ -81,6 +81,7 @@ var ( "n2": 0.031611, "n2d": 0.027502, "t2d": 0.027502, + "z3": 0.04965, } predefinedMemoryPricePerHourPerGb = map[string]float64{ "a2": 0.004237, @@ -95,6 +96,7 @@ var ( "n2": 0.004237, "n2d": 0.003686, "t2d": 0.003686, + "z3": 0.00666, } predefinedPreemptibleDiscount = map[string]float64{ "a2": 0.009483 / 0.031611, @@ -109,6 +111,7 @@ var ( "n2": 0.007650 / 0.031611, "n2d": 0.002773 / 0.027502, "t2d": 0.006655 / 0.027502, + "z3": 0.01986 / 0.04965, } customCpuPricePerHour = map[string]float64{ "e2": 0.022890, @@ -336,6 +339,8 @@ var ( "t2d-standard-32": 1.3519, "t2d-standard-48": 2.0278, "t2d-standard-60": 2.5348, + "z3-highmem-88": 13.0, + "z3-highmem-176": 22.06, } preemptiblePrices = map[string]float64{ "a2-highgpu-1g": 1.102016, @@ -513,6 +518,8 @@ var ( "t2d-standard-32": 0.3271, "t2d-standard-48": 0.4907, "t2d-standard-60": 0.6134, + "z3-highmem-88": 6.75, + "z3-highmem-176": 10.37, } gpuPrices = map[string]float64{ "nvidia-tesla-t4": 0.35, From 715e1fdbb71c358d2d14971ace3d6a2053fd43c7 Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Mon, 26 Feb 2024 12:33:15 +0200 Subject: [PATCH 04/44] docs: update outdated/deprecated taints in the examples Refactor references to taints & tolerations, replacing master key with control-plane across all the example YAMLs. Signed-off-by: Feruzjon Muyassarov --- .../examples/cluster-autoscaler-run-on-control-plane.yaml | 4 ++-- .../azure/examples/cluster-autoscaler-autodiscover.yaml | 4 ++-- .../examples/cluster-autoscaler-standard-control-plane.yaml | 4 ++-- .../azure/examples/cluster-autoscaler-standard-msi.yaml | 4 ++-- .../examples/cluster-autoscaler-vmss-control-plane.yaml | 4 ++-- .../azure/examples/cluster-autoscaler-vmss-msi.yaml | 4 ++-- .../examples/cluster-autoscaler-deployment.yaml | 6 +++--- .../hetzner/examples/cluster-autoscaler-run-on-master.yaml | 6 +++--- .../cluster-autoscaler-deployment-control-plane.yaml | 4 ++-- .../cloudprovider/magnum/examples/values-autodiscovery.yaml | 6 +++--- .../cloudprovider/magnum/examples/values-example.yaml | 6 +++--- cluster-autoscaler/cloudprovider/tencentcloud/README.md | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-run-on-control-plane.yaml b/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-run-on-control-plane.yaml index 9cda4af03e5b..1bc986ce19d5 100644 --- a/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-run-on-control-plane.yaml +++ b/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-run-on-control-plane.yaml @@ -149,9 +149,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - image: registry.k8s.io/autoscaling/cluster-autoscaler:v1.26.2 name: cluster-autoscaler diff --git a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-autodiscover.yaml b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-autodiscover.yaml index fee3dc20a305..d9652ad98043 100644 --- a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-autodiscover.yaml +++ b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-autodiscover.yaml @@ -154,9 +154,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - command: - ./cluster-autoscaler diff --git a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-control-plane.yaml b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-control-plane.yaml index b3d21d8d92a5..1a2bb5666082 100644 --- a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-control-plane.yaml +++ b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-control-plane.yaml @@ -156,9 +156,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - command: - ./cluster-autoscaler diff --git a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-msi.yaml b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-msi.yaml index 83d2bcccb7ac..3a3175972507 100644 --- a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-msi.yaml +++ b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-standard-msi.yaml @@ -154,9 +154,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - command: - ./cluster-autoscaler diff --git a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-control-plane.yaml b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-control-plane.yaml index 9161887cb4db..1a1756b5b07e 100644 --- a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-control-plane.yaml +++ b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-control-plane.yaml @@ -155,9 +155,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - image: registry.k8s.io/autoscaling/cluster-autoscaler:{{ ca_version }} imagePullPolicy: Always diff --git a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-msi.yaml b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-msi.yaml index b28a8e3c4db0..aa113b32fdfd 100644 --- a/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-msi.yaml +++ b/cluster-autoscaler/cloudprovider/azure/examples/cluster-autoscaler-vmss-msi.yaml @@ -153,9 +153,9 @@ spec: - effect: NoSchedule operator: "Equal" value: "true" - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane nodeSelector: - kubernetes.io/role: master + kubernetes.io/role: control-plane containers: - image: registry.k8s.io/autoscaling/cluster-autoscaler:{{ ca_version }} imagePullPolicy: Always diff --git a/cluster-autoscaler/cloudprovider/cherryservers/examples/cluster-autoscaler-deployment.yaml b/cluster-autoscaler/cloudprovider/cherryservers/examples/cluster-autoscaler-deployment.yaml index 183575b49c19..1cf37bc3e3f4 100644 --- a/cluster-autoscaler/cloudprovider/cherryservers/examples/cluster-autoscaler-deployment.yaml +++ b/cluster-autoscaler/cloudprovider/cherryservers/examples/cluster-autoscaler-deployment.yaml @@ -18,16 +18,16 @@ spec: spec: tolerations: - effect: NoSchedule - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane # Node affinity is used to force cluster-autoscaler to stick - # to the master node. This allows the cluster to reliably downscale + # to the macontrol-plane node. This allows the cluster to reliably downscale # to zero worker nodes when needed. affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: node-role.kubernetes.io/master + - key: node-role.kubernetes.io/control-plane operator: Exists serviceAccountName: cluster-autoscaler containers: diff --git a/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml b/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml index 496c3551d858..1dd9b9d2a8e5 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml +++ b/cluster-autoscaler/cloudprovider/hetzner/examples/cluster-autoscaler-run-on-master.yaml @@ -140,16 +140,16 @@ spec: serviceAccountName: cluster-autoscaler tolerations: - effect: NoSchedule - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane # Node affinity is used to force cluster-autoscaler to stick - # to the master node. This allows the cluster to reliably downscale + # to the control-plane node. This allows the cluster to reliably downscale # to zero worker nodes when needed. affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: node-role.kubernetes.io/master + - key: node-role.kubernetes.io/control-plane operator: Exists containers: - image: registry.k8s.io/autoscaling/cluster-autoscaler:latest # or your custom image diff --git a/cluster-autoscaler/cloudprovider/magnum/examples/cluster-autoscaler-deployment-control-plane.yaml b/cluster-autoscaler/cloudprovider/magnum/examples/cluster-autoscaler-deployment-control-plane.yaml index df3c97a45710..d507a8237394 100644 --- a/cluster-autoscaler/cloudprovider/magnum/examples/cluster-autoscaler-deployment-control-plane.yaml +++ b/cluster-autoscaler/cloudprovider/magnum/examples/cluster-autoscaler-deployment-control-plane.yaml @@ -18,7 +18,7 @@ spec: app: cluster-autoscaler spec: nodeSelector: - node-role.kubernetes.io/master: "" + node-role.kubernetes.io/control-plane: "" securityContext: runAsUser: 1001 tolerations: @@ -26,7 +26,7 @@ spec: value: "True" effect: NoSchedule - key: dedicated - value: "master" + value: "control-plane" effect: NoSchedule serviceAccountName: cluster-autoscaler-account containers: diff --git a/cluster-autoscaler/cloudprovider/magnum/examples/values-autodiscovery.yaml b/cluster-autoscaler/cloudprovider/magnum/examples/values-autodiscovery.yaml index bd2729265e8e..543dcd08b6e0 100644 --- a/cluster-autoscaler/cloudprovider/magnum/examples/values-autodiscovery.yaml +++ b/cluster-autoscaler/cloudprovider/magnum/examples/values-autodiscovery.yaml @@ -11,16 +11,16 @@ image: tag: v1.23.0 nodeSelector: - node-role.kubernetes.io/master: "" + node-role.kubernetes.io/control-plane: "" tolerations: - key: CriticalAddonsOnly value: "True" effect: NoSchedule - key: dedicated - value: "master" + value: "control-plane" effect: NoSchedule -- key: node-role.kubernetes.io/master +- key: node-role.kubernetes.io/control-plane effect: NoSchedule cloudConfigPath: /etc/kubernetes/cloud-config diff --git a/cluster-autoscaler/cloudprovider/magnum/examples/values-example.yaml b/cluster-autoscaler/cloudprovider/magnum/examples/values-example.yaml index af1e08481c22..608100c8e55b 100644 --- a/cluster-autoscaler/cloudprovider/magnum/examples/values-example.yaml +++ b/cluster-autoscaler/cloudprovider/magnum/examples/values-example.yaml @@ -12,16 +12,16 @@ image: tag: v1.23.0 nodeSelector: - node-role.kubernetes.io/master: "" + node-role.kubernetes.io/control-plane: "" tolerations: - key: CriticalAddonsOnly value: "True" effect: NoSchedule - key: dedicated - value: "master" + value: "control-plane" effect: NoSchedule -- key: node-role.kubernetes.io/master +- key: node-role.kubernetes.io/control-plane effect: NoSchedule cloudConfigPath: "/etc/kubernetes/cloud-config" diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/README.md b/cluster-autoscaler/cloudprovider/tencentcloud/README.md index 6ae685a6c41f..793eaef6cbe3 100644 --- a/cluster-autoscaler/cloudprovider/tencentcloud/README.md +++ b/cluster-autoscaler/cloudprovider/tencentcloud/README.md @@ -146,7 +146,7 @@ spec: serviceAccountName: kube-admin tolerations: - effect: NoSchedule - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/control-plane volumes: - hostPath: path: /etc/localtime From bafe7cde1075633085d803abf7d5faae81ca8ea9 Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Tue, 27 Feb 2024 10:02:19 +0200 Subject: [PATCH 05/44] Add warning about vendor removal to Makefile build target Signed-off-by: Feruzjon Muyassarov --- cluster-autoscaler/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/Makefile b/cluster-autoscaler/Makefile index fb82bb2b5ee5..60dab6b0d1ce 100644 --- a/cluster-autoscaler/Makefile +++ b/cluster-autoscaler/Makefile @@ -36,7 +36,10 @@ IMAGE=$(REGISTRY)/cluster-autoscaler$(PROVIDER) export DOCKER_CLI_EXPERIMENTAL := enabled -build: build-arch-$(GOARCH) +build: + @echo "⚠️ WARNING: The vendor directory will be removed soon. \ + Please make sure your dependencies are managed via Go modules." + @$(MAKE) build-arch-$(GOARCH) build-arch-%: clean-arch-% $(ENVVAR) GOOS=$(GOOS) GOARCH=$* go build -o cluster-autoscaler-$* ${LDFLAGS_FLAG} ${TAGS_FLAG} From 3bf0226e530c10685d6b1f723fa53e96e62b5f7a Mon Sep 17 00:00:00 2001 From: Johnnie Ho Date: Mon, 26 Feb 2024 22:35:22 +0700 Subject: [PATCH 06/44] fix: add missing ephemeral-storage resource definition --- .../cloudprovider/hetzner/hetzner_node_group.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go index cdf923f28cb7..179c92a5b23a 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go +++ b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go @@ -364,10 +364,10 @@ func getMachineTypeResourceList(m *hetznerManager, instanceType string) (apiv1.R return apiv1.ResourceList{ // TODO somehow determine the actual pods that will be running - apiv1.ResourcePods: *resource.NewQuantity(defaultPodAmountsLimit, resource.DecimalSI), - apiv1.ResourceCPU: *resource.NewQuantity(int64(typeInfo.Cores), resource.DecimalSI), - apiv1.ResourceMemory: *resource.NewQuantity(int64(typeInfo.Memory*1024*1024*1024), resource.DecimalSI), - apiv1.ResourceStorage: *resource.NewQuantity(int64(typeInfo.Disk*1024*1024*1024), resource.DecimalSI), + apiv1.ResourcePods: *resource.NewQuantity(defaultPodAmountsLimit, resource.DecimalSI), + apiv1.ResourceCPU: *resource.NewQuantity(int64(typeInfo.Cores), resource.DecimalSI), + apiv1.ResourceMemory: *resource.NewQuantity(int64(typeInfo.Memory*1024*1024*1024), resource.DecimalSI), + apiv1.ResourceEphemeralStorage: *resource.NewQuantity(int64(typeInfo.Disk*1024*1024*1024), resource.DecimalSI), }, nil } From aada65745257e7668a41c758b52b5928a3d4ec05 Mon Sep 17 00:00:00 2001 From: Walid Ghallab Date: Wed, 21 Feb 2024 16:31:38 +0000 Subject: [PATCH 07/44] Add BuildTestNodeWithAllocatable test utility method. --- cluster-autoscaler/utils/test/test_utils.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cluster-autoscaler/utils/test/test_utils.go b/cluster-autoscaler/utils/test/test_utils.go index f51dbc653b78..8deb51a6a5b2 100644 --- a/cluster-autoscaler/utils/test/test_utils.go +++ b/cluster-autoscaler/utils/test/test_utils.go @@ -212,7 +212,7 @@ func TolerateGpuForPod(pod *apiv1.Pod) { } // BuildTestNode creates a node with specified capacity. -func BuildTestNode(name string, millicpu int64, mem int64) *apiv1.Node { +func BuildTestNode(name string, millicpuCapacity int64, memCapacity int64) *apiv1.Node { node := &apiv1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -229,11 +229,11 @@ func BuildTestNode(name string, millicpu int64, mem int64) *apiv1.Node { }, } - if millicpu >= 0 { - node.Status.Capacity[apiv1.ResourceCPU] = *resource.NewMilliQuantity(millicpu, resource.DecimalSI) + if millicpuCapacity >= 0 { + node.Status.Capacity[apiv1.ResourceCPU] = *resource.NewMilliQuantity(millicpuCapacity, resource.DecimalSI) } - if mem >= 0 { - node.Status.Capacity[apiv1.ResourceMemory] = *resource.NewQuantity(mem, resource.DecimalSI) + if memCapacity >= 0 { + node.Status.Capacity[apiv1.ResourceMemory] = *resource.NewQuantity(memCapacity, resource.DecimalSI) } node.Status.Allocatable = apiv1.ResourceList{} @@ -244,6 +244,13 @@ func BuildTestNode(name string, millicpu int64, mem int64) *apiv1.Node { return node } +// WithAllocatable adds specified milliCpu and memory to Allocatable of the node in-place. +func WithAllocatable(node *apiv1.Node, millicpuAllocatable, memAllocatable int64) *apiv1.Node { + node.Status.Allocatable[apiv1.ResourceCPU] = *resource.NewMilliQuantity(millicpuAllocatable, resource.DecimalSI) + node.Status.Allocatable[apiv1.ResourceMemory] = *resource.NewQuantity(memAllocatable, resource.DecimalSI) + return node +} + // AddEphemeralStorageToNode adds ephemeral storage capacity to a given node. func AddEphemeralStorageToNode(node *apiv1.Node, eph int64) *apiv1.Node { if eph >= 0 { From 0bc8dda8268fbd05d40eba49d52edafc1b4b0618 Mon Sep 17 00:00:00 2001 From: Karol Wychowaniec Date: Wed, 28 Feb 2024 11:11:23 +0000 Subject: [PATCH 08/44] Fix a bug where atomic scale-down failure could affect subsequent atomic scale-downs --- .../core/scaledown/actuation/actuator.go | 2 +- .../actuation/group_deletion_scheduler.go | 5 +- .../group_deletion_scheduler_test.go | 176 +++++++++++------- 3 files changed, 116 insertions(+), 67 deletions(-) diff --git a/cluster-autoscaler/core/scaledown/actuation/actuator.go b/cluster-autoscaler/core/scaledown/actuation/actuator.go index 482853260600..f5854385b0ef 100644 --- a/cluster-autoscaler/core/scaledown/actuation/actuator.go +++ b/cluster-autoscaler/core/scaledown/actuation/actuator.go @@ -98,7 +98,7 @@ func (a *Actuator) ClearResultsNotNewerThan(t time.Time) { // StartDeletion triggers a new deletion process. func (a *Actuator) StartDeletion(empty, drain []*apiv1.Node) (*status.ScaleDownStatus, errors.AutoscalerError) { - a.nodeDeletionScheduler.ReportMetrics() + a.nodeDeletionScheduler.ResetAndReportMetrics() deletionStartTime := time.Now() defer func() { metrics.UpdateDuration(metrics.ScaleDownNodeDeletion, time.Since(deletionStartTime)) }() diff --git a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go index 41d3e0a7b8b5..b7b583381567 100644 --- a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go +++ b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler.go @@ -60,14 +60,15 @@ func NewGroupDeletionScheduler(ctx *context.AutoscalingContext, ndt *deletiontra } } -// ReportMetrics should be invoked for GroupDeletionScheduler before each scale-down phase. -func (ds *GroupDeletionScheduler) ReportMetrics() { +// ResetAndReportMetrics should be invoked for GroupDeletionScheduler before each scale-down phase. +func (ds *GroupDeletionScheduler) ResetAndReportMetrics() { ds.Lock() defer ds.Unlock() pendingNodeDeletions := 0 for _, nodes := range ds.nodeQueue { pendingNodeDeletions += len(nodes) } + ds.failuresForGroup = map[string]bool{} // Since the nodes are deleted asynchronously, it's easier to // monitor the pending ones at the beginning of the next scale-down phase. metrics.ObservePendingNodeDeletions(pendingNodeDeletions) diff --git a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler_test.go b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler_test.go index 86d584d89c0c..cadf6ec99400 100644 --- a/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler_test.go +++ b/cluster-autoscaler/core/scaledown/actuation/group_deletion_scheduler_test.go @@ -19,6 +19,7 @@ package actuation import ( "fmt" "testing" + "time" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -38,62 +39,94 @@ import ( schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" ) +type testIteration struct { + toSchedule []*budgets.NodeGroupView + toAbort []*budgets.NodeGroupView + toScheduleAfterAbort []*budgets.NodeGroupView + wantDeleted int + wantNodeDeleteResults map[string]status.NodeDeleteResult +} + func TestScheduleDeletion(t *testing.T) { testNg := testprovider.NewTestNodeGroup("test", 100, 0, 3, true, false, "n1-standard-2", nil, nil) atomic2 := sizedNodeGroup("atomic-2", 2, true, false) atomic4 := sizedNodeGroup("atomic-4", 4, true, false) testCases := []struct { - name string - toSchedule []*budgets.NodeGroupView - toAbort []*budgets.NodeGroupView - toScheduleAfterAbort []*budgets.NodeGroupView - wantDeleted int - wantNodeDeleteResults map[string]status.NodeDeleteResult + name string + iterations []testIteration }{ { - name: "no nodes", - toSchedule: []*budgets.NodeGroupView{}, + name: "no nodes", + iterations: []testIteration{{ + toSchedule: []*budgets.NodeGroupView{}, + }}, }, { - name: "individual nodes are deleted right away", - toSchedule: generateNodeGroupViewList(testNg, 0, 3), - toAbort: generateNodeGroupViewList(testNg, 3, 6), - toScheduleAfterAbort: generateNodeGroupViewList(testNg, 6, 9), - wantDeleted: 6, - wantNodeDeleteResults: map[string]status.NodeDeleteResult{ - "test-node-3": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - "test-node-4": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - "test-node-5": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - }, + name: "individual nodes are deleted right away", + iterations: []testIteration{{ + toSchedule: generateNodeGroupViewList(testNg, 0, 3), + toAbort: generateNodeGroupViewList(testNg, 3, 6), + toScheduleAfterAbort: generateNodeGroupViewList(testNg, 6, 9), + wantDeleted: 6, + wantNodeDeleteResults: map[string]status.NodeDeleteResult{ + "test-node-3": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "test-node-4": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "test-node-5": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + }, + }}, }, { name: "whole atomic node groups deleted", - toSchedule: mergeLists( - generateNodeGroupViewList(atomic4, 0, 1), - generateNodeGroupViewList(atomic2, 0, 1), - generateNodeGroupViewList(atomic4, 1, 2), - generateNodeGroupViewList(atomic2, 1, 2), - generateNodeGroupViewList(atomic4, 2, 4), - ), - wantDeleted: 6, + iterations: []testIteration{{ + toSchedule: mergeLists( + generateNodeGroupViewList(atomic4, 0, 1), + generateNodeGroupViewList(atomic2, 0, 1), + generateNodeGroupViewList(atomic4, 1, 2), + generateNodeGroupViewList(atomic2, 1, 2), + generateNodeGroupViewList(atomic4, 2, 4), + ), + wantDeleted: 6, + }}, }, { name: "atomic node group aborted in the process", - toSchedule: mergeLists( - generateNodeGroupViewList(atomic4, 0, 1), - generateNodeGroupViewList(atomic2, 0, 1), - generateNodeGroupViewList(atomic4, 1, 2), - generateNodeGroupViewList(atomic2, 1, 2), - ), - toAbort: generateNodeGroupViewList(atomic4, 2, 3), - toScheduleAfterAbort: generateNodeGroupViewList(atomic4, 3, 4), - wantDeleted: 2, - wantNodeDeleteResults: map[string]status.NodeDeleteResult{ - "atomic-4-node-0": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - "atomic-4-node-1": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - "atomic-4-node-2": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, - "atomic-4-node-3": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + iterations: []testIteration{{ + toSchedule: mergeLists( + generateNodeGroupViewList(atomic4, 0, 1), + generateNodeGroupViewList(atomic2, 0, 1), + generateNodeGroupViewList(atomic4, 1, 2), + generateNodeGroupViewList(atomic2, 1, 2), + ), + toAbort: generateNodeGroupViewList(atomic4, 2, 3), + toScheduleAfterAbort: generateNodeGroupViewList(atomic4, 3, 4), + wantDeleted: 2, + wantNodeDeleteResults: map[string]status.NodeDeleteResult{ + "atomic-4-node-0": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-1": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-2": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-3": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + }, + }}, + }, + { + name: "atomic node group aborted, next time successful", + iterations: []testIteration{ + { + toSchedule: generateNodeGroupViewList(atomic4, 0, 2), + toAbort: generateNodeGroupViewList(atomic4, 2, 3), + toScheduleAfterAbort: generateNodeGroupViewList(atomic4, 3, 4), + wantNodeDeleteResults: map[string]status.NodeDeleteResult{ + "atomic-4-node-0": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-1": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-2": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + "atomic-4-node-3": {ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError}, + }, + }, + { + toSchedule: generateNodeGroupViewList(atomic4, 0, 4), + wantDeleted: 4, + }, }, }, } @@ -103,13 +136,6 @@ func TestScheduleDeletion(t *testing.T) { provider := testprovider.NewTestCloudProvider(nil, func(nodeGroup string, node string) error { return nil }) - for _, bucket := range append(append(tc.toSchedule, tc.toAbort...), tc.toScheduleAfterAbort...) { - bucket.Group.(*testprovider.TestNodeGroup).SetCloudProvider(provider) - provider.InsertNodeGroup(bucket.Group) - for _, node := range bucket.Nodes { - provider.AddNode(bucket.Group.Id(), node) - } - } batcher := &countingBatcher{} tracker := deletiontracker.NewNodeDeletionTracker(0) @@ -128,25 +154,47 @@ func TestScheduleDeletion(t *testing.T) { } scheduler := NewGroupDeletionScheduler(&ctx, tracker, batcher, Evictor{EvictionRetryTime: 0, PodEvictionHeadroom: DefaultPodEvictionHeadroom}) - if err := scheduleAll(tc.toSchedule, scheduler); err != nil { - t.Fatal(err) - } - for _, bucket := range tc.toAbort { - for _, node := range bucket.Nodes { - nodeDeleteResult := status.NodeDeleteResult{ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError} - scheduler.AbortNodeDeletion(node, bucket.Group.Id(), false, "simulated abort", nodeDeleteResult) + for i, ti := range tc.iterations { + allBuckets := append(append(ti.toSchedule, ti.toAbort...), ti.toScheduleAfterAbort...) + for _, bucket := range allBuckets { + bucket.Group.(*testprovider.TestNodeGroup).SetCloudProvider(provider) + provider.InsertNodeGroup(bucket.Group) + for _, node := range bucket.Nodes { + provider.AddNode(bucket.Group.Id(), node) + } } - } - if err := scheduleAll(tc.toScheduleAfterAbort, scheduler); err != nil { - t.Fatal(err) - } - if batcher.addedNodes != tc.wantDeleted { - t.Errorf("Incorrect number of deleted nodes, want %v but got %v", tc.wantDeleted, batcher.addedNodes) - } - gotDeletionResult, _ := tracker.DeletionResults() - if diff := cmp.Diff(tc.wantNodeDeleteResults, gotDeletionResult, cmpopts.EquateEmpty(), cmpopts.EquateErrors()); diff != "" { - t.Errorf("NodeDeleteResults diff (-want +got):\n%s", diff) + // ResetAndReportMetrics should be called before each scale-down phase + scheduler.ResetAndReportMetrics() + tracker.ClearResultsNotNewerThan(time.Now()) + + if err := scheduleAll(ti.toSchedule, scheduler); err != nil { + t.Fatal(err) + } + for _, bucket := range ti.toAbort { + for _, node := range bucket.Nodes { + nodeDeleteResult := status.NodeDeleteResult{ResultType: status.NodeDeleteErrorFailedToDelete, Err: cmpopts.AnyError} + scheduler.AbortNodeDeletion(node, bucket.Group.Id(), false, "simulated abort", nodeDeleteResult) + } + } + if err := scheduleAll(ti.toScheduleAfterAbort, scheduler); err != nil { + t.Fatal(err) + } + + if batcher.addedNodes != ti.wantDeleted { + t.Errorf("Incorrect number of deleted nodes in iteration %v, want %v but got %v", i, ti.wantDeleted, batcher.addedNodes) + } + gotDeletionResult, _ := tracker.DeletionResults() + if diff := cmp.Diff(ti.wantNodeDeleteResults, gotDeletionResult, cmpopts.EquateEmpty(), cmpopts.EquateErrors()); diff != "" { + t.Errorf("NodeDeleteResults diff in iteration %v (-want +got):\n%s", i, diff) + } + + for _, bucket := range allBuckets { + provider.DeleteNodeGroup(bucket.Group.Id()) + for _, node := range bucket.Nodes { + provider.DeleteNode(node) + } + } } }) } From cc7568090449e2c77835fbe41334dff1c8016931 Mon Sep 17 00:00:00 2001 From: Anish Shah Date: Sat, 2 Mar 2024 11:31:49 -0800 Subject: [PATCH 09/44] Update gce_price_info.go --- cluster-autoscaler/cloudprovider/gce/gce_price_info.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go index ad0e3fa4e8af..f47c906c91a6 100644 --- a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go +++ b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go @@ -340,7 +340,7 @@ var ( "t2d-standard-48": 2.0278, "t2d-standard-60": 2.5348, "z3-highmem-88": 13.0, - "z3-highmem-176": 22.06, + "z3-highmem-176": 22.05, } preemptiblePrices = map[string]float64{ "a2-highgpu-1g": 1.102016, @@ -518,8 +518,8 @@ var ( "t2d-standard-32": 0.3271, "t2d-standard-48": 0.4907, "t2d-standard-60": 0.6134, - "z3-highmem-88": 6.75, - "z3-highmem-176": 10.37, + "z3-highmem-88": 5.2, + "z3-highmem-176": 8.82, } gpuPrices = map[string]float64{ "nvidia-tesla-t4": 0.35, From 4944ed9609fb8f2d6d85157f18892c74d68ccffc Mon Sep 17 00:00:00 2001 From: oksanabaza Date: Thu, 22 Feb 2024 22:55:06 +0000 Subject: [PATCH 10/44] Migrate from satori/go.uuid to google/uuid --- .../alibaba-cloud-sdk-go/sdk/utils/utils.go | 7 +- cluster-autoscaler/go.mod | 5 +- cluster-autoscaler/go.sum | 6 +- .../vendor/github.com/google/uuid/.travis.yml | 9 - .../github.com/google/uuid/CHANGELOG.md | 41 +++ .../github.com/google/uuid/CONTRIBUTING.md | 16 ++ .../vendor/github.com/google/uuid/README.md | 10 +- .../vendor/github.com/google/uuid/hash.go | 6 + .../vendor/github.com/google/uuid/node_js.go | 2 +- .../vendor/github.com/google/uuid/time.go | 21 +- .../vendor/github.com/google/uuid/uuid.go | 89 ++++++- .../vendor/github.com/google/uuid/version6.go | 56 ++++ .../vendor/github.com/google/uuid/version7.go | 104 ++++++++ .../github.com/satori/go.uuid/.travis.yml | 23 -- .../vendor/github.com/satori/go.uuid/LICENSE | 20 -- .../github.com/satori/go.uuid/README.md | 65 ----- .../vendor/github.com/satori/go.uuid/codec.go | 206 --------------- .../github.com/satori/go.uuid/generator.go | 239 ------------------ .../vendor/github.com/satori/go.uuid/sql.go | 78 ------ .../vendor/github.com/satori/go.uuid/uuid.go | 161 ------------ cluster-autoscaler/vendor/modules.txt | 6 +- .../mockcontainerserviceclient/doc.go | 18 -- .../mockcontainerserviceclient/interface.go | 112 -------- 23 files changed, 335 insertions(+), 965 deletions(-) delete mode 100644 cluster-autoscaler/vendor/github.com/google/uuid/.travis.yml create mode 100644 cluster-autoscaler/vendor/github.com/google/uuid/CHANGELOG.md create mode 100644 cluster-autoscaler/vendor/github.com/google/uuid/version6.go create mode 100644 cluster-autoscaler/vendor/github.com/google/uuid/version7.go delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/.travis.yml delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/LICENSE delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/README.md delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/codec.go delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/generator.go delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/sql.go delete mode 100644 cluster-autoscaler/vendor/github.com/satori/go.uuid/uuid.go delete mode 100644 cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/doc.go delete mode 100644 cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go diff --git a/cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/utils/utils.go b/cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/utils/utils.go index 68da41409fa9..32a18e607a4a 100644 --- a/cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/utils/utils.go +++ b/cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/utils/utils.go @@ -22,7 +22,7 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/satori/go.uuid" + "github.com/google/uuid" "net/url" "reflect" "strconv" @@ -37,8 +37,9 @@ var ( // GetUUIDV4 returns uuidHex func GetUUIDV4() (uuidHex string) { - uuidV4 := uuid.NewV4() - uuidHex = hex.EncodeToString(uuidV4.Bytes()) + uuidV4 := uuid.New() + binaryUUID, _ := uuidV4.MarshalBinary() + uuidHex = hex.EncodeToString(binaryUUID) return } diff --git a/cluster-autoscaler/go.mod b/cluster-autoscaler/go.mod index 2c2823e05990..39549f7d10f9 100644 --- a/cluster-autoscaler/go.mod +++ b/cluster-autoscaler/go.mod @@ -1,6 +1,6 @@ module k8s.io/autoscaler/cluster-autoscaler -go 1.21.3 +go 1.21 require ( cloud.google.com/go/compute/metadata v0.2.3 @@ -18,14 +18,13 @@ require ( github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/google/go-querystring v1.0.0 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.6.0 github.com/jmespath/go-jmespath v0.4.0 github.com/json-iterator/go v1.1.12 github.com/onsi/ginkgo/v2 v2.13.0 github.com/onsi/gomega v1.29.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.16.0 - github.com/satori/go.uuid v1.2.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.14.0 diff --git a/cluster-autoscaler/go.sum b/cluster-autoscaler/go.sum index 6e9e8d796400..241a70e0d698 100644 --- a/cluster-autoscaler/go.sum +++ b/cluster-autoscaler/go.sum @@ -360,8 +360,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -509,8 +509,6 @@ github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8 github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/seccomp/libseccomp-golang v0.10.0 h1:aA4bp+/Zzi0BnWZ2F1wgNBs5gTpm+na2rWM6M9YjLpY= github.com/seccomp/libseccomp-golang v0.10.0/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/.travis.yml b/cluster-autoscaler/vendor/github.com/google/uuid/.travis.yml deleted file mode 100644 index d8156a60ba9b..000000000000 --- a/cluster-autoscaler/vendor/github.com/google/uuid/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go - -go: - - 1.4.3 - - 1.5.3 - - tip - -script: - - go test -v ./... diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/google/uuid/CHANGELOG.md new file mode 100644 index 000000000000..7ec5ac7ea909 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/uuid/CHANGELOG.md @@ -0,0 +1,41 @@ +# Changelog + +## [1.6.0](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) (2024-01-16) + + +### Features + +* add Max UUID constant ([#149](https://github.com/google/uuid/issues/149)) ([c58770e](https://github.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3)) + + +### Bug Fixes + +* fix typo in version 7 uuid documentation ([#153](https://github.com/google/uuid/issues/153)) ([016b199](https://github.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06)) +* Monotonicity in UUIDv7 ([#150](https://github.com/google/uuid/issues/150)) ([a2b2b32](https://github.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6)) + +## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12) + + +### Features + +* Validate UUID without creating new UUID ([#141](https://github.com/google/uuid/issues/141)) ([9ee7366](https://github.com/google/uuid/commit/9ee7366e66c9ad96bab89139418a713dc584ae29)) + +## [1.4.0](https://github.com/google/uuid/compare/v1.3.1...v1.4.0) (2023-10-26) + + +### Features + +* UUIDs slice type with Strings() convenience method ([#133](https://github.com/google/uuid/issues/133)) ([cd5fbbd](https://github.com/google/uuid/commit/cd5fbbdd02f3e3467ac18940e07e062be1f864b4)) + +### Fixes + +* Clarify that Parse's job is to parse but not necessarily validate strings. (Documents current behavior) + +## [1.3.1](https://github.com/google/uuid/compare/v1.3.0...v1.3.1) (2023-08-18) + + +### Bug Fixes + +* Use .EqualFold() to parse urn prefixed UUIDs ([#118](https://github.com/google/uuid/issues/118)) ([574e687](https://github.com/google/uuid/commit/574e6874943741fb99d41764c705173ada5293f0)) + +## Changelog diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/CONTRIBUTING.md b/cluster-autoscaler/vendor/github.com/google/uuid/CONTRIBUTING.md index 04fdf09f136b..a502fdc515ac 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/CONTRIBUTING.md +++ b/cluster-autoscaler/vendor/github.com/google/uuid/CONTRIBUTING.md @@ -2,6 +2,22 @@ We definitely welcome patches and contribution to this project! +### Tips + +Commits must be formatted according to the [Conventional Commits Specification](https://www.conventionalcommits.org). + +Always try to include a test case! If it is not possible or not necessary, +please explain why in the pull request description. + +### Releasing + +Commits that would precipitate a SemVer change, as described in the Conventional +Commits Specification, will trigger [`release-please`](https://github.com/google-github-actions/release-please-action) +to create a release candidate pull request. Once submitted, `release-please` +will create a release. + +For tips on how to work with `release-please`, see its documentation. + ### Legal requirements In order to protect both you and ourselves, you will need to sign the diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/README.md b/cluster-autoscaler/vendor/github.com/google/uuid/README.md index f765a46f9150..3e9a61889de4 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/README.md +++ b/cluster-autoscaler/vendor/github.com/google/uuid/README.md @@ -1,6 +1,6 @@ -# uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master) +# uuid The uuid package generates and inspects UUIDs based on -[RFC 4122](http://tools.ietf.org/html/rfc4122) +[RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) and DCE 1.1: Authentication and Security Services. This package is based on the github.com/pborman/uuid package (previously named @@ -9,10 +9,12 @@ a UUID is a 16 byte array rather than a byte slice. One loss due to this change is the ability to represent an invalid UUID (vs a NIL UUID). ###### Install -`go get github.com/google/uuid` +```sh +go get github.com/google/uuid +``` ###### Documentation -[![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid) +[![Go Reference](https://pkg.go.dev/badge/github.com/google/uuid.svg)](https://pkg.go.dev/github.com/google/uuid) Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/hash.go b/cluster-autoscaler/vendor/github.com/google/uuid/hash.go index b404f4bec274..dc60082d3b3b 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/hash.go +++ b/cluster-autoscaler/vendor/github.com/google/uuid/hash.go @@ -17,6 +17,12 @@ var ( NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) Nil UUID // empty UUID, all zeros + + // The Max UUID is special form of UUID that is specified to have all 128 bits set to 1. + Max = UUID{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + } ) // NewHash returns a new UUID derived from the hash of space concatenated with diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/node_js.go b/cluster-autoscaler/vendor/github.com/google/uuid/node_js.go index 24b78edc9071..b2a0bc8711b3 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/node_js.go +++ b/cluster-autoscaler/vendor/github.com/google/uuid/node_js.go @@ -7,6 +7,6 @@ package uuid // getHardwareInterface returns nil values for the JS version of the code. -// This remvoves the "net" dependency, because it is not used in the browser. +// This removes the "net" dependency, because it is not used in the browser. // Using the "net" library inflates the size of the transpiled JS code by 673k bytes. func getHardwareInterface(name string) (string, []byte) { return "", nil } diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/time.go b/cluster-autoscaler/vendor/github.com/google/uuid/time.go index e6ef06cdc87a..c351129279f3 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/time.go +++ b/cluster-autoscaler/vendor/github.com/google/uuid/time.go @@ -108,12 +108,23 @@ func setClockSequence(seq int) { } // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in -// uuid. The time is only defined for version 1 and 2 UUIDs. +// uuid. The time is only defined for version 1, 2, 6 and 7 UUIDs. func (uuid UUID) Time() Time { - time := int64(binary.BigEndian.Uint32(uuid[0:4])) - time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 - time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 - return Time(time) + var t Time + switch uuid.Version() { + case 6: + time := binary.BigEndian.Uint64(uuid[:8]) // Ignore uuid[6] version b0110 + t = Time(time) + case 7: + time := binary.BigEndian.Uint64(uuid[:8]) + t = Time((time>>16)*10000 + g1582ns100) + default: // forward compatible + time := int64(binary.BigEndian.Uint32(uuid[0:4])) + time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 + time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 + t = Time(time) + } + return t } // ClockSequence returns the clock sequence encoded in uuid. diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/uuid.go b/cluster-autoscaler/vendor/github.com/google/uuid/uuid.go index a57207aeb6fd..5232b486780d 100644 --- a/cluster-autoscaler/vendor/github.com/google/uuid/uuid.go +++ b/cluster-autoscaler/vendor/github.com/google/uuid/uuid.go @@ -56,11 +56,15 @@ func IsInvalidLengthError(err error) bool { return ok } -// Parse decodes s into a UUID or returns an error. Both the standard UUID -// forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the -// Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex -// encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. +// Parse decodes s into a UUID or returns an error if it cannot be parsed. Both +// the standard UUID forms defined in RFC 4122 +// (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) are decoded. In addition, +// Parse accepts non-standard strings such as the raw hex encoding +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx and 38 byte "Microsoft style" encodings, +// e.g. {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. Only the middle 36 bytes are +// examined in the latter case. Parse should not be used to validate strings as +// it parses non-standard encodings as indicated above. func Parse(s string) (UUID, error) { var uuid UUID switch len(s) { @@ -69,7 +73,7 @@ func Parse(s string) (UUID, error) { // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx case 36 + 9: - if strings.ToLower(s[:9]) != "urn:uuid:" { + if !strings.EqualFold(s[:9], "urn:uuid:") { return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9]) } s = s[9:] @@ -101,7 +105,8 @@ func Parse(s string) (UUID, error) { 9, 11, 14, 16, 19, 21, - 24, 26, 28, 30, 32, 34} { + 24, 26, 28, 30, 32, 34, + } { v, ok := xtob(s[x], s[x+1]) if !ok { return uuid, errors.New("invalid UUID format") @@ -117,7 +122,7 @@ func ParseBytes(b []byte) (UUID, error) { switch len(b) { case 36: // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx case 36 + 9: // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) { + if !bytes.EqualFold(b[:9], []byte("urn:uuid:")) { return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9]) } b = b[9:] @@ -145,7 +150,8 @@ func ParseBytes(b []byte) (UUID, error) { 9, 11, 14, 16, 19, 21, - 24, 26, 28, 30, 32, 34} { + 24, 26, 28, 30, 32, 34, + } { v, ok := xtob(b[x], b[x+1]) if !ok { return uuid, errors.New("invalid UUID format") @@ -180,6 +186,59 @@ func Must(uuid UUID, err error) UUID { return uuid } +// Validate returns an error if s is not a properly formatted UUID in one of the following formats: +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// It returns an error if the format is invalid, otherwise nil. +func Validate(s string) error { + switch len(s) { + // Standard UUID format + case 36: + + // UUID with "urn:uuid:" prefix + case 36 + 9: + if !strings.EqualFold(s[:9], "urn:uuid:") { + return fmt.Errorf("invalid urn prefix: %q", s[:9]) + } + s = s[9:] + + // UUID enclosed in braces + case 36 + 2: + if s[0] != '{' || s[len(s)-1] != '}' { + return fmt.Errorf("invalid bracketed UUID format") + } + s = s[1 : len(s)-1] + + // UUID without hyphens + case 32: + for i := 0; i < len(s); i += 2 { + _, ok := xtob(s[i], s[i+1]) + if !ok { + return errors.New("invalid UUID format") + } + } + + default: + return invalidLengthError{len(s)} + } + + // Check for standard UUID format + if len(s) == 36 { + if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { + return errors.New("invalid UUID format") + } + for _, x := range []int{0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} { + if _, ok := xtob(s[x], s[x+1]); !ok { + return errors.New("invalid UUID format") + } + } + } + + return nil +} + // String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // , or "" if uuid is invalid. func (uuid UUID) String() string { @@ -292,3 +351,15 @@ func DisableRandPool() { poolMu.Lock() poolPos = randPoolSize } + +// UUIDs is a slice of UUID types. +type UUIDs []UUID + +// Strings returns a string slice containing the string form of each UUID in uuids. +func (uuids UUIDs) Strings() []string { + var uuidStrs = make([]string, len(uuids)) + for i, uuid := range uuids { + uuidStrs[i] = uuid.String() + } + return uuidStrs +} diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/version6.go b/cluster-autoscaler/vendor/github.com/google/uuid/version6.go new file mode 100644 index 000000000000..339a959a7a26 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/uuid/version6.go @@ -0,0 +1,56 @@ +// Copyright 2023 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import "encoding/binary" + +// UUID version 6 is a field-compatible version of UUIDv1, reordered for improved DB locality. +// It is expected that UUIDv6 will primarily be used in contexts where there are existing v1 UUIDs. +// Systems that do not involve legacy UUIDv1 SHOULD consider using UUIDv7 instead. +// +// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#uuidv6 +// +// NewV6 returns a Version 6 UUID based on the current NodeID and clock +// sequence, and the current time. If the NodeID has not been set by SetNodeID +// or SetNodeInterface then it will be set automatically. If the NodeID cannot +// be set NewV6 set NodeID is random bits automatically . If clock sequence has not been set by +// SetClockSequence then it will be set automatically. If GetTime fails to +// return the current NewV6 returns Nil and an error. +func NewV6() (UUID, error) { + var uuid UUID + now, seq, err := GetTime() + if err != nil { + return uuid, err + } + + /* + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | time_high | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | time_mid | time_low_and_version | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |clk_seq_hi_res | clk_seq_low | node (0-1) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | node (2-5) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + + binary.BigEndian.PutUint64(uuid[0:], uint64(now)) + binary.BigEndian.PutUint16(uuid[8:], seq) + + uuid[6] = 0x60 | (uuid[6] & 0x0F) + uuid[8] = 0x80 | (uuid[8] & 0x3F) + + nodeMu.Lock() + if nodeID == zeroID { + setNodeInterface("") + } + copy(uuid[10:], nodeID[:]) + nodeMu.Unlock() + + return uuid, nil +} diff --git a/cluster-autoscaler/vendor/github.com/google/uuid/version7.go b/cluster-autoscaler/vendor/github.com/google/uuid/version7.go new file mode 100644 index 000000000000..3167b643d459 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/uuid/version7.go @@ -0,0 +1,104 @@ +// Copyright 2023 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "io" +) + +// UUID version 7 features a time-ordered value field derived from the widely +// implemented and well known Unix Epoch timestamp source, +// the number of milliseconds seconds since midnight 1 Jan 1970 UTC, leap seconds excluded. +// As well as improved entropy characteristics over versions 1 or 6. +// +// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#name-uuid-version-7 +// +// Implementations SHOULD utilize UUID version 7 over UUID version 1 and 6 if possible. +// +// NewV7 returns a Version 7 UUID based on the current time(Unix Epoch). +// Uses the randomness pool if it was enabled with EnableRandPool. +// On error, NewV7 returns Nil and an error +func NewV7() (UUID, error) { + uuid, err := NewRandom() + if err != nil { + return uuid, err + } + makeV7(uuid[:]) + return uuid, nil +} + +// NewV7FromReader returns a Version 7 UUID based on the current time(Unix Epoch). +// it use NewRandomFromReader fill random bits. +// On error, NewV7FromReader returns Nil and an error. +func NewV7FromReader(r io.Reader) (UUID, error) { + uuid, err := NewRandomFromReader(r) + if err != nil { + return uuid, err + } + + makeV7(uuid[:]) + return uuid, nil +} + +// makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6]) +// uuid[8] already has the right version number (Variant is 10) +// see function NewV7 and NewV7FromReader +func makeV7(uuid []byte) { + /* + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | unix_ts_ms | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | unix_ts_ms | ver | rand_a (12 bit seq) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |var| rand_b | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | rand_b | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + _ = uuid[15] // bounds check + + t, s := getV7Time() + + uuid[0] = byte(t >> 40) + uuid[1] = byte(t >> 32) + uuid[2] = byte(t >> 24) + uuid[3] = byte(t >> 16) + uuid[4] = byte(t >> 8) + uuid[5] = byte(t) + + uuid[6] = 0x70 | (0x0F & byte(s>>8)) + uuid[7] = byte(s) +} + +// lastV7time is the last time we returned stored as: +// +// 52 bits of time in milliseconds since epoch +// 12 bits of (fractional nanoseconds) >> 8 +var lastV7time int64 + +const nanoPerMilli = 1000000 + +// getV7Time returns the time in milliseconds and nanoseconds / 256. +// The returned (milli << 12 + seq) is guarenteed to be greater than +// (milli << 12 + seq) returned by any previous call to getV7Time. +func getV7Time() (milli, seq int64) { + timeMu.Lock() + defer timeMu.Unlock() + + nano := timeNow().UnixNano() + milli = nano / nanoPerMilli + // Sequence number is between 0 and 3906 (nanoPerMilli>>8) + seq = (nano - milli*nanoPerMilli) >> 8 + now := milli<<12 + seq + if now <= lastV7time { + now = lastV7time + 1 + milli = now >> 12 + seq = now & 0xfff + } + lastV7time = now + return milli, seq +} diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/.travis.yml b/cluster-autoscaler/vendor/github.com/satori/go.uuid/.travis.yml deleted file mode 100644 index 20dd53b8d362..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: go -sudo: false -go: - - 1.2 - - 1.3 - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - 1.8 - - 1.9 - - tip -matrix: - allow_failures: - - go: tip - fast_finish: true -before_install: - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cmd/cover -script: - - $HOME/gopath/bin/goveralls -service=travis-ci -notifications: - email: false diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/LICENSE b/cluster-autoscaler/vendor/github.com/satori/go.uuid/LICENSE deleted file mode 100644 index 926d54987029..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2013-2018 by Maxim Bublis - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/README.md b/cluster-autoscaler/vendor/github.com/satori/go.uuid/README.md deleted file mode 100644 index 7b1a722dff9f..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# UUID package for Go language - -[![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid) -[![Coverage Status](https://coveralls.io/repos/github/satori/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/satori/go.uuid) -[![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid) - -This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs. - -With 100% test coverage and benchmarks out of box. - -Supported versions: -* Version 1, based on timestamp and MAC address (RFC 4122) -* Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1) -* Version 3, based on MD5 hashing (RFC 4122) -* Version 4, based on random numbers (RFC 4122) -* Version 5, based on SHA-1 hashing (RFC 4122) - -## Installation - -Use the `go` command: - - $ go get github.com/satori/go.uuid - -## Requirements - -UUID package requires Go >= 1.2. - -## Example - -```go -package main - -import ( - "fmt" - "github.com/satori/go.uuid" -) - -func main() { - // Creating UUID Version 4 - u1 := uuid.NewV4() - fmt.Printf("UUIDv4: %s\n", u1) - - // Parsing UUID from string input - u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") - if err != nil { - fmt.Printf("Something gone wrong: %s", err) - } - fmt.Printf("Successfully parsed: %s", u2) -} -``` - -## Documentation - -[Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project. - -## Links -* [RFC 4122](http://tools.ietf.org/html/rfc4122) -* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01) - -## Copyright - -Copyright (C) 2013-2018 by Maxim Bublis . - -UUID package released under MIT License. -See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details. diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/codec.go b/cluster-autoscaler/vendor/github.com/satori/go.uuid/codec.go deleted file mode 100644 index 656892c53e07..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/codec.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -package uuid - -import ( - "bytes" - "encoding/hex" - "fmt" -) - -// FromBytes returns UUID converted from raw byte slice input. -// It will return error if the slice isn't 16 bytes long. -func FromBytes(input []byte) (u UUID, err error) { - err = u.UnmarshalBinary(input) - return -} - -// FromBytesOrNil returns UUID converted from raw byte slice input. -// Same behavior as FromBytes, but returns a Nil UUID on error. -func FromBytesOrNil(input []byte) UUID { - uuid, err := FromBytes(input) - if err != nil { - return Nil - } - return uuid -} - -// FromString returns UUID parsed from string input. -// Input is expected in a form accepted by UnmarshalText. -func FromString(input string) (u UUID, err error) { - err = u.UnmarshalText([]byte(input)) - return -} - -// FromStringOrNil returns UUID parsed from string input. -// Same behavior as FromString, but returns a Nil UUID on error. -func FromStringOrNil(input string) UUID { - uuid, err := FromString(input) - if err != nil { - return Nil - } - return uuid -} - -// MarshalText implements the encoding.TextMarshaler interface. -// The encoding is the same as returned by String. -func (u UUID) MarshalText() (text []byte, err error) { - text = []byte(u.String()) - return -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -// Following formats are supported: -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8", -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" -// "6ba7b8109dad11d180b400c04fd430c8" -// ABNF for supported UUID text representation follows: -// uuid := canonical | hashlike | braced | urn -// plain := canonical | hashlike -// canonical := 4hexoct '-' 2hexoct '-' 2hexoct '-' 6hexoct -// hashlike := 12hexoct -// braced := '{' plain '}' -// urn := URN ':' UUID-NID ':' plain -// URN := 'urn' -// UUID-NID := 'uuid' -// 12hexoct := 6hexoct 6hexoct -// 6hexoct := 4hexoct 2hexoct -// 4hexoct := 2hexoct 2hexoct -// 2hexoct := hexoct hexoct -// hexoct := hexdig hexdig -// hexdig := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | -// 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | -// 'A' | 'B' | 'C' | 'D' | 'E' | 'F' -func (u *UUID) UnmarshalText(text []byte) (err error) { - switch len(text) { - case 32: - return u.decodeHashLike(text) - case 36: - return u.decodeCanonical(text) - case 38: - return u.decodeBraced(text) - case 41: - fallthrough - case 45: - return u.decodeURN(text) - default: - return fmt.Errorf("uuid: incorrect UUID length: %s", text) - } -} - -// decodeCanonical decodes UUID string in format -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8". -func (u *UUID) decodeCanonical(t []byte) (err error) { - if t[8] != '-' || t[13] != '-' || t[18] != '-' || t[23] != '-' { - return fmt.Errorf("uuid: incorrect UUID format %s", t) - } - - src := t[:] - dst := u[:] - - for i, byteGroup := range byteGroups { - if i > 0 { - src = src[1:] // skip dash - } - _, err = hex.Decode(dst[:byteGroup/2], src[:byteGroup]) - if err != nil { - return - } - src = src[byteGroup:] - dst = dst[byteGroup/2:] - } - - return -} - -// decodeHashLike decodes UUID string in format -// "6ba7b8109dad11d180b400c04fd430c8". -func (u *UUID) decodeHashLike(t []byte) (err error) { - src := t[:] - dst := u[:] - - if _, err = hex.Decode(dst, src); err != nil { - return err - } - return -} - -// decodeBraced decodes UUID string in format -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}" or in format -// "{6ba7b8109dad11d180b400c04fd430c8}". -func (u *UUID) decodeBraced(t []byte) (err error) { - l := len(t) - - if t[0] != '{' || t[l-1] != '}' { - return fmt.Errorf("uuid: incorrect UUID format %s", t) - } - - return u.decodePlain(t[1 : l-1]) -} - -// decodeURN decodes UUID string in format -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" or in format -// "urn:uuid:6ba7b8109dad11d180b400c04fd430c8". -func (u *UUID) decodeURN(t []byte) (err error) { - total := len(t) - - urn_uuid_prefix := t[:9] - - if !bytes.Equal(urn_uuid_prefix, urnPrefix) { - return fmt.Errorf("uuid: incorrect UUID format: %s", t) - } - - return u.decodePlain(t[9:total]) -} - -// decodePlain decodes UUID string in canonical format -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8" or in hash-like format -// "6ba7b8109dad11d180b400c04fd430c8". -func (u *UUID) decodePlain(t []byte) (err error) { - switch len(t) { - case 32: - return u.decodeHashLike(t) - case 36: - return u.decodeCanonical(t) - default: - return fmt.Errorf("uuid: incorrrect UUID length: %s", t) - } -} - -// MarshalBinary implements the encoding.BinaryMarshaler interface. -func (u UUID) MarshalBinary() (data []byte, err error) { - data = u.Bytes() - return -} - -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. -// It will return error if the slice isn't 16 bytes long. -func (u *UUID) UnmarshalBinary(data []byte) (err error) { - if len(data) != Size { - err = fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data)) - return - } - copy(u[:], data) - - return -} diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/generator.go b/cluster-autoscaler/vendor/github.com/satori/go.uuid/generator.go deleted file mode 100644 index 3f2f1da2dcee..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/generator.go +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -package uuid - -import ( - "crypto/md5" - "crypto/rand" - "crypto/sha1" - "encoding/binary" - "hash" - "net" - "os" - "sync" - "time" -) - -// Difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). -const epochStart = 122192928000000000 - -var ( - global = newDefaultGenerator() - - epochFunc = unixTimeFunc - posixUID = uint32(os.Getuid()) - posixGID = uint32(os.Getgid()) -) - -// NewV1 returns UUID based on current timestamp and MAC address. -func NewV1() UUID { - return global.NewV1() -} - -// NewV2 returns DCE Security UUID based on POSIX UID/GID. -func NewV2(domain byte) UUID { - return global.NewV2(domain) -} - -// NewV3 returns UUID based on MD5 hash of namespace UUID and name. -func NewV3(ns UUID, name string) UUID { - return global.NewV3(ns, name) -} - -// NewV4 returns random generated UUID. -func NewV4() UUID { - return global.NewV4() -} - -// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. -func NewV5(ns UUID, name string) UUID { - return global.NewV5(ns, name) -} - -// Generator provides interface for generating UUIDs. -type Generator interface { - NewV1() UUID - NewV2(domain byte) UUID - NewV3(ns UUID, name string) UUID - NewV4() UUID - NewV5(ns UUID, name string) UUID -} - -// Default generator implementation. -type generator struct { - storageOnce sync.Once - storageMutex sync.Mutex - - lastTime uint64 - clockSequence uint16 - hardwareAddr [6]byte -} - -func newDefaultGenerator() Generator { - return &generator{} -} - -// NewV1 returns UUID based on current timestamp and MAC address. -func (g *generator) NewV1() UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := g.getStorage() - - binary.BigEndian.PutUint32(u[0:], uint32(timeNow)) - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - - copy(u[10:], hardwareAddr) - - u.SetVersion(V1) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV2 returns DCE Security UUID based on POSIX UID/GID. -func (g *generator) NewV2(domain byte) UUID { - u := UUID{} - - timeNow, clockSeq, hardwareAddr := g.getStorage() - - switch domain { - case DomainPerson: - binary.BigEndian.PutUint32(u[0:], posixUID) - case DomainGroup: - binary.BigEndian.PutUint32(u[0:], posixGID) - } - - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - u[9] = domain - - copy(u[10:], hardwareAddr) - - u.SetVersion(V2) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV3 returns UUID based on MD5 hash of namespace UUID and name. -func (g *generator) NewV3(ns UUID, name string) UUID { - u := newFromHash(md5.New(), ns, name) - u.SetVersion(V3) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV4 returns random generated UUID. -func (g *generator) NewV4() UUID { - u := UUID{} - g.safeRandom(u[:]) - u.SetVersion(V4) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name. -func (g *generator) NewV5(ns UUID, name string) UUID { - u := newFromHash(sha1.New(), ns, name) - u.SetVersion(V5) - u.SetVariant(VariantRFC4122) - - return u -} - -func (g *generator) initStorage() { - g.initClockSequence() - g.initHardwareAddr() -} - -func (g *generator) initClockSequence() { - buf := make([]byte, 2) - g.safeRandom(buf) - g.clockSequence = binary.BigEndian.Uint16(buf) -} - -func (g *generator) initHardwareAddr() { - interfaces, err := net.Interfaces() - if err == nil { - for _, iface := range interfaces { - if len(iface.HardwareAddr) >= 6 { - copy(g.hardwareAddr[:], iface.HardwareAddr) - return - } - } - } - - // Initialize hardwareAddr randomly in case - // of real network interfaces absence - g.safeRandom(g.hardwareAddr[:]) - - // Set multicast bit as recommended in RFC 4122 - g.hardwareAddr[0] |= 0x01 -} - -func (g *generator) safeRandom(dest []byte) { - if _, err := rand.Read(dest); err != nil { - panic(err) - } -} - -// Returns UUID v1/v2 storage state. -// Returns epoch timestamp, clock sequence, and hardware address. -func (g *generator) getStorage() (uint64, uint16, []byte) { - g.storageOnce.Do(g.initStorage) - - g.storageMutex.Lock() - defer g.storageMutex.Unlock() - - timeNow := epochFunc() - // Clock changed backwards since last UUID generation. - // Should increase clock sequence. - if timeNow <= g.lastTime { - g.clockSequence++ - } - g.lastTime = timeNow - - return timeNow, g.clockSequence, g.hardwareAddr[:] -} - -// Returns difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and current time. -// This is default epoch calculation function. -func unixTimeFunc() uint64 { - return epochStart + uint64(time.Now().UnixNano()/100) -} - -// Returns UUID based on hashing of namespace UUID and name. -func newFromHash(h hash.Hash, ns UUID, name string) UUID { - u := UUID{} - h.Write(ns[:]) - h.Write([]byte(name)) - copy(u[:], h.Sum(nil)) - - return u -} diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/sql.go b/cluster-autoscaler/vendor/github.com/satori/go.uuid/sql.go deleted file mode 100644 index 56759d390509..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/sql.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -package uuid - -import ( - "database/sql/driver" - "fmt" -) - -// Value implements the driver.Valuer interface. -func (u UUID) Value() (driver.Value, error) { - return u.String(), nil -} - -// Scan implements the sql.Scanner interface. -// A 16-byte slice is handled by UnmarshalBinary, while -// a longer byte slice or a string is handled by UnmarshalText. -func (u *UUID) Scan(src interface{}) error { - switch src := src.(type) { - case []byte: - if len(src) == Size { - return u.UnmarshalBinary(src) - } - return u.UnmarshalText(src) - - case string: - return u.UnmarshalText([]byte(src)) - } - - return fmt.Errorf("uuid: cannot convert %T to UUID", src) -} - -// NullUUID can be used with the standard sql package to represent a -// UUID value that can be NULL in the database -type NullUUID struct { - UUID UUID - Valid bool -} - -// Value implements the driver.Valuer interface. -func (u NullUUID) Value() (driver.Value, error) { - if !u.Valid { - return nil, nil - } - // Delegate to UUID Value function - return u.UUID.Value() -} - -// Scan implements the sql.Scanner interface. -func (u *NullUUID) Scan(src interface{}) error { - if src == nil { - u.UUID, u.Valid = Nil, false - return nil - } - - // Delegate to UUID Scan function - u.Valid = true - return u.UUID.Scan(src) -} diff --git a/cluster-autoscaler/vendor/github.com/satori/go.uuid/uuid.go b/cluster-autoscaler/vendor/github.com/satori/go.uuid/uuid.go deleted file mode 100644 index a2b8e2ca2a1e..000000000000 --- a/cluster-autoscaler/vendor/github.com/satori/go.uuid/uuid.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// Package uuid provides implementation of Universally Unique Identifier (UUID). -// Supported versions are 1, 3, 4 and 5 (as specified in RFC 4122) and -// version 2 (as specified in DCE 1.1). -package uuid - -import ( - "bytes" - "encoding/hex" -) - -// Size of a UUID in bytes. -const Size = 16 - -// UUID representation compliant with specification -// described in RFC 4122. -type UUID [Size]byte - -// UUID versions -const ( - _ byte = iota - V1 - V2 - V3 - V4 - V5 -) - -// UUID layout variants. -const ( - VariantNCS byte = iota - VariantRFC4122 - VariantMicrosoft - VariantFuture -) - -// UUID DCE domains. -const ( - DomainPerson = iota - DomainGroup - DomainOrg -) - -// String parse helpers. -var ( - urnPrefix = []byte("urn:uuid:") - byteGroups = []int{8, 4, 4, 4, 12} -) - -// Nil is special form of UUID that is specified to have all -// 128 bits set to zero. -var Nil = UUID{} - -// Predefined namespace UUIDs. -var ( - NamespaceDNS = Must(FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) - NamespaceURL = Must(FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8")) - NamespaceOID = Must(FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) - NamespaceX500 = Must(FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) -) - -// Equal returns true if u1 and u2 equals, otherwise returns false. -func Equal(u1 UUID, u2 UUID) bool { - return bytes.Equal(u1[:], u2[:]) -} - -// Version returns algorithm version used to generate UUID. -func (u UUID) Version() byte { - return u[6] >> 4 -} - -// Variant returns UUID layout variant. -func (u UUID) Variant() byte { - switch { - case (u[8] >> 7) == 0x00: - return VariantNCS - case (u[8] >> 6) == 0x02: - return VariantRFC4122 - case (u[8] >> 5) == 0x06: - return VariantMicrosoft - case (u[8] >> 5) == 0x07: - fallthrough - default: - return VariantFuture - } -} - -// Bytes returns bytes slice representation of UUID. -func (u UUID) Bytes() []byte { - return u[:] -} - -// Returns canonical string representation of UUID: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. -func (u UUID) String() string { - buf := make([]byte, 36) - - hex.Encode(buf[0:8], u[0:4]) - buf[8] = '-' - hex.Encode(buf[9:13], u[4:6]) - buf[13] = '-' - hex.Encode(buf[14:18], u[6:8]) - buf[18] = '-' - hex.Encode(buf[19:23], u[8:10]) - buf[23] = '-' - hex.Encode(buf[24:], u[10:]) - - return string(buf) -} - -// SetVersion sets version bits. -func (u *UUID) SetVersion(v byte) { - u[6] = (u[6] & 0x0f) | (v << 4) -} - -// SetVariant sets variant bits. -func (u *UUID) SetVariant(v byte) { - switch v { - case VariantNCS: - u[8] = (u[8]&(0xff>>1) | (0x00 << 7)) - case VariantRFC4122: - u[8] = (u[8]&(0xff>>2) | (0x02 << 6)) - case VariantMicrosoft: - u[8] = (u[8]&(0xff>>3) | (0x06 << 5)) - case VariantFuture: - fallthrough - default: - u[8] = (u[8]&(0xff>>3) | (0x07 << 5)) - } -} - -// Must is a helper that wraps a call to a function returning (UUID, error) -// and panics if the error is non-nil. It is intended for use in variable -// initializations such as -// var packageUUID = uuid.Must(uuid.FromString("123e4567-e89b-12d3-a456-426655440000")); -func Must(u UUID, err error) UUID { - if err != nil { - panic(err) - } - return u -} diff --git a/cluster-autoscaler/vendor/modules.txt b/cluster-autoscaler/vendor/modules.txt index 357b69415bbe..80fc5744175c 100644 --- a/cluster-autoscaler/vendor/modules.txt +++ b/cluster-autoscaler/vendor/modules.txt @@ -415,7 +415,7 @@ github.com/google/s2a-go/internal/v2/remotesigner github.com/google/s2a-go/internal/v2/tlsconfigstore github.com/google/s2a-go/retry github.com/google/s2a-go/stream -# github.com/google/uuid v1.3.0 +# github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid # github.com/googleapis/enterprise-certificate-proxy v0.2.3 @@ -607,9 +607,6 @@ github.com/prometheus/procfs/internal/util # github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 ## explicit github.com/rubiojr/go-vhd/vhd -# github.com/satori/go.uuid v1.2.0 -## explicit -github.com/satori/go.uuid # github.com/seccomp/libseccomp-golang v0.10.0 ## explicit; go 1.14 github.com/seccomp/libseccomp-golang @@ -2201,7 +2198,6 @@ sigs.k8s.io/cloud-provider-azure/pkg/azureclients sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient sigs.k8s.io/cloud-provider-azure/pkg/azureclients/blobclient sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient -sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/doc.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/doc.go deleted file mode 100644 index b9fa86d429f4..000000000000 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -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 mockcontainerserviceclient implements the mock client for azure container service. -package mockcontainerserviceclient // import "sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient" diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go deleted file mode 100644 index 6ea6b15d092e..000000000000 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go +++ /dev/null @@ -1,112 +0,0 @@ -// /* -// Copyright The Kubernetes Authors. -// -// 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 MockGen. DO NOT EDIT. -// Source: pkg/azureclients/containerserviceclient/interface.go - -// Package mockcontainerserviceclient is a generated GoMock package. -package mockcontainerserviceclient - -import ( - context "context" - reflect "reflect" - - containerservice "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice" - gomock "github.com/golang/mock/gomock" - retry "sigs.k8s.io/cloud-provider-azure/pkg/retry" -) - -// MockInterface is a mock of Interface interface. -type MockInterface struct { - ctrl *gomock.Controller - recorder *MockInterfaceMockRecorder -} - -// MockInterfaceMockRecorder is the mock recorder for MockInterface. -type MockInterfaceMockRecorder struct { - mock *MockInterface -} - -// NewMockInterface creates a new mock instance. -func NewMockInterface(ctrl *gomock.Controller) *MockInterface { - mock := &MockInterface{ctrl: ctrl} - mock.recorder = &MockInterfaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { - return m.recorder -} - -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, managedClusterName string, parameters containerservice.ManagedCluster, etag string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, managedClusterName, parameters, etag) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, managedClusterName, parameters, etag interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, managedClusterName, parameters, etag) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, managedClusterName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, managedClusterName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, managedClusterName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, managedClusterName) -} - -// Get mocks base method. -func (m *MockInterface) Get(ctx context.Context, resourceGroupName, managedClusterName string) (containerservice.ManagedCluster, *retry.Error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, managedClusterName) - ret0, _ := ret[0].(containerservice.ManagedCluster) - ret1, _ := ret[1].(*retry.Error) - return ret0, ret1 -} - -// Get indicates an expected call of Get. -func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, managedClusterName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, managedClusterName) -} - -// List mocks base method. -func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]containerservice.ManagedCluster, *retry.Error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) - ret0, _ := ret[0].([]containerservice.ManagedCluster) - ret1, _ := ret[1].(*retry.Error) - return ret0, ret1 -} - -// List indicates an expected call of List. -func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) -} From 2bf403effc83738416f02a136ab3a2b0bcf5e825 Mon Sep 17 00:00:00 2001 From: Vijay Bhargav Eshappa Date: Sun, 3 Mar 2024 22:45:48 +0530 Subject: [PATCH 11/44] Delay force refresh by DefaultInterval when OCI GetNodePool call returns 404 --- .../cloudprovider/oci/nodepools/cache.go | 33 ++++++++++++------- .../oci/nodepools/oci_manager.go | 13 +++++--- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/oci/nodepools/cache.go b/cluster-autoscaler/cloudprovider/oci/nodepools/cache.go index c4a5a2412b13..d6758e55577d 100644 --- a/cluster-autoscaler/cloudprovider/oci/nodepools/cache.go +++ b/cluster-autoscaler/cloudprovider/oci/nodepools/cache.go @@ -40,24 +40,33 @@ func (c *nodePoolCache) nodePools() map[string]*oke.NodePool { return result } -func (c *nodePoolCache) rebuild(staticNodePools map[string]NodePool) error { +func (c *nodePoolCache) rebuild(staticNodePools map[string]NodePool, maxGetNodepoolRetries int) (httpStatusCode int, err error) { klog.Infof("rebuilding cache") + var resp oke.GetNodePoolResponse + var statusCode int for id := range staticNodePools { - // prevent us from getting a node pool at the same time that we're performing delete actions on the node pool. - c.mu.Lock() - resp, err := c.okeClient.GetNodePool(context.Background(), oke.GetNodePoolRequest{ - NodePoolId: common.String(id), - }) - c.mu.Unlock() - + for i := 1; i <= maxGetNodepoolRetries; i++ { + // prevent us from getting a node pool at the same time that we're performing delete actions on the node pool. + c.mu.Lock() + resp, err = c.okeClient.GetNodePool(context.Background(), oke.GetNodePoolRequest{ + NodePoolId: common.String(id), + }) + c.mu.Unlock() + httpResp := resp.HTTPResponse() + statusCode = httpResp.StatusCode + if err != nil { + klog.Errorf("Failed to fetch the nodepool : %v. Retries available : %v", id, maxGetNodepoolRetries-i) + } else { + break + } + } if err != nil { - return err + klog.Errorf("Failed to fetch the nodepool : %v", id) + return statusCode, err } - c.set(&resp.NodePool) } - - return nil + return statusCode, nil } // removeInstance tries to remove the instance from the node pool. diff --git a/cluster-autoscaler/cloudprovider/oci/nodepools/oci_manager.go b/cluster-autoscaler/cloudprovider/oci/nodepools/oci_manager.go index bcb19ddddc13..a7f0b4879612 100644 --- a/cluster-autoscaler/cloudprovider/oci/nodepools/oci_manager.go +++ b/cluster-autoscaler/cloudprovider/oci/nodepools/oci_manager.go @@ -32,7 +32,8 @@ import ( ) const ( - maxAddTaintRetries = 5 + maxAddTaintRetries = 5 + maxGetNodepoolRetries = 3 ) var ( @@ -249,11 +250,15 @@ func (m *ociManagerImpl) TaintToPreventFurtherSchedulingOnRestart(nodes []*apiv1 } func (m *ociManagerImpl) forceRefresh() error { - err := m.nodePoolCache.rebuild(m.staticNodePools) + httpStatusCode, err := m.nodePoolCache.rebuild(m.staticNodePools, maxGetNodepoolRetries) if err != nil { + if httpStatusCode == 404 { + m.lastRefresh = time.Now() + klog.Errorf("Failed to fetch the nodepools. Retrying after %v", m.lastRefresh.Add(m.cfg.Global.RefreshInterval)) + return err + } return err } - m.lastRefresh = time.Now() klog.Infof("Refreshed NodePool list, next refresh after %v", m.lastRefresh.Add(m.cfg.Global.RefreshInterval)) return nil @@ -441,7 +446,7 @@ func (m *ociManagerImpl) GetNodePoolForInstance(instance ocicommon.OciRef) (Node np, found := m.staticNodePools[instance.NodePoolID] if !found { - klog.Infof("did not find node pool for reference: %+v", instance) + klog.V(4).Infof("did not find node pool for reference: %+v", instance) return nil, errInstanceNodePoolNotFound } From 6583c17dc997d82444f820e81850548d2a5f8e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Tu=C5=BCnik?= Date: Wed, 6 Mar 2024 12:16:04 +0100 Subject: [PATCH 12/44] CA: update dependencies to k8s v1.30.0-alpha.3, go1.21.8 --- builder/Dockerfile | 2 +- cluster-autoscaler/go.mod | 128 +- cluster-autoscaler/go.sum | 171 +- .../mgmt/2019-12-01/compute/CHANGELOG.md | 2 - .../mgmt/2019-12-01/compute/_meta.json | 11 - .../2019-12-01/compute/availabilitysets.go | 652 - .../compute/mgmt/2019-12-01/compute/client.go | 43 - .../2019-12-01/compute/containerservices.go | 538 - .../2019-12-01/compute/dedicatedhostgroups.go | 585 - .../mgmt/2019-12-01/compute/dedicatedhosts.go | 493 - .../2019-12-01/compute/diskencryptionsets.go | 601 - .../compute/mgmt/2019-12-01/compute/disks.go | 774 - .../compute/mgmt/2019-12-01/compute/enums.go | 1393 - .../mgmt/2019-12-01/compute/galleries.go | 580 - .../2019-12-01/compute/galleryapplications.go | 485 - .../compute/galleryapplicationversions.go | 514 - .../mgmt/2019-12-01/compute/galleryimages.go | 492 - .../compute/galleryimageversions.go | 503 - .../compute/mgmt/2019-12-01/compute/images.go | 583 - .../mgmt/2019-12-01/compute/loganalytics.go | 206 - .../compute/mgmt/2019-12-01/compute/models.go | 15500 ---- .../mgmt/2019-12-01/compute/operations.go | 98 - .../compute/proximityplacementgroups.go | 575 - .../mgmt/2019-12-01/compute/resourceskus.go | 149 - .../mgmt/2019-12-01/compute/snapshots.go | 767 - .../mgmt/2019-12-01/compute/sshpublickeys.go | 649 - .../compute/mgmt/2019-12-01/compute/usage.go | 155 - .../mgmt/2019-12-01/compute/version.go | 19 - .../compute/virtualmachineextensionimages.go | 270 - .../compute/virtualmachineextensions.go | 442 - .../compute/virtualmachineimages.go | 432 - .../compute/virtualmachineruncommands.go | 237 - .../2019-12-01/compute/virtualmachines.go | 1945 - .../virtualmachinescalesetextensions.go | 483 - .../virtualmachinescalesetrollingupgrades.go | 346 - .../compute/virtualmachinescalesets.go | 2018 - .../virtualmachinescalesetvmextensions.go | 453 - .../compute/virtualmachinescalesetvms.go | 1341 - .../2019-12-01/compute/virtualmachinesizes.go | 114 - .../2019-05-01/containerregistry/CHANGELOG.md | 2 - .../2019-05-01/containerregistry/_meta.json | 11 - .../2019-05-01/containerregistry/client.go | 43 - .../2019-05-01/containerregistry/enums.go | 513 - .../2019-05-01/containerregistry/models.go | 5094 -- .../containerregistry/operations.go | 140 - .../containerregistry/registries.go | 1255 - .../containerregistry/replications.go | 542 - .../mgmt/2019-05-01/containerregistry/runs.go | 529 - .../2019-05-01/containerregistry/tasks.go | 646 - .../2019-05-01/containerregistry/version.go | 19 - .../2019-05-01/containerregistry/webhooks.go | 866 - .../2020-04-01/containerservice/CHANGELOG.md | 2 - .../2020-04-01/containerservice/_meta.json | 11 - .../2020-04-01/containerservice/agentpools.go | 608 - .../2020-04-01/containerservice/client.go | 43 - .../containerservice/containerservices.go | 621 - .../mgmt/2020-04-01/containerservice/enums.go | 702 - .../containerservice/managedclusters.go | 1380 - .../2020-04-01/containerservice/models.go | 3404 - .../openshiftmanagedclusters.go | 619 - .../2020-04-01/containerservice/operations.go | 98 - .../2020-04-01/containerservice/version.go | 19 - .../mgmt/2019-06-01/network/CHANGELOG.md | 2 - .../mgmt/2019-06-01/network/_meta.json | 11 - .../2019-06-01/network/applicationgateways.go | 1476 - .../network/applicationsecuritygroups.go | 580 - .../network/availabledelegations.go | 148 - .../network/availableendpointservices.go | 148 - .../network/availableprivateendpointtypes.go | 267 - .../availableresourcegroupdelegations.go | 151 - .../network/azurefirewallfqdntags.go | 145 - .../mgmt/2019-06-01/network/azurefirewalls.go | 577 - .../mgmt/2019-06-01/network/bastionhosts.go | 579 - .../network/bgpservicecommunities.go | 145 - .../network/mgmt/2019-06-01/network/client.go | 200 - .../2019-06-01/network/connectionmonitors.go | 683 - .../2019-06-01/network/ddoscustompolicies.go | 351 - .../2019-06-01/network/ddosprotectionplans.go | 583 - .../network/defaultsecurityrules.go | 228 - .../network/mgmt/2019-06-01/network/enums.go | 2076 - .../expressroutecircuitauthorizations.go | 396 - .../network/expressroutecircuitconnections.go | 403 - .../network/expressroutecircuitpeerings.go | 406 - .../network/expressroutecircuits.go | 985 - .../network/expressrouteconnections.go | 359 - .../expressroutecrossconnectionpeerings.go | 407 - .../network/expressroutecrossconnections.go | 754 - .../network/expressroutegateways.go | 423 - .../2019-06-01/network/expressroutelinks.go | 228 - .../2019-06-01/network/expressrouteports.go | 580 - .../network/expressrouteportslocations.go | 221 - .../network/expressrouteserviceproviders.go | 145 - .../2019-06-01/network/firewallpolicies.go | 581 - .../network/firewallpolicyrulegroups.go | 406 - .../network/hubvirtualnetworkconnections.go | 228 - .../2019-06-01/network/inboundnatrules.go | 416 - .../network/interfaceipconfigurations.go | 228 - .../network/interfaceloadbalancers.go | 150 - .../2019-06-01/network/interfacesgroup.go | 1277 - .../network/interfacetapconfigurations.go | 429 - .../loadbalancerbackendaddresspools.go | 228 - .../loadbalancerfrontendipconfigurations.go | 229 - .../network/loadbalancerloadbalancingrules.go | 228 - .../network/loadbalancernetworkinterfaces.go | 150 - .../network/loadbalanceroutboundrules.go | 228 - .../2019-06-01/network/loadbalancerprobes.go | 228 - .../mgmt/2019-06-01/network/loadbalancers.go | 582 - .../network/localnetworkgateways.go | 493 - .../network/mgmt/2019-06-01/network/models.go | 37163 ---------- .../mgmt/2019-06-01/network/natgateways.go | 579 - .../mgmt/2019-06-01/network/operations.go | 140 - .../mgmt/2019-06-01/network/p2svpngateways.go | 741 - .../network/p2svpnserverconfigurations.go | 394 - .../mgmt/2019-06-01/network/packetcaptures.go | 520 - .../peerexpressroutecircuitconnections.go | 233 - .../2019-06-01/network/privateendpoints.go | 501 - .../2019-06-01/network/privatelinkservices.go | 1063 - .../mgmt/2019-06-01/network/profiles.go | 576 - .../2019-06-01/network/publicipaddresses.go | 927 - .../2019-06-01/network/publicipprefixes.go | 583 - .../network/resourcenavigationlinks.go | 110 - .../2019-06-01/network/routefilterrules.go | 489 - .../mgmt/2019-06-01/network/routefilters.go | 586 - .../network/mgmt/2019-06-01/network/routes.go | 391 - .../mgmt/2019-06-01/network/routetables.go | 582 - .../mgmt/2019-06-01/network/securitygroups.go | 582 - .../mgmt/2019-06-01/network/securityrules.go | 391 - .../network/serviceassociationlinks.go | 110 - .../network/serviceendpointpolicies.go | 583 - .../serviceendpointpolicydefinitions.go | 393 - .../mgmt/2019-06-01/network/servicetags.go | 107 - .../mgmt/2019-06-01/network/subnets.go | 563 - .../network/mgmt/2019-06-01/network/usages.go | 154 - .../mgmt/2019-06-01/network/version.go | 19 - .../mgmt/2019-06-01/network/virtualhubs.go | 579 - .../virtualnetworkgatewayconnections.go | 743 - .../network/virtualnetworkgateways.go | 1653 - .../network/virtualnetworkpeerings.go | 393 - .../2019-06-01/network/virtualnetworks.go | 778 - .../2019-06-01/network/virtualnetworktaps.go | 611 - .../mgmt/2019-06-01/network/virtualwans.go | 579 - .../mgmt/2019-06-01/network/vpnconnections.go | 393 - .../mgmt/2019-06-01/network/vpngateways.go | 658 - .../2019-06-01/network/vpnlinkconnections.go | 152 - .../network/vpnsitelinkconnections.go | 112 - .../mgmt/2019-06-01/network/vpnsitelinks.go | 227 - .../mgmt/2019-06-01/network/vpnsites.go | 579 - .../network/vpnsitesconfiguration.go | 120 - .../mgmt/2019-06-01/network/watchers.go | 1560 - .../network/webapplicationfirewallpolicies.go | 513 - .../mgmt/2019-06-01/storage/CHANGELOG.md | 2 - .../mgmt/2019-06-01/storage/_meta.json | 11 - .../mgmt/2019-06-01/storage/accounts.go | 1398 - .../mgmt/2019-06-01/storage/blobcontainers.go | 1437 - .../mgmt/2019-06-01/storage/blobservices.go | 336 - .../storage/mgmt/2019-06-01/storage/client.go | 43 - .../2019-06-01/storage/encryptionscopes.go | 469 - .../storage/mgmt/2019-06-01/storage/enums.go | 784 - .../mgmt/2019-06-01/storage/fileservices.go | 323 - .../mgmt/2019-06-01/storage/fileshares.go | 689 - .../2019-06-01/storage/managementpolicies.go | 316 - .../storage/mgmt/2019-06-01/storage/models.go | 4491 -- .../storage/objectreplicationpolicies.go | 417 - .../mgmt/2019-06-01/storage/operations.go | 98 - .../storage/privateendpointconnections.go | 411 - .../storage/privatelinkresources.go | 124 - .../storage/mgmt/2019-06-01/storage/queue.go | 571 - .../mgmt/2019-06-01/storage/queueservices.go | 313 - .../storage/mgmt/2019-06-01/storage/skus.go | 109 - .../storage/mgmt/2019-06-01/storage/table.go | 556 - .../mgmt/2019-06-01/storage/tableservices.go | 313 - .../storage/mgmt/2019-06-01/storage/usages.go | 112 - .../mgmt/2019-06-01/storage/version.go | 19 - .../vendor/github.com/go-logr/logr/README.md | 73 +- .../tee.go => go-logr/logr/context.go} | 34 +- .../github.com/go-logr/logr/context_noslog.go | 49 + .../github.com/go-logr/logr/context_slog.go | 83 + .../github.com/go-logr/logr/funcr/funcr.go | 185 +- .../github.com/go-logr/logr/funcr/slogsink.go | 105 + .../vendor/github.com/go-logr/logr/logr.go | 43 - .../go-logr/logr/{slogr => }/sloghandler.go | 98 +- .../vendor/github.com/go-logr/logr/slogr.go | 100 + .../github.com/go-logr/logr/slogr/slogr.go | 77 +- .../go-logr/logr/{slogr => }/slogsink.go | 24 +- .../github.com/go-logr/zapr/.golangci.yaml | 20 + .../vendor/github.com/go-logr/zapr/README.md | 39 +- .../github.com/go-logr/zapr/slogzapr.go | 183 + .../vendor/github.com/go-logr/zapr/zapr.go | 15 +- .../path.go => go-logr/zapr/zapr_noslog.go} | 36 +- .../github.com/go-logr/zapr/zapr_slog.go | 48 + .../github.com/mrunalp/fileutils/fileutils.go | 11 +- .../github.com/mrunalp/fileutils/idtools.go | 3 + .../github.com/onsi/ginkgo/v2/CHANGELOG.md | 61 + .../ginkgo/internal/profiles_and_reports.go | 4 +- .../ginkgo/v2/ginkgo/internal/test_suite.go | 9 +- .../onsi/ginkgo/v2/ginkgo/outline/ginkgo.go | 3 +- .../onsi/ginkgo/v2/ginkgo/outline/import.go | 9 +- .../ginkgo/v2/ginkgo/watch/dependencies.go | 2 +- .../ginkgo/v2/ginkgo/watch/package_hash.go | 4 +- .../github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go | 110 +- .../v2/internal/output_interceptor_wasm.go | 7 + .../v2/internal/progress_report_wasm.go | 10 + .../onsi/ginkgo/v2/internal/spec_context.go | 4 +- .../onsi/ginkgo/v2/internal/suite.go | 8 +- .../onsi/ginkgo/v2/reporters/json_report.go | 6 +- .../onsi/ginkgo/v2/reporters/junit_report.go | 12 + .../github.com/onsi/ginkgo/v2/table_dsl.go | 113 +- .../onsi/ginkgo/v2/types/code_location.go | 2 +- .../github.com/onsi/ginkgo/v2/types/errors.go | 9 + .../onsi/ginkgo/v2/types/version.go | 2 +- .../github.com/onsi/gomega/CHANGELOG.md | 23 + .../github.com/onsi/gomega/gomega_dsl.go | 2 +- .../onsi/gomega/internal/async_assertion.go | 7 +- .../vendor/github.com/onsi/gomega/matchers.go | 19 +- .../onsi/gomega/matchers/be_false_matcher.go | 13 +- .../onsi/gomega/matchers/be_true_matcher.go | 13 +- .../runc/libcontainer/cgroups/file.go | 34 +- .../runc/libcontainer/cgroups/fs/hugetlb.go | 36 +- .../runc/libcontainer/cgroups/fs/memory.go | 10 + .../runc/libcontainer/cgroups/fs/paths.go | 1 + .../runc/libcontainer/cgroups/fs2/hugetlb.go | 30 +- .../runc/libcontainer/cgroups/fs2/memory.go | 18 +- .../runc/libcontainer/cgroups/stats.go | 2 + .../runc/libcontainer/configs/config.go | 6 +- .../runc/libcontainer/configs/config_linux.go | 30 +- .../libcontainer/configs/validate/rootless.go | 31 +- .../configs/validate/validator.go | 12 +- .../runc/libcontainer/container_linux.go | 11 +- .../runc/libcontainer/init_linux.go | 31 + .../seccomp/patchbpf/enosys_linux.go | 2 +- .../runc/libcontainer/setns_init_linux.go | 37 +- .../runc/libcontainer/standard_init_linux.go | 19 + .../runc/libcontainer/userns/userns_maps.c | 79 + .../libcontainer/userns/userns_maps_linux.go | 186 + .../runc/libcontainer/utils/utils_unix.go | 64 +- .../vendor/github.com/rubiojr/go-vhd/LICENSE | 22 - .../github.com/rubiojr/go-vhd/vhd/util.go | 54 - .../github.com/rubiojr/go-vhd/vhd/vhd.go | 489 - .../github.com/vmware/govmomi/CONTRIBUTORS | 256 - .../github.com/vmware/govmomi/LICENSE.txt | 202 - .../github.com/vmware/govmomi/find/doc.go | 37 - .../github.com/vmware/govmomi/find/error.go | 64 - .../github.com/vmware/govmomi/find/finder.go | 1114 - .../vmware/govmomi/find/recurser.go | 253 - .../vmware/govmomi/history/collector.go | 91 - .../vmware/govmomi/internal/helpers.go | 63 - .../vmware/govmomi/internal/methods.go | 123 - .../vmware/govmomi/internal/types.go | 270 - .../govmomi/internal/version/version.go | 25 - .../github.com/vmware/govmomi/list/lister.go | 630 - .../vmware/govmomi/lookup/client.go | 159 - .../vmware/govmomi/lookup/methods/methods.go | 224 - .../vmware/govmomi/lookup/types/types.go | 412 - .../github.com/vmware/govmomi/nfc/lease.go | 233 - .../vmware/govmomi/nfc/lease_updater.go | 146 - .../govmomi/object/authorization_manager.go | 221 - .../object/authorization_manager_internal.go | 86 - .../object/cluster_compute_resource.go | 103 - .../vmware/govmomi/object/common.go | 148 - .../vmware/govmomi/object/compute_resource.go | 111 - .../govmomi/object/custom_fields_manager.go | 146 - .../object/customization_spec_manager.go | 173 - .../vmware/govmomi/object/datacenter.go | 129 - .../vmware/govmomi/object/datastore.go | 439 - .../vmware/govmomi/object/datastore_file.go | 412 - .../govmomi/object/datastore_file_manager.go | 228 - .../vmware/govmomi/object/datastore_path.go | 71 - .../vmware/govmomi/object/diagnostic_log.go | 76 - .../govmomi/object/diagnostic_manager.go | 102 - .../object/distributed_virtual_portgroup.go | 90 - .../object/distributed_virtual_switch.go | 118 - .../govmomi/object/extension_manager.go | 113 - .../vmware/govmomi/object/file_manager.go | 126 - .../vmware/govmomi/object/folder.go | 241 - .../govmomi/object/host_account_manager.go | 65 - .../govmomi/object/host_certificate_info.go | 247 - .../object/host_certificate_manager.go | 162 - .../govmomi/object/host_config_manager.go | 171 - .../govmomi/object/host_datastore_browser.go | 65 - .../govmomi/object/host_datastore_system.go | 135 - .../govmomi/object/host_date_time_system.go | 69 - .../govmomi/object/host_firewall_system.go | 181 - .../govmomi/object/host_network_system.go | 358 - .../govmomi/object/host_service_system.go | 88 - .../govmomi/object/host_storage_system.go | 200 - .../vmware/govmomi/object/host_system.go | 154 - .../object/host_virtual_nic_manager.go | 93 - .../object/host_vsan_internal_system.go | 117 - .../vmware/govmomi/object/host_vsan_system.go | 88 - .../govmomi/object/namespace_manager.go | 76 - .../vmware/govmomi/object/network.go | 54 - .../govmomi/object/network_reference.go | 31 - .../vmware/govmomi/object/opaque_network.go | 72 - .../vmware/govmomi/object/option_manager.go | 59 - .../vmware/govmomi/object/resource_pool.go | 151 - .../vmware/govmomi/object/search_index.go | 259 - .../vmware/govmomi/object/storage_pod.go | 34 - .../object/storage_resource_manager.go | 179 - .../github.com/vmware/govmomi/object/task.go | 100 - .../vmware/govmomi/object/tenant_manager.go | 78 - .../github.com/vmware/govmomi/object/types.go | 67 - .../vmware/govmomi/object/virtual_app.go | 121 - .../govmomi/object/virtual_device_list.go | 965 - .../govmomi/object/virtual_disk_manager.go | 227 - .../object/virtual_disk_manager_internal.go | 166 - .../vmware/govmomi/object/virtual_machine.go | 1082 - .../vmware_distributed_virtual_switch.go | 25 - .../github.com/vmware/govmomi/pbm/client.go | 287 - .../vmware/govmomi/pbm/methods/methods.go | 664 - .../github.com/vmware/govmomi/pbm/pbm_util.go | 148 - .../vmware/govmomi/pbm/types/enum.go | 307 - .../github.com/vmware/govmomi/pbm/types/if.go | 139 - .../vmware/govmomi/pbm/types/types.go | 1757 - .../vmware/govmomi/property/collector.go | 217 - .../vmware/govmomi/property/filter.go | 168 - .../vmware/govmomi/property/wait.go | 151 - .../vmware/govmomi/session/keep_alive.go | 40 - .../govmomi/session/keepalive/handler.go | 204 - .../vmware/govmomi/session/manager.go | 294 - .../github.com/vmware/govmomi/sts/client.go | 219 - .../vmware/govmomi/sts/internal/types.go | 694 - .../github.com/vmware/govmomi/sts/signer.go | 355 - .../github.com/vmware/govmomi/task/error.go | 33 - .../vmware/govmomi/task/history_collector.go | 89 - .../github.com/vmware/govmomi/task/manager.go | 61 - .../github.com/vmware/govmomi/task/wait.go | 143 - .../vmware/govmomi/vapi/internal/internal.go | 89 - .../vmware/govmomi/vapi/rest/client.go | 336 - .../vmware/govmomi/vapi/rest/resource.go | 114 - .../vmware/govmomi/vapi/tags/categories.go | 167 - .../vmware/govmomi/vapi/tags/errors.go | 55 - .../govmomi/vapi/tags/tag_association.go | 377 - .../vmware/govmomi/vapi/tags/tags.go | 226 - .../vmware/govmomi/view/container_view.go | 145 - .../vmware/govmomi/view/list_view.go | 62 - .../govmomi/view/managed_object_view.go | 52 - .../github.com/vmware/govmomi/view/manager.go | 69 - .../vmware/govmomi/view/task_view.go | 125 - .../github.com/vmware/govmomi/vim25/client.go | 191 - .../vmware/govmomi/vim25/debug/debug.go | 73 - .../vmware/govmomi/vim25/debug/file.go | 75 - .../vmware/govmomi/vim25/debug/log.go | 49 - .../github.com/vmware/govmomi/vim25/doc.go | 29 - .../vmware/govmomi/vim25/methods/methods.go | 18704 ----- .../govmomi/vim25/methods/service_content.go | 57 - .../govmomi/vim25/methods/unreleased.go | 44 - .../vmware/govmomi/vim25/mo/ancestors.go | 137 - .../vmware/govmomi/vim25/mo/entity.go | 24 - .../vmware/govmomi/vim25/mo/extra.go | 61 - .../github.com/vmware/govmomi/vim25/mo/mo.go | 1868 - .../vmware/govmomi/vim25/mo/reference.go | 26 - .../vmware/govmomi/vim25/mo/registry.go | 21 - .../vmware/govmomi/vim25/mo/retrieve.go | 255 - .../vmware/govmomi/vim25/mo/type_info.go | 263 - .../govmomi/vim25/progress/aggregator.go | 73 - .../vmware/govmomi/vim25/progress/doc.go | 32 - .../vmware/govmomi/vim25/progress/prefix.go | 54 - .../vmware/govmomi/vim25/progress/reader.go | 188 - .../vmware/govmomi/vim25/progress/report.go | 26 - .../vmware/govmomi/vim25/progress/scale.go | 76 - .../vmware/govmomi/vim25/progress/sinker.go | 33 - .../github.com/vmware/govmomi/vim25/retry.go | 113 - .../vmware/govmomi/vim25/soap/client.go | 891 - .../vmware/govmomi/vim25/soap/debug.go | 154 - .../vmware/govmomi/vim25/soap/error.go | 166 - .../vmware/govmomi/vim25/soap/soap.go | 49 - .../vmware/govmomi/vim25/types/base.go | 19 - .../vmware/govmomi/vim25/types/enum.go | 5547 -- .../vmware/govmomi/vim25/types/fault.go | 43 - .../vmware/govmomi/vim25/types/helpers.go | 316 - .../vmware/govmomi/vim25/types/if.go | 3561 - .../vmware/govmomi/vim25/types/registry.go | 43 - .../vmware/govmomi/vim25/types/types.go | 59412 ---------------- .../vmware/govmomi/vim25/types/unreleased.go | 121 - .../vmware/govmomi/vim25/xml/LICENSE | 27 - .../vmware/govmomi/vim25/xml/extras.go | 99 - .../vmware/govmomi/vim25/xml/marshal.go | 1066 - .../vmware/govmomi/vim25/xml/read.go | 837 - .../vmware/govmomi/vim25/xml/typeinfo.go | 377 - .../vmware/govmomi/vim25/xml/xml.go | 2056 - .../vendor/go.uber.org/atomic/.codecov.yml | 19 - .../vendor/go.uber.org/atomic/.gitignore | 15 - .../vendor/go.uber.org/atomic/CHANGELOG.md | 117 - .../vendor/go.uber.org/atomic/LICENSE.txt | 19 - .../vendor/go.uber.org/atomic/Makefile | 79 - .../vendor/go.uber.org/atomic/README.md | 63 - .../vendor/go.uber.org/atomic/bool.go | 88 - .../vendor/go.uber.org/atomic/doc.go | 23 - .../vendor/go.uber.org/atomic/duration.go | 89 - .../vendor/go.uber.org/atomic/duration_ext.go | 40 - .../vendor/go.uber.org/atomic/error.go | 62 - .../vendor/go.uber.org/atomic/error_ext.go | 39 - .../vendor/go.uber.org/atomic/float32.go | 77 - .../vendor/go.uber.org/atomic/float32_ext.go | 76 - .../vendor/go.uber.org/atomic/float64.go | 77 - .../vendor/go.uber.org/atomic/float64_ext.go | 76 - .../vendor/go.uber.org/atomic/gen.go | 27 - .../vendor/go.uber.org/atomic/int32.go | 109 - .../vendor/go.uber.org/atomic/int64.go | 109 - .../vendor/go.uber.org/atomic/nocmp.go | 35 - .../go.uber.org/atomic/pointer_go118.go | 60 - .../go.uber.org/atomic/pointer_go119.go | 61 - .../vendor/go.uber.org/atomic/string.go | 65 - .../vendor/go.uber.org/atomic/string_ext.go | 43 - .../vendor/go.uber.org/atomic/time_ext.go | 36 - .../vendor/go.uber.org/atomic/uint32.go | 109 - .../vendor/go.uber.org/atomic/uint64.go | 109 - .../vendor/go.uber.org/atomic/uintptr.go | 109 - .../go.uber.org/atomic/unsafe_pointer.go | 65 - .../vendor/go.uber.org/atomic/value.go | 31 - .../vendor/go.uber.org/zap/.golangci.yml | 77 + .../vendor/go.uber.org/zap/CHANGELOG.md | 242 +- .../vendor/go.uber.org/zap/Makefile | 87 +- .../vendor/go.uber.org/zap/README.md | 62 +- .../vendor/go.uber.org/zap/array.go | 127 + .../vendor/go.uber.org/zap/array_go118.go | 156 - .../vendor/go.uber.org/zap/buffer/buffer.go | 5 + .../vendor/go.uber.org/zap/buffer/pool.go | 20 +- .../vendor/go.uber.org/zap/config.go | 84 +- .../vendor/go.uber.org/zap/error.go | 14 +- .../vendor/go.uber.org/zap/field.go | 194 +- .../vendor/go.uber.org/zap/http_handler.go | 19 +- .../go.uber.org/zap/internal/level_enabler.go | 2 + .../bool_ext.go => zap/internal/pool/pool.go} | 49 +- .../stacktrace/stack.go} | 81 +- .../vendor/go.uber.org/zap/level.go | 9 +- .../vendor/go.uber.org/zap/logger.go | 48 +- .../vendor/go.uber.org/zap/sink.go | 5 +- .../vendor/go.uber.org/zap/sugar.go | 69 +- .../vendor/go.uber.org/zap/writer.go | 12 +- .../zap/zapcore/console_encoder.go | 14 +- .../vendor/go.uber.org/zap/zapcore/core.go | 6 +- .../vendor/go.uber.org/zap/zapcore/entry.go | 22 +- .../vendor/go.uber.org/zap/zapcore/error.go | 14 +- .../go.uber.org/zap/zapcore/json_encoder.go | 155 +- .../time.go => zap/zapcore/lazy_with.go} | 51 +- .../vendor/go.uber.org/zap/zapcore/sampler.go | 9 +- .../vendor/go.uber.org/zap/zapgrpc/zapgrpc.go | 8 +- .../x/crypto/chacha20/chacha_arm64.go | 1 - .../x/crypto/chacha20/chacha_arm64.s | 1 - .../x/crypto/chacha20/chacha_noasm.go | 1 - .../x/crypto/chacha20/chacha_ppc64le.go | 1 - .../x/crypto/chacha20/chacha_ppc64le.s | 1 - .../x/crypto/chacha20/chacha_s390x.go | 1 - .../x/crypto/chacha20/chacha_s390x.s | 1 - .../chacha20poly1305_amd64.go | 1 - .../chacha20poly1305/chacha20poly1305_amd64.s | 25 +- .../chacha20poly1305_noasm.go | 1 - .../golang.org/x/crypto/cryptobyte/asn1.go | 13 +- .../vendor/golang.org/x/crypto/hkdf/hkdf.go | 4 +- .../x/crypto/internal/alias/alias.go | 1 - .../x/crypto/internal/alias/alias_purego.go | 1 - .../x/crypto/internal/poly1305/bits_compat.go | 40 - .../x/crypto/internal/poly1305/bits_go1.13.go | 22 - .../x/crypto/internal/poly1305/mac_noasm.go | 1 - .../x/crypto/internal/poly1305/sum_amd64.go | 1 - .../x/crypto/internal/poly1305/sum_amd64.s | 1 - .../x/crypto/internal/poly1305/sum_generic.go | 43 +- .../x/crypto/internal/poly1305/sum_ppc64le.go | 1 - .../x/crypto/internal/poly1305/sum_ppc64le.s | 1 - .../x/crypto/internal/poly1305/sum_s390x.go | 1 - .../x/crypto/internal/poly1305/sum_s390x.s | 1 - .../x/crypto/salsa20/salsa/salsa20_amd64.go | 1 - .../x/crypto/salsa20/salsa/salsa20_amd64.s | 1 - .../x/crypto/salsa20/salsa/salsa20_noasm.go | 1 - .../vendor/golang.org/x/net/context/go17.go | 1 - .../vendor/golang.org/x/net/context/go19.go | 1 - .../golang.org/x/net/context/pre_go17.go | 1 - .../golang.org/x/net/context/pre_go19.go | 1 - .../golang.org/x/net/http2/databuffer.go | 59 +- .../vendor/golang.org/x/net/http2/go111.go | 30 - .../vendor/golang.org/x/net/http2/go115.go | 27 - .../vendor/golang.org/x/net/http2/go118.go | 17 - .../golang.org/x/net/http2/not_go111.go | 21 - .../golang.org/x/net/http2/not_go115.go | 31 - .../golang.org/x/net/http2/not_go118.go | 17 - .../vendor/golang.org/x/net/http2/server.go | 24 +- .../golang.org/x/net/http2/transport.go | 33 +- .../vendor/golang.org/x/net/idna/go118.go | 1 - .../golang.org/x/net/idna/idna10.0.0.go | 1 - .../vendor/golang.org/x/net/idna/idna9.0.0.go | 1 - .../vendor/golang.org/x/net/idna/pre_go118.go | 1 - .../golang.org/x/net/idna/tables10.0.0.go | 1 - .../golang.org/x/net/idna/tables11.0.0.go | 1 - .../golang.org/x/net/idna/tables12.0.0.go | 1 - .../golang.org/x/net/idna/tables13.0.0.go | 1 - .../golang.org/x/net/idna/tables15.0.0.go | 1 - .../golang.org/x/net/idna/tables9.0.0.go | 1 - .../golang.org/x/net/idna/trie12.0.0.go | 1 - .../golang.org/x/net/idna/trie13.0.0.go | 1 - .../x/sync/singleflight/singleflight.go | 9 + .../golang.org/x/sys/cpu/asm_aix_ppc64.s | 1 - .../vendor/golang.org/x/sys/cpu/cpu_aix.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_arm64.s | 1 - .../golang.org/x/sys/cpu/cpu_gc_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_gc_s390x.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 2 - .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 1 - .../golang.org/x/sys/cpu/cpu_gccgo_x86.c | 2 - .../golang.org/x/sys/cpu/cpu_gccgo_x86.go | 2 - .../vendor/golang.org/x/sys/cpu/cpu_linux.go | 1 - .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 2 - .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 1 - .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 2 - .../golang.org/x/sys/cpu/cpu_loong64.go | 1 - .../golang.org/x/sys/cpu/cpu_mips64x.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 1 - .../golang.org/x/sys/cpu/cpu_other_arm.go | 1 - .../golang.org/x/sys/cpu/cpu_other_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_other_mips64x.go | 2 - .../golang.org/x/sys/cpu/cpu_other_ppc64x.go | 3 - .../golang.org/x/sys/cpu/cpu_other_riscv64.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 1 - .../golang.org/x/sys/cpu/cpu_riscv64.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_s390x.s | 1 - .../vendor/golang.org/x/sys/cpu/cpu_wasm.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_x86.go | 1 - .../vendor/golang.org/x/sys/cpu/cpu_x86.s | 2 - .../vendor/golang.org/x/sys/cpu/endian_big.go | 1 - .../golang.org/x/sys/cpu/endian_little.go | 1 - .../x/sys/cpu/proc_cpuinfo_linux.go | 1 - .../x/sys/cpu/runtime_auxv_go121.go | 1 - .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 1 - .../x/sys/cpu/syscall_aix_ppc64_gc.go | 1 - .../golang.org/x/sys/execabs/execabs.go | 102 - .../golang.org/x/sys/execabs/execabs_go118.go | 18 - .../golang.org/x/sys/execabs/execabs_go119.go | 21 - .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 1 - .../golang.org/x/sys/plan9/pwd_plan9.go | 1 - .../vendor/golang.org/x/sys/plan9/race.go | 1 - .../vendor/golang.org/x/sys/plan9/race0.go | 1 - .../vendor/golang.org/x/sys/plan9/str.go | 1 - .../vendor/golang.org/x/sys/plan9/syscall.go | 1 - .../x/sys/plan9/zsyscall_plan9_386.go | 1 - .../x/sys/plan9/zsyscall_plan9_amd64.go | 1 - .../x/sys/plan9/zsyscall_plan9_arm.go | 1 - .../vendor/golang.org/x/sys/unix/aliases.go | 2 - .../golang.org/x/sys/unix/asm_aix_ppc64.s | 1 - .../golang.org/x/sys/unix/asm_bsd_386.s | 2 - .../golang.org/x/sys/unix/asm_bsd_amd64.s | 2 - .../golang.org/x/sys/unix/asm_bsd_arm.s | 2 - .../golang.org/x/sys/unix/asm_bsd_arm64.s | 2 - .../golang.org/x/sys/unix/asm_bsd_ppc64.s | 2 - .../golang.org/x/sys/unix/asm_bsd_riscv64.s | 2 - .../golang.org/x/sys/unix/asm_linux_386.s | 1 - .../golang.org/x/sys/unix/asm_linux_amd64.s | 1 - .../golang.org/x/sys/unix/asm_linux_arm.s | 1 - .../golang.org/x/sys/unix/asm_linux_arm64.s | 3 - .../golang.org/x/sys/unix/asm_linux_loong64.s | 3 - .../golang.org/x/sys/unix/asm_linux_mips64x.s | 3 - .../golang.org/x/sys/unix/asm_linux_mipsx.s | 3 - .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 3 - .../golang.org/x/sys/unix/asm_linux_riscv64.s | 2 - .../golang.org/x/sys/unix/asm_linux_s390x.s | 3 - .../x/sys/unix/asm_openbsd_mips64.s | 1 - .../golang.org/x/sys/unix/asm_solaris_amd64.s | 1 - .../golang.org/x/sys/unix/asm_zos_s390x.s | 3 - .../golang.org/x/sys/unix/cap_freebsd.go | 1 - .../vendor/golang.org/x/sys/unix/constants.go | 1 - .../golang.org/x/sys/unix/dev_aix_ppc.go | 1 - .../golang.org/x/sys/unix/dev_aix_ppc64.go | 1 - .../vendor/golang.org/x/sys/unix/dev_zos.go | 1 - .../vendor/golang.org/x/sys/unix/dirent.go | 1 - .../golang.org/x/sys/unix/endian_big.go | 1 - .../golang.org/x/sys/unix/endian_little.go | 1 - .../vendor/golang.org/x/sys/unix/env_unix.go | 1 - .../vendor/golang.org/x/sys/unix/epoll_zos.go | 1 - .../vendor/golang.org/x/sys/unix/fcntl.go | 3 +- .../x/sys/unix/fcntl_linux_32bit.go | 1 - .../vendor/golang.org/x/sys/unix/fdset.go | 1 - .../golang.org/x/sys/unix/fstatfs_zos.go | 1 - .../vendor/golang.org/x/sys/unix/gccgo.go | 1 - .../vendor/golang.org/x/sys/unix/gccgo_c.c | 1 - .../x/sys/unix/gccgo_linux_amd64.go | 1 - .../golang.org/x/sys/unix/ifreq_linux.go | 1 - .../golang.org/x/sys/unix/ioctl_linux.go | 5 + .../golang.org/x/sys/unix/ioctl_signed.go | 1 - .../golang.org/x/sys/unix/ioctl_unsigned.go | 1 - .../vendor/golang.org/x/sys/unix/ioctl_zos.go | 1 - .../vendor/golang.org/x/sys/unix/mkerrors.sh | 43 +- .../golang.org/x/sys/unix/mmap_nomremap.go | 1 - .../vendor/golang.org/x/sys/unix/mremap.go | 1 - .../golang.org/x/sys/unix/pagesize_unix.go | 1 - .../golang.org/x/sys/unix/pledge_openbsd.go | 92 +- .../golang.org/x/sys/unix/ptrace_darwin.go | 1 - .../golang.org/x/sys/unix/ptrace_ios.go | 1 - .../vendor/golang.org/x/sys/unix/race.go | 1 - .../vendor/golang.org/x/sys/unix/race0.go | 1 - .../x/sys/unix/readdirent_getdents.go | 1 - .../x/sys/unix/readdirent_getdirentries.go | 1 - .../golang.org/x/sys/unix/sockcmsg_unix.go | 1 - .../x/sys/unix/sockcmsg_unix_other.go | 1 - .../vendor/golang.org/x/sys/unix/syscall.go | 1 - .../golang.org/x/sys/unix/syscall_aix.go | 4 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 1 - .../x/sys/unix/syscall_aix_ppc64.go | 1 - .../golang.org/x/sys/unix/syscall_bsd.go | 3 +- .../x/sys/unix/syscall_darwin_amd64.go | 1 - .../x/sys/unix/syscall_darwin_arm64.go | 1 - .../x/sys/unix/syscall_darwin_libSystem.go | 1 - .../x/sys/unix/syscall_dragonfly_amd64.go | 1 - .../x/sys/unix/syscall_freebsd_386.go | 1 - .../x/sys/unix/syscall_freebsd_amd64.go | 1 - .../x/sys/unix/syscall_freebsd_arm.go | 1 - .../x/sys/unix/syscall_freebsd_arm64.go | 1 - .../x/sys/unix/syscall_freebsd_riscv64.go | 1 - .../golang.org/x/sys/unix/syscall_hurd.go | 1 - .../golang.org/x/sys/unix/syscall_hurd_386.go | 1 - .../golang.org/x/sys/unix/syscall_illumos.go | 1 - .../golang.org/x/sys/unix/syscall_linux.go | 33 +- .../x/sys/unix/syscall_linux_386.go | 1 - .../x/sys/unix/syscall_linux_alarm.go | 2 - .../x/sys/unix/syscall_linux_amd64.go | 1 - .../x/sys/unix/syscall_linux_amd64_gc.go | 1 - .../x/sys/unix/syscall_linux_arm.go | 1 - .../x/sys/unix/syscall_linux_arm64.go | 1 - .../golang.org/x/sys/unix/syscall_linux_gc.go | 1 - .../x/sys/unix/syscall_linux_gc_386.go | 1 - .../x/sys/unix/syscall_linux_gc_arm.go | 1 - .../x/sys/unix/syscall_linux_gccgo_386.go | 1 - .../x/sys/unix/syscall_linux_gccgo_arm.go | 1 - .../x/sys/unix/syscall_linux_loong64.go | 1 - .../x/sys/unix/syscall_linux_mips64x.go | 2 - .../x/sys/unix/syscall_linux_mipsx.go | 2 - .../x/sys/unix/syscall_linux_ppc.go | 1 - .../x/sys/unix/syscall_linux_ppc64x.go | 2 - .../x/sys/unix/syscall_linux_riscv64.go | 1 - .../x/sys/unix/syscall_linux_s390x.go | 1 - .../x/sys/unix/syscall_linux_sparc64.go | 1 - .../x/sys/unix/syscall_netbsd_386.go | 1 - .../x/sys/unix/syscall_netbsd_amd64.go | 1 - .../x/sys/unix/syscall_netbsd_arm.go | 1 - .../x/sys/unix/syscall_netbsd_arm64.go | 1 - .../golang.org/x/sys/unix/syscall_openbsd.go | 28 +- .../x/sys/unix/syscall_openbsd_386.go | 1 - .../x/sys/unix/syscall_openbsd_amd64.go | 1 - .../x/sys/unix/syscall_openbsd_arm.go | 1 - .../x/sys/unix/syscall_openbsd_arm64.go | 1 - .../x/sys/unix/syscall_openbsd_libc.go | 1 - .../x/sys/unix/syscall_openbsd_ppc64.go | 1 - .../x/sys/unix/syscall_openbsd_riscv64.go | 1 - .../golang.org/x/sys/unix/syscall_solaris.go | 5 +- .../x/sys/unix/syscall_solaris_amd64.go | 1 - .../golang.org/x/sys/unix/syscall_unix.go | 1 - .../golang.org/x/sys/unix/syscall_unix_gc.go | 2 - .../x/sys/unix/syscall_unix_gc_ppc64x.go | 3 - .../x/sys/unix/syscall_zos_s390x.go | 3 +- .../golang.org/x/sys/unix/sysvshm_linux.go | 1 - .../golang.org/x/sys/unix/sysvshm_unix.go | 1 - .../x/sys/unix/sysvshm_unix_other.go | 1 - .../golang.org/x/sys/unix/timestruct.go | 1 - .../golang.org/x/sys/unix/unveil_openbsd.go | 41 +- .../vendor/golang.org/x/sys/unix/xattr_bsd.go | 1 - .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1 - .../x/sys/unix/zerrors_aix_ppc64.go | 1 - .../x/sys/unix/zerrors_darwin_amd64.go | 1 - .../x/sys/unix/zerrors_darwin_arm64.go | 1 - .../x/sys/unix/zerrors_dragonfly_amd64.go | 1 - .../x/sys/unix/zerrors_freebsd_386.go | 1 - .../x/sys/unix/zerrors_freebsd_amd64.go | 1 - .../x/sys/unix/zerrors_freebsd_arm.go | 1 - .../x/sys/unix/zerrors_freebsd_arm64.go | 1 - .../x/sys/unix/zerrors_freebsd_riscv64.go | 1 - .../golang.org/x/sys/unix/zerrors_linux.go | 104 +- .../x/sys/unix/zerrors_linux_386.go | 4 +- .../x/sys/unix/zerrors_linux_amd64.go | 4 +- .../x/sys/unix/zerrors_linux_arm.go | 4 +- .../x/sys/unix/zerrors_linux_arm64.go | 4 +- .../x/sys/unix/zerrors_linux_loong64.go | 5 +- .../x/sys/unix/zerrors_linux_mips.go | 4 +- .../x/sys/unix/zerrors_linux_mips64.go | 4 +- .../x/sys/unix/zerrors_linux_mips64le.go | 4 +- .../x/sys/unix/zerrors_linux_mipsle.go | 4 +- .../x/sys/unix/zerrors_linux_ppc.go | 4 +- .../x/sys/unix/zerrors_linux_ppc64.go | 4 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 4 +- .../x/sys/unix/zerrors_linux_riscv64.go | 7 +- .../x/sys/unix/zerrors_linux_s390x.go | 4 +- .../x/sys/unix/zerrors_linux_sparc64.go | 4 +- .../x/sys/unix/zerrors_netbsd_386.go | 1 - .../x/sys/unix/zerrors_netbsd_amd64.go | 1 - .../x/sys/unix/zerrors_netbsd_arm.go | 1 - .../x/sys/unix/zerrors_netbsd_arm64.go | 1 - .../x/sys/unix/zerrors_openbsd_386.go | 1 - .../x/sys/unix/zerrors_openbsd_amd64.go | 1 - .../x/sys/unix/zerrors_openbsd_arm.go | 1 - .../x/sys/unix/zerrors_openbsd_arm64.go | 1 - .../x/sys/unix/zerrors_openbsd_mips64.go | 1 - .../x/sys/unix/zerrors_openbsd_ppc64.go | 1 - .../x/sys/unix/zerrors_openbsd_riscv64.go | 1 - .../x/sys/unix/zerrors_solaris_amd64.go | 1 - .../x/sys/unix/zerrors_zos_s390x.go | 1 - .../x/sys/unix/zptrace_armnn_linux.go | 2 - .../x/sys/unix/zptrace_mipsnn_linux.go | 2 - .../x/sys/unix/zptrace_mipsnnle_linux.go | 2 - .../x/sys/unix/zptrace_x86_linux.go | 2 - .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 1 - .../x/sys/unix/zsyscall_darwin_amd64.go | 1 - .../x/sys/unix/zsyscall_darwin_arm64.go | 1 - .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1 - .../x/sys/unix/zsyscall_freebsd_386.go | 1 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 1 - .../x/sys/unix/zsyscall_freebsd_arm.go | 1 - .../x/sys/unix/zsyscall_freebsd_arm64.go | 1 - .../x/sys/unix/zsyscall_freebsd_riscv64.go | 1 - .../x/sys/unix/zsyscall_illumos_amd64.go | 1 - .../golang.org/x/sys/unix/zsyscall_linux.go | 26 +- .../x/sys/unix/zsyscall_linux_386.go | 1 - .../x/sys/unix/zsyscall_linux_amd64.go | 1 - .../x/sys/unix/zsyscall_linux_arm.go | 1 - .../x/sys/unix/zsyscall_linux_arm64.go | 1 - .../x/sys/unix/zsyscall_linux_loong64.go | 1 - .../x/sys/unix/zsyscall_linux_mips.go | 1 - .../x/sys/unix/zsyscall_linux_mips64.go | 1 - .../x/sys/unix/zsyscall_linux_mips64le.go | 1 - .../x/sys/unix/zsyscall_linux_mipsle.go | 1 - .../x/sys/unix/zsyscall_linux_ppc.go | 1 - .../x/sys/unix/zsyscall_linux_ppc64.go | 1 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 1 - .../x/sys/unix/zsyscall_linux_riscv64.go | 1 - .../x/sys/unix/zsyscall_linux_s390x.go | 1 - .../x/sys/unix/zsyscall_linux_sparc64.go | 1 - .../x/sys/unix/zsyscall_netbsd_386.go | 1 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 1 - .../x/sys/unix/zsyscall_netbsd_arm.go | 1 - .../x/sys/unix/zsyscall_netbsd_arm64.go | 1 - .../x/sys/unix/zsyscall_openbsd_386.go | 70 +- .../x/sys/unix/zsyscall_openbsd_386.s | 20 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_amd64.s | 20 + .../x/sys/unix/zsyscall_openbsd_arm.go | 70 +- .../x/sys/unix/zsyscall_openbsd_arm.s | 20 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_arm64.s | 20 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_mips64.s | 20 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_ppc64.s | 24 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_riscv64.s | 20 + .../x/sys/unix/zsyscall_solaris_amd64.go | 1 - .../x/sys/unix/zsyscall_zos_s390x.go | 1 - .../x/sys/unix/zsysctl_openbsd_386.go | 1 - .../x/sys/unix/zsysctl_openbsd_amd64.go | 1 - .../x/sys/unix/zsysctl_openbsd_arm.go | 1 - .../x/sys/unix/zsysctl_openbsd_arm64.go | 1 - .../x/sys/unix/zsysctl_openbsd_mips64.go | 1 - .../x/sys/unix/zsysctl_openbsd_ppc64.go | 1 - .../x/sys/unix/zsysctl_openbsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_darwin_amd64.go | 1 - .../x/sys/unix/zsysnum_darwin_arm64.go | 1 - .../x/sys/unix/zsysnum_dragonfly_amd64.go | 1 - .../x/sys/unix/zsysnum_freebsd_386.go | 1 - .../x/sys/unix/zsysnum_freebsd_amd64.go | 1 - .../x/sys/unix/zsysnum_freebsd_arm.go | 1 - .../x/sys/unix/zsysnum_freebsd_arm64.go | 1 - .../x/sys/unix/zsysnum_freebsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_linux_386.go | 6 +- .../x/sys/unix/zsysnum_linux_amd64.go | 6 +- .../x/sys/unix/zsysnum_linux_arm.go | 6 +- .../x/sys/unix/zsysnum_linux_arm64.go | 6 +- .../x/sys/unix/zsysnum_linux_loong64.go | 6 +- .../x/sys/unix/zsysnum_linux_mips.go | 6 +- .../x/sys/unix/zsysnum_linux_mips64.go | 6 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 6 +- .../x/sys/unix/zsysnum_linux_mipsle.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc64.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc64le.go | 6 +- .../x/sys/unix/zsysnum_linux_riscv64.go | 6 +- .../x/sys/unix/zsysnum_linux_s390x.go | 6 +- .../x/sys/unix/zsysnum_linux_sparc64.go | 6 +- .../x/sys/unix/zsysnum_netbsd_386.go | 1 - .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 - .../x/sys/unix/zsysnum_netbsd_arm.go | 1 - .../x/sys/unix/zsysnum_netbsd_arm64.go | 1 - .../x/sys/unix/zsysnum_openbsd_386.go | 1 - .../x/sys/unix/zsysnum_openbsd_amd64.go | 1 - .../x/sys/unix/zsysnum_openbsd_arm.go | 1 - .../x/sys/unix/zsysnum_openbsd_arm64.go | 1 - .../x/sys/unix/zsysnum_openbsd_mips64.go | 1 - .../x/sys/unix/zsysnum_openbsd_ppc64.go | 1 - .../x/sys/unix/zsysnum_openbsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_zos_s390x.go | 1 - .../golang.org/x/sys/unix/ztypes_aix_ppc.go | 1 - .../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 1 - .../x/sys/unix/ztypes_darwin_amd64.go | 1 - .../x/sys/unix/ztypes_darwin_arm64.go | 1 - .../x/sys/unix/ztypes_dragonfly_amd64.go | 1 - .../x/sys/unix/ztypes_freebsd_386.go | 1 - .../x/sys/unix/ztypes_freebsd_amd64.go | 1 - .../x/sys/unix/ztypes_freebsd_arm.go | 1 - .../x/sys/unix/ztypes_freebsd_arm64.go | 1 - .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 - .../golang.org/x/sys/unix/ztypes_linux.go | 170 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 1 - .../x/sys/unix/ztypes_linux_amd64.go | 1 - .../golang.org/x/sys/unix/ztypes_linux_arm.go | 1 - .../x/sys/unix/ztypes_linux_arm64.go | 1 - .../x/sys/unix/ztypes_linux_loong64.go | 1 - .../x/sys/unix/ztypes_linux_mips.go | 1 - .../x/sys/unix/ztypes_linux_mips64.go | 1 - .../x/sys/unix/ztypes_linux_mips64le.go | 1 - .../x/sys/unix/ztypes_linux_mipsle.go | 1 - .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 1 - .../x/sys/unix/ztypes_linux_ppc64.go | 1 - .../x/sys/unix/ztypes_linux_ppc64le.go | 1 - .../x/sys/unix/ztypes_linux_riscv64.go | 1 - .../x/sys/unix/ztypes_linux_s390x.go | 1 - .../x/sys/unix/ztypes_linux_sparc64.go | 1 - .../x/sys/unix/ztypes_netbsd_386.go | 1 - .../x/sys/unix/ztypes_netbsd_amd64.go | 1 - .../x/sys/unix/ztypes_netbsd_arm.go | 1 - .../x/sys/unix/ztypes_netbsd_arm64.go | 1 - .../x/sys/unix/ztypes_openbsd_386.go | 1 - .../x/sys/unix/ztypes_openbsd_amd64.go | 1 - .../x/sys/unix/ztypes_openbsd_arm.go | 1 - .../x/sys/unix/ztypes_openbsd_arm64.go | 1 - .../x/sys/unix/ztypes_openbsd_mips64.go | 1 - .../x/sys/unix/ztypes_openbsd_ppc64.go | 1 - .../x/sys/unix/ztypes_openbsd_riscv64.go | 1 - .../x/sys/unix/ztypes_solaris_amd64.go | 1 - .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 1 - .../golang.org/x/sys/windows/aliases.go | 1 - .../vendor/golang.org/x/sys/windows/empty.s | 1 - .../golang.org/x/sys/windows/env_windows.go | 17 +- .../golang.org/x/sys/windows/eventlog.go | 1 - .../golang.org/x/sys/windows/mksyscall.go | 1 - .../vendor/golang.org/x/sys/windows/race.go | 1 - .../vendor/golang.org/x/sys/windows/race0.go | 1 - .../golang.org/x/sys/windows/registry/key.go | 1 - .../x/sys/windows/registry/mksyscall.go | 1 - .../x/sys/windows/registry/syscall.go | 1 - .../x/sys/windows/registry/value.go | 1 - .../golang.org/x/sys/windows/service.go | 1 - .../vendor/golang.org/x/sys/windows/str.go | 1 - .../golang.org/x/sys/windows/svc/security.go | 1 - .../golang.org/x/sys/windows/svc/service.go | 1 - .../golang.org/x/sys/windows/syscall.go | 1 - .../x/sys/windows/syscall_windows.go | 10 +- .../golang.org/x/sys/windows/types_windows.go | 28 +- .../x/sys/windows/zsyscall_windows.go | 37 + .../vendor/golang.org/x/term/term_unix.go | 1 - .../vendor/golang.org/x/term/term_unix_bsd.go | 1 - .../golang.org/x/term/term_unix_other.go | 1 - .../golang.org/x/term/term_unsupported.go | 1 - .../golang.org/x/text/message/catalog/go19.go | 1 - .../x/text/message/catalog/gopre19.go | 1 - .../x/text/secure/bidirule/bidirule10.0.0.go | 1 - .../x/text/secure/bidirule/bidirule9.0.0.go | 1 - .../x/text/unicode/bidi/tables10.0.0.go | 1 - .../x/text/unicode/bidi/tables11.0.0.go | 1 - .../x/text/unicode/bidi/tables12.0.0.go | 1 - .../x/text/unicode/bidi/tables13.0.0.go | 1 - .../x/text/unicode/bidi/tables15.0.0.go | 1 - .../x/text/unicode/bidi/tables9.0.0.go | 1 - .../x/text/unicode/norm/tables10.0.0.go | 1 - .../x/text/unicode/norm/tables11.0.0.go | 1 - .../x/text/unicode/norm/tables12.0.0.go | 1 - .../x/text/unicode/norm/tables13.0.0.go | 1 - .../x/text/unicode/norm/tables15.0.0.go | 1 - .../x/text/unicode/norm/tables9.0.0.go | 1 - .../golang.org/x/text/width/tables10.0.0.go | 1 - .../golang.org/x/text/width/tables11.0.0.go | 1 - .../golang.org/x/text/width/tables12.0.0.go | 1 - .../golang.org/x/text/width/tables13.0.0.go | 1 - .../golang.org/x/text/width/tables15.0.0.go | 1 - .../golang.org/x/text/width/tables9.0.0.go | 1 - .../x/tools/cmd/stringer/stringer.go | 5 +- .../x/tools/go/ast/astutil/enclosing.go | 8 +- .../x/tools/go/ast/astutil/rewrite.go | 8 +- .../x/tools/go/ast/inspector/typeof.go | 4 +- .../tools/go/internal/packagesdriver/sizes.go | 24 +- .../golang.org/x/tools/go/packages/doc.go | 36 +- .../x/tools/go/packages/external.go | 2 +- .../golang.org/x/tools/go/packages/golist.go | 92 +- .../x/tools/go/packages/golist_overlay.go | 492 - .../x/tools/go/packages/packages.go | 189 +- .../x/tools/go/types/objectpath/objectpath.go | 130 +- .../golang.org/x/tools/imports/forward.go | 4 +- .../x/tools/internal/event/keys/util.go | 21 + .../x/tools/internal/fastwalk/fastwalk.go | 196 - .../internal/fastwalk/fastwalk_darwin.go | 119 - .../fastwalk/fastwalk_dirent_fileno.go | 14 - .../internal/fastwalk/fastwalk_dirent_ino.go | 15 - .../fastwalk/fastwalk_dirent_namlen_bsd.go | 14 - .../fastwalk/fastwalk_dirent_namlen_linux.go | 29 - .../internal/fastwalk/fastwalk_portable.go | 38 - .../tools/internal/fastwalk/fastwalk_unix.go | 153 - .../x/tools/internal/gcimporter/gcimporter.go | 3 +- .../x/tools/internal/gcimporter/iexport.go | 31 +- .../x/tools/internal/gcimporter/iimport.go | 39 +- .../x/tools/internal/gocommand/invoke.go | 27 +- .../x/tools/internal/gopathwalk/walk.go | 227 +- .../x/tools/internal/imports/fix.go | 63 +- .../x/tools/internal/imports/mod.go | 5 +- .../x/tools/internal/imports/zstdlib.go | 230 + .../internal/packagesinternal/packages.go | 8 - .../x/tools/internal/typeparams/common.go | 24 +- .../x/tools/internal/typeparams/coretype.go | 16 +- .../internal/typeparams/enabled_go117.go | 12 - .../internal/typeparams/enabled_go118.go | 15 - .../x/tools/internal/typeparams/normalize.go | 20 +- .../x/tools/internal/typeparams/termlist.go | 2 +- .../internal/typeparams/typeparams_go117.go | 197 - .../internal/typeparams/typeparams_go118.go | 151 - .../x/tools/internal/typeparams/typeterm.go | 9 +- .../x/tools/internal/typesinternal/types.go | 16 - .../x/tools/internal/versions/gover.go | 172 + .../x/tools/internal/versions/types.go | 19 + .../x/tools/internal/versions/types_go121.go | 20 + .../x/tools/internal/versions/types_go122.go | 24 + .../tools/internal/versions/versions_go121.go | 49 + .../tools/internal/versions/versions_go122.go | 38 + .../admissionregistration/v1/generated.proto | 8 + .../api/admissionregistration/v1/types.go | 8 + .../v1beta1/generated.proto | 9 + .../admissionregistration/v1beta1/types.go | 9 + .../vendor/k8s.io/api/apps/v1/generated.proto | 9 + .../vendor/k8s.io/api/apps/v1/types.go | 9 + .../k8s.io/api/apps/v1beta1/generated.proto | 5 + .../vendor/k8s.io/api/apps/v1beta1/types.go | 5 + .../k8s.io/api/apps/v1beta2/generated.proto | 9 + .../vendor/k8s.io/api/apps/v1beta2/types.go | 9 + .../api/authentication/v1/generated.proto | 4 + .../k8s.io/api/authentication/v1/types.go | 4 + .../authentication/v1beta1/generated.proto | 3 + .../api/authentication/v1beta1/types.go | 3 + .../api/authorization/v1/generated.proto | 9 + .../k8s.io/api/authorization/v1/types.go | 9 + .../api/authorization/v1beta1/generated.proto | 9 + .../k8s.io/api/authorization/v1beta1/types.go | 9 + .../api/autoscaling/v2beta1/generated.proto | 3 + .../k8s.io/api/autoscaling/v2beta1/types.go | 3 + .../api/autoscaling/v2beta2/generated.proto | 4 + .../k8s.io/api/autoscaling/v2beta2/types.go | 4 + .../k8s.io/api/batch/v1/generated.proto | 13 +- .../vendor/k8s.io/api/batch/v1/types.go | 14 +- .../batch/v1/types_swagger_doc_generated.go | 8 +- .../vendor/k8s.io/api/core/v1/generated.pb.go | 2720 +- .../vendor/k8s.io/api/core/v1/generated.proto | 188 +- .../vendor/k8s.io/api/core/v1/types.go | 192 +- .../core/v1/types_swagger_doc_generated.go | 26 +- .../api/core/v1/zz_generated.deepcopy.go | 41 + .../api/extensions/v1beta1/generated.proto | 19 + .../k8s.io/api/extensions/v1beta1/types.go | 19 + .../k8s.io/api/networking/v1/generated.proto | 9 + .../vendor/k8s.io/api/networking/v1/types.go | 9 + .../api/networking/v1alpha1/generated.proto | 1 + .../k8s.io/api/networking/v1alpha1/types.go | 1 + .../api/networking/v1beta1/generated.proto | 5 + .../k8s.io/api/networking/v1beta1/types.go | 5 + .../vendor/k8s.io/api/rbac/v1/generated.proto | 10 + .../vendor/k8s.io/api/rbac/v1/types.go | 10 + .../k8s.io/api/rbac/v1alpha1/generated.proto | 10 + .../vendor/k8s.io/api/rbac/v1alpha1/types.go | 10 + .../k8s.io/api/rbac/v1beta1/generated.proto | 10 + .../vendor/k8s.io/api/rbac/v1beta1/types.go | 10 + .../api/resource/v1alpha2/generated.proto | 2 + .../k8s.io/api/resource/v1alpha2/types.go | 4 +- .../k8s.io/api/storage/v1/generated.proto | 10 +- .../vendor/k8s.io/api/storage/v1/types.go | 10 +- .../storage/v1/types_swagger_doc_generated.go | 4 +- .../api/storage/v1alpha1/generated.proto | 2 - .../k8s.io/api/storage/v1alpha1/types.go | 2 - .../api/storage/v1beta1/generated.proto | 7 +- .../k8s.io/api/storage/v1beta1/types.go | 7 +- .../pkg/features/kube_features.go | 2 +- .../apimachinery/pkg/api/validation/OWNERS | 11 + .../pkg/apis/meta/v1/generated.proto | 22 + .../apimachinery/pkg/apis/meta/v1/types.go | 26 + .../k8s.io/apimachinery/pkg/runtime/helper.go | 12 +- .../pkg/util/cache/lruexpirecache.go | 13 + .../k8s.io/apimachinery/pkg/util/sets/doc.go | 2 +- .../apimachinery/pkg/util/sets/ordered.go | 53 - .../k8s.io/apimachinery/pkg/util/sets/set.go | 9 +- .../apimachinery/pkg/util/validation/OWNERS | 11 + .../pkg/util/validation/validation.go | 34 +- .../pkg/admission/plugin/cel/composition.go | 19 +- .../plugin/policy/generic/accessor.go | 42 + .../plugin/policy/generic/interfaces.go | 64 + .../admission/plugin/policy/generic/plugin.go | 199 + .../policy/generic/policy_dispatcher.go | 354 + .../generic/policy_matcher.go} | 73 +- .../plugin/policy/generic/policy_source.go | 477 + .../policy/generic/policy_test_context.go | 638 + .../internal/generic/controller.go | 0 .../internal/generic/doc.go | 0 .../internal/generic/informer.go | 4 + .../internal/generic/interface.go | 0 .../internal/generic/lister.go | 0 .../matching/matching.go | 0 .../plugin/policy/validating/accessor.go | 82 + .../validating}/caching_authorizer.go | 2 +- .../validating/dispatcher.go} | 339 +- .../validating}/initializer.go | 2 +- .../validating}/interface.go | 20 +- .../validating}/message.go | 2 +- .../policy/validating/metrics}/metrics.go | 0 .../plugin/policy/validating/plugin.go | 202 + .../validating}/policy_decision.go | 2 +- .../validating}/typechecking.go | 121 +- .../validating}/validator.go | 2 +- .../plugin/validatingadmissionpolicy/OWNERS | 10 - .../validatingadmissionpolicy/admission.go | 197 - .../controller_reconcile.go | 550 - .../config/apis/webhookadmission/doc.go | 2 +- .../config/apis/webhookadmission/v1/doc.go | 2 +- .../apis/webhookadmission/v1alpha1/doc.go | 2 +- .../apiserver/pkg/apis/apiserver/register.go | 1 + .../apiserver/pkg/apis/apiserver/types.go | 9 + .../types_encryption.go} | 2 +- .../apis/{config => apiserver}/v1/defaults.go | 0 .../pkg/apis/apiserver/v1/register.go | 4 + .../v1/types_encryption.go} | 0 .../apiserver/v1/zz_generated.conversion.go | 259 + .../apiserver/v1/zz_generated.deepcopy.go | 202 + .../apiserver/v1/zz_generated.defaults.go | 13 + .../pkg/apis/apiserver/v1alpha1/types.go | 25 + .../v1alpha1/zz_generated.conversion.go | 2 + .../apis/apiserver/validation/validation.go | 36 +- .../validation/validation_encryption.go} | 27 +- .../apis/apiserver/zz_generated.deepcopy.go | 202 + .../pkg/apis/audit/v1/generated.proto | 12 + .../apiserver/pkg/apis/audit/v1/types.go | 12 + .../k8s.io/apiserver/pkg/apis/config/doc.go | 19 - .../apiserver/pkg/apis/config/register.go | 53 - .../apiserver/pkg/apis/config/v1/doc.go | 23 - .../apiserver/pkg/apis/config/v1/register.go | 53 - .../apis/config/v1/zz_generated.conversion.go | 299 - .../apis/config/v1/zz_generated.deepcopy.go | 228 - .../apis/config/v1/zz_generated.defaults.go | 46 - .../pkg/apis/config/zz_generated.deepcopy.go | 228 - .../pkg/authentication/serviceaccount/util.go | 6 + .../authorization/authorizer/interfaces.go | 2 +- .../authorizerfactory/delegating.go | 1 + .../pkg/authorization/cel/compile.go | 36 + .../pkg/authorization/cel/matcher.go | 19 +- .../vendor/k8s.io/apiserver/pkg/cel/cidr.go | 87 + .../apiserver/pkg/cel/environment/base.go | 23 +- .../vendor/k8s.io/apiserver/pkg/cel/ip.go | 86 + .../k8s.io/apiserver/pkg/cel/library/cidr.go | 287 + .../k8s.io/apiserver/pkg/cel/library/cost.go | 150 + .../k8s.io/apiserver/pkg/cel/library/ip.go | 329 + .../pkg/endpoints/filters/request_deadline.go | 14 +- .../pkg/endpoints/filters/webhook_duration.go | 3 +- .../apiserver/pkg/endpoints/handlers/get.go | 32 +- .../apiserver/pkg/endpoints/handlers/watch.go | 141 +- .../pkg/endpoints/request/webhook_duration.go | 23 + .../apiserver/pkg/features/kube_features.go | 34 +- .../pkg/registry/generic/registry/store.go | 48 +- .../k8s.io/apiserver/pkg/server/config.go | 23 +- .../apiserver/pkg/server/filters/routine.go | 77 + .../apiserver/pkg/server/genericapiserver.go | 21 +- .../k8s.io/apiserver/pkg/server/healthz.go | 96 +- .../apiserver/pkg/server/healthz/healthz.go | 6 - .../apiserver/pkg/server/options/admission.go | 2 +- .../server/options/encryptionconfig/config.go | 41 +- .../encryptionconfig/metrics/metrics.go | 46 +- .../k8s.io/apiserver/pkg/server/plugins.go | 2 +- .../apiserver/pkg/storage/cacher/cacher.go | 6 +- .../apiserver/pkg/storage/cacher/util.go | 14 - .../pkg/storage/cacher/watch_cache.go | 10 +- .../k8s.io/apiserver/pkg/storage/errors.go | 15 + .../apiserver/pkg/storage/errors/storage.go | 2 +- .../pkg/storage/etcd3/metrics/metrics.go | 3 +- .../apiserver/pkg/storage/etcd3/store.go | 112 +- .../pkg/storage/selection_predicate.go | 18 +- .../flowcontrol/fairqueuing/queueset/doc.go | 2 +- .../fairqueuing/queueset/queueset.go | 27 +- .../apiserver/pkg/util/webhook/client.go | 51 +- .../plugin/pkg/authorizer/webhook/webhook.go | 12 +- .../core/v1/clustertrustbundleprojection.go | 79 + .../core/v1/volumeprojection.go | 9 + .../applyconfigurations/internal/internal.go | 22 + .../k8s.io/client-go/features/envvar.go | 138 + .../k8s.io/client-go/features/features.go | 143 + .../client-go/features/known_features.go | 49 + .../vendor/k8s.io/client-go/informers/doc.go | 2 +- .../vendor/k8s.io/client-go/kubernetes/doc.go | 2 +- .../client-go/scale/scheme/appsint/doc.go | 2 +- .../k8s.io/client-go/scale/scheme/doc.go | 2 +- .../scale/scheme/extensionsint/doc.go | 2 +- .../k8s.io/client-go/tools/cache/index.go | 3 +- .../k8s.io/client-go/tools/cache/reflector.go | 18 +- .../client-go/tools/cache/shared_informer.go | 4 +- .../tools/cache/thread_safe_store.go | 92 +- .../client-go/tools/clientcmd/api/doc.go | 2 +- .../client-go/tools/clientcmd/api/v1/doc.go | 2 +- .../tools/clientcmd/client_config.go | 49 +- .../tools/events/event_broadcaster.go | 10 +- .../tools/leaderelection/leaderelection.go | 30 +- .../client-go/tools/leaderelection/metrics.go | 30 +- .../k8s.io/client-go/tools/record/event.go | 19 +- .../client-go/util/flowcontrol/backoff.go | 3 +- .../vendor/k8s.io/cloud-provider/OWNERS | 1 + .../vendor/k8s.io/cloud-provider/cloud.go | 5 + .../cloud-provider/node/helpers/address.go | 6 +- .../vendor/k8s.io/cloud-provider/plugins.go | 2 - .../vendor/k8s.io/code-generator/README.md | 4 + .../cmd/applyconfiguration-gen/args/args.go | 17 +- .../cmd/client-gen/args/args.go | 14 +- .../cmd/conversion-gen/args/args.go | 8 +- .../cmd/deepcopy-gen/args/args.go | 2 +- .../cmd/defaulter-gen/args/args.go | 2 +- .../generators/register_external.go | 2 +- .../generate-internal-groups.sh | 148 +- .../k8s.io/code-generator/kube_codegen.sh | 168 +- .../featuregate/feature_gate.go | 74 +- .../logs/api/v1/kube_features.go | 10 +- .../component-base/logs/api/v1/options.go | 36 +- .../component-base/logs/api/v1/registry.go | 2 +- .../k8s.io/component-base/logs/api/v1/text.go | 142 + .../component-base/logs/api/v1/types.go | 13 + .../logs/api/v1/zz_generated.deepcopy.go | 37 +- .../metrics/prometheus/slis/metrics.go | 3 +- .../metrics/testutil/testutil.go | 11 +- .../k8s.io/component-base/tracing/utils.go | 4 +- .../k8s.io/component-helpers/node/util/ips.go | 15 +- .../storage/volume/helpers.go | 14 + .../pkg/features/kube_features.go | 6 +- .../cri-api/pkg/apis/runtime/v1/api.pb.go | 1528 +- .../cri-api/pkg/apis/runtime/v1/api.proto | 31 + .../k8s.io/cri-api/pkg/errors/errors.go | 3 + .../csi-translation-lib/plugins/azure_file.go | 4 +- .../resourceclaim/resourceclaim.go | 22 +- .../vendor/k8s.io/klog/v2/OWNERS | 4 +- .../v2/contextual_slog.go} | 23 +- .../klog/v2/internal/verbosity/verbosity.go | 303 + .../vendor/k8s.io/klog/v2/klog.go | 23 +- .../vendor/k8s.io/klog/v2/klogr_slog.go | 10 +- .../vendor/k8s.io/klog/v2/safeptr.go | 34 + .../k8s.io/klog/v2/textlogger/options.go | 154 + .../k8s.io/klog/v2/textlogger/textlogger.go | 187 + .../klog/v2/textlogger/textlogger_slog.go | 52 + .../pkg/generators/rules/idl_tag.go | 3 +- .../k8s.io/kubelet/config/v1beta1/types.go | 15 + .../config/v1beta1/zz_generated.deepcopy.go | 10 + .../pkg/cri/streaming/remotecommand/doc.go | 2 +- .../vendor/k8s.io/kubelet/pkg/types/labels.go | 7 + .../cmd/kubelet/app/options/globalflags.go | 14 - .../app/options/globalflags_providers.go | 31 - .../cmd/kubelet/app/options/options.go | 9 +- .../cmd/kubelet/app/plugins_providers.go | 3 - .../kubernetes/cmd/kubelet/app/server.go | 51 +- .../k8s.io/kubernetes/pkg/apis/batch/types.go | 15 +- .../k8s.io/kubernetes/pkg/apis/core/types.go | 33 +- .../apis/core/v1/zz_generated.conversion.go | 40 + .../pkg/apis/core/validation/names.go | 132 + .../pkg/apis/core/validation/validation.go | 166 +- .../pkg/apis/core/zz_generated.deepcopy.go | 41 + .../kubernetes/pkg/apis/scheduling/types.go | 3 +- .../pkg/cloudprovider/providers/providers.go | 2 - .../pkg/controller/controller_utils.go | 5 +- .../controller/daemon/daemon_controller.go | 48 +- .../deployment/util/deployment_util.go | 6 +- .../pkg/credentialprovider/azure/OWNERS | 13 - .../azure/azure_acr_helper.go | 291 - .../azure/azure_credentials.go | 350 - .../pkg/credentialprovider/azure/doc.go | 17 - .../pkg/credentialprovider/plugin/plugin.go | 12 +- .../kubernetes/pkg/features/client_adapter.go | 69 + .../kubernetes/pkg/features/kube_features.go | 225 +- .../pkg/kubelet/apis/config/types.go | 5 + .../kubelet/apis/config/v1beta1/defaults.go | 6 + .../config/v1beta1/zz_generated.conversion.go | 12 + .../apis/config/validation/validation.go | 7 + .../apis/config/zz_generated.deepcopy.go | 1 + .../pkg/kubelet/cadvisor/cadvisor_linux.go | 26 +- .../kubelet/cadvisor/cadvisor_unsupported.go | 17 +- .../pkg/kubelet/cadvisor/cadvisor_windows.go | 21 +- .../pkg/kubelet/cadvisor/helpers_linux.go | 26 +- .../kubelet/cadvisor/helpers_unsupported.go | 4 + .../kubernetes/pkg/kubelet/cadvisor/types.go | 11 +- .../clustertrustbundle_manager.go | 261 + .../pkg/kubelet/cm/container_manager_linux.go | 4 +- .../kubelet/cm/cpumanager/cpu_assignment.go | 192 +- .../devicemanager/checkpoint/checkpointv1.go | 2 +- .../pkg/kubelet/cm/devicemanager/manager.go | 28 +- .../cm/devicemanager/plugin/v1beta1/server.go | 2 +- .../kubelet/cm/devicemanager/pod_devices.go | 2 +- .../cm/devicemanager/topology_hints.go | 4 +- .../kubelet/cm/memorymanager/policy_static.go | 10 +- .../cm/node_container_manager_linux.go | 2 +- .../kubernetes/pkg/kubelet/config/common.go | 17 + .../kubernetes/pkg/kubelet/config/config.go | 20 +- .../config.go => kubelet/config/mux.go} | 80 +- .../pkg/kubelet/container/container_gc.go | 21 + .../pkg/kubelet/container/runtime.go | 4 + .../container/testing/fake_ready_provider.go} | 25 +- .../kubelet/container/testing/fake_runtime.go | 49 +- .../kubelet/container/testing/runtime_mock.go | 60 + .../pkg/kubelet/eviction/api/types.go | 21 +- .../pkg/kubelet/eviction/defaults_linux.go | 9 +- .../pkg/kubelet/eviction/eviction_manager.go | 58 +- .../pkg/kubelet/eviction/helpers.go | 260 +- .../kubernetes/pkg/kubelet/eviction/types.go | 4 + .../pkg/kubelet/images/image_gc_manager.go | 46 +- .../pkg/kubelet/images/image_manager.go | 7 +- .../kubernetes/pkg/kubelet/images/puller.go | 18 +- .../k8s.io/kubernetes/pkg/kubelet/kubelet.go | 79 +- .../kubernetes/pkg/kubelet/kubelet_volumes.go | 8 +- .../kubeletconfig/configfiles/configfiles.go | 17 + .../kubelet/kubeletconfig/util/codec/codec.go | 15 + .../kuberuntime/fake_kuberuntime_manager.go | 2 +- .../kubelet/kuberuntime/kuberuntime_image.go | 21 + .../kubernetes/pkg/kubelet/leaky/leaky.go | 25 - .../pkg/kubelet/lifecycle/handlers.go | 66 +- .../pkg/kubelet/logs/container_log_manager.go | 137 +- .../kubernetes/pkg/kubelet/metrics/metrics.go | 113 +- .../kubernetes/pkg/kubelet/pleg/generic.go | 2 +- .../pkg/kubelet/pluginmanager/cache/types.go | 4 +- .../kubernetes/pkg/kubelet/server/server.go | 7 - .../pkg/kubelet/server/stats/handler.go | 18 +- .../pkg/kubelet/server/stats/summary.go | 4 +- .../kubelet/stats/cadvisor_stats_provider.go | 78 +- .../pkg/kubelet/stats/cri_stats_provider.go | 23 +- .../stats/cri_stats_provider_windows.go | 4 +- .../kubernetes/pkg/kubelet/stats/provider.go | 76 +- .../userns/inuserns/inuserns_linux.go} | 14 +- .../userns/inuserns/inuserns_others.go} | 14 +- .../pkg/kubelet/userns/userns_manager.go | 10 +- .../util/pod_startup_latency_tracker.go | 8 + .../kubernetes/pkg/kubelet/volume_host.go | 49 +- .../cache/actual_state_of_world.go | 8 + .../desired_state_of_world_populator.go | 22 +- .../volumemanager/reconciler/reconciler.go | 128 +- .../reconciler/reconciler_common.go | 11 - .../reconciler/reconciler_new.go | 75 - .../volumemanager/reconciler/reconstruct.go | 226 +- .../reconciler/reconstruct_new.go | 212 - .../kubelet/winstats/perfcounter_nodestats.go | 3 +- .../pkg/scheduler/apis/config/types.go | 4 - .../apis/config/v1/zz_generated.conversion.go | 2 - .../apis/config/validation/validation.go | 51 +- .../kubernetes/pkg/scheduler/eventhandlers.go | 48 +- .../kubernetes/pkg/scheduler/extender.go | 39 +- .../pkg/scheduler/framework/extender.go | 11 +- .../pkg/scheduler/framework/interface.go | 49 +- .../defaultpreemption/default_preemption.go | 8 +- .../dynamicresources/dynamicresources.go | 200 +- .../plugins/interpodaffinity/scoring.go | 2 +- .../plugins/nodeaffinity/node_affinity.go | 27 +- .../noderesources/balanced_allocation.go | 2 +- .../framework/plugins/noderesources/fit.go | 137 +- .../nodeunschedulable/node_unschedulable.go | 19 +- .../framework/plugins/nodevolumelimits/OWNERS | 10 + .../framework/plugins/nodevolumelimits/csi.go | 10 +- .../plugins/nodevolumelimits/non_csi.go | 8 +- .../plugins/podtopologyspread/common.go | 10 + .../plugins/podtopologyspread/filtering.go | 24 +- .../plugins/podtopologyspread/plugin.go | 138 +- .../plugins/podtopologyspread/scoring.go | 10 +- .../schedulinggates/scheduling_gates.go | 14 +- .../tainttoleration/taint_toleration.go | 2 +- .../plugins/volumebinding/volume_binding.go | 20 + .../plugins/volumerestrictions/OWNERS | 10 + .../framework/plugins/volumezone/OWNERS | 10 + .../framework/preemption/preemption.go | 123 +- .../scheduler/framework/runtime/framework.go | 315 +- .../framework/runtime/instrumented_plugins.go | 2 +- .../framework/runtime/waiting_pods_map.go | 4 +- .../pkg/scheduler/framework/types.go | 59 +- .../pkg/scheduler/internal/queue/events.go | 2 + .../internal/queue/scheduling_queue.go | 37 +- .../pkg/scheduler/metrics/metrics.go | 4 +- .../pkg/scheduler/profile/profile.go | 12 + .../kubernetes/pkg/scheduler/schedule_one.go | 115 +- .../kubernetes/pkg/scheduler/scheduler.go | 17 + .../pkg/scheduler/util/pod_resources.go | 6 - .../k8s.io/kubernetes/pkg/util/config/doc.go | 20 - .../kubernetes/pkg/util/filesystem/watcher.go | 127 + .../kubernetes/pkg/util/iptables/iptables.go | 11 +- .../pkg/util/iptables/save_restore.go | 17 +- .../k8s.io/kubernetes/pkg/util/slice/slice.go | 75 + .../kubernetes/pkg/volume/azure_file/OWNERS | 18 - .../pkg/volume/azure_file/azure_file.go | 414 - .../pkg/volume/azure_file/azure_provision.go | 284 - .../pkg/volume/azure_file/azure_util.go | 162 - .../kubernetes/pkg/volume/csi/csi_mounter.go | 13 +- .../kubernetes/pkg/volume/csi/csi_plugin.go | 5 +- .../kubernetes/pkg/volume/csi/expander.go | 2 +- .../pkg/volume/csimigration/plugin_manager.go | 2 +- .../kubernetes/pkg/volume/flexvolume/probe.go | 4 + .../k8s.io/kubernetes/pkg/volume/plugins.go | 9 +- .../pkg/volume/projected/projected.go | 38 + .../pkg/volume/util/atomic_writer.go | 104 +- .../pkg/volume/util/hostutil/hostutil.go | 1 + .../volume/util/hostutil/hostutil_linux.go | 2 +- .../volume/util/hostutil/hostutil_windows.go | 3 +- .../operationexecutor/operation_executor.go | 7 + .../operationexecutor/operation_generator.go | 51 +- .../kubernetes/pkg/volume/util/selinux.go | 4 + .../kubernetes/pkg/volume/util/types/types.go | 17 + .../kubernetes/test/utils/deployment.go | 8 +- .../kubernetes/test/utils/replicaset.go | 4 +- .../k8s.io/kubernetes/test/utils/runners.go | 4 +- .../legacy-cloud-providers/azure/OWNERS | 18 - .../azure/auth/azure_auth.go | 290 - .../legacy-cloud-providers/azure/auth/doc.go | 18 - .../legacy-cloud-providers/azure/azure.go | 988 - .../azure/azure_backoff.go | 470 - .../azure/azure_blobDiskController.go | 648 - .../azure/azure_config.go | 95 - .../azure/azure_controller_common.go | 460 - .../azure/azure_controller_standard.go | 204 - .../azure/azure_controller_vmss.go | 207 - .../azure/azure_fakes.go | 99 - .../azure/azure_file.go | 42 - .../azure/azure_instance_metadata.go | 270 - .../azure/azure_instances.go | 432 - .../azure/azure_loadbalancer.go | 2769 - .../azure/azure_managedDiskController.go | 399 - .../azure/azure_ratelimit.go | 110 - .../azure/azure_routes.go | 579 - .../azure/azure_standard.go | 1132 - .../azure/azure_storage.go | 86 - .../azure/azure_storageaccount.go | 214 - .../azure/azure_utils.go | 165 - .../azure/azure_vmsets.go | 88 - .../azure/azure_vmss.go | 1708 - .../azure/azure_vmss_cache.go | 350 - .../azure/azure_wrap.go | 356 - .../azure/azure_zones.go | 131 - .../azure/cache/azure_cache.go | 178 - .../legacy-cloud-providers/azure/cache/doc.go | 21 - .../clients/armclient/azure_armclient.go | 701 - .../azure/clients/armclient/doc.go | 21 - .../azure/clients/armclient/interface.go | 104 - .../azure/clients/azure_client_config.go | 82 - .../azure_containerserviceclient.go | 419 - .../clients/containerserviceclient/doc.go | 21 - .../containerserviceclient/interface.go | 42 - .../azure_deploymentclient.go | 459 - .../azure/clients/deploymentclient/doc.go | 21 - .../clients/deploymentclient/interface.go | 42 - .../clients/diskclient/azure_diskclient.go | 453 - .../azure/clients/diskclient/doc.go | 21 - .../azure/clients/diskclient/interface.go | 55 - .../clients/diskclient/mockdiskclient/doc.go | 21 - .../diskclient/mockdiskclient/interface.go | 128 - .../azure/clients/doc.go | 21 - .../clients/fileclient/azure_fileclient.go | 121 - .../azure/clients/fileclient/doc.go | 21 - .../azure/clients/fileclient/interface.go | 33 - .../interfaceclient/azure_interfaceclient.go | 320 - .../azure/clients/interfaceclient/doc.go | 21 - .../clients/interfaceclient/interface.go | 51 - .../mockinterfaceclient/doc.go | 21 - .../mockinterfaceclient/interface.go | 114 - .../azure_loadbalancerclient.go | 419 - .../azure/clients/loadbalancerclient/doc.go | 21 - .../clients/loadbalancerclient/interface.go | 48 - .../mockloadbalancerclient/doc.go | 21 - .../mockloadbalancerclient/interface.go | 114 - .../publicipclient/azure_publicipclient.go | 485 - .../azure/clients/publicipclient/doc.go | 21 - .../azure/clients/publicipclient/interface.go | 54 - .../publicipclient/mockpublicipclient/doc.go | 21 - .../mockpublicipclient/interface.go | 129 - .../clients/routeclient/azure_routeclient.go | 199 - .../azure/clients/routeclient/doc.go | 21 - .../azure/clients/routeclient/interface.go | 42 - .../routeclient/mockrouteclient/doc.go | 21 - .../routeclient/mockrouteclient/interface.go | 84 - .../azure_routetableclient.go | 213 - .../azure/clients/routetableclient/doc.go | 21 - .../clients/routetableclient/interface.go | 42 - .../mockroutetableclient/doc.go | 21 - .../mockroutetableclient/interface.go | 85 - .../azure_securitygroupclient.go | 419 - .../azure/clients/securitygroupclient/doc.go | 21 - .../clients/securitygroupclient/interface.go | 48 - .../mocksecuritygroupclient/doc.go | 21 - .../mocksecuritygroupclient/interface.go | 114 - .../snapshotclient/azure_snapshotclient.go | 412 - .../azure/clients/snapshotclient/doc.go | 21 - .../azure/clients/snapshotclient/interface.go | 48 - .../azure_storageaccountclient.go | 478 - .../azure/clients/storageaccountclient/doc.go | 21 - .../clients/storageaccountclient/interface.go | 55 - .../subnetclient/azure_subnetclient.go | 419 - .../azure/clients/subnetclient/doc.go | 21 - .../azure/clients/subnetclient/interface.go | 48 - .../subnetclient/mocksubnetclient/doc.go | 21 - .../mocksubnetclient/interface.go | 114 - .../azure/clients/vmclient/azure_vmclient.go | 486 - .../azure/clients/vmclient/doc.go | 21 - .../azure/clients/vmclient/interface.go | 51 - .../clients/vmclient/mockvmclient/doc.go | 21 - .../vmclient/mockvmclient/interface.go | 128 - .../vmsizeclient/azure_vmsizeclient.go | 137 - .../azure/clients/vmsizeclient/doc.go | 21 - .../azure/clients/vmsizeclient/interface.go | 39 - .../clients/vmssclient/azure_vmssclient.go | 653 - .../azure/clients/vmssclient/doc.go | 21 - .../azure/clients/vmssclient/interface.go | 78 - .../clients/vmssclient/mockvmssclient/doc.go | 21 - .../vmssclient/mockvmssclient/interface.go | 251 - .../vmssvmclient/azure_vmssvmclient.go | 463 - .../azure/clients/vmssvmclient/doc.go | 21 - .../azure/clients/vmssvmclient/interface.go | 48 - .../vmssvmclient/mockvmssvmclient/doc.go | 21 - .../mockvmssvmclient/interface.go | 114 - .../legacy-cloud-providers/azure/doc.go | 22 - .../azure/metrics/azure_metrics.go | 189 - .../azure/metrics/doc.go | 21 - .../azure/retry/azure_error.go | 315 - .../azure/retry/azure_retry.go | 201 - .../legacy-cloud-providers/azure/retry/doc.go | 22 - .../legacy-cloud-providers/vsphere/OWNERS | 12 - .../vsphere/credentialmanager.go | 170 - .../legacy-cloud-providers/vsphere/doc.go | 17 - .../vsphere/nodemanager.go | 564 - .../vsphere/shared_datastore.go | 210 - .../vsphere/vclib/connection.go | 237 - .../vsphere/vclib/constants.go | 65 - .../vsphere/vclib/custom_errors.go | 37 - .../vsphere/vclib/datacenter.go | 370 - .../vsphere/vclib/datastore.go | 109 - .../vsphere/vclib/diskmanagers/vdm.go | 105 - .../vsphere/vclib/diskmanagers/virtualdisk.go | 80 - .../vsphere/vclib/diskmanagers/vmdm.go | 254 - .../vsphere/vclib/folder.go | 47 - .../vsphere/vclib/pbm.go | 169 - .../vsphere/vclib/utils.go | 284 - .../vsphere/vclib/virtualmachine.go | 472 - .../vsphere/vclib/vmoptions.go | 27 - .../vsphere/vclib/volumeoptions.go | 111 - .../vsphere/vclib/vsphere_metrics.go | 192 - .../legacy-cloud-providers/vsphere/vsphere.go | 2105 - .../vsphere/vsphere_util.go | 880 - .../vsphere/vsphere_util_windows.go | 45 - .../vsphere/vsphere_volume_map.go | 114 - .../k8s.io/mount-utils/mount_helper_unix.go | 2 +- .../vendor/k8s.io/mount-utils/mount_linux.go | 73 +- .../k8s.io/mount-utils/mount_windows.go | 17 +- cluster-autoscaler/vendor/modules.txt | 309 +- cluster-autoscaler/version/version.go | 2 +- 1443 files changed, 19529 insertions(+), 306535 deletions(-) delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/enums.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/enums.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/models.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/enums.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/enums.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/enums.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go delete mode 100644 cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go rename cluster-autoscaler/vendor/github.com/{vmware/govmomi/vim25/progress/tee.go => go-logr/logr/context.go} (53%) create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/logr/context_noslog.go create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/logr/context_slog.go create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/slogsink.go rename cluster-autoscaler/vendor/github.com/go-logr/logr/{slogr => }/sloghandler.go (63%) create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/logr/slogr.go rename cluster-autoscaler/vendor/github.com/go-logr/logr/{slogr => }/slogsink.go (82%) create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/zapr/.golangci.yaml create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/zapr/slogzapr.go rename cluster-autoscaler/vendor/github.com/{vmware/govmomi/list/path.go => go-logr/zapr/zapr_noslog.go} (56%) create mode 100644 cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_slog.go create mode 100644 cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go create mode 100644 cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go create mode 100644 cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps.c create mode 100644 cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps_linux.go delete mode 100644 cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/LICENSE delete mode 100644 cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/util.go delete mode 100644 cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/CONTRIBUTORS delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/LICENSE.txt delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/find/doc.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/find/error.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/find/finder.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/find/recurser.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/history/collector.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/helpers.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/methods.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/version/version.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/list/lister.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/methods/methods.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/types/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease_updater.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/common.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/compute_resource.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datacenter.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_path.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_log.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/extension_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/file_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/folder.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_account_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_info.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_config_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_date_time_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_firewall_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_network_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_service_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_storage_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_system.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/namespace_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network_reference.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/opaque_network.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/option_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/resource_pool.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/search_index.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_pod.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/task.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/tenant_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_app.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_device_list.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_machine.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/methods/methods.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/pbm_util.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/enum.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/if.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/property/collector.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/property/filter.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/property/wait.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keep_alive.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keepalive/handler.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/session/manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/internal/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/signer.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/task/error.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/task/history_collector.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/task/manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/task/wait.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/internal/internal.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/resource.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/categories.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/errors.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tag_association.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tags.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/view/container_view.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/view/list_view.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/view/managed_object_view.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/view/manager.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/view/task_view.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/debug.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/file.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/log.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/doc.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/methods.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/unreleased.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/entity.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/extra.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/mo.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/reference.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/registry.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/doc.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/reader.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/report.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/scale.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/retry.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/client.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/debug.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/error.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/soap.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/base.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/enum.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/fault.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/helpers.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/if.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/registry.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/types.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/unreleased.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/extras.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/read.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go delete mode 100644 cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/xml.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/.codecov.yml delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/.gitignore delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/CHANGELOG.md delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/LICENSE.txt delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/Makefile delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/README.md delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/bool.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/doc.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/duration.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/duration_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/error.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/error_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/float32.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/float32_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/float64.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/float64_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/gen.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/int32.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/int64.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/nocmp.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/pointer_go118.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/pointer_go119.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/string.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/string_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/time_ext.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/uint32.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/uint64.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/uintptr.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/unsafe_pointer.go delete mode 100644 cluster-autoscaler/vendor/go.uber.org/atomic/value.go create mode 100644 cluster-autoscaler/vendor/go.uber.org/zap/.golangci.yml delete mode 100644 cluster-autoscaler/vendor/go.uber.org/zap/array_go118.go rename cluster-autoscaler/vendor/go.uber.org/{atomic/bool_ext.go => zap/internal/pool/pool.go} (56%) rename cluster-autoscaler/vendor/go.uber.org/zap/{stacktrace.go => internal/stacktrace/stack.go} (73%) rename cluster-autoscaler/vendor/go.uber.org/{atomic/time.go => zap/zapcore/lazy_with.go} (60%) delete mode 100644 cluster-autoscaler/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/go111.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/go115.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/go118.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/not_go111.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/not_go115.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/net/http2/not_go118.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/sys/execabs/execabs.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/sys/execabs/execabs_go118.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/sys/execabs/execabs_go119.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/event/keys/util.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_darwin.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go delete mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/gover.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/types.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/types_go121.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/types_go122.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/versions_go121.go create mode 100644 cluster-autoscaler/vendor/golang.org/x/tools/internal/versions/versions_go122.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/accessor.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/interfaces.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/plugin.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_dispatcher.go rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy/matcher.go => policy/generic/policy_matcher.go} (60%) create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/internal/generic/controller.go (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/internal/generic/doc.go (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/internal/generic/informer.go (79%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/internal/generic/interface.go (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/internal/generic/lister.go (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy}/matching/matching.go (100%) create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/accessor.go rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/caching_authorizer.go (99%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy/controller.go => policy/validating/dispatcher.go} (55%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/initializer.go (96%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/interface.go (75%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/message.go (96%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/{cel => plugin/policy/validating/metrics}/metrics.go (100%) create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/policy_decision.go (98%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/typechecking.go (79%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/{validatingadmissionpolicy => policy/validating}/validator.go (99%) delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/admission.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/controller_reconcile.go rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/{config/types.go => apiserver/types_encryption.go} (99%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/{config => apiserver}/v1/defaults.go (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/{config/v1/types.go => apiserver/v1/types_encryption.go} (100%) rename cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/{config/validation/validation.go => apiserver/validation/validation_encryption.go} (91%) delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/register.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/v1/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/v1/register.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/v1/zz_generated.conversion.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/v1/zz_generated.deepcopy.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/v1/zz_generated.defaults.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/config/zz_generated.deepcopy.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/cel/cidr.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/cel/ip.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/cel/library/ip.go create mode 100644 cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/routine.go create mode 100644 cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go create mode 100644 cluster-autoscaler/vendor/k8s.io/client-go/features/envvar.go create mode 100644 cluster-autoscaler/vendor/k8s.io/client-go/features/features.go create mode 100644 cluster-autoscaler/vendor/k8s.io/client-go/features/known_features.go create mode 100644 cluster-autoscaler/vendor/k8s.io/component-base/logs/api/v1/text.go rename cluster-autoscaler/vendor/k8s.io/{legacy-cloud-providers/vsphere/vsphere_util_linux.go => klog/v2/contextual_slog.go} (61%) create mode 100644 cluster-autoscaler/vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go create mode 100644 cluster-autoscaler/vendor/k8s.io/klog/v2/safeptr.go create mode 100644 cluster-autoscaler/vendor/k8s.io/klog/v2/textlogger/options.go create mode 100644 cluster-autoscaler/vendor/k8s.io/klog/v2/textlogger/textlogger.go create mode 100644 cluster-autoscaler/vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providers.go create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/names.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_acr_helper.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_credentials.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/doc.go create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/client_adapter.go create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/clustertrustbundle/clustertrustbundle_manager.go rename cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/{util/config/config.go => kubelet/config/mux.go} (50%) rename cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/{util/iptables/iptables_unsupported.go => kubelet/container/testing/fake_ready_provider.go} (51%) delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/leaky/leaky.go rename cluster-autoscaler/vendor/k8s.io/{legacy-cloud-providers/vsphere/vsphere_util_unsupported.go => kubernetes/pkg/kubelet/userns/inuserns/inuserns_linux.go} (64%) rename cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/{volume/azure_file/doc.go => kubelet/userns/inuserns/inuserns_others.go} (75%) delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler_new.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconstruct_new.go create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/OWNERS create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/OWNERS create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/config/doc.go create mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_provision.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_util.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/auth/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_ratelimit.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_utils.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/cache/azure_cache.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/cache/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/azure_client_config.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/azure_containerserviceclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/azure_deploymentclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/azure_diskclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/azure_fileclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/azure_interfaceclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/azure_loadbalancerclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/azure_publicipclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/azure_routeclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/azure_routetableclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/azure_securitygroupclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/azure_snapshotclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/azure_storageaccountclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/azure_subnetclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/azure_vmclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/azure_vmsizeclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/azure_vmssclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/azure_vmssvmclient.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/metrics/azure_metrics.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/metrics/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_error.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_retry.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/retry/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/doc.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/shared_datastore.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/constants.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/custom_errors.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datacenter.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datastore.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/virtualdisk.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vmdm.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/folder.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/pbm.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/virtualmachine.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/vmoptions.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/vsphere_metrics.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go delete mode 100644 cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_volume_map.go diff --git a/builder/Dockerfile b/builder/Dockerfile index e02b6cd39efe..6e9dd16b93bd 100644 --- a/builder/Dockerfile +++ b/builder/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6 +FROM golang:1.21.8 LABEL maintainer="Marcin Wielgus " ENV GOPATH /gopath/ diff --git a/cluster-autoscaler/go.mod b/cluster-autoscaler/go.mod index 39549f7d10f9..0a1991cc6d5f 100644 --- a/cluster-autoscaler/go.mod +++ b/cluster-autoscaler/go.mod @@ -2,6 +2,8 @@ module k8s.io/autoscaler/cluster-autoscaler go 1.21 +toolchain go1.21.8 + require ( cloud.google.com/go/compute/metadata v0.2.3 github.com/Azure/azure-sdk-for-go v68.0.0+incompatible @@ -21,33 +23,33 @@ require ( github.com/google/uuid v1.6.0 github.com/jmespath/go-jmespath v0.4.0 github.com/json-iterator/go v1.1.12 - github.com/onsi/ginkgo/v2 v2.13.0 - github.com/onsi/gomega v1.29.0 + github.com/onsi/ginkgo/v2 v2.15.0 + github.com/onsi/gomega v1.31.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.16.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + golang.org/x/crypto v0.19.0 + golang.org/x/net v0.19.0 golang.org/x/oauth2 v0.10.0 - golang.org/x/sys v0.13.0 + golang.org/x/sys v0.17.0 google.golang.org/api v0.126.0 google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 gopkg.in/gcfg.v1 v1.2.3 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.29.0-alpha.3 - k8s.io/apimachinery v0.29.0-alpha.3 - k8s.io/apiserver v0.29.0-alpha.3 - k8s.io/client-go v0.29.0-alpha.3 - k8s.io/cloud-provider v0.29.0-alpha.3 + k8s.io/api v0.30.0-alpha.3 + k8s.io/apimachinery v0.30.0-alpha.3 + k8s.io/apiserver v0.30.0-alpha.3 + k8s.io/client-go v0.30.0-alpha.3 + k8s.io/cloud-provider v0.30.0-alpha.3 k8s.io/cloud-provider-aws v1.27.0 - k8s.io/code-generator v0.29.0-alpha.3 - k8s.io/component-base v0.29.0-alpha.3 - k8s.io/component-helpers v0.29.0-alpha.3 - k8s.io/klog/v2 v2.110.1 - k8s.io/kubelet v0.29.0-alpha.3 - k8s.io/kubernetes v1.29.0-alpha.3 + k8s.io/code-generator v0.30.0-alpha.3 + k8s.io/component-base v0.30.0-alpha.3 + k8s.io/component-helpers v0.30.0-alpha.3 + k8s.io/klog/v2 v2.120.1 + k8s.io/kubelet v0.30.0-alpha.3 + k8s.io/kubernetes v1.30.0-alpha.3 k8s.io/legacy-cloud-providers v0.0.0 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/cloud-provider-azure v1.28.0 @@ -86,15 +88,16 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect + github.com/dnaeon/go-vcr v1.2.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -129,18 +132,17 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb // indirect - github.com/mrunalp/fileutils v0.5.0 // indirect + github.com/mrunalp/fileutils v0.5.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/runc v1.1.9 // indirect + github.com/opencontainers/runc v1.1.12 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 // indirect github.com/seccomp/libseccomp-golang v0.10.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/cobra v1.7.0 // indirect @@ -149,7 +151,6 @@ require ( github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/vishvananda/netlink v1.1.0 // indirect github.com/vishvananda/netns v0.0.4 // indirect - github.com/vmware/govmomi v0.30.6 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect go.etcd.io/etcd/client/v3 v3.5.10 // indirect @@ -164,16 +165,15 @@ require ( go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect + go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/term v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.12.0 // indirect + golang.org/x/tools v0.16.1 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect @@ -183,17 +183,17 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.0.0 // indirect - k8s.io/controller-manager v0.29.0-alpha.3 // indirect - k8s.io/cri-api v0.29.0-alpha.3 // indirect + k8s.io/controller-manager v0.30.0-alpha.3 // indirect + k8s.io/cri-api v0.30.0-alpha.3 // indirect k8s.io/csi-translation-lib v0.27.0 // indirect k8s.io/dynamic-resource-allocation v0.0.0 // indirect k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/kms v0.29.0-alpha.3 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/kms v0.30.0-alpha.3 // indirect + k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e // indirect k8s.io/kube-scheduler v0.0.0 // indirect k8s.io/kubectl v0.28.0 // indirect k8s.io/mount-utils v0.26.0-alpha.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect ) @@ -203,62 +203,62 @@ replace github.com/digitalocean/godo => github.com/digitalocean/godo v1.27.0 replace github.com/rancher/go-rancher => github.com/rancher/go-rancher v0.1.0 -replace k8s.io/api => k8s.io/api v0.29.0-alpha.3 +replace k8s.io/api => k8s.io/api v0.30.0-alpha.3 -replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.0-alpha.3 +replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.0-alpha.3 -replace k8s.io/apimachinery => k8s.io/apimachinery v0.29.0-alpha.3 +replace k8s.io/apimachinery => k8s.io/apimachinery v0.30.0-alpha.3 -replace k8s.io/apiserver => k8s.io/apiserver v0.29.0-alpha.3 +replace k8s.io/apiserver => k8s.io/apiserver v0.30.0-alpha.3 -replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.29.0-alpha.3 +replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.0-alpha.3 -replace k8s.io/client-go => k8s.io/client-go v0.29.0-alpha.3 +replace k8s.io/client-go => k8s.io/client-go v0.30.0-alpha.3 -replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.29.0-alpha.3 +replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.0-alpha.3 -replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.29.0-alpha.3 +replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.0-alpha.3 -replace k8s.io/code-generator => k8s.io/code-generator v0.29.0-alpha.3 +replace k8s.io/code-generator => k8s.io/code-generator v0.30.0-alpha.3 -replace k8s.io/component-base => k8s.io/component-base v0.29.0-alpha.3 +replace k8s.io/component-base => k8s.io/component-base v0.30.0-alpha.3 -replace k8s.io/component-helpers => k8s.io/component-helpers v0.29.0-alpha.3 +replace k8s.io/component-helpers => k8s.io/component-helpers v0.30.0-alpha.3 -replace k8s.io/controller-manager => k8s.io/controller-manager v0.29.0-alpha.3 +replace k8s.io/controller-manager => k8s.io/controller-manager v0.30.0-alpha.3 -replace k8s.io/cri-api => k8s.io/cri-api v0.29.0-alpha.3 +replace k8s.io/cri-api => k8s.io/cri-api v0.30.0-alpha.3 -replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.29.0-alpha.3 +replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.0-alpha.3 -replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.29.0-alpha.3 +replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.0-alpha.3 -replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.29.0-alpha.3 +replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.0-alpha.3 -replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.29.0-alpha.3 +replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.0-alpha.3 -replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.29.0-alpha.3 +replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.0-alpha.3 -replace k8s.io/kubectl => k8s.io/kubectl v0.29.0-alpha.3 +replace k8s.io/kubectl => k8s.io/kubectl v0.30.0-alpha.3 -replace k8s.io/kubelet => k8s.io/kubelet v0.29.0-alpha.3 +replace k8s.io/kubelet => k8s.io/kubelet v0.30.0-alpha.3 -replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.29.0-alpha.3 +replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.0-alpha.3 -replace k8s.io/metrics => k8s.io/metrics v0.29.0-alpha.3 +replace k8s.io/metrics => k8s.io/metrics v0.30.0-alpha.3 -replace k8s.io/mount-utils => k8s.io/mount-utils v0.29.0-alpha.3 +replace k8s.io/mount-utils => k8s.io/mount-utils v0.30.0-alpha.3 -replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.29.0-alpha.3 +replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.0-alpha.3 -replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.29.0-alpha.3 +replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.0-alpha.3 -replace k8s.io/sample-controller => k8s.io/sample-controller v0.29.0-alpha.3 +replace k8s.io/sample-controller => k8s.io/sample-controller v0.30.0-alpha.3 -replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.29.0-alpha.3 +replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.0-alpha.3 -replace k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.29.0-alpha.3 +replace k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.0-alpha.3 -replace k8s.io/kms => k8s.io/kms v0.29.0-alpha.3 +replace k8s.io/kms => k8s.io/kms v0.30.0-alpha.3 -replace k8s.io/endpointslice => k8s.io/endpointslice v0.29.0-alpha.3 +replace k8s.io/endpointslice => k8s.io/endpointslice v0.30.0-alpha.3 diff --git a/cluster-autoscaler/go.sum b/cluster-autoscaler/go.sum index 241a70e0d698..6597ebec22b2 100644 --- a/cluster-autoscaler/go.sum +++ b/cluster-autoscaler/go.sum @@ -114,8 +114,6 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.44.241 h1:D3KycZq3HjhmjYGzvTcmX/Ztf/KNmsfTmdDuKdnzZKo= github.com/aws/aws-sdk-go v1.44.241/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -239,12 +237,12 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= @@ -448,26 +446,27 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb h1:e+l77LJOEqXTIQihQJVkA6ZxPOUmfPM5e4H7rcpgtSk= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= +github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= -github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4= @@ -505,8 +504,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8UUz1SO9cT9tizyIsATfB7b4D3tc= -github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/seccomp/libseccomp-golang v0.10.0 h1:aA4bp+/Zzi0BnWZ2F1wgNBs5gTpm+na2rWM6M9YjLpY= @@ -562,8 +559,6 @@ github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYp github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= -github.com/vmware/govmomi v0.30.6 h1:O3tjSwQBy0XwI5uK1/yVIfQ1LP9bAECEDUfifnyGs9U= -github.com/vmware/govmomi v0.30.6/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -623,20 +618,14 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -649,8 +638,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -689,8 +678,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -733,8 +722,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -766,8 +755,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -828,14 +817,14 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -847,8 +836,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -871,7 +860,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -912,8 +900,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1089,7 +1077,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= @@ -1100,63 +1087,63 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.0-alpha.3 h1:6QllqDvVn1jBNDXtFKzJg7mNQYYHYVANNBfP4z6Fu7Q= -k8s.io/api v0.29.0-alpha.3/go.mod h1:9zVQmGyL++Ki1RnuKUQ65LVgPP7WPq6pJwoQPfz9QPk= -k8s.io/apiextensions-apiserver v0.29.0-alpha.3 h1:D5JZVBDknOYpWTbK1+d5XQm0Y3sodG0Yxz1Mr0Wc44o= -k8s.io/apiextensions-apiserver v0.29.0-alpha.3/go.mod h1:bERujWZam5M3KWzrUWc2ujAQG1vxa3HVaSHO/OxIJjs= -k8s.io/apimachinery v0.29.0-alpha.3 h1:Y/VavRd57V5fliXV8M2Zr1Xyzi+raIhkDemWdGuuw6w= -k8s.io/apimachinery v0.29.0-alpha.3/go.mod h1:yFk3nwBh/jXlkMvRKH7BKtX7saT1lRmmGV6Ru0cTSUA= -k8s.io/apiserver v0.29.0-alpha.3 h1:xQlrw/AhtwGxMB7ox5sCItG63Njd8sXsHY701LizHdQ= -k8s.io/apiserver v0.29.0-alpha.3/go.mod h1:zsWRaMlVjUKc2a4Eyt+mlWwRwGg/2bXYwwqyBQ9C9Xk= -k8s.io/client-go v0.29.0-alpha.3 h1:934TEVX3ThG6yP/UWUM/1kBT+PzJQ4cxzyhXhA49fds= -k8s.io/client-go v0.29.0-alpha.3/go.mod h1:ZJK8Lomw8XdKVnmmvRWSSsJEWHv5RyWf8Hfnnv+p+AA= -k8s.io/cloud-provider v0.29.0-alpha.3 h1:BJvm/I9SB2TacWDZK6W4yByLBckeeEcJqL2btEQg3iE= -k8s.io/cloud-provider v0.29.0-alpha.3/go.mod h1:8SDiYEAyqr3HLS7gRTBGUpRvAGztXFGKJTK5nmXlLRg= +k8s.io/api v0.30.0-alpha.3 h1:EcbaDi8WjoR8QdQS6LKd8oP0qjODWxfKdVj5U8WM1P0= +k8s.io/api v0.30.0-alpha.3/go.mod h1:gUziZ7QreMQgwigIm0O6q1xN4w2DPIs6PwP9Ha3c9dQ= +k8s.io/apiextensions-apiserver v0.30.0-alpha.3 h1:yclPVUCBc/EACEVQhVdKGWzMhF3nqrbhytE0LqcjnXc= +k8s.io/apiextensions-apiserver v0.30.0-alpha.3/go.mod h1:znSzLc9nW/iy1rW4tom7QShv0J7MgXGLQvdvZgvHsck= +k8s.io/apimachinery v0.30.0-alpha.3 h1:9FoqT1Wc+48DJ+mYkbmZd3n4351u9YbGnQSPnVWUwWM= +k8s.io/apimachinery v0.30.0-alpha.3/go.mod h1:/862Kkwje5hhHGJWPKiaHuov2c6mw6uCXWikV9kOIP4= +k8s.io/apiserver v0.30.0-alpha.3 h1:Z73kgqfxr9XQmV11LCwWhHe7HXDArWLFkH8M2aOL+sI= +k8s.io/apiserver v0.30.0-alpha.3/go.mod h1:BNpQK5agUh2i5pfv6SeBSLMPdpGBc+cba6ct3MofK+s= +k8s.io/client-go v0.30.0-alpha.3 h1:0dj5DVlvaRI44HhHHI6cJxJ+n3F6GA1TwUV6U+L26No= +k8s.io/client-go v0.30.0-alpha.3/go.mod h1:waezUYZSoIV2fUNG2+pwia+wTwPb8HTRVHKd5v5rDg0= +k8s.io/cloud-provider v0.30.0-alpha.3 h1:btC1xBaX7PfJZ2E9MnAOUkiddCxnwjLEXKUlcXPFQDM= +k8s.io/cloud-provider v0.30.0-alpha.3/go.mod h1:fJPdTRHtZnRaG7kS52Q6SwmSPNBNgXpY+5Q3Kig0ijw= k8s.io/cloud-provider-aws v1.27.0 h1:PF8YrH8QcN6JoXB3Xxlaz84SBDYMPunJuCc0cPuCWXA= k8s.io/cloud-provider-aws v1.27.0/go.mod h1:9vUb5mnVnReSRDBWcBxB1b0HOeEc472iOPmrnwpN9SA= -k8s.io/code-generator v0.29.0-alpha.3 h1:OQeRh2S47GTJOZauTA3igT1wChmx3MPeObz5bhV9x8s= -k8s.io/code-generator v0.29.0-alpha.3/go.mod h1:C1oDIDCuN+hZsr8bZVFUp6dsOKvvMZ6jcmE4SFQn//8= -k8s.io/component-base v0.29.0-alpha.3 h1:R0Au5IIQaog5gx7P7M9hNQASA3Ca61e9r3WJmndZdsY= -k8s.io/component-base v0.29.0-alpha.3/go.mod h1:2ViYQzIf+qZRQFQxpcvz6xvOJnHtsj9CM6PSoYXg1HU= -k8s.io/component-helpers v0.29.0-alpha.3 h1:bc0Q654mJ/ULgVMPVajb+rCbTcee/55RJNNR38GHnXI= -k8s.io/component-helpers v0.29.0-alpha.3/go.mod h1:8vqwVQKAjWaFkqdOgY0no/CyypHmU+HWB3YhCOwDDAE= -k8s.io/controller-manager v0.29.0-alpha.3 h1:QLBQ3droXBoGwj202c0/we7qvynENVxcVIEJJ66cGhM= -k8s.io/controller-manager v0.29.0-alpha.3/go.mod h1:xgVCSzbzX9tBHflkUB3MI4GANd7ePkTgTQgDD+Mw6kw= -k8s.io/cri-api v0.29.0-alpha.3 h1:CS/RuCK+YL6sgGefbDX4rlznYASL8yAsqvLq3M5SvJY= -k8s.io/cri-api v0.29.0-alpha.3/go.mod h1:3a2YQ+dzaWb6S8NuTJnkldEbFCYOdfE9tVqUSlKbw4E= -k8s.io/csi-translation-lib v0.29.0-alpha.3 h1:u27f2djNHteJSstmnZLAEi0RQJwilgv4T4fYcaJR7eQ= -k8s.io/csi-translation-lib v0.29.0-alpha.3/go.mod h1:qkAWFUkeNUo8cBlTo46kTpJzHRPunSzErTyzCY7gh4w= -k8s.io/dynamic-resource-allocation v0.29.0-alpha.3 h1:ZR0VEFW1NJP7zfq/D1vULSTisWHWJSrtkMlvppBeODc= -k8s.io/dynamic-resource-allocation v0.29.0-alpha.3/go.mod h1:YTJQ0UDRrrNFWn7Zbu3bbUFvy6jhg5w5/m/RTsFT0Lk= +k8s.io/code-generator v0.30.0-alpha.3 h1:fECwF/f8ua0xti5GfgpWP8dqOcwD1IJUEXQhM6fi7Ro= +k8s.io/code-generator v0.30.0-alpha.3/go.mod h1:MuEqSZ4rgFkc0pmyi//QD/K26uzYwND/mgs/bJC+6HQ= +k8s.io/component-base v0.30.0-alpha.3 h1:krf6aBCCJHv4ga0wc4v3pNLEZ1gmBtxAUey5L9n2xlI= +k8s.io/component-base v0.30.0-alpha.3/go.mod h1:cvuAeLTeh91ELy3wPWFtJ+J4d08ws9zk/+mek4aLdHM= +k8s.io/component-helpers v0.30.0-alpha.3 h1:pY0mKQCKG7O6tSZWb87dI7GnD0IcO7FRyrfRO1sZOKQ= +k8s.io/component-helpers v0.30.0-alpha.3/go.mod h1:Ga/4AXsetMojfkZRlKT4129GTMCDw2oJustjtuWbuP8= +k8s.io/controller-manager v0.30.0-alpha.3 h1:Sw1s7OyfStNnfnnri67m6n3FkXVt53geBDcnXQ8IKLE= +k8s.io/controller-manager v0.30.0-alpha.3/go.mod h1:e0YxUtoqIunLcyCZDHpN7suh1CMI2HXeZHrUlaHh6ds= +k8s.io/cri-api v0.30.0-alpha.3 h1:oDH5Wt3Rkxh4hqfAtFaeOfFSY0z2qnzTbt5QHcVhnsc= +k8s.io/cri-api v0.30.0-alpha.3/go.mod h1:ccyGaZDcNRI40/m8vcr9gqkOI/iPI+ZSdpViZsNWhDA= +k8s.io/csi-translation-lib v0.30.0-alpha.3 h1:nysajtLeZFiHkAdKgRlEax1Ak7MSuor5BP/WK0r8o3g= +k8s.io/csi-translation-lib v0.30.0-alpha.3/go.mod h1:tC+hSM2zIhZ/xPqqMN0SmXSHZR4kKBimf88dCccc8xE= +k8s.io/dynamic-resource-allocation v0.30.0-alpha.3 h1:eYmUlGlfcEimyxnws0z88vHCXvKN6C5lwsft7zcBpaM= +k8s.io/dynamic-resource-allocation v0.30.0-alpha.3/go.mod h1:rgPUMSrZGEXTJCj2+VXQmOsYyT5J25C0jLJVKEePy3A= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kms v0.29.0-alpha.3 h1:MxOaeXnE50OEqb6CgbE1TAGZop387NF6/yeFghANsFc= -k8s.io/kms v0.29.0-alpha.3/go.mod h1:FqOEKmJMCoy6bPYdLRXYxPOdR9hQtM1/QUabKQIXCv8= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/kube-scheduler v0.29.0-alpha.3 h1:7nX3uMwD/k5FQSsiKlQ/bxnKh0/3i0HP6SZEqusyaF4= -k8s.io/kube-scheduler v0.29.0-alpha.3/go.mod h1:hH7ItZdOFsP7V+eNqxIiU19YuOqXWYll71SoS4u0o68= -k8s.io/kubectl v0.29.0-alpha.3 h1:Q9TkGB5HHJNjX9+sdzNeRNDashB7EF1aDOkwqcs0SlI= -k8s.io/kubectl v0.29.0-alpha.3/go.mod h1:tG9srWZBHIZHifk1ERUAmRyXLrR4hGeXzuAVU2Sz48I= -k8s.io/kubelet v0.29.0-alpha.3 h1:wiVt06zqSypK5WNWIuVs1LIyEOTuI0P4rTaRi/AdZSE= -k8s.io/kubelet v0.29.0-alpha.3/go.mod h1:zO7ssCmP+3Yg9M/bCdTJWkrLKTbs99Oie2MxwpZYkxo= -k8s.io/kubernetes v1.29.0-alpha.3 h1:EpsTUPqSynUEJCO5sZaq9pBxk/3y6mjTPMcG5fz089g= -k8s.io/kubernetes v1.29.0-alpha.3/go.mod h1:zBvSiD31nd9pX6tvl2+/Ds+cNJ8nAx/JSvzuXNpq/3A= -k8s.io/legacy-cloud-providers v0.29.0-alpha.3 h1:hXzZ5V84gNOmJzGIOJBOkWG7VMiye1b3njEs5zsrXEI= -k8s.io/legacy-cloud-providers v0.29.0-alpha.3/go.mod h1:4JrNQQiSo66qFzUi9bqdFVnQZ8l0QLiJ2LOmcZFVJ+U= -k8s.io/mount-utils v0.29.0-alpha.3 h1:DnGJaEEZe73bvBu5zhNhveh1UHC0zDlAAFNPRtTcCu4= -k8s.io/mount-utils v0.29.0-alpha.3/go.mod h1:rfxftInoYqE82uC/7UeqNYqgW71N0J64ftvgOkzUmew= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kms v0.30.0-alpha.3 h1:gA/3ayisIFPtjCkq4Mxcd8U1aM1MH/rYrSEwU3JhX9k= +k8s.io/kms v0.30.0-alpha.3/go.mod h1:a2u2EEVbvhimBrZ4UwbRySIP5Hhm8QgqC45xOT5ebR8= +k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e h1:snPmy96t93RredGRjKfMFt+gvxuVAncqSAyBveJtr4Q= +k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-scheduler v0.30.0-alpha.3 h1:EGhdnbMq8p7dp0nB3ZOOvdvTh9+c2dNeo+U0x8C6rRs= +k8s.io/kube-scheduler v0.30.0-alpha.3/go.mod h1:+VXkvl9Cnbz3KRoeJLhVgllTtzbc8/Xo3vX6Z5ysYPo= +k8s.io/kubectl v0.30.0-alpha.3 h1:Cq4evzMw2q5rcHfwJQS7HZGlH0axArxccLseM47J1c8= +k8s.io/kubectl v0.30.0-alpha.3/go.mod h1:7uWFP+swHfWEPfrTNu9OYSCqd1u87ntH6vA/u9vCdMQ= +k8s.io/kubelet v0.30.0-alpha.3 h1:nrmox2gdhnohIBoxKNUtEcK8VxoqVvRZ0zxzzr4RtA8= +k8s.io/kubelet v0.30.0-alpha.3/go.mod h1:TRGTE7NP4eW6ejZTTJhki9sKKplQ2FmRcdWCvsH3u3o= +k8s.io/kubernetes v1.30.0-alpha.3 h1:iNXxeu3ppkuOuUQ+apUVap8UROzQQw1ToOls9doIzo0= +k8s.io/kubernetes v1.30.0-alpha.3/go.mod h1:aW3opQ6TOnY8LHHsjQDykd7OByY5Ybd4FBXQlTlNDXw= +k8s.io/legacy-cloud-providers v0.30.0-alpha.3 h1:PI6hGuNix1i8ruZEbti9w7DOUvhX7eALZwniGNHb4cI= +k8s.io/legacy-cloud-providers v0.30.0-alpha.3/go.mod h1:4tnITpjHsaVZM8F0wlWFw2PNiRv8rHwcHKERR/elIjU= +k8s.io/mount-utils v0.30.0-alpha.3 h1:sBxg1kxidHy75l2OqI4ecPyI2qnum/5ldl/o4nzTleI= +k8s.io/mount-utils v0.30.0-alpha.3/go.mod h1:J9Oy8y8KrrjS4Ni00nrRj0oDYyld5k7dLNJVBIsBXjo= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= sigs.k8s.io/cloud-provider-azure v1.28.0 h1:LkvvDQ2u0rCr1lhFBoyjvKhYazhpYnAohOqQKN060H8= sigs.k8s.io/cloud-provider-azure v1.28.0/go.mod h1:ubvg4F58jePO4Z7C4XfgJkFFGpqhVeogpzOdc1X4dyk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json deleted file mode 100644 index ad0ecd947317..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", - "tag": "package-2019-12-01", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go deleted file mode 100644 index 8caf510ee78c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go +++ /dev/null @@ -1,652 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AvailabilitySetsClient is the compute Client -type AvailabilitySetsClient struct { - BaseClient -} - -// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient client. -func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { - return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient 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 NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient { - return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update an availability set. -// Parameters: -// resourceGroupName - the name of the resource group. -// availabilitySetName - the name of the availability set. -// parameters - parameters supplied to the Create Availability Set operation. -func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "availabilitySetName": autorest.Encode("path", availabilitySetName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/availabilitySets/{availabilitySetName}", pathParameters), - autorest.WithJSON(parameters), - 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 AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response) (result AvailabilitySet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete an availability set. -// Parameters: -// resourceGroupName - the name of the resource group. -// availabilitySetName - the name of the availability set. -func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, availabilitySetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "availabilitySetName": autorest.Encode("path", availabilitySetName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get retrieves information about an availability set. -// Parameters: -// resourceGroupName - the name of the resource group. -// availabilitySetName - the name of the availability set. -func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, availabilitySetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "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.AvailabilitySetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "availabilitySetName": autorest.Encode("path", availabilitySetName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/availabilitySets/{availabilitySetName}", 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 AvailabilitySetsClient) 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 AvailabilitySetsClient) GetResponder(resp *http.Response) (result AvailabilitySet, 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 availability sets in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.List") - defer func() { - sc := -1 - if result.aslr.Response.Response != nil { - sc = result.aslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.aslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure sending request") - return - } - - result.aslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure responding to request") - return - } - if result.aslr.hasNextLink() && result.aslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/availabilitySets", 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 AvailabilitySetsClient) 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 AvailabilitySetsClient) ListResponder(resp *http.Response) (result AvailabilitySetListResult, 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 AvailabilitySetsClient) listNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) { - req, err := lastResults.availabilitySetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "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.AvailabilitySetsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailabilitySetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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) - return -} - -// ListAvailableSizes lists all available virtual machine sizes that can be used to create a new virtual machine in an -// existing availability set. -// Parameters: -// resourceGroupName - the name of the resource group. -// availabilitySetName - the name of the availability set. -func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListAvailableSizes") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, availabilitySetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableSizesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableSizesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableSizesPreparer prepares the ListAvailableSizes request. -func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "availabilitySetName": autorest.Encode("path", availabilitySetName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/availabilitySets/{availabilitySetName}/vmSizes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the -// http.Response Body if it receives an error. -func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always -// closes the http.Response Body. -func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListBySubscription lists all availability sets in a subscription. -// Parameters: -// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'. -func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, expand string) (result AvailabilitySetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription") - defer func() { - sc := -1 - if result.aslr.Response.Response != nil { - sc = result.aslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.aslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.aslr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.aslr.hasNextLink() && result.aslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Context, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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}/providers/Microsoft.Compute/availabilitySets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client AvailabilitySetsClient) ListBySubscriptionResponder(resp *http.Response) (result AvailabilitySetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) { - req, err := lastResults.availabilitySetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, expand string) (result AvailabilitySetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription") - 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.ListBySubscription(ctx, expand) - return -} - -// Update update an availability set. -// Parameters: -// resourceGroupName - the name of the resource group. -// availabilitySetName - the name of the availability set. -// parameters - parameters supplied to the Update Availability Set operation. -func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (result AvailabilitySet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "availabilitySetName": autorest.Encode("path", availabilitySetName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/availabilitySets/{availabilitySetName}", pathParameters), - autorest.WithJSON(parameters), - 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 AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client AvailabilitySetsClient) UpdateResponder(resp *http.Response) (result AvailabilitySet, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go deleted file mode 100644 index c7c4543154d5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package compute implements the Azure ARM Compute service API version . -// -// Compute Client -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Compute - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Compute. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient 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 NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go deleted file mode 100644 index b1c854615c25..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go +++ /dev/null @@ -1,538 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ContainerServicesClient is the compute Client -type ContainerServicesClient struct { - BaseClient -} - -// NewContainerServicesClient creates an instance of the ContainerServicesClient client. -func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { - return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient 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 NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { - return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and -// agents. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -// parameters - parameters supplied to the Create or Update a Container Service operation. -func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ContainerServiceProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.Secret", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.ContainerServiceProperties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ContainerServiceProperties.AgentPoolProfiles", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ContainerServiceProperties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, - {Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.ContainerServiceProperties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-z][a-z0-9_-]*$`, Chain: nil}}}, - {Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.ContainerServiceProperties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.ContainerServicesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-01-31" - 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.ContainerService/containerServices/{containerServiceName}", pathParameters), - autorest.WithJSON(parameters), - 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 ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the specified container service in the specified subscription and resource group. The operation does -// not delete other resources created as part of creating a container service, including storage accounts, VMs, and -// availability sets. All the other resources created with the container service are part of the same resource group -// and can be deleted individually. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-01-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) 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 the properties of the specified container service in the specified subscription and resource group. The -// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters -// and agents. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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, containerServiceName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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.ContainerServicesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-01-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of container services in the specified subscription. The operation returns properties of each -// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. -func (client ContainerServicesClient) List(ctx context.Context) (result ContainerServiceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List") - defer func() { - sc := -1 - if result.cslr.Response.Response != nil { - sc = result.cslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.cslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure sending request") - return - } - - result.cslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request") - return - } - if result.cslr.hasNextLink() && result.cslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-01-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListResponder(resp *http.Response) (result ContainerServiceListResult, 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 ContainerServicesClient) listNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) { - req, err := lastResults.containerServiceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ContainerServiceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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) - return -} - -// ListByResourceGroup gets a list of container services in the specified subscription and resource group. The -// operation returns properties of each container service including state, orchestrator, number of masters and agents, -// and FQDNs of masters and agents. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.cslr.Response.Response != nil { - sc = result.cslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.cslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.cslr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.cslr.hasNextLink() && result.cslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-01-31" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerServiceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) { - req, err := lastResults.containerServiceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go deleted file mode 100644 index 70f9358cc5b5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go +++ /dev/null @@ -1,585 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// DedicatedHostGroupsClient is the compute Client -type DedicatedHostGroupsClient struct { - BaseClient -} - -// NewDedicatedHostGroupsClient creates an instance of the DedicatedHostGroupsClient client. -func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClient { - return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient 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 NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient { - return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups -// please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// parameters - parameters supplied to the Create Dedicated Host Group. -func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (result DedicatedHostGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.CreateOrUpdate") - 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: 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}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DedicatedHostGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHostGroup, 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 delete a dedicated host group. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DedicatedHostGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get retrieves information about a dedicated host group. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.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, hostGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "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.DedicatedHostGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/hostGroups/{hostGroupName}", 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 DedicatedHostGroupsClient) 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 DedicatedHostGroupsClient) GetResponder(resp *http.Response) (result DedicatedHostGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup lists all of the dedicated host groups in the specified resource group. Use the nextLink -// property in the response to get the next page of dedicated host groups. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.dhglr.Response.Response != nil { - sc = result.dhglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.dhglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.dhglr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/hostGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client DedicatedHostGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client DedicatedHostGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) { - req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListBySubscription lists all of the dedicated host groups in the subscription. Use the nextLink property in the -// response to get the next page of dedicated host groups. -func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context) (result DedicatedHostGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription") - defer func() { - sc := -1 - if result.dhglr.Response.Response != nil { - sc = result.dhglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.dhglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.dhglr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client DedicatedHostGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client DedicatedHostGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) { - req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result DedicatedHostGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription") - 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.ListBySubscription(ctx) - return -} - -// Update update an dedicated host group. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// parameters - parameters supplied to the Update Dedicated Host Group operation. -func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (result DedicatedHostGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DedicatedHostGroupsClient) UpdateResponder(resp *http.Response) (result DedicatedHostGroup, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go deleted file mode 100644 index eebe2534f7b3..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go +++ /dev/null @@ -1,493 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// DedicatedHostsClient is the compute Client -type DedicatedHostsClient struct { - BaseClient -} - -// NewDedicatedHostsClient creates an instance of the DedicatedHostsClient client. -func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { - return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient 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 NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient { - return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a dedicated host . -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// hostName - the name of the dedicated host . -// parameters - parameters supplied to the Create Dedicated Host. -func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (result DedicatedHostsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {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}, - }}, - }}, - {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "hostName": autorest.Encode("path", hostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters), - autorest.WithJSON(parameters), - 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 DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DedicatedHostsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHost, 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 delete a dedicated host. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// hostName - the name of the dedicated host. -func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (result DedicatedHostsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName, hostName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "hostName": autorest.Encode("path", hostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DedicatedHostsClient) 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 retrieves information about a dedicated host. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// hostName - the name of the dedicated host. -// expand - the expand expression to apply on the operation. -func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (result DedicatedHost, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.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, hostGroupName, hostName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "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.DedicatedHostsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "hostName": autorest.Encode("path", hostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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/hostGroups/{hostGroupName}/hosts/{hostName}", 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 DedicatedHostsClient) 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 DedicatedHostsClient) GetResponder(resp *http.Response) (result DedicatedHost, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByHostGroup lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in -// the response to get the next page of dedicated hosts. -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup") - defer func() { - sc := -1 - if result.dhlr.Response.Response != nil { - sc = result.dhlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByHostGroupNextResults - req, err := client.ListByHostGroupPreparer(ctx, resourceGroupName, hostGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByHostGroupSender(req) - if err != nil { - result.dhlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure sending request") - return - } - - result.dhlr, err = client.ListByHostGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request") - return - } - if result.dhlr.hasNextLink() && result.dhlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByHostGroupPreparer prepares the ListByHostGroup request. -func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/hostGroups/{hostGroupName}/hosts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByHostGroupSender sends the ListByHostGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always -// closes the http.Response Body. -func (client DedicatedHostsClient) ListByHostGroupResponder(resp *http.Response) (result DedicatedHostListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByHostGroupNextResults retrieves the next set of results, if any. -func (client DedicatedHostsClient) listByHostGroupNextResults(ctx context.Context, lastResults DedicatedHostListResult) (result DedicatedHostListResult, err error) { - req, err := lastResults.dedicatedHostListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByHostGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByHostGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByHostGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client DedicatedHostsClient) ListByHostGroupComplete(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup") - 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.ListByHostGroup(ctx, resourceGroupName, hostGroupName) - return -} - -// Update update an dedicated host . -// Parameters: -// resourceGroupName - the name of the resource group. -// hostGroupName - the name of the dedicated host group. -// hostName - the name of the dedicated host . -// parameters - parameters supplied to the Update Dedicated Host operation. -func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (result DedicatedHostsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostGroupName": autorest.Encode("path", hostGroupName), - "hostName": autorest.Encode("path", hostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters), - autorest.WithJSON(parameters), - 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 DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DedicatedHostsClient) UpdateResponder(resp *http.Response) (result DedicatedHost, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go deleted file mode 100644 index 7b232cdfb8bc..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go +++ /dev/null @@ -1,601 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// DiskEncryptionSetsClient is the compute Client -type DiskEncryptionSetsClient struct { - BaseClient -} - -// NewDiskEncryptionSetsClient creates an instance of the DiskEncryptionSetsClient client. -func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient { - return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient 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 NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient { - return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a 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. -// diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set -// operation. -func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (result DiskEncryptionSetsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: diskEncryptionSet, - Constraints: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.DiskEncryptionSetsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (*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 = "2019-11-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/diskEncryptionSets/{diskEncryptionSetName}", pathParameters), - autorest.WithJSON(diskEncryptionSet), - 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 DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Response) (result DiskEncryptionSet, 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 deletes a 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) Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSetsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, diskEncryptionSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DiskEncryptionSetsClient) DeletePreparer(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 = "2019-11-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/diskEncryptionSets/{diskEncryptionSetName}", 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 DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DiskEncryptionSetsClient) 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 information about a 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) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.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, diskEncryptionSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "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.DiskEncryptionSetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DiskEncryptionSetsClient) GetPreparer(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 = "2019-11-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.Compute/diskEncryptionSets/{diskEncryptionSetName}", 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 DiskEncryptionSetsClient) 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 DiskEncryptionSetsClient) GetResponder(resp *http.Response) (result DiskEncryptionSet, 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 the disk encryption sets under a subscription. -func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEncryptionSetListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List") - defer func() { - sc := -1 - if result.desl.Response.Response != nil { - sc = result.desl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.desl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure sending request") - return - } - - result.desl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request") - return - } - if result.desl.hasNextLink() && result.desl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", 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 DiskEncryptionSetsClient) 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 DiskEncryptionSetsClient) ListResponder(resp *http.Response) (result DiskEncryptionSetList, 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 DiskEncryptionSetsClient) listNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) { - req, err := lastResults.diskEncryptionSetListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "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.DiskEncryptionSetsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result DiskEncryptionSetListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.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) - return -} - -// ListByResourceGroup lists all the disk encryption sets under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.desl.Response.Response != nil { - sc = result.desl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.desl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.desl, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.desl.hasNextLink() && result.desl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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.Compute/diskEncryptionSets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client DiskEncryptionSetsClient) ListByResourceGroupResponder(resp *http.Response) (result DiskEncryptionSetList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client DiskEncryptionSetsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) { - req, err := lastResults.diskEncryptionSetListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client DiskEncryptionSetsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates (patches) a 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. -// diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set -// operation. -func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (result DiskEncryptionSetsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (*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 = "2019-11-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/diskEncryptionSets/{diskEncryptionSetName}", pathParameters), - autorest.WithJSON(diskEncryptionSet), - 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 DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DiskEncryptionSetsClient) UpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go deleted file mode 100644 index d3c7af7f3832..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go +++ /dev/null @@ -1,774 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// DisksClient is the compute Client -type DisksClient struct { - BaseClient -} - -// NewDisksClient creates an instance of the DisksClient client. -func NewDisksClient(subscriptionID string) DisksClient { - return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDisksClientWithBaseURI creates an instance of the DisksClient 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 NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient { - return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -// disk - disk object supplied in the body of the Put disk operation. -func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (result DisksCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: disk, - Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskName, disk) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - disk.ManagedBy = nil - disk.ManagedByExtended = nil - 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/disks/{diskName}", pathParameters), - autorest.WithJSON(disk), - 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 DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) (result DisksDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, diskName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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/disks/{diskName}", 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 DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DisksClient) 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 information about a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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, diskName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "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.DisksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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.Compute/disks/{diskName}", 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 DisksClient) 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 DisksClient) GetResponder(resp *http.Response) (result Disk, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GrantAccess grants access to a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -// grantAccessData - access data object supplied in the body of the get disk access operation. -func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (result DisksGrantAccessFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.GrantAccess") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: grantAccessData, - Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.DisksClient", "GrantAccess", err.Error()) - } - - req, err := client.GrantAccessPreparer(ctx, resourceGroupName, diskName, grantAccessData) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure preparing request") - return - } - - result, err = client.GrantAccessSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", result.Response(), "Failure sending request") - return - } - - return -} - -// GrantAccessPreparer prepares the GrantAccess request. -func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", pathParameters), - autorest.WithJSON(grantAccessData), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GrantAccessSender sends the GrantAccess request. The method will close the -// http.Response Body if it receives an error. -func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GrantAccessResponder handles the response to the GrantAccess request. The method always -// closes the http.Response Body. -func (client DisksClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all the disks under a subscription. -func (client DisksClient) List(ctx context.Context) (result DiskListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List") - defer func() { - sc := -1 - if result.dl.Response.Response != nil { - sc = result.dl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.dl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", 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 DisksClient) 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 DisksClient) ListResponder(resp *http.Response) (result DiskList, 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 DisksClient) listNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) { - req, err := lastResults.diskListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DisksClient", "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.DisksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DisksClient) ListComplete(ctx context.Context) (result DiskListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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) - return -} - -// ListByResourceGroup lists all the disks under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.dl.Response.Response != nil { - sc = result.dl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.dl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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.Compute/disks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client DisksClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) { - req, err := lastResults.diskListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// RevokeAccess revokes access to a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result DisksRevokeAccessFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.RevokeAccess") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, diskName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request") - return - } - - result, err = client.RevokeAccessSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", result.Response(), "Failure sending request") - return - } - - return -} - -// RevokeAccessPreparer prepares the RevokeAccess request. -func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RevokeAccessSender sends the RevokeAccess request. The method will close the -// http.Response Body if it receives an error. -func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RevokeAccessResponder handles the response to the RevokeAccess request. The method always -// closes the http.Response Body. -func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates (patches) a disk. -// Parameters: -// resourceGroupName - the name of the resource group. -// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 -// characters. -// disk - disk object supplied in the body of the Patch disk operation. -func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, diskName, disk) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diskName": autorest.Encode("path", diskName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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/disks/{diskName}", pathParameters), - autorest.WithJSON(disk), - 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 DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/enums.go deleted file mode 100644 index e666bfc7361d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/enums.go +++ /dev/null @@ -1,1393 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// 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} -} - -// 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 ( - // EncryptionAtRestWithCustomerKey Disk is encrypted with Customer managed key at rest. - EncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey" - // EncryptionAtRestWithPlatformKey Disk is encrypted with XStore managed key at rest. It is the default - // encryption type. - EncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey" -) - -// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type. -func PossibleEncryptionTypeValues() []EncryptionType { - return []EncryptionType{EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformKey} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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 ( - // Automatic ... - Automatic UpgradeMode = "Automatic" - // Manual ... - Manual UpgradeMode = "Manual" - // Rolling ... - Rolling UpgradeMode = "Rolling" -) - -// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. -func PossibleUpgradeModeValues() []UpgradeMode { - return []UpgradeMode{Automatic, Manual, Rolling} -} - -// 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} -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go deleted file mode 100644 index 0d32432e367a..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go +++ /dev/null @@ -1,580 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// GalleriesClient is the compute Client -type GalleriesClient struct { - BaseClient -} - -// NewGalleriesClient creates an instance of the GalleriesClient client. -func NewGalleriesClient(subscriptionID string) GalleriesClient { - return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient 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 NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient { - return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a Shared Image Gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with -// dots and periods allowed in the middle. The maximum length is 80 characters. -// gallery - parameters supplied to the create or update Shared Image Gallery operation. -func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (result GalleriesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, gallery) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}", pathParameters), - autorest.WithJSON(gallery), - 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 GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (result Gallery, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a Shared Image Gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery to be deleted. -func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleriesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}", 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 GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client GalleriesClient) 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 retrieves information about a Shared Image Gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery. -func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string) (result Gallery, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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, galleryName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "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.GalleriesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}", 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 GalleriesClient) 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 GalleriesClient) GetResponder(resp *http.Response) (result Gallery, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list galleries under a subscription. -func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List") - defer func() { - sc := -1 - if result.gl.Response.Response != nil { - sc = result.gl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.gl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure sending request") - return - } - - result.gl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request") - return - } - if result.gl.hasNextLink() && result.gl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", 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 GalleriesClient) 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 GalleriesClient) ListResponder(resp *http.Response) (result GalleryList, 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 GalleriesClient) listNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) { - req, err := lastResults.galleryListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "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.GalleriesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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) - return -} - -// ListByResourceGroup list galleries under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result GalleryListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.gl.Response.Response != nil { - sc = result.gl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.gl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.gl, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.gl.hasNextLink() && result.gl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response) (result GalleryList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client GalleriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) { - req, err := lastResults.galleryListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result GalleryListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update update a Shared Image Gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with -// dots and periods allowed in the middle. The maximum length is 80 characters. -// gallery - parameters supplied to the update Shared Image Gallery operation. -func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}", pathParameters), - autorest.WithJSON(gallery), - 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 GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go deleted file mode 100644 index 7886b4fec37c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go +++ /dev/null @@ -1,485 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// GalleryApplicationsClient is the compute Client -type GalleryApplicationsClient struct { - BaseClient -} - -// NewGalleryApplicationsClient creates an instance of the GalleryApplicationsClient client. -func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClient { - return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient 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 NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient { - return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a gallery Application Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be -// created. -// galleryApplicationName - the name of the gallery Application Definition to be created or updated. The -// allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The -// maximum length is 80 characters. -// galleryApplication - parameters supplied to the create or update gallery Application operation. -func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (result GalleryApplicationsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters), - autorest.WithJSON(galleryApplication), - 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 GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GalleryApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplication, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a gallery Application. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be -// deleted. -// galleryApplicationName - the name of the gallery Application Definition to be deleted. -func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}", 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 GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client GalleryApplicationsClient) 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 retrieves information about a gallery Application Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery from which the Application Definitions are to be -// retrieved. -// galleryApplicationName - the name of the gallery Application Definition to be retrieved. -func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplication, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.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, galleryName, galleryApplicationName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "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.GalleryApplicationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", 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 GalleryApplicationsClient) 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 GalleryApplicationsClient) GetResponder(resp *http.Response) (result GalleryApplication, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByGallery list gallery Application Definitions in a gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery from which Application Definitions are to be -// listed. -func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery") - defer func() { - sc := -1 - if result.gal.Response.Response != nil { - sc = result.gal.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByGalleryNextResults - req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", nil, "Failure preparing request") - return - } - - resp, err := client.ListByGallerySender(req) - if err != nil { - result.gal.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure sending request") - return - } - - result.gal, err = client.ListByGalleryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request") - return - } - if result.gal.hasNextLink() && result.gal.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByGalleryPreparer prepares the ListByGallery request. -func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/applications", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByGallerySender sends the ListByGallery request. The method will close the -// http.Response Body if it receives an error. -func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByGalleryResponder handles the response to the ListByGallery request. The method always -// closes the http.Response Body. -func (client GalleryApplicationsClient) ListByGalleryResponder(resp *http.Response) (result GalleryApplicationList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByGalleryNextResults retrieves the next set of results, if any. -func (client GalleryApplicationsClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryApplicationList) (result GalleryApplicationList, err error) { - req, err := lastResults.galleryApplicationListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByGallerySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByGalleryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery") - 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.ListByGallery(ctx, resourceGroupName, galleryName) - return -} - -// Update update a gallery Application Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be -// updated. -// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed -// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum -// length is 80 characters. -// galleryApplication - parameters supplied to the update gallery Application operation. -func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters), - autorest.WithJSON(galleryApplication), - 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 GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go deleted file mode 100644 index 3958d3bbe33c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go +++ /dev/null @@ -1,514 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// GalleryApplicationVersionsClient is the compute Client -type GalleryApplicationVersionsClient struct { - BaseClient -} - -// NewGalleryApplicationVersionsClient creates an instance of the GalleryApplicationVersionsClient client. -func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicationVersionsClient { - return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient 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 NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient { - return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a gallery Application Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. -// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is -// to be created. -// galleryApplicationVersionName - the name of the gallery Application Version to be created. Needs to follow -// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range -// of a 32-bit integer. Format: .. -// galleryApplicationVersion - parameters supplied to the create or update gallery Application Version -// operation. -func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (result GalleryApplicationVersionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: galleryApplicationVersion, - Constraints: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.FileName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.MediaLink", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.GalleryApplicationVersionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters), - autorest.WithJSON(galleryApplicationVersion), - 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 GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GalleryApplicationVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a gallery Application Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. -// galleryApplicationName - the name of the gallery Application Definition in which the Application Version -// resides. -// galleryApplicationVersionName - the name of the gallery Application Version to be deleted. -func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result GalleryApplicationVersionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", 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 GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client GalleryApplicationVersionsClient) 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 retrieves information about a gallery Application Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. -// galleryApplicationName - the name of the gallery Application Definition in which the Application Version -// resides. -// galleryApplicationVersionName - the name of the gallery Application Version to be retrieved. -// expand - the expand expression to apply on the operation. -func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (result GalleryApplicationVersion, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.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, galleryName, galleryApplicationName, galleryApplicationVersionName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "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.GalleryApplicationVersionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", 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 GalleryApplicationVersionsClient) 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 GalleryApplicationVersionsClient) GetResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByGalleryApplication list gallery Application Versions in a gallery Application Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. -// galleryApplicationName - the name of the Shared Application Gallery Application Definition from which the -// Application Versions are to be listed. -func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication") - defer func() { - sc := -1 - if result.gavl.Response.Response != nil { - sc = result.gavl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByGalleryApplicationNextResults - req, err := client.ListByGalleryApplicationPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", nil, "Failure preparing request") - return - } - - resp, err := client.ListByGalleryApplicationSender(req) - if err != nil { - result.gavl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure sending request") - return - } - - result.gavl, err = client.ListByGalleryApplicationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request") - return - } - if result.gavl.hasNextLink() && result.gavl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByGalleryApplicationPreparer prepares the ListByGalleryApplication request. -func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the -// http.Response Body if it receives an error. -func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always -// closes the http.Response Body. -func (client GalleryApplicationVersionsClient) ListByGalleryApplicationResponder(resp *http.Response) (result GalleryApplicationVersionList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByGalleryApplicationNextResults retrieves the next set of results, if any. -func (client GalleryApplicationVersionsClient) listByGalleryApplicationNextResults(ctx context.Context, lastResults GalleryApplicationVersionList) (result GalleryApplicationVersionList, err error) { - req, err := lastResults.galleryApplicationVersionListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByGalleryApplicationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByGalleryApplicationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByGalleryApplicationComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication") - 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.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName) - return -} - -// Update update a gallery Application Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. -// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is -// to be updated. -// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow -// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range -// of a 32-bit integer. Format: .. -// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation. -func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryApplicationName": autorest.Encode("path", galleryApplicationName), - "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters), - autorest.WithJSON(galleryApplicationVersion), - 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 GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go deleted file mode 100644 index a57095ccf216..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go +++ /dev/null @@ -1,492 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// GalleryImagesClient is the compute Client -type GalleryImagesClient struct { - BaseClient -} - -// NewGalleryImagesClient creates an instance of the GalleryImagesClient client. -func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { - return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient 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 NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient { - return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a gallery Image Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be created. -// galleryImageName - the name of the gallery Image Definition to be created or updated. The allowed characters -// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 -// characters. -// galleryImage - parameters supplied to the create or update gallery image operation. -func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (result GalleryImagesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: galleryImage, - Constraints: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier.Publisher", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "galleryImage.GalleryImageProperties.Identifier.Offer", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "galleryImage.GalleryImageProperties.Identifier.Sku", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.GalleryImagesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}", pathParameters), - autorest.WithJSON(galleryImage), - 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 GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a gallery image. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be deleted. -// galleryImageName - the name of the gallery Image Definition to be deleted. -func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImagesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}", 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 GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client GalleryImagesClient) 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 retrieves information about a gallery Image Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery from which the Image Definitions are to be retrieved. -// galleryImageName - the name of the gallery Image Definition to be retrieved. -func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.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, galleryName, galleryImageName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "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.GalleryImagesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/images/{galleryImageName}", 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 GalleryImagesClient) 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 GalleryImagesClient) GetResponder(resp *http.Response) (result GalleryImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByGallery list gallery Image Definitions in a gallery. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery from which Image Definitions are to be listed. -func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery") - defer func() { - sc := -1 - if result.gil.Response.Response != nil { - sc = result.gil.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByGalleryNextResults - req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", nil, "Failure preparing request") - return - } - - resp, err := client.ListByGallerySender(req) - if err != nil { - result.gil.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure sending request") - return - } - - result.gil, err = client.ListByGalleryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request") - return - } - if result.gil.hasNextLink() && result.gil.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByGalleryPreparer prepares the ListByGallery request. -func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/images", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByGallerySender sends the ListByGallery request. The method will close the -// http.Response Body if it receives an error. -func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByGalleryResponder handles the response to the ListByGallery request. The method always -// closes the http.Response Body. -func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (result GalleryImageList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByGalleryNextResults retrieves the next set of results, if any. -func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryImageList) (result GalleryImageList, err error) { - req, err := lastResults.galleryImageListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByGallerySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByGalleryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery") - 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.ListByGallery(ctx, resourceGroupName, galleryName) - return -} - -// Update update a gallery Image Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated. -// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are -// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 -// characters. -// galleryImage - parameters supplied to the update gallery image operation. -func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}", pathParameters), - autorest.WithJSON(galleryImage), - 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 GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go deleted file mode 100644 index 5db43f681fcf..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go +++ /dev/null @@ -1,503 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// GalleryImageVersionsClient is the compute Client -type GalleryImageVersionsClient struct { - BaseClient -} - -// NewGalleryImageVersionsClient creates an instance of the GalleryImageVersionsClient client. -func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsClient { - return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient 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 NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient { - return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a gallery Image Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. -// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be created. -// galleryImageVersionName - the name of the gallery Image Version to be created. Needs to follow semantic -// version name pattern: The allowed characters are digit and period. Digits must be within the range of a -// 32-bit integer. Format: .. -// galleryImageVersion - parameters supplied to the create or update gallery Image Version operation. -func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (result GalleryImageVersionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: galleryImageVersion, - Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), - autorest.WithJSON(galleryImageVersion), - 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 GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a gallery Image Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. -// galleryImageName - the name of the gallery Image Definition in which the Image Version resides. -// galleryImageVersionName - the name of the gallery Image Version to be deleted. -func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result GalleryImageVersionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", 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 GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client GalleryImageVersionsClient) 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 retrieves information about a gallery Image Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. -// galleryImageName - the name of the gallery Image Definition in which the Image Version resides. -// galleryImageVersionName - the name of the gallery Image Version to be retrieved. -// expand - the expand expression to apply on the operation. -func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (result GalleryImageVersion, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.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, galleryName, galleryImageName, galleryImageVersionName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "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.GalleryImageVersionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", 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 GalleryImageVersionsClient) 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 GalleryImageVersionsClient) GetResponder(resp *http.Response) (result GalleryImageVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByGalleryImage list gallery Image Versions in a gallery Image Definition. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. -// galleryImageName - the name of the Shared Image Gallery Image Definition from which the Image Versions are -// to be listed. -func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage") - defer func() { - sc := -1 - if result.givl.Response.Response != nil { - sc = result.givl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByGalleryImageNextResults - req, err := client.ListByGalleryImagePreparer(ctx, resourceGroupName, galleryName, galleryImageName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", nil, "Failure preparing request") - return - } - - resp, err := client.ListByGalleryImageSender(req) - if err != nil { - result.givl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure sending request") - return - } - - result.givl, err = client.ListByGalleryImageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request") - return - } - if result.givl.hasNextLink() && result.givl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByGalleryImagePreparer prepares the ListByGalleryImage request. -func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the -// http.Response Body if it receives an error. -func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always -// closes the http.Response Body. -func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.Response) (result GalleryImageVersionList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByGalleryImageNextResults retrieves the next set of results, if any. -func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx context.Context, lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) { - req, err := lastResults.galleryImageVersionListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByGalleryImageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByGalleryImageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByGalleryImageComplete enumerates all values, automatically crossing page boundaries as required. -func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage") - 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.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName) - return -} - -// Update update a gallery Image Version. -// Parameters: -// resourceGroupName - the name of the resource group. -// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. -// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be updated. -// galleryImageVersionName - the name of the gallery Image Version to be updated. Needs to follow semantic -// version name pattern: The allowed characters are digit and period. Digits must be within the range of a -// 32-bit integer. Format: .. -// galleryImageVersion - parameters supplied to the update gallery Image Version operation. -func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "galleryImageName": autorest.Encode("path", galleryImageName), - "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), - "galleryName": autorest.Encode("path", galleryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), - autorest.WithJSON(galleryImageVersion), - 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 GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go deleted file mode 100644 index d0b4009a4afe..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go +++ /dev/null @@ -1,583 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ImagesClient is the compute Client -type ImagesClient struct { - BaseClient -} - -// NewImagesClient creates an instance of the ImagesClient client. -func NewImagesClient(subscriptionID string) ImagesClient { - return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewImagesClientWithBaseURI creates an instance of the ImagesClient 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 NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient { - return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update an image. -// Parameters: -// resourceGroupName - the name of the resource group. -// imageName - the name of the image. -// parameters - parameters supplied to the Create Image operation. -func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (result ImagesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, imageName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "imageName": autorest.Encode("path", imageName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/images/{imageName}", pathParameters), - autorest.WithJSON(parameters), - 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 ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result Image, 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 deletes an Image. -// Parameters: -// resourceGroupName - the name of the resource group. -// imageName - the name of the image. -func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string, imageName string) (result ImagesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, imageName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, imageName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "imageName": autorest.Encode("path", imageName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/images/{imageName}", 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 ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ImagesClient) 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 an image. -// Parameters: -// resourceGroupName - the name of the resource group. -// imageName - the name of the image. -// expand - the expand expression to apply on the operation. -func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result Image, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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, imageName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "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.ImagesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, imageName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "imageName": autorest.Encode("path", imageName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/images/{imageName}", 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 ImagesClient) 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 ImagesClient) GetResponder(resp *http.Response) (result Image, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of -// Images. Do this till nextLink is null to fetch all the Images. -func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.List") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure sending request") - return - } - - result.ilr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure responding to request") - return - } - if result.ilr.hasNextLink() && result.ilr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", 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 ImagesClient) 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 ImagesClient) ListResponder(resp *http.Response) (result ImageListResult, 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 ImagesClient) listNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) { - req, err := lastResults.imageListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "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.ImagesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ImagesClient) ListComplete(ctx context.Context) (result ImageListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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) - return -} - -// ListByResourceGroup gets the list of images under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ImageListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.ilr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.ilr.hasNextLink() && result.ilr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/images", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ImagesClient) ListByResourceGroupResponder(resp *http.Response) (result ImageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ImagesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) { - req, err := lastResults.imageListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ImageListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update update an image. -// Parameters: -// resourceGroupName - the name of the resource group. -// imageName - the name of the image. -// parameters - parameters supplied to the Update Image operation. -func (client ImagesClient) Update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (result ImagesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, imageName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "imageName": autorest.Encode("path", imageName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/images/{imageName}", pathParameters), - autorest.WithJSON(parameters), - 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 ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ImagesClient) UpdateResponder(resp *http.Response) (result Image, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go deleted file mode 100644 index e388b68ee2e6..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go +++ /dev/null @@ -1,206 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// LogAnalyticsClient is the compute Client -type LogAnalyticsClient struct { - BaseClient -} - -// NewLogAnalyticsClient creates an instance of the LogAnalyticsClient client. -func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { - return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient 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 NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient { - return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ExportRequestRateByInterval export logs that show Api requests made by this subscription in the given time window to -// show throttling activities. -// Parameters: -// parameters - parameters supplied to the LogAnalytics getRequestRateByInterval Api. -// location - the location upon which virtual-machine-sizes is queried. -func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context, parameters RequestRateByIntervalInput, location string) (result LogAnalyticsExportRequestRateByIntervalFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.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.LogAnalyticsClient", "ExportRequestRateByInterval", err.Error()) - } - - req, err := client.ExportRequestRateByIntervalPreparer(ctx, parameters, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure preparing request") - return - } - - result, err = client.ExportRequestRateByIntervalSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request") - return - } - - return -} - -// ExportRequestRateByIntervalPreparer prepares the ExportRequestRateByInterval request. -func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context.Context, parameters RequestRateByIntervalInput, location string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the -// http.Response Body if it receives an error. -func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ExportRequestRateByIntervalResponder handles the response to the ExportRequestRateByInterval request. The method always -// closes the http.Response Body. -func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ExportThrottledRequests export logs that show total throttled Api requests for this subscription in the given time -// window. -// Parameters: -// parameters - parameters supplied to the LogAnalytics getThrottledRequests Api. -// location - the location upon which virtual-machine-sizes is queried. -func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, parameters ThrottledRequestsInput, location string) (result LogAnalyticsExportThrottledRequestsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.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.LogAnalyticsClient", "ExportThrottledRequests", err.Error()) - } - - req, err := client.ExportThrottledRequestsPreparer(ctx, parameters, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure preparing request") - return - } - - result, err = client.ExportThrottledRequestsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request") - return - } - - return -} - -// ExportThrottledRequestsPreparer prepares the ExportThrottledRequests request. -func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Context, parameters ThrottledRequestsInput, location string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the -// http.Response Body if it receives an error. -func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ExportThrottledRequestsResponder handles the response to the ExportThrottledRequests request. The method always -// closes the http.Response Body. -func (client LogAnalyticsClient) ExportThrottledRequestsResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go deleted file mode 100644 index 4cb1fad422d4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go +++ /dev/null @@ -1,15500 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" - -// 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"` -} - -// MarshalJSON is the custom marshaler for AccessURI. -func (au AccessURI) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale -// set. -type AdditionalCapabilities struct { - // 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"` -} - -// 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"` -} - -// 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"` -} - -// 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"` -} - -// 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"` -} - -// 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"` -} - -// 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) -} - -// 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 - } - } - } - - 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. - NextLink *string `json:"nextLink,omitempty"` -} - -// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values. -type AvailabilitySetListResultIterator struct { - i int - page AvailabilitySetListResultPage -} - -// 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 -} - -// 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()) -} - -// 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()) -} - -// Response returns the raw server response from the last page request. -func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult { - 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 { - if !iter.page.NotDone() { - return AvailabilitySet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AvailabilitySetListResultIterator type. -func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator { - return AvailabilitySetListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (aslr AvailabilitySetListResult) IsEmpty() bool { - return aslr.Value == nil || len(*aslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (aslr AvailabilitySetListResult) hasNextLink() bool { - return aslr.NextLink != nil && len(*aslr.NextLink) != 0 -} - -// 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))) -} - -// AvailabilitySetListResultPage contains a page of AvailabilitySet values. -type AvailabilitySetListResultPage struct { - fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error) - aslr AvailabilitySetListResult -} - -// 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 -} - -// 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()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AvailabilitySetListResultPage) NotDone() bool { - return !page.aslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult { - return page.aslr -} - -// 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 -} - -// 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, - } -} - -// 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"` -} - -// 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) -} - -// 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 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) -} - -// 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 - } - } - } - - return nil -} - -// 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"` -} - -// 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. - 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. - ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` - // SerialConsoleLogBlobURI - READ-ONLY; The Linux serial console log blob Uri. - 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 BootDiagnosticsInstanceView. -func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CloudError an error response from the Compute service. -type CloudError struct { - Error *APIError `json:"error,omitempty"` -} - -// 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 - 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"` -} - -// MarshalJSON is the custom marshaler for ContainerService. -func (cs ContainerService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cs.ContainerServiceProperties != nil { - objectMap["properties"] = cs.ContainerServiceProperties - } - if cs.Location != nil { - objectMap["location"] = cs.Location - } - if cs.Tags != nil { - objectMap["tags"] = cs.Tags - } - return json.Marshal(objectMap) -} - -// 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 { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var containerServiceProperties ContainerServiceProperties - err = json.Unmarshal(*v, &containerServiceProperties) - if err != nil { - return err - } - cs.ContainerServiceProperties = &containerServiceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cs.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cs.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cs.Tags = tags - } - } - } - - 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"` -} - -// 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"` -} - -// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values. -type ContainerServiceListResultIterator struct { - i int - 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 *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.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 *ContainerServiceListResultIterator) 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 { - 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 { - 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 { - if !iter.page.NotDone() { - return ContainerService{} - } - return iter.page.Values()[iter.i] -} - -// 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 (cslr ContainerServiceListResult) IsEmpty() bool { - return cslr.Value == nil || len(*cslr.Value) == 0 -} - -// 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 (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(cslr.NextLink))) -} - -// 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 *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.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.cslr) - if err != nil { - return err - } - page.cslr = 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 *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 ContainerServiceListResultPage) NotDone() bool { - return !page.cslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -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 ContainerServiceListResultPage) Values() []ContainerService { - if page.cslr.IsEmpty() { - return nil - } - return *page.cslr.Value -} - -// 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, - } -} - -// 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"` -} - -// 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) -} - -// 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 csp.OrchestratorProfile != nil { - objectMap["orchestratorProfile"] = csp.OrchestratorProfile - } - if csp.CustomProfile != nil { - objectMap["customProfile"] = csp.CustomProfile - } - 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) -} - -// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ContainerServicesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ContainerServicesClient) (ContainerService, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ContainerServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ContainerServicesCreateOrUpdateFuture.Result. -func (future *ContainerServicesCreateOrUpdateFuture) result(client ContainerServicesClient) (cs ContainerService, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - cs.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { - cs, err = client.CreateOrUpdateResponder(cs.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request") - } - } - return -} - -// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ContainerServicesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ContainerServicesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ContainerServicesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ContainerServicesDeleteFuture.Result. -func (future *ContainerServicesDeleteFuture) result(client ContainerServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster -// to use for manipulating Azure APIs. -type ContainerServiceServicePrincipalProfile struct { - // 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"` -} - -// 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) -} - -// 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"` -} - -// 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 - } - 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"` -} - -// MarshalJSON is the custom marshaler for DataDiskImage. -func (ddi DataDiskImage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// 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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DedicatedHost. -func (dh DedicatedHost) 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 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 DedicatedHost struct. -func (dh *DedicatedHost) 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 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) - if err != nil { - return err - } - dh.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dh.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dh.Tags = tags - } - } - } - - 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"` -} - -// 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 -} - -// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response. -type DedicatedHostGroupListResult 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. - NextLink *string `json:"nextLink,omitempty"` -} - -// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values. -type DedicatedHostGroupListResultIterator struct { - i int - 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 *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.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 *DedicatedHostGroupListResultIterator) 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 { - 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 { - 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 { - if !iter.page.NotDone() { - return DedicatedHostGroup{} - } - return iter.page.Values()[iter.i] -} - -// 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 (dhglr DedicatedHostGroupListResult) IsEmpty() bool { - return dhglr.Value == nil || len(*dhglr.Value) == 0 -} - -// 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 (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(dhglr.NextLink))) -} - -// 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 *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.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.dhglr) - if err != nil { - return err - } - page.dhglr = 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 *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 DedicatedHostGroupListResultPage) NotDone() bool { - return !page.dhglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -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 DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup { - if page.dhglr.IsEmpty() { - return nil - } - return *page.dhglr.Value -} - -// 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, - } -} - -// 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"` -} - -// 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 - } - return json.Marshal(objectMap) -} - -// 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) { - objectMap := make(map[string]interface{}) - if dhgu.DedicatedHostGroupProperties != nil { - objectMap["properties"] = dhgu.DedicatedHostGroupProperties - } - if dhgu.Zones != nil { - objectMap["zones"] = dhgu.Zones - } - if dhgu.Tags != nil { - objectMap["tags"] = dhgu.Tags - } - 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"` -} - -// MarshalJSON is the custom marshaler for DedicatedHostInstanceView. -func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dhiv.AvailableCapacity != nil { - objectMap["availableCapacity"] = dhiv.AvailableCapacity - } - if dhiv.Statuses != nil { - objectMap["statuses"] = dhiv.Statuses - } - return json.Marshal(objectMap) -} - -// 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 -} - -// 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 (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(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) - }() - } - for { - next, err := page.fn(ctx, page.dhlr) - if err != nil { - return err - } - page.dhlr = 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 *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(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage { - return DedicatedHostListResultPage{ - fn: getNextPage, - dhlr: cur, - } -} - -// 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"` -} - -// MarshalJSON is the custom marshaler for DedicatedHostProperties. -func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dhp.PlatformFaultDomain != nil { - objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain - } - if dhp.AutoReplaceOnFailure != nil { - objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure - } - if dhp.LicenseType != "" { - objectMap["licenseType"] = dhp.LicenseType - } - return json.Marshal(objectMap) -} - -// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DedicatedHostsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DedicatedHostsClient) (DedicatedHost, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result. -func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent { - dh, err = client.CreateOrUpdateResponder(dh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request") - } - } - return -} - -// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DedicatedHostsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DedicatedHostsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DedicatedHostsDeleteFuture.Result. -func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DedicatedHostsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DedicatedHostsClient) (DedicatedHost, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DedicatedHostsUpdateFuture.Result. -func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent { - dh, err = client.UpdateResponder(dh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request") - } - } - return -} - -// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and -// licenseType may be updated. -type DedicatedHostUpdate struct { - *DedicatedHostProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DedicatedHostUpdate. -func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dhu.DedicatedHostProperties != nil { - objectMap["properties"] = dhu.DedicatedHostProperties - } - if dhu.Tags != nil { - objectMap["tags"] = dhu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct. -func (dhu *DedicatedHostUpdate) 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 dedicatedHostProperties DedicatedHostProperties - err = json.Unmarshal(*v, &dedicatedHostProperties) - if err != nil { - return err - } - dhu.DedicatedHostProperties = &dedicatedHostProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dhu.Tags = tags - } - } - } - - return nil -} - -// DiagnosticsProfile specifies the boot diagnostic settings state.

Minimum api-version: -// 2015-06-15. -type DiagnosticsProfile struct { - // 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 *BootDiagnostics `json:"bootDiagnostics,omitempty"` -} - -// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating -// system disk.

NOTE: The ephemeral disk settings can only be specified for managed disk. -type DiffDiskSettings struct { - // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local' - Option DiffDiskOptions `json:"option,omitempty"` - // Placement - Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk' - Placement DiffDiskPlacement `json:"placement,omitempty"` -} - -// Disallowed describes the disallowed disk types. -type Disallowed struct { - // DiskTypes - A list of disk types. - DiskTypes *[]string `json:"diskTypes,omitempty"` -} - -// Disk disk resource. -type Disk struct { - autorest.Response `json:"-"` - // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. - ManagedBy *string `json:"managedBy,omitempty"` - // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. - ManagedByExtended *[]string `json:"managedByExtended,omitempty"` - Sku *DiskSku `json:"sku,omitempty"` - // Zones - The Logical zone list for Disk. - Zones *[]string `json:"zones,omitempty"` - *DiskProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for Disk. -func (d Disk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.Sku != nil { - objectMap["sku"] = d.Sku - } - if d.Zones != nil { - objectMap["zones"] = d.Zones - } - if d.DiskProperties != nil { - objectMap["properties"] = d.DiskProperties - } - if d.Location != nil { - objectMap["location"] = d.Location - } - if d.Tags != nil { - objectMap["tags"] = d.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Disk struct. -func (d *Disk) 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 "managedBy": - if v != nil { - var managedBy string - err = json.Unmarshal(*v, &managedBy) - if err != nil { - return err - } - d.ManagedBy = &managedBy - } - case "managedByExtended": - if v != nil { - var managedByExtended []string - err = json.Unmarshal(*v, &managedByExtended) - if err != nil { - return err - } - d.ManagedByExtended = &managedByExtended - } - case "sku": - if v != nil { - var sku DiskSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - d.Sku = &sku - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - d.Zones = &zones - } - case "properties": - if v != nil { - var diskProperties DiskProperties - err = json.Unmarshal(*v, &diskProperties) - if err != nil { - return err - } - d.DiskProperties = &diskProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - d.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - d.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - d.Tags = tags - } - } - } - - return nil -} - -// DiskEncryptionSet disk encryption set resource. -type DiskEncryptionSet struct { - autorest.Response `json:"-"` - Identity *EncryptionSetIdentity `json:"identity,omitempty"` - *EncryptionSetProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for DiskEncryptionSet. -func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if desVar.Identity != nil { - objectMap["identity"] = desVar.Identity - } - if desVar.EncryptionSetProperties != nil { - objectMap["properties"] = desVar.EncryptionSetProperties - } - if desVar.Location != nil { - objectMap["location"] = desVar.Location - } - if desVar.Tags != nil { - objectMap["tags"] = desVar.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct. -func (desVar *DiskEncryptionSet) 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 "identity": - if v != nil { - var identity EncryptionSetIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - desVar.Identity = &identity - } - case "properties": - if v != nil { - var encryptionSetProperties EncryptionSetProperties - err = json.Unmarshal(*v, &encryptionSetProperties) - if err != nil { - return err - } - desVar.EncryptionSetProperties = &encryptionSetProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - desVar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - desVar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - desVar.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - desVar.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - desVar.Tags = tags - } - } - } - - return nil -} - -// DiskEncryptionSetList the List disk encryption set operation response. -type DiskEncryptionSetList struct { - autorest.Response `json:"-"` - // Value - A list of disk encryption sets. - Value *[]DiskEncryptionSet `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets. - NextLink *string `json:"nextLink,omitempty"` -} - -// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values. -type DiskEncryptionSetListIterator struct { - i int - page DiskEncryptionSetListPage -} - -// 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 *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.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 *DiskEncryptionSetListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DiskEncryptionSetListIterator) 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 DiskEncryptionSetListIterator) Response() DiskEncryptionSetList { - 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 DiskEncryptionSetListIterator) Value() DiskEncryptionSet { - if !iter.page.NotDone() { - return DiskEncryptionSet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DiskEncryptionSetListIterator type. -func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator { - return DiskEncryptionSetListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(desl.NextLink))) -} - -// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values. -type DiskEncryptionSetListPage struct { - fn func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error) - desl DiskEncryptionSetList -} - -// 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 *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.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.desl) - if err != nil { - return err - } - page.desl = 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 *DiskEncryptionSetListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DiskEncryptionSetListPage) NotDone() bool { - return !page.desl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList { - return page.desl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet { - if page.desl.IsEmpty() { - return nil - } - return *page.desl.Value -} - -// Creates a new instance of the DiskEncryptionSetListPage type. -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 -// that can be specified for disk.

NOTE: The disk encryption set resource id can only be specified -// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. -type DiskEncryptionSetParameters struct { - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DiskEncryptionSetsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result. -func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - desVar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent { - desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request") - } - } - return -} - -// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DiskEncryptionSetsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DiskEncryptionSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result. -func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DiskEncryptionSetsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result. -func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - desVar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent { - desVar, err = client.UpdateResponder(desVar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request") - } - } - return -} - -// DiskEncryptionSettings describes a Encryption Settings for a Disk -type DiskEncryptionSettings struct { - // DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret. - DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` - // KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault. - KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` - // Enabled - Specifies whether disk encryption should be enabled on the virtual machine. - Enabled *bool `json:"enabled,omitempty"` -} - -// DiskEncryptionSetUpdate disk encryption set update resource. -type DiskEncryptionSetUpdate struct { - *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate. -func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if desu.DiskEncryptionSetUpdateProperties != nil { - objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties - } - if desu.Tags != nil { - objectMap["tags"] = desu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct. -func (desu *DiskEncryptionSetUpdate) 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 diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties - err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties) - if err != nil { - return err - } - desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - desu.Tags = tags - } - } - } - - return nil -} - -// DiskEncryptionSetUpdateProperties disk encryption set resource update properties. -type DiskEncryptionSetUpdateProperties struct { - ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"` -} - -// DiskImageEncryption this is the disk image encryption base class. -type DiskImageEncryption struct { - // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` -} - -// DiskInstanceView the instance view of the disk. -type DiskInstanceView struct { - // Name - The disk name. - Name *string `json:"name,omitempty"` - // EncryptionSettings - Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 - EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// DiskList the List Disks operation response. -type DiskList struct { - autorest.Response `json:"-"` - // Value - A list of disks. - Value *[]Disk `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks. - NextLink *string `json:"nextLink,omitempty"` -} - -// DiskListIterator provides access to a complete listing of Disk values. -type DiskListIterator struct { - i int - page DiskListPage -} - -// 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 *DiskListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.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 *DiskListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DiskListIterator) 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 DiskListIterator) Response() DiskList { - 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 DiskListIterator) Value() Disk { - if !iter.page.NotDone() { - return Disk{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DiskListIterator type. -func NewDiskListIterator(page DiskListPage) DiskListIterator { - return DiskListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dl.NextLink))) -} - -// DiskListPage contains a page of Disk values. -type DiskListPage struct { - fn func(context.Context, DiskList) (DiskList, error) - dl DiskList -} - -// 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 *DiskListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.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.dl) - if err != nil { - return err - } - page.dl = 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 *DiskListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DiskListPage) NotDone() bool { - return !page.dl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DiskListPage) Response() DiskList { - return page.dl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DiskListPage) Values() []Disk { - if page.dl.IsEmpty() { - return nil - } - return *page.dl.Value -} - -// Creates a new instance of the DiskListPage type. -func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage { - return DiskListPage{ - fn: getNextPage, - dl: cur, - } -} - -// DiskProperties disk resource properties. -type DiskProperties struct { - // TimeCreated - READ-ONLY; The time when the disk was created. - TimeCreated *date.Time `json:"timeCreated,omitempty"` - // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` - // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. - CreationData *CreationData `json:"creationData,omitempty"` - // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. - 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"` - // UniqueID - READ-ONLY; Unique Guid identifying the resource. - UniqueID *string `json:"uniqueId,omitempty"` - // EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. - EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` - // ProvisioningState - READ-ONLY; The disk provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. - DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` - // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. - DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` - // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. - 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 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"` - // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. - MaxShares *int32 `json:"maxShares,omitempty"` - // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. - ShareInfo *[]ShareInfoElement `json:"shareInfo,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.Encryption != nil { - objectMap["encryption"] = dp.Encryption - } - if dp.MaxShares != nil { - objectMap["maxShares"] = dp.MaxShares - } - return json.Marshal(objectMap) -} - -// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DisksCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DisksClient) (Disk, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DisksCreateOrUpdateFuture.Result. -func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - d.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { - d, err = client.CreateOrUpdateResponder(d.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") - } - } - return -} - -// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type DisksDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DisksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DisksDeleteFuture.Result. -func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type DisksGrantAccessFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DisksClient) (AccessURI, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DisksGrantAccessFuture.Result. -func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - au.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { - au, err = client.GrantAccessResponder(au.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") - } - } - return -} - -// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. -type DiskSku struct { - // Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS' - Name DiskStorageAccountTypes `json:"name,omitempty"` - // Tier - READ-ONLY; The sku tier. - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DisksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DisksRevokeAccessFuture.Result. -func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture") - return - } - ar.Response = future.Response() - return -} - -// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type DisksUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DisksClient) (Disk, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DisksUpdateFuture.Result. -func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - d.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent { - d, err = client.UpdateResponder(d.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request") - } - } - return -} - -// DiskUpdate disk update resource. -type DiskUpdate struct { - *DiskUpdateProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` - Sku *DiskSku `json:"sku,omitempty"` -} - -// MarshalJSON is the custom marshaler for DiskUpdate. -func (du DiskUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if du.DiskUpdateProperties != nil { - objectMap["properties"] = du.DiskUpdateProperties - } - if du.Tags != nil { - objectMap["tags"] = du.Tags - } - if du.Sku != nil { - objectMap["sku"] = du.Sku - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct. -func (du *DiskUpdate) 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 diskUpdateProperties DiskUpdateProperties - err = json.Unmarshal(*v, &diskUpdateProperties) - if err != nil { - return err - } - du.DiskUpdateProperties = &diskUpdateProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - du.Tags = tags - } - case "sku": - if v != nil { - var sku DiskSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - du.Sku = &sku - } - } - } - - return nil -} - -// DiskUpdateProperties disk resource update properties. -type DiskUpdateProperties struct { - // OsType - the Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. - EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` - // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. - DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` - // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. - DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` - // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. - 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"` - // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. - MaxShares *int32 `json:"maxShares,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"` -} - -// 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 - The type of key used to encrypt the data of the disk. Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey' - Type EncryptionType `json:"type,omitempty"` -} - -// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data -// disks in the gallery artifact. -type EncryptionImages struct { - OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"` - // DataDiskImages - A list of encryption specifications for data disk images. - DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"` -} - -// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on -// the key vault before it can be used to encrypt disks. -type EncryptionSetIdentity struct { - // Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported. Possible values include: 'SystemAssigned' - Type DiskEncryptionSetIdentityType `json:"type,omitempty"` - // PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity - 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 { - // 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. - PreviousKeys *[]KeyVaultAndKeyReference `json:"previousKeys,omitempty"` - // ProvisioningState - READ-ONLY; The disk encryption set provisioning state. - 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.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. - Enabled *bool `json:"enabled,omitempty"` - // EncryptionSettings - A collection of encryption settings, one for each disk volume. - EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"` - // EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption. - EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"` -} - -// EncryptionSettingsElement encryption settings for one disk volume. -type EncryptionSettingsElement struct { - // DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key - DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"` - // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. - KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"` -} - -// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type GalleriesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleriesClient) (Gallery, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleriesCreateOrUpdateFuture.Result. -func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - g.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent { - g, err = client.CreateOrUpdateResponder(g.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type GalleriesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleriesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleriesDeleteFuture.Result. -func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type GalleriesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleriesClient) (Gallery, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleriesUpdateFuture.Result. -func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - g.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent { - g, err = client.UpdateResponder(g.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request") - } - } - return -} - -// Gallery specifies information about the Shared Image Gallery that you want to create or update. -type Gallery struct { - autorest.Response `json:"-"` - *GalleryProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for Gallery. -func (g Gallery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if g.GalleryProperties != nil { - objectMap["properties"] = g.GalleryProperties - } - if g.Location != nil { - objectMap["location"] = g.Location - } - if g.Tags != nil { - objectMap["tags"] = g.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Gallery struct. -func (g *Gallery) 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 galleryProperties GalleryProperties - err = json.Unmarshal(*v, &galleryProperties) - if err != nil { - return err - } - g.GalleryProperties = &galleryProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - g.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - g.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - g.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - g.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - g.Tags = tags - } - } - } - - return nil -} - -// GalleryApplication specifies information about the gallery Application Definition that you want to -// create or update. -type GalleryApplication struct { - autorest.Response `json:"-"` - *GalleryApplicationProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for GalleryApplication. -func (ga GalleryApplication) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ga.GalleryApplicationProperties != nil { - objectMap["properties"] = ga.GalleryApplicationProperties - } - if ga.Location != nil { - objectMap["location"] = ga.Location - } - if ga.Tags != nil { - objectMap["tags"] = ga.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct. -func (ga *GalleryApplication) 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 galleryApplicationProperties GalleryApplicationProperties - err = json.Unmarshal(*v, &galleryApplicationProperties) - if err != nil { - return err - } - ga.GalleryApplicationProperties = &galleryApplicationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ga.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ga.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ga.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ga.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ga.Tags = tags - } - } - } - - return nil -} - -// GalleryApplicationList the List Gallery Applications operation response. -type GalleryApplicationList struct { - autorest.Response `json:"-"` - // Value - A list of Gallery Applications. - Value *[]GalleryApplication `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions. - NextLink *string `json:"nextLink,omitempty"` -} - -// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values. -type GalleryApplicationListIterator struct { - i int - page GalleryApplicationListPage -} - -// 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 *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.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 *GalleryApplicationListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter GalleryApplicationListIterator) 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 GalleryApplicationListIterator) Response() GalleryApplicationList { - 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 GalleryApplicationListIterator) Value() GalleryApplication { - if !iter.page.NotDone() { - return GalleryApplication{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the GalleryApplicationListIterator type. -func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator { - return GalleryApplicationListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(gal.NextLink))) -} - -// GalleryApplicationListPage contains a page of GalleryApplication values. -type GalleryApplicationListPage struct { - fn func(context.Context, GalleryApplicationList) (GalleryApplicationList, error) - gal GalleryApplicationList -} - -// 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 *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.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.gal) - if err != nil { - return err - } - page.gal = 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 *GalleryApplicationListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page GalleryApplicationListPage) NotDone() bool { - return !page.gal.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page GalleryApplicationListPage) Response() GalleryApplicationList { - return page.gal -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page GalleryApplicationListPage) Values() []GalleryApplication { - if page.gal.IsEmpty() { - return nil - } - return *page.gal.Value -} - -// Creates a new instance of the GalleryApplicationListPage type. -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. -type GalleryApplicationProperties struct { - // Description - The description of this gallery Application Definition resource. This property is updatable. - Description *string `json:"description,omitempty"` - // Eula - The Eula agreement for the gallery Application Definition. - Eula *string `json:"eula,omitempty"` - // PrivacyStatementURI - The privacy statement uri. - PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` - // ReleaseNoteURI - The release note uri. - ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"` -} - -// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryApplicationsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationsClient) (GalleryApplication, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result. -func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ga.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent { - ga, err = client.CreateOrUpdateResponder(ga.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryApplicationsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationsDeleteFuture.Result. -func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryApplicationsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationsClient) (GalleryApplication, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationsUpdateFuture.Result. -func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ga.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent { - ga, err = client.UpdateResponder(ga.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to -// update. -type GalleryApplicationUpdate struct { - *GalleryApplicationProperties `json:"properties,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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GalleryApplicationUpdate. -func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gau.GalleryApplicationProperties != nil { - objectMap["properties"] = gau.GalleryApplicationProperties - } - if gau.Tags != nil { - objectMap["tags"] = gau.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct. -func (gau *GalleryApplicationUpdate) 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 galleryApplicationProperties GalleryApplicationProperties - err = json.Unmarshal(*v, &galleryApplicationProperties) - if err != nil { - return err - } - gau.GalleryApplicationProperties = &galleryApplicationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gau.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gau.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gau.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gau.Tags = tags - } - } - } - - return nil -} - -// GalleryApplicationVersion specifies information about the gallery Application Version that you want to -// create or update. -type GalleryApplicationVersion struct { - autorest.Response `json:"-"` - *GalleryApplicationVersionProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for GalleryApplicationVersion. -func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gav.GalleryApplicationVersionProperties != nil { - objectMap["properties"] = gav.GalleryApplicationVersionProperties - } - if gav.Location != nil { - objectMap["location"] = gav.Location - } - if gav.Tags != nil { - objectMap["tags"] = gav.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct. -func (gav *GalleryApplicationVersion) 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 galleryApplicationVersionProperties GalleryApplicationVersionProperties - err = json.Unmarshal(*v, &galleryApplicationVersionProperties) - if err != nil { - return err - } - gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gav.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gav.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gav.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - gav.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gav.Tags = tags - } - } - } - - return nil -} - -// GalleryApplicationVersionList the List Gallery Application version operation response. -type GalleryApplicationVersionList struct { - autorest.Response `json:"-"` - // Value - A list of gallery Application Versions. - Value *[]GalleryApplicationVersion `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions. - NextLink *string `json:"nextLink,omitempty"` -} - -// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion -// values. -type GalleryApplicationVersionListIterator struct { - i int - page GalleryApplicationVersionListPage -} - -// 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 *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.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 *GalleryApplicationVersionListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter GalleryApplicationVersionListIterator) 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 GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList { - 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 GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion { - if !iter.page.NotDone() { - return GalleryApplicationVersion{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the GalleryApplicationVersionListIterator type. -func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator { - return GalleryApplicationVersionListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(gavl.NextLink))) -} - -// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values. -type GalleryApplicationVersionListPage struct { - fn func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error) - gavl GalleryApplicationVersionList -} - -// 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 *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.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.gavl) - if err != nil { - return err - } - page.gavl = 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 *GalleryApplicationVersionListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page GalleryApplicationVersionListPage) NotDone() bool { - return !page.gavl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList { - return page.gavl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion { - if page.gavl.IsEmpty() { - return nil - } - return *page.gavl.Value -} - -// Creates a new instance of the GalleryApplicationVersionListPage type. -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. -type GalleryApplicationVersionProperties struct { - PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating' - ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"` - // ReplicationStatus - READ-ONLY - 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"` - // ContentType - Optional. May be used to help process this file. The type of file contained in the source, e.g. zip, json, etc. - ContentType *string `json:"contentType,omitempty"` - // EnableHealthCheck - Optional. Whether or not this application reports health. - EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"` - // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. - TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` - // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. - ReplicaCount *int32 `json:"replicaCount,omitempty"` - // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. - ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` - // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published. - PublishedDate *date.Time `json:"publishedDate,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result. -func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - gav.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent { - gav, err = client.CreateOrUpdateResponder(gav.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryApplicationVersionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationVersionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result. -func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryApplicationVersionsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result. -func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - gav.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent { - gav, err = client.UpdateResponder(gav.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you -// want to update. -type GalleryApplicationVersionUpdate struct { - *GalleryApplicationVersionProperties `json:"properties,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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate. -func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gavu.GalleryApplicationVersionProperties != nil { - objectMap["properties"] = gavu.GalleryApplicationVersionProperties - } - if gavu.Tags != nil { - objectMap["tags"] = gavu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct. -func (gavu *GalleryApplicationVersionUpdate) 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 galleryApplicationVersionProperties GalleryApplicationVersionProperties - err = json.Unmarshal(*v, &galleryApplicationVersionProperties) - if err != nil { - return err - } - gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gavu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gavu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gavu.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gavu.Tags = tags - } - } - } - - return nil -} - -// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile. -type GalleryArtifactPublishingProfileBase struct { - // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. - TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` - // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. - ReplicaCount *int32 `json:"replicaCount,omitempty"` - // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. - ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` - // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published. - PublishedDate *date.Time `json:"publishedDate,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' - 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"` -} - -// GalleryArtifactVersionSource the gallery artifact version source. -type GalleryArtifactVersionSource struct { - // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image. - ID *string `json:"id,omitempty"` -} - -// GalleryDataDiskImage this is the data disk image. -type GalleryDataDiskImage 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"` - // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. - SizeInGB *int32 `json:"sizeInGB,omitempty"` - // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,omitempty"` - 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. - SizeInGB *int32 `json:"sizeInGB,omitempty"` - // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,omitempty"` - 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. - UniqueName *string `json:"uniqueName,omitempty"` -} - -// MarshalJSON is the custom marshaler for GalleryIdentifier. -func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// GalleryImage specifies information about the gallery Image Definition that you want to create or update. -type GalleryImage struct { - autorest.Response `json:"-"` - *GalleryImageProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for GalleryImage. -func (gi GalleryImage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gi.GalleryImageProperties != nil { - objectMap["properties"] = gi.GalleryImageProperties - } - if gi.Location != nil { - objectMap["location"] = gi.Location - } - if gi.Tags != nil { - objectMap["tags"] = gi.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryImage struct. -func (gi *GalleryImage) 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 galleryImageProperties GalleryImageProperties - err = json.Unmarshal(*v, &galleryImageProperties) - if err != nil { - return err - } - gi.GalleryImageProperties = &galleryImageProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gi.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gi.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gi.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - gi.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gi.Tags = tags - } - } - } - - return nil -} - -// GalleryImageIdentifier this is the gallery Image Definition identifier. -type GalleryImageIdentifier struct { - // Publisher - The name of the gallery Image Definition publisher. - Publisher *string `json:"publisher,omitempty"` - // Offer - The name of the gallery Image Definition offer. - Offer *string `json:"offer,omitempty"` - // Sku - The name of the gallery Image Definition SKU. - Sku *string `json:"sku,omitempty"` -} - -// GalleryImageList the List Gallery Images operation response. -type GalleryImageList struct { - autorest.Response `json:"-"` - // Value - A list of Shared Image Gallery images. - Value *[]GalleryImage `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery Image Definitions. - NextLink *string `json:"nextLink,omitempty"` -} - -// GalleryImageListIterator provides access to a complete listing of GalleryImage values. -type GalleryImageListIterator struct { - i int - page GalleryImageListPage -} - -// 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 *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.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 *GalleryImageListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter GalleryImageListIterator) 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 GalleryImageListIterator) Response() GalleryImageList { - 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 GalleryImageListIterator) Value() GalleryImage { - if !iter.page.NotDone() { - return GalleryImage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the GalleryImageListIterator type. -func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator { - return GalleryImageListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(gil.NextLink))) -} - -// GalleryImageListPage contains a page of GalleryImage values. -type GalleryImageListPage struct { - fn func(context.Context, GalleryImageList) (GalleryImageList, error) - gil GalleryImageList -} - -// 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 *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.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.gil) - if err != nil { - return err - } - page.gil = 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 *GalleryImageListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page GalleryImageListPage) NotDone() bool { - return !page.gil.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page GalleryImageListPage) Response() GalleryImageList { - return page.gil -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page GalleryImageListPage) Values() []GalleryImage { - if page.gil.IsEmpty() { - return nil - } - return *page.gil.Value -} - -// Creates a new instance of the GalleryImageListPage type. -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. -type GalleryImageProperties struct { - // Description - The description of this gallery Image Definition resource. This property is updatable. - Description *string `json:"description,omitempty"` - // Eula - The Eula agreement for the gallery Image Definition. - Eula *string `json:"eula,omitempty"` - // PrivacyStatementURI - The privacy statement uri. - PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"` - // ReleaseNoteURI - The release note uri. - ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"` - // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized' - OsState OperatingSystemStateTypes `json:"osState,omitempty"` - // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` - Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` - Disallowed *Disallowed `json:"disallowed,omitempty"` - PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating' - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImagesClient) (GalleryImage, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result. -func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - gi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent { - gi, err = client.CreateOrUpdateResponder(gi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type GalleryImagesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImagesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImagesDeleteFuture.Result. -func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type GalleryImagesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImagesClient) (GalleryImage, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImagesUpdateFuture.Result. -func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - gi.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent { - gi, err = client.UpdateResponder(gi.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update. -type GalleryImageUpdate struct { - *GalleryImageProperties `json:"properties,omitempty"` - // 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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GalleryImageUpdate. -func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if giu.GalleryImageProperties != nil { - objectMap["properties"] = giu.GalleryImageProperties - } - if giu.Tags != nil { - objectMap["tags"] = giu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct. -func (giu *GalleryImageUpdate) 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 galleryImageProperties GalleryImageProperties - err = json.Unmarshal(*v, &galleryImageProperties) - if err != nil { - return err - } - giu.GalleryImageProperties = &galleryImageProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - giu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - giu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - giu.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - giu.Tags = tags - } - } - } - - return nil -} - -// GalleryImageVersion specifies information about the gallery Image Version that you want to create or -// update. -type GalleryImageVersion struct { - autorest.Response `json:"-"` - *GalleryImageVersionProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for GalleryImageVersion. -func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if giv.GalleryImageVersionProperties != nil { - objectMap["properties"] = giv.GalleryImageVersionProperties - } - if giv.Location != nil { - objectMap["location"] = giv.Location - } - if giv.Tags != nil { - objectMap["tags"] = giv.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct. -func (giv *GalleryImageVersion) 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 galleryImageVersionProperties GalleryImageVersionProperties - err = json.Unmarshal(*v, &galleryImageVersionProperties) - if err != nil { - return err - } - giv.GalleryImageVersionProperties = &galleryImageVersionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - giv.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - giv.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - giv.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - giv.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - giv.Tags = tags - } - } - } - - return nil -} - -// GalleryImageVersionList the List Gallery Image version operation response. -type GalleryImageVersionList struct { - autorest.Response `json:"-"` - // Value - A list of gallery Image Versions. - Value *[]GalleryImageVersion `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions. - NextLink *string `json:"nextLink,omitempty"` -} - -// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values. -type GalleryImageVersionListIterator struct { - i int - page GalleryImageVersionListPage -} - -// 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 *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.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 *GalleryImageVersionListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter GalleryImageVersionListIterator) 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 GalleryImageVersionListIterator) Response() GalleryImageVersionList { - 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 GalleryImageVersionListIterator) Value() GalleryImageVersion { - if !iter.page.NotDone() { - return GalleryImageVersion{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the GalleryImageVersionListIterator type. -func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator { - return GalleryImageVersionListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(givl.NextLink))) -} - -// GalleryImageVersionListPage contains a page of GalleryImageVersion values. -type GalleryImageVersionListPage struct { - fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error) - givl GalleryImageVersionList -} - -// 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 *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.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.givl) - if err != nil { - return err - } - page.givl = 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 *GalleryImageVersionListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page GalleryImageVersionListPage) NotDone() bool { - return !page.givl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page GalleryImageVersionListPage) Response() GalleryImageVersionList { - return page.givl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page GalleryImageVersionListPage) Values() []GalleryImageVersion { - if page.givl.IsEmpty() { - return nil - } - return *page.givl.Value -} - -// Creates a new instance of the GalleryImageVersionListPage type. -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. -type GalleryImageVersionProperties struct { - PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating' - ProvisioningState ProvisioningState3 `json:"provisioningState,omitempty"` - StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"` - // ReplicationStatus - READ-ONLY - 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. - TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` - // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. - ReplicaCount *int32 `json:"replicaCount,omitempty"` - // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. - ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` - // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published. - PublishedDate *date.Time `json:"publishedDate,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImageVersionsClient) (GalleryImageVersion, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result. -func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - giv.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent { - giv, err = client.CreateOrUpdateResponder(giv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryImageVersionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImageVersionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImageVersionsDeleteFuture.Result. -func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version. -type GalleryImageVersionStorageProfile struct { - Source *GalleryArtifactVersionSource `json:"source,omitempty"` - OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` - // DataDiskImages - A list of data disk images. - DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` -} - -// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type GalleryImageVersionsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(GalleryImageVersionsClient) (GalleryImageVersion, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for GalleryImageVersionsUpdateFuture.Result. -func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - giv.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent { - giv, err = client.UpdateResponder(giv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") - } - } - return -} - -// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update. -type GalleryImageVersionUpdate struct { - *GalleryImageVersionProperties `json:"properties,omitempty"` - // 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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate. -func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if givu.GalleryImageVersionProperties != nil { - objectMap["properties"] = givu.GalleryImageVersionProperties - } - if givu.Tags != nil { - objectMap["tags"] = givu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct. -func (givu *GalleryImageVersionUpdate) 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 galleryImageVersionProperties GalleryImageVersionProperties - err = json.Unmarshal(*v, &galleryImageVersionProperties) - if err != nil { - return err - } - givu.GalleryImageVersionProperties = &galleryImageVersionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - givu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - givu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - givu.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - givu.Tags = tags - } - } - } - - return nil -} - -// GalleryList the List Galleries operation response. -type GalleryList struct { - autorest.Response `json:"-"` - // Value - A list of galleries. - Value *[]Gallery `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. - NextLink *string `json:"nextLink,omitempty"` -} - -// GalleryListIterator provides access to a complete listing of Gallery values. -type GalleryListIterator struct { - i int - page GalleryListPage -} - -// 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 *GalleryListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.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 *GalleryListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter GalleryListIterator) 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 GalleryListIterator) Response() GalleryList { - 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 GalleryListIterator) Value() Gallery { - if !iter.page.NotDone() { - return Gallery{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the GalleryListIterator type. -func NewGalleryListIterator(page GalleryListPage) GalleryListIterator { - return GalleryListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(gl.NextLink))) -} - -// GalleryListPage contains a page of Gallery values. -type GalleryListPage struct { - fn func(context.Context, GalleryList) (GalleryList, error) - gl GalleryList -} - -// 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 *GalleryListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.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.gl) - if err != nil { - return err - } - page.gl = 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 *GalleryListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page GalleryListPage) NotDone() bool { - return !page.gl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page GalleryListPage) Response() GalleryList { - return page.gl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page GalleryListPage) Values() []Gallery { - if page.gl.IsEmpty() { - return nil - } - return *page.gl.Value -} - -// Creates a new instance of the GalleryListPage type. -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. -type GalleryOSDiskImage struct { - // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. - SizeInGB *int32 `json:"sizeInGB,omitempty"` - // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,omitempty"` - 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. - Description *string `json:"description,omitempty"` - Identifier *GalleryIdentifier `json:"identifier,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating' - 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"` - // 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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GalleryUpdate. -func (gu GalleryUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gu.GalleryProperties != nil { - objectMap["properties"] = gu.GalleryProperties - } - if gu.Tags != nil { - objectMap["tags"] = gu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct. -func (gu *GalleryUpdate) 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 galleryProperties GalleryProperties - err = json.Unmarshal(*v, &galleryProperties) - if err != nil { - return err - } - gu.GalleryProperties = &galleryProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - gu.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - gu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - gu.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - gu.Tags = tags - } - } - } - - return nil -} - -// GrantAccessData data used for requesting a SAS. -type GrantAccessData struct { - // Access - Possible values include: 'None', 'Read', 'Write' - Access AccessLevel `json:"access,omitempty"` - // DurationInSeconds - Time duration in seconds until the SAS access expires. - DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` -} - -// 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 VirtualMachineSizeTypes `json:"vmSize,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. -type Image struct { - autorest.Response `json:"-"` - *ImageProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for Image. -func (i Image) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if i.ImageProperties != nil { - objectMap["properties"] = i.ImageProperties - } - if i.Location != nil { - objectMap["location"] = i.Location - } - if i.Tags != nil { - objectMap["tags"] = i.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Image struct. -func (i *Image) 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 imageProperties ImageProperties - err = json.Unmarshal(*v, &imageProperties) - if err != nil { - return err - } - i.ImageProperties = &imageProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - i.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - i.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - i.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - i.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - i.Tags = tags - } - } - } - - return nil -} - -// ImageDataDisk describes a data disk. -type ImageDataDisk 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"` - // Snapshot - The snapshot. - Snapshot *SubResource `json:"snapshot,omitempty"` - // ManagedDisk - The managedDisk. - ManagedDisk *SubResource `json:"managedDisk,omitempty"` - // BlobURI - The Virtual Hard Disk. - BlobURI *string `json:"blobUri,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"` - // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' - StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` - // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// ImageDisk describes a image disk. -type ImageDisk struct { - // Snapshot - The snapshot. - Snapshot *SubResource `json:"snapshot,omitempty"` - // ManagedDisk - The managedDisk. - ManagedDisk *SubResource `json:"managedDisk,omitempty"` - // BlobURI - The Virtual Hard Disk. - BlobURI *string `json:"blobUri,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"` - // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' - StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` - // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// ImageDiskReference the source image used for creating the disk. -type ImageDiskReference struct { - // ID - A relative uri containing either a Platform Image Repository or user image reference. - ID *string `json:"id,omitempty"` - // Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. - Lun *int32 `json:"lun,omitempty"` -} - -// ImageListResult the List Image operation response. -type ImageListResult struct { - autorest.Response `json:"-"` - // Value - The list of Images. - Value *[]Image `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images. - NextLink *string `json:"nextLink,omitempty"` -} - -// ImageListResultIterator provides access to a complete listing of Image values. -type ImageListResultIterator struct { - i int - page ImageListResultPage -} - -// 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 *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.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 *ImageListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ImageListResultIterator) 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 ImageListResultIterator) Response() ImageListResult { - 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 ImageListResultIterator) Value() Image { - if !iter.page.NotDone() { - return Image{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ImageListResultIterator type. -func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator { - return ImageListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ilr.NextLink))) -} - -// ImageListResultPage contains a page of Image values. -type ImageListResultPage struct { - fn func(context.Context, ImageListResult) (ImageListResult, error) - ilr ImageListResult -} - -// 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 *ImageListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.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.ilr) - if err != nil { - return err - } - page.ilr = 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 *ImageListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ImageListResultPage) NotDone() bool { - return !page.ilr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ImageListResultPage) Response() ImageListResult { - return page.ilr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ImageListResultPage) Values() []Image { - if page.ilr.IsEmpty() { - return nil - } - return *page.ilr.Value -} - -// Creates a new instance of the ImageListResultPage type. -func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage { - return ImageListResultPage{ - fn: getNextPage, - ilr: cur, - } -} - -// ImageOSDisk describes an Operating System disk. -type ImageOSDisk struct { - // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // OsState - The OS State. Possible values include: 'Generalized', 'Specialized' - OsState OperatingSystemStateTypes `json:"osState,omitempty"` - // Snapshot - The snapshot. - Snapshot *SubResource `json:"snapshot,omitempty"` - // ManagedDisk - The managedDisk. - ManagedDisk *SubResource `json:"managedDisk,omitempty"` - // BlobURI - The Virtual Hard Disk. - BlobURI *string `json:"blobUri,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"` - // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' - StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` - // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk. - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// ImageProperties describes the properties of an Image. -type ImageProperties struct { - // SourceVirtualMachine - The source virtual machine from which Image is created. - SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"` - // StorageProfile - Specifies the storage settings for the virtual machine disks. - StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - // HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2' - 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 { - // Name - The plan ID. - Name *string `json:"name,omitempty"` - // Publisher - The publisher ID. - Publisher *string `json:"publisher,omitempty"` - // Product - The product ID. - Product *string `json:"product,omitempty"` -} - -// ImageReference specifies information about the image to use. You can specify information about platform -// images, marketplace images, or virtual machine images. This element is required when you want to use a -// platform image, marketplace image, or virtual machine image, but is not used in other creation -// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. -type ImageReference struct { - // Publisher - The image publisher. - Publisher *string `json:"publisher,omitempty"` - // Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine. - Offer *string `json:"offer,omitempty"` - // Sku - The image SKU. - Sku *string `json:"sku,omitempty"` - // Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. - Version *string `json:"version,omitempty"` - // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. - ExactVersion *string `json:"exactVersion,omitempty"` - // ID - Resource Id - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ImagesClient) (Image, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ImagesCreateOrUpdateFuture.Result. -func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - i.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.CreateOrUpdateResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - -// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type ImagesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ImagesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ImagesDeleteFuture.Result. -func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ImageStorageProfile describes a storage profile. -type ImageStorageProfile struct { - // OsDisk - Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - OsDisk *ImageOSDisk `json:"osDisk,omitempty"` - // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"` - // ZoneResilient - Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). - ZoneResilient *bool `json:"zoneResilient,omitempty"` -} - -// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type ImagesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ImagesClient) (Image, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ImagesUpdateFuture.Result. -func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - i.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.UpdateResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - -// ImageUpdate the source user image virtual hard disk. Only tags may be updated. -type ImageUpdate struct { - *ImageProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ImageUpdate. -func (iu ImageUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iu.ImageProperties != nil { - objectMap["properties"] = iu.ImageProperties - } - if iu.Tags != nil { - objectMap["tags"] = iu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct. -func (iu *ImageUpdate) 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 imageProperties ImageProperties - err = json.Unmarshal(*v, &imageProperties) - if err != nil { - return err - } - iu.ImageProperties = &imageProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - iu.Tags = tags - } - } - } - - return nil -} - -// InnerError inner error details. -type InnerError struct { - // Exceptiontype - The exception type. - Exceptiontype *string `json:"exceptiontype,omitempty"` - // Errordetail - The internal error message or exception dump. - Errordetail *string `json:"errordetail,omitempty"` -} - -// InstanceViewStatus instance view status. -type InstanceViewStatus struct { - // Code - The status code. - Code *string `json:"code,omitempty"` - // Level - The level code. Possible values include: 'Info', 'Warning', 'Error' - Level StatusLevelTypes `json:"level,omitempty"` - // DisplayStatus - The short localizable label for the status. - DisplayStatus *string `json:"displayStatus,omitempty"` - // Message - The detailed status message, including for alerts and error messages. - Message *string `json:"message,omitempty"` - // Time - The time of the status. - Time *date.Time `json:"time,omitempty"` -} - -// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used -// to unwrap the encryptionKey -type KeyVaultAndKeyReference struct { - // SourceVault - Resource id of the KeyVault containing the key or secret - SourceVault *SourceVault `json:"sourceVault,omitempty"` - // KeyURL - Url pointing to a key or secret in KeyVault - KeyURL *string `json:"keyUrl,omitempty"` -} - -// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key -type KeyVaultAndSecretReference struct { - // SourceVault - Resource id of the KeyVault containing the key or secret - SourceVault *SourceVault `json:"sourceVault,omitempty"` - // SecretURL - Url pointing to a key or secret in KeyVault - SecretURL *string `json:"secretUrl,omitempty"` -} - -// KeyVaultKeyReference describes a reference to Key Vault Key -type KeyVaultKeyReference struct { - // KeyURL - The URL referencing a key encryption key in Key Vault. - KeyURL *string `json:"keyUrl,omitempty"` - // SourceVault - The relative URL of the Key Vault containing the key. - SourceVault *SubResource `json:"sourceVault,omitempty"` -} - -// KeyVaultSecretReference describes a reference to Key Vault Secret -type KeyVaultSecretReference struct { - // SecretURL - The URL referencing a secret in a Key Vault. - SecretURL *string `json:"secretUrl,omitempty"` - // SourceVault - The relative URL of the Key Vault containing the secret. - SourceVault *SubResource `json:"sourceVault,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) -//

For running non-endorsed distributions, see [Information for Non-Endorsed -// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). -type LinuxConfiguration struct { - // DisablePasswordAuthentication - Specifies whether password authentication should be disabled. - DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` - // SSH - Specifies the ssh key configuration for a Linux OS. - SSH *SSHConfiguration `json:"ssh,omitempty"` - // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. - ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` -} - -// ListUsagesResult the List Usages operation response. -type ListUsagesResult struct { - autorest.Response `json:"-"` - // Value - The list of compute resource usages. - Value *[]Usage `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListUsagesResultIterator provides access to a complete listing of Usage values. -type ListUsagesResultIterator struct { - i int - page ListUsagesResultPage -} - -// 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 *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.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 *ListUsagesResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListUsagesResultIterator) 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 ListUsagesResultIterator) Response() ListUsagesResult { - 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 ListUsagesResultIterator) Value() Usage { - if !iter.page.NotDone() { - return Usage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListUsagesResultIterator type. -func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator { - return ListUsagesResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lur.NextLink))) -} - -// ListUsagesResultPage contains a page of Usage values. -type ListUsagesResultPage struct { - fn func(context.Context, ListUsagesResult) (ListUsagesResult, error) - lur ListUsagesResult -} - -// 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 *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.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.lur) - if err != nil { - return err - } - page.lur = 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 *ListUsagesResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListUsagesResultPage) NotDone() bool { - return !page.lur.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListUsagesResultPage) Response() ListUsagesResult { - return page.lur -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListUsagesResultPage) Values() []Usage { - if page.lur.IsEmpty() { - return nil - } - return *page.lur.Value -} - -// Creates a new instance of the ListUsagesResultPage type. -func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage { - return ListUsagesResultPage{ - fn: getNextPage, - lur: cur, - } -} - -// ListVirtualMachineExtensionImage ... -type ListVirtualMachineExtensionImage struct { - autorest.Response `json:"-"` - Value *[]VirtualMachineExtensionImage `json:"value,omitempty"` -} - -// ListVirtualMachineImageResource ... -type ListVirtualMachineImageResource struct { - autorest.Response `json:"-"` - Value *[]VirtualMachineImageResource `json:"value,omitempty"` -} - -// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type LogAnalyticsExportRequestRateByIntervalFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result. -func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - laor.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { - laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request") - } - } - return -} - -// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LogAnalyticsExportThrottledRequestsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result. -func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - laor.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent { - laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request") - } - } - return -} - -// LogAnalyticsInputBase api input base class for LogAnalytics Api. -type LogAnalyticsInputBase struct { - // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. - BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` - // FromTime - From time of the query - FromTime *date.Time `json:"fromTime,omitempty"` - // ToTime - To time of the query - ToTime *date.Time `json:"toTime,omitempty"` - // GroupByThrottlePolicy - Group query result by Throttle Policy applied. - GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` - // GroupByOperationName - Group query result by Operation Name. - GroupByOperationName *bool `json:"groupByOperationName,omitempty"` - // GroupByResourceName - Group query result by Resource Name. - GroupByResourceName *bool `json:"groupByResourceName,omitempty"` -} - -// LogAnalyticsOperationResult logAnalytics operation status response -type LogAnalyticsOperationResult struct { - autorest.Response `json:"-"` - // Properties - READ-ONLY; LogAnalyticsOutput - Properties *LogAnalyticsOutput `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult. -func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// LogAnalyticsOutput logAnalytics output properties -type LogAnalyticsOutput struct { - // Output - READ-ONLY; Output file Uri path to blob container. - Output *string `json:"output,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogAnalyticsOutput. -func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MaintenanceRedeployStatus maintenance Operation Status. -type MaintenanceRedeployStatus struct { - // IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance. - IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"` - // PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window. - PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"` - // PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window. - PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"` - // MaintenanceWindowStartTime - Start Time for the Maintenance Window. - MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"` - // MaintenanceWindowEndTime - End Time for the Maintenance Window. - MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"` - // LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted' - LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"` - // LastOperationMessage - Message returned for the last Maintenance Operation. - LastOperationMessage *string `json:"lastOperationMessage,omitempty"` -} - -// ManagedArtifact the managed artifact. -type ManagedArtifact struct { - // ID - The managed artifact id. - ID *string `json:"id,omitempty"` -} - -// ManagedDiskParameters the parameters of a managed disk. -type ManagedDiskParameters struct { - // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' - StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` - // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk. - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// NetworkInterfaceReference describes a network interface reference. -type NetworkInterfaceReference struct { - *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for NetworkInterfaceReference. -func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if nir.NetworkInterfaceReferenceProperties != nil { - objectMap["properties"] = nir.NetworkInterfaceReferenceProperties - } - if nir.ID != nil { - objectMap["id"] = nir.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct. -func (nir *NetworkInterfaceReference) 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 networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties - err = json.Unmarshal(*v, &networkInterfaceReferenceProperties) - if err != nil { - return err - } - nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - nir.ID = &ID - } - } - } - - return nil -} - -// NetworkInterfaceReferenceProperties describes a network interface reference properties. -type NetworkInterfaceReferenceProperties struct { - // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. - Primary *bool `json:"primary,omitempty"` -} - -// NetworkProfile specifies the network interfaces of the virtual machine. -type NetworkProfile struct { - // NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine. - NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"` -} - -// OperationListResult the List Compute Operation operation response. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of compute operations - Value *[]OperationValue `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationListResult. -func (olr OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationValue describes the properties of a Compute Operation value. -type OperationValue struct { - // Origin - READ-ONLY; The origin of the compute operation. - Origin *string `json:"origin,omitempty"` - // Name - READ-ONLY; The name of the compute operation. - Name *string `json:"name,omitempty"` - *OperationValueDisplay `json:"display,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationValue. -func (ov OperationValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ov.OperationValueDisplay != nil { - objectMap["display"] = ov.OperationValueDisplay - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OperationValue struct. -func (ov *OperationValue) 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 "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - ov.Origin = &origin - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ov.Name = &name - } - case "display": - if v != nil { - var operationValueDisplay OperationValueDisplay - err = json.Unmarshal(*v, &operationValueDisplay) - if err != nil { - return err - } - ov.OperationValueDisplay = &operationValueDisplay - } - } - } - - return nil -} - -// OperationValueDisplay describes the properties of a Compute Operation Value Display. -type OperationValueDisplay struct { - // Operation - READ-ONLY; The display name of the compute operation. - Operation *string `json:"operation,omitempty"` - // Resource - READ-ONLY; The display name of the resource the operation applies to. - Resource *string `json:"resource,omitempty"` - // Description - READ-ONLY; The description of the operation. - Description *string `json:"description,omitempty"` - // Provider - READ-ONLY; The resource provider for the operation. - Provider *string `json:"provider,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationValueDisplay. -func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OrchestrationServiceStateInput the input for OrchestrationServiceState -type OrchestrationServiceStateInput struct { - // ServiceName - The name of the service. Possible values include: 'AutomaticRepairs' - ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` - // Action - The action to be performed. Possible values include: 'Resume', 'Suspend' - Action OrchestrationServiceStateAction `json:"action,omitempty"` -} - -// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set. -type OrchestrationServiceSummary struct { - // ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName' - ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` - // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended' - ServiceState OrchestrationServiceState `json:"serviceState,omitempty"` -} - -// MarshalJSON is the custom marshaler for OrchestrationServiceSummary. -func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OSDisk specifies information about the operating system disk used by the virtual machine.

For -// more information about disks, see [About disks and VHDs for Azure virtual -// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). -type OSDisk struct { - // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // EncryptionSettings - Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 - EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,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"` - // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. - DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,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"` -} - -// OSDiskImage contains the os disk image information. -type OSDiskImage struct { - // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux' - OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` -} - -// OSDiskImageEncryption contains encryption settings for an OS disk image. -type OSDiskImageEncryption struct { - // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` -} - -// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot -// be changed once VM is provisioned. -type OSProfile struct { - // ComputerName - Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

**Max-length (Windows):** 15 characters

**Max-length (Linux):** 64 characters.

For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - ComputerName *string `json:"computerName,omitempty"` - // AdminUsername - Specifies the name of the administrator account.

This property cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - AdminUsername *string `json:"adminUsername,omitempty"` - // AdminPassword - Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - AdminPassword *string `json:"adminPassword,omitempty"` - // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - CustomData *string `json:"customData,omitempty"` - // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. - WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,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)

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` - // Secrets - Specifies set of certificates that should be installed onto the virtual machine. - 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 *bool `json:"requireGuestProvisionSignal,omitempty"` -} - -// Plan specifies information about the marketplace image used to create the virtual machine. This element -// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable -// the image for programmatic use. In the Azure portal, find the marketplace image that you want to use -// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and -// then click **Save**. -type Plan struct { - // Name - The plan ID. - Name *string `json:"name,omitempty"` - // Publisher - The publisher ID. - Publisher *string `json:"publisher,omitempty"` - // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. - Product *string `json:"product,omitempty"` - // PromotionCode - The promotion code. - PromotionCode *string `json:"promotionCode,omitempty"` -} - -// ProximityPlacementGroup specifies information about the proximity placement group. -type ProximityPlacementGroup struct { - autorest.Response `json:"-"` - // ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group. - *ProximityPlacementGroupProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for ProximityPlacementGroup. -func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ppg.ProximityPlacementGroupProperties != nil { - objectMap["properties"] = ppg.ProximityPlacementGroupProperties - } - if ppg.Location != nil { - objectMap["location"] = ppg.Location - } - if ppg.Tags != nil { - objectMap["tags"] = ppg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct. -func (ppg *ProximityPlacementGroup) 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 proximityPlacementGroupProperties ProximityPlacementGroupProperties - err = json.Unmarshal(*v, &proximityPlacementGroupProperties) - if err != nil { - return err - } - ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ppg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ppg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ppg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ppg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ppg.Tags = tags - } - } - } - - return nil -} - -// ProximityPlacementGroupListResult the List Proximity Placement Group operation response. -type ProximityPlacementGroupListResult struct { - autorest.Response `json:"-"` - // Value - The list of proximity placement groups - Value *[]ProximityPlacementGroup `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of proximity placement groups. - NextLink *string `json:"nextLink,omitempty"` -} - -// ProximityPlacementGroupListResultIterator provides access to a complete listing of -// ProximityPlacementGroup values. -type ProximityPlacementGroupListResultIterator struct { - i int - page ProximityPlacementGroupListResultPage -} - -// 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 *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.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 *ProximityPlacementGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProximityPlacementGroupListResultIterator) 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 ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult { - 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 ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup { - if !iter.page.NotDone() { - return ProximityPlacementGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ProximityPlacementGroupListResultIterator type. -func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator { - return ProximityPlacementGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ppglr.NextLink))) -} - -// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values. -type ProximityPlacementGroupListResultPage struct { - fn func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error) - ppglr ProximityPlacementGroupListResult -} - -// 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 *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.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.ppglr) - if err != nil { - return err - } - page.ppglr = 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 *ProximityPlacementGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProximityPlacementGroupListResultPage) NotDone() bool { - return !page.ppglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult { - return page.ppglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup { - if page.ppglr.IsEmpty() { - return nil - } - return *page.ppglr.Value -} - -// Creates a new instance of the ProximityPlacementGroupListResultPage type. -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. -type ProximityPlacementGroupProperties struct { - // ProximityPlacementGroupType - Specifies the type of the proximity placement group.

    Possible values are:

    **Standard** : Co-locate resources within an Azure region or Availability Zone.

    **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' - ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"` - // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group. - VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"` - // VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group. - VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"` - // AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group. - AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"` - // ColocationStatus - Describes colocation status of the Proximity Placement Group. - 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 - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate. -func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ppgu.Tags != nil { - objectMap["tags"] = ppgu.Tags - } - return json.Marshal(objectMap) -} - -// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. -type PurchasePlan struct { - // Publisher - The publisher ID. - Publisher *string `json:"publisher,omitempty"` - // Name - The plan ID. - Name *string `json:"name,omitempty"` - // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. - Product *string `json:"product,omitempty"` -} - -// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this -// Image Definition. These properties are updatable. -type RecommendedMachineConfiguration struct { - VCPUs *ResourceRange `json:"vCPUs,omitempty"` - Memory *ResourceRange `json:"memory,omitempty"` -} - -// RecoveryWalkResponse response after calling a manual recovery walk -type RecoveryWalkResponse struct { - autorest.Response `json:"-"` - // WalkPerformed - READ-ONLY; Whether the recovery walk was performed - WalkPerformed *bool `json:"walkPerformed,omitempty"` - // NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed - NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecoveryWalkResponse. -func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RegionalReplicationStatus this is the regional replication status. -type RegionalReplicationStatus struct { - // Region - READ-ONLY; The region to which the gallery Image Version is being replicated to. - Region *string `json:"region,omitempty"` - // State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed' - State ReplicationState `json:"state,omitempty"` - // Details - READ-ONLY; The details of the replication status. - Details *string `json:"details,omitempty"` - // Progress - READ-ONLY; It indicates progress of the replication job. - Progress *int32 `json:"progress,omitempty"` -} - -// MarshalJSON is the custom marshaler for RegionalReplicationStatus. -func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ReplicationStatus this is the replication status of the gallery Image Version. -type ReplicationStatus struct { - // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' - AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"` - // Summary - READ-ONLY; This is a summary of replication status for each region. - Summary *[]RegionalReplicationStatus `json:"summary,omitempty"` -} - -// MarshalJSON is the custom marshaler for ReplicationStatus. -func (rs ReplicationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api. -type RequestRateByIntervalInput struct { - // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' - IntervalLength IntervalInMins `json:"intervalLength,omitempty"` - // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. - BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` - // FromTime - From time of the query - FromTime *date.Time `json:"fromTime,omitempty"` - // ToTime - To time of the query - ToTime *date.Time `json:"toTime,omitempty"` - // GroupByThrottlePolicy - Group query result by Throttle Policy applied. - GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` - // GroupByOperationName - Group query result by Operation Name. - GroupByOperationName *bool `json:"groupByOperationName,omitempty"` - // GroupByResourceName - Group query result by Resource Name. - GroupByResourceName *bool `json:"groupByResourceName,omitempty"` -} - -// Resource the Resource model definition. -type Resource struct { - // 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"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// ResourceRange describes the resource range. -type ResourceRange struct { - // Min - The minimum number of the resource. - Min *int32 `json:"min,omitempty"` - // Max - The maximum number of the resource. - Max *int32 `json:"max,omitempty"` -} - -// ResourceSku describes an available Compute SKU. -type ResourceSku struct { - // ResourceType - READ-ONLY; The type of resource the SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - // Name - READ-ONLY; The name of SKU. - Name *string `json:"name,omitempty"` - // Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - Tier *string `json:"tier,omitempty"` - // Size - READ-ONLY; The Size of the SKU. - Size *string `json:"size,omitempty"` - // Family - READ-ONLY; The Family of this particular SKU. - Family *string `json:"family,omitempty"` - // Kind - READ-ONLY; The Kind of resources that are supported in this SKU. - Kind *string `json:"kind,omitempty"` - // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set. - Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` - // Locations - READ-ONLY; The set of locations that the SKU is available. - Locations *[]string `json:"locations,omitempty"` - // LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available. - LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"` - // APIVersions - READ-ONLY; The api versions that support this SKU. - APIVersions *[]string `json:"apiVersions,omitempty"` - // Costs - READ-ONLY; Metadata for retrieving price info. - Costs *[]ResourceSkuCosts `json:"costs,omitempty"` - // Capabilities - READ-ONLY; A name value pair to describe the capability. - Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` - // Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSku. -func (rs ResourceSku) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuCapabilities describes The SKU capabilities object. -type ResourceSkuCapabilities struct { - // Name - READ-ONLY; An invariant to describe the feature. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; An invariant if the feature is measured by quantity. - Value *string `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuCapabilities. -func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuCapacity describes scaling information of a SKU. -type ResourceSkuCapacity struct { - // Minimum - READ-ONLY; The minimum capacity. - Minimum *int64 `json:"minimum,omitempty"` - // Maximum - READ-ONLY; The maximum capacity that can be set. - Maximum *int64 `json:"maximum,omitempty"` - // Default - READ-ONLY; The default capacity. - Default *int64 `json:"default,omitempty"` - // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' - ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuCapacity. -func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuCosts describes metadata for retrieving price info. -type ResourceSkuCosts struct { - // MeterID - READ-ONLY; Used for querying price from commerce. - MeterID *string `json:"meterID,omitempty"` - // Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost. - Quantity *int64 `json:"quantity,omitempty"` - // ExtendedUnit - READ-ONLY; An invariant to show the extended unit. - ExtendedUnit *string `json:"extendedUnit,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuCosts. -func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuLocationInfo ... -type ResourceSkuLocationInfo struct { - // Location - READ-ONLY; Location of the SKU - Location *string `json:"location,omitempty"` - // Zones - READ-ONLY; List of availability zones where the SKU is supported. - Zones *[]string `json:"zones,omitempty"` - // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones. - ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo. -func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuRestrictionInfo ... -type ResourceSkuRestrictionInfo struct { - // Locations - READ-ONLY; Locations where the SKU is restricted - Locations *[]string `json:"locations,omitempty"` - // Zones - READ-ONLY; List of availability zones where the SKU is restricted. - Zones *[]string `json:"zones,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo. -func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkuRestrictions describes scaling information of a SKU. -type ResourceSkuRestrictions struct { - // Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone' - Type ResourceSkuRestrictionsType `json:"type,omitempty"` - // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - Values *[]string `json:"values,omitempty"` - // RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used. - RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"` - // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription' - ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuRestrictions. -func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ResourceSkusResult the List Resource Skus operation response. -type ResourceSkusResult struct { - autorest.Response `json:"-"` - // Value - The list of skus available for the subscription. - Value *[]ResourceSku `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus - NextLink *string `json:"nextLink,omitempty"` -} - -// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values. -type ResourceSkusResultIterator struct { - i int - page ResourceSkusResultPage -} - -// 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 *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.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 *ResourceSkusResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ResourceSkusResultIterator) 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 ResourceSkusResultIterator) Response() ResourceSkusResult { - 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 ResourceSkusResultIterator) Value() ResourceSku { - if !iter.page.NotDone() { - return ResourceSku{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ResourceSkusResultIterator type. -func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator { - return ResourceSkusResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rsr.NextLink))) -} - -// ResourceSkusResultPage contains a page of ResourceSku values. -type ResourceSkusResultPage struct { - fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error) - rsr ResourceSkusResult -} - -// 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 *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.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.rsr) - if err != nil { - return err - } - page.rsr = 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 *ResourceSkusResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ResourceSkusResultPage) NotDone() bool { - return !page.rsr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ResourceSkusResultPage) Response() ResourceSkusResult { - return page.rsr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ResourceSkusResultPage) Values() []ResourceSku { - if page.rsr.IsEmpty() { - return nil - } - return *page.rsr.Value -} - -// Creates a new instance of the ResourceSkusResultPage type. -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. -type ResourceSkuZoneDetails struct { - // Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. - Name *[]string `json:"name,omitempty"` - // Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. - Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails. -func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation. -type RollbackStatusInfo struct { - // SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back. - 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"` -} - -// MarshalJSON is the custom marshaler for RollbackStatusInfo. -func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade. -type RollingUpgradePolicy struct { - // MaxBatchInstancePercent - The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. - 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. -type RollingUpgradeProgressInfo struct { - // SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded. - SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"` - // FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully. - FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"` - // InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded. - InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"` - // PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded. - PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"` -} - -// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo. -func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RollingUpgradeRunningStatus information about the current running state of the overall upgrade. -type RollingUpgradeRunningStatus struct { - // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted' - Code RollingUpgradeStatusCode `json:"code,omitempty"` - // StartTime - READ-ONLY; Start time of the upgrade. - StartTime *date.Time `json:"startTime,omitempty"` - // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel' - LastAction RollingUpgradeActionType `json:"lastAction,omitempty"` - // LastActionTime - READ-ONLY; Last action time of the upgrade. - LastActionTime *date.Time `json:"lastActionTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus. -func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade. -type RollingUpgradeStatusInfo struct { - autorest.Response `json:"-"` - *RollingUpgradeStatusInfoProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo. -func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rusi.RollingUpgradeStatusInfoProperties != nil { - objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties - } - if rusi.Location != nil { - objectMap["location"] = rusi.Location - } - if rusi.Tags != nil { - objectMap["tags"] = rusi.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct. -func (rusi *RollingUpgradeStatusInfo) 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 rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties - err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties) - if err != nil { - return err - } - rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rusi.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rusi.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rusi.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rusi.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rusi.Tags = tags - } - } - } - - return nil -} - -// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade. -type RollingUpgradeStatusInfoProperties struct { - // Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade. - Policy *RollingUpgradePolicy `json:"policy,omitempty"` - // RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade. - RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"` - // Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state. - Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` - // Error - READ-ONLY; Error details for this upgrade, if there are any. - Error *APIError `json:"error,omitempty"` -} - -// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties. -func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RunCommandDocument describes the properties of a Run Command. -type RunCommandDocument struct { - autorest.Response `json:"-"` - // Script - The script to be executed. - Script *[]string `json:"script,omitempty"` - // Parameters - The parameters used by the script. - Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"` - // Schema - The VM run command schema. - Schema *string `json:"$schema,omitempty"` - // ID - The VM run command id. - ID *string `json:"id,omitempty"` - // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // Label - The VM run command label. - Label *string `json:"label,omitempty"` - // Description - The VM run command description. - Description *string `json:"description,omitempty"` -} - -// RunCommandDocumentBase describes the properties of a Run Command metadata. -type RunCommandDocumentBase struct { - // Schema - The VM run command schema. - Schema *string `json:"$schema,omitempty"` - // ID - The VM run command id. - ID *string `json:"id,omitempty"` - // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // Label - The VM run command label. - Label *string `json:"label,omitempty"` - // Description - The VM run command description. - Description *string `json:"description,omitempty"` -} - -// RunCommandInput capture Virtual Machine parameters. -type RunCommandInput struct { - // CommandID - The run command id. - CommandID *string `json:"commandId,omitempty"` - // Script - Optional. The script to be executed. When this value is given, the given script will override the default script of the command. - Script *[]string `json:"script,omitempty"` - // Parameters - The run command parameters. - Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` -} - -// RunCommandInputParameter describes the properties of a run command parameter. -type RunCommandInputParameter struct { - // Name - The run command parameter name. - Name *string `json:"name,omitempty"` - // Value - The run command parameter value. - Value *string `json:"value,omitempty"` -} - -// RunCommandListResult the List Virtual Machine operation response. -type RunCommandListResult struct { - autorest.Response `json:"-"` - // Value - The list of virtual machine run commands. - Value *[]RunCommandDocumentBase `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. - NextLink *string `json:"nextLink,omitempty"` -} - -// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values. -type RunCommandListResultIterator struct { - i int - page RunCommandListResultPage -} - -// 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 *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.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 *RunCommandListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RunCommandListResultIterator) 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 RunCommandListResultIterator) Response() RunCommandListResult { - 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 RunCommandListResultIterator) Value() RunCommandDocumentBase { - if !iter.page.NotDone() { - return RunCommandDocumentBase{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RunCommandListResultIterator type. -func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator { - return RunCommandListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rclr.NextLink))) -} - -// RunCommandListResultPage contains a page of RunCommandDocumentBase values. -type RunCommandListResultPage struct { - fn func(context.Context, RunCommandListResult) (RunCommandListResult, error) - rclr RunCommandListResult -} - -// 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 *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.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.rclr) - if err != nil { - return err - } - page.rclr = 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 *RunCommandListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RunCommandListResultPage) NotDone() bool { - return !page.rclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RunCommandListResultPage) Response() RunCommandListResult { - return page.rclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RunCommandListResultPage) Values() []RunCommandDocumentBase { - if page.rclr.IsEmpty() { - return nil - } - return *page.rclr.Value -} - -// Creates a new instance of the RunCommandListResultPage type. -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. -type RunCommandParameterDefinition struct { - // Name - The run command parameter name. - Name *string `json:"name,omitempty"` - // Type - The run command parameter type. - Type *string `json:"type,omitempty"` - // DefaultValue - The run command parameter default value. - DefaultValue *string `json:"defaultValue,omitempty"` - // Required - The run command parameter required. - Required *bool `json:"required,omitempty"` -} - -// RunCommandResult ... -type RunCommandResult struct { - autorest.Response `json:"-"` - // Value - Run command operation response. - Value *[]InstanceViewStatus `json:"value,omitempty"` -} - -// ScaleInPolicy describes a scale-in policy for a virtual machine scale set. -type ScaleInPolicy struct { - // Rules - The rules to be followed when scaling-in a virtual machine scale set.

    Possible values are:

    **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

    **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

    **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

    - Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"` -} - -// ScheduledEventsProfile ... -type ScheduledEventsProfile struct { - // TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations. - TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` -} - -// ShareInfoElement ... -type ShareInfoElement struct { - // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. - VMURI *string `json:"vmUri,omitempty"` -} - -// MarshalJSON is the custom marshaler for ShareInfoElement. -func (sie ShareInfoElement) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware -// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU -// name. -type Sku struct { - // Name - The sku name. - Name *string `json:"name,omitempty"` - // Tier - Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - Tier *string `json:"tier,omitempty"` - // Capacity - Specifies the number of virtual machines in the scale set. - Capacity *int64 `json:"capacity,omitempty"` -} - -// Snapshot snapshot resource. -type Snapshot struct { - autorest.Response `json:"-"` - // ManagedBy - READ-ONLY; Unused. Always Null. - ManagedBy *string `json:"managedBy,omitempty"` - Sku *SnapshotSku `json:"sku,omitempty"` - *SnapshotProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for Snapshot. -func (s Snapshot) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if s.Sku != nil { - objectMap["sku"] = s.Sku - } - if s.SnapshotProperties != nil { - objectMap["properties"] = s.SnapshotProperties - } - if s.Location != nil { - objectMap["location"] = s.Location - } - if s.Tags != nil { - objectMap["tags"] = s.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Snapshot struct. -func (s *Snapshot) 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 "managedBy": - if v != nil { - var managedBy string - err = json.Unmarshal(*v, &managedBy) - if err != nil { - return err - } - s.ManagedBy = &managedBy - } - case "sku": - if v != nil { - var sku SnapshotSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - s.Sku = &sku - } - case "properties": - if v != nil { - var snapshotProperties SnapshotProperties - err = json.Unmarshal(*v, &snapshotProperties) - if err != nil { - return err - } - s.SnapshotProperties = &snapshotProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - s.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - s.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - s.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - s.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - s.Tags = tags - } - } - } - - return nil -} - -// SnapshotList the List Snapshots operation response. -type SnapshotList struct { - autorest.Response `json:"-"` - // Value - A list of snapshots. - Value *[]Snapshot `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. - NextLink *string `json:"nextLink,omitempty"` -} - -// SnapshotListIterator provides access to a complete listing of Snapshot values. -type SnapshotListIterator struct { - i int - page SnapshotListPage -} - -// 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 *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.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 *SnapshotListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SnapshotListIterator) 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 SnapshotListIterator) Response() SnapshotList { - 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 SnapshotListIterator) Value() Snapshot { - if !iter.page.NotDone() { - return Snapshot{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SnapshotListIterator type. -func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator { - return SnapshotListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sl.NextLink))) -} - -// SnapshotListPage contains a page of Snapshot values. -type SnapshotListPage struct { - fn func(context.Context, SnapshotList) (SnapshotList, error) - sl SnapshotList -} - -// 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 *SnapshotListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.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.sl) - if err != nil { - return err - } - page.sl = 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 *SnapshotListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SnapshotListPage) NotDone() bool { - return !page.sl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SnapshotListPage) Response() SnapshotList { - return page.sl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SnapshotListPage) Values() []Snapshot { - if page.sl.IsEmpty() { - return nil - } - return *page.sl.Value -} - -// Creates a new instance of the SnapshotListPage type. -func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage { - return SnapshotListPage{ - fn: getNextPage, - sl: cur, - } -} - -// SnapshotProperties snapshot resource properties. -type SnapshotProperties struct { - // TimeCreated - READ-ONLY; The time when the disk was created. - TimeCreated *date.Time `json:"timeCreated,omitempty"` - // OsType - The Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' - HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` - // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. - CreationData *CreationData `json:"creationData,omitempty"` - // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. - 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"` - // 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. - EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` - // ProvisioningState - READ-ONLY; The disk provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. - Incremental *bool `json:"incremental,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"` -} - -// 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.EncryptionSettingsCollection != nil { - objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection - } - if sp.Incremental != nil { - objectMap["incremental"] = sp.Incremental - } - if sp.Encryption != nil { - objectMap["encryption"] = sp.Encryption - } - return json.Marshal(objectMap) -} - -// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SnapshotsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SnapshotsClient) (Snapshot, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result. -func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SnapshotsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SnapshotsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SnapshotsDeleteFuture.Result. -func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SnapshotsGrantAccessFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SnapshotsClient) (AccessURI, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SnapshotsGrantAccessFuture.Result. -func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - au.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { - au, err = client.GrantAccessResponder(au.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") - } - } - return -} - -// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. -type SnapshotSku struct { - // Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS' - Name SnapshotStorageAccountTypes `json:"name,omitempty"` - // Tier - READ-ONLY; The sku tier. - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SnapshotsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SnapshotsRevokeAccessFuture.Result. -func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture") - return - } - ar.Response = future.Response() - return -} - -// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SnapshotsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SnapshotsClient) (Snapshot, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SnapshotsUpdateFuture.Result. -func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.UpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// SnapshotUpdate snapshot update resource. -type SnapshotUpdate struct { - *SnapshotUpdateProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` - Sku *SnapshotSku `json:"sku,omitempty"` -} - -// MarshalJSON is the custom marshaler for SnapshotUpdate. -func (su SnapshotUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if su.SnapshotUpdateProperties != nil { - objectMap["properties"] = su.SnapshotUpdateProperties - } - if su.Tags != nil { - objectMap["tags"] = su.Tags - } - if su.Sku != nil { - objectMap["sku"] = su.Sku - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct. -func (su *SnapshotUpdate) 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 snapshotUpdateProperties SnapshotUpdateProperties - err = json.Unmarshal(*v, &snapshotUpdateProperties) - if err != nil { - return err - } - su.SnapshotUpdateProperties = &snapshotUpdateProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - su.Tags = tags - } - case "sku": - if v != nil { - var sku SnapshotSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - su.Sku = &sku - } - } - } - - return nil -} - -// SnapshotUpdateProperties snapshot resource update properties. -type SnapshotUpdateProperties struct { - // OsType - the Operating System type. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. - EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,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"` -} - -// SourceVault the vault id is an Azure Resource Manager Resource id in the form -// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} -type SourceVault struct { - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// SSHConfiguration SSH configuration for Linux based VMs running on Azure -type SSHConfiguration struct { - // PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. - PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` -} - -// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where -// the public key is placed. -type SSHPublicKey struct { - // Path - Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - Path *string `json:"path,omitempty"` - // KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - KeyData *string `json:"keyData,omitempty"` -} - -// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair. -type SSHPublicKeyGenerateKeyPairResult struct { - autorest.Response `json:"-"` - // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. - PrivateKey *string `json:"privateKey,omitempty"` - // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. - PublicKey *string `json:"publicKey,omitempty"` - // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} - ID *string `json:"id,omitempty"` -} - -// SSHPublicKeyResource specifies information about the SSH public key. -type SSHPublicKeyResource struct { - autorest.Response `json:"-"` - // SSHPublicKeyResourceProperties - Properties of the SSH public key. - *SSHPublicKeyResourceProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for SSHPublicKeyResource. -func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if spkr.SSHPublicKeyResourceProperties != nil { - objectMap["properties"] = spkr.SSHPublicKeyResourceProperties - } - if spkr.Location != nil { - objectMap["location"] = spkr.Location - } - if spkr.Tags != nil { - objectMap["tags"] = spkr.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct. -func (spkr *SSHPublicKeyResource) 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 SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties - err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) - if err != nil { - return err - } - spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - spkr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - spkr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - spkr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - spkr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - spkr.Tags = tags - } - } - } - - return nil -} - -// SSHPublicKeyResourceProperties properties of the SSH public key. -type SSHPublicKeyResourceProperties struct { - // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. - PublicKey *string `json:"publicKey,omitempty"` -} - -// SSHPublicKeysGroupListResult the list SSH public keys operation response. -type SSHPublicKeysGroupListResult struct { - autorest.Response `json:"-"` - // Value - The list of SSH public keys - Value *[]SSHPublicKeyResource `json:"value,omitempty"` - // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. - NextLink *string `json:"nextLink,omitempty"` -} - -// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource -// values. -type SSHPublicKeysGroupListResultIterator struct { - i int - page SSHPublicKeysGroupListResultPage -} - -// 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 *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.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 *SSHPublicKeysGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SSHPublicKeysGroupListResultIterator) 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 SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult { - 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 SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource { - if !iter.page.NotDone() { - return SSHPublicKeyResource{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SSHPublicKeysGroupListResultIterator type. -func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator { - return SSHPublicKeysGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(spkglr.NextLink))) -} - -// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values. -type SSHPublicKeysGroupListResultPage struct { - fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error) - spkglr SSHPublicKeysGroupListResult -} - -// 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 *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.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.spkglr) - if err != nil { - return err - } - page.spkglr = 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 *SSHPublicKeysGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SSHPublicKeysGroupListResultPage) NotDone() bool { - return !page.spkglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult { - return page.spkglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource { - if page.spkglr.IsEmpty() { - return nil - } - return *page.spkglr.Value -} - -// Creates a new instance of the SSHPublicKeysGroupListResultPage type. -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. -type SSHPublicKeyUpdateResource struct { - // SSHPublicKeyResourceProperties - Properties of the SSH public key. - *SSHPublicKeyResourceProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource. -func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if spkur.SSHPublicKeyResourceProperties != nil { - objectMap["properties"] = spkur.SSHPublicKeyResourceProperties - } - if spkur.Tags != nil { - objectMap["tags"] = spkur.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct. -func (spkur *SSHPublicKeyUpdateResource) 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 SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties - err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) - if err != nil { - return err - } - spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - spkur.Tags = tags - } - } - } - - return nil -} - -// StorageProfile specifies the storage settings for the virtual machine disks. -type StorageProfile struct { - // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - ImageReference *ImageReference `json:"imageReference,omitempty"` - // OsDisk - Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - OsDisk *OSDisk `json:"osDisk,omitempty"` - // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - DataDisks *[]DataDisk `json:"dataDisks,omitempty"` -} - -// SubResource ... -type SubResource struct { - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// SubResourceReadOnly ... -type SubResourceReadOnly struct { - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubResourceReadOnly. -func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SubResourceWithColocationStatus ... -type SubResourceWithColocationStatus struct { - // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group. - ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// TargetRegion describes the target region information. -type TargetRegion struct { - // Name - The name of the region. - Name *string `json:"name,omitempty"` - // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable. - RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' - StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` - Encryption *EncryptionImages `json:"encryption,omitempty"` -} - -// TerminateNotificationProfile ... -type TerminateNotificationProfile struct { - // NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M) - NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"` - // Enable - Specifies whether the Terminate Scheduled event is enabled or disabled. - Enable *bool `json:"enable,omitempty"` -} - -// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api. -type ThrottledRequestsInput struct { - // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. - BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"` - // FromTime - From time of the query - FromTime *date.Time `json:"fromTime,omitempty"` - // ToTime - To time of the query - ToTime *date.Time `json:"toTime,omitempty"` - // GroupByThrottlePolicy - Group query result by Throttle Policy applied. - GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"` - // GroupByOperationName - Group query result by Operation Name. - GroupByOperationName *bool `json:"groupByOperationName,omitempty"` - // GroupByResourceName - Group query result by Resource Name. - GroupByResourceName *bool `json:"groupByResourceName,omitempty"` -} - -// UpdateResource the Update Resource model definition. -type UpdateResource struct { - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for UpdateResource. -func (ur UpdateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ur.Tags != nil { - objectMap["tags"] = ur.Tags - } - return json.Marshal(objectMap) -} - -// UpdateResourceDefinition the Update Resource model definition. -type UpdateResourceDefinition struct { - // 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"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for UpdateResourceDefinition. -func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if urd.Tags != nil { - objectMap["tags"] = urd.Tags - } - return json.Marshal(objectMap) -} - -// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response. -type UpgradeOperationHistoricalStatusInfo struct { - // Properties - READ-ONLY; Information about the properties of the upgrade operation. - Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - // Location - READ-ONLY; Resource location - Location *string `json:"location,omitempty"` -} - -// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo. -func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale -// Set. -type UpgradeOperationHistoricalStatusInfoProperties struct { - // RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation. - RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"` - // Progress - READ-ONLY; Counts of the VMs in each state. - Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` - // Error - READ-ONLY; Error Details for this upgrade if there are any. - Error *APIError `json:"error,omitempty"` - // StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform' - StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"` - // TargetImageReference - READ-ONLY; Image Reference details - TargetImageReference *ImageReference `json:"targetImageReference,omitempty"` - // RollbackInfo - READ-ONLY; Information about OS rollback if performed - RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"` -} - -// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties. -func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade. -type UpgradeOperationHistoryStatus struct { - // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted' - Code UpgradeState `json:"code,omitempty"` - // StartTime - READ-ONLY; Start time of the upgrade. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; End time of the upgrade. - EndTime *date.Time `json:"endTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus. -func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling. -type UpgradePolicy struct { - // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling' - Mode UpgradeMode `json:"mode,omitempty"` - // RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade. - RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"` - // AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade. - AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"` -} - -// Usage describes Compute Resource Usage. -type Usage struct { - // Unit - An enum describing the unit of usage measurement. - Unit *string `json:"unit,omitempty"` - // CurrentValue - The current usage of the resource. - CurrentValue *int32 `json:"currentValue,omitempty"` - // Limit - The maximum permitted usage of the resource. - Limit *int64 `json:"limit,omitempty"` - // Name - The name of the type of usage. - Name *UsageName `json:"name,omitempty"` -} - -// UsageName the Usage Names. -type UsageName struct { - // Value - The name of the resource. - Value *string `json:"value,omitempty"` - // LocalizedValue - The localized name of the resource. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// UserArtifactSource the source image from which the Image Version is going to be created. -type UserArtifactSource struct { - // FileName - Required. The fileName of the artifact. - FileName *string `json:"fileName,omitempty"` - // MediaLink - Required. The mediaLink of the artifact, must be a readable storage blob. - MediaLink *string `json:"mediaLink,omitempty"` -} - -// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate -// should reside on the VM. -type VaultCertificate struct { - // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    } - CertificateURL *string `json:"certificateUrl,omitempty"` - // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

    For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. - CertificateStore *string `json:"certificateStore,omitempty"` -} - -// VaultSecretGroup describes a set of certificates which are all in the same Key Vault. -type VaultSecretGroup struct { - // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. - SourceVault *SubResource `json:"sourceVault,omitempty"` - // VaultCertificates - The list of key vault references in SourceVault which contain certificates. - VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"` -} - -// VirtualHardDisk describes the uri of a disk. -type VirtualHardDisk struct { - // URI - Specifies the virtual hard disk's uri. - URI *string `json:"uri,omitempty"` -} - -// VirtualMachine describes a Virtual Machine. -type VirtualMachine struct { - autorest.Response `json:"-"` - // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. - Plan *Plan `json:"plan,omitempty"` - *VirtualMachineProperties `json:"properties,omitempty"` - // Resources - READ-ONLY; The virtual machine child extension resources. - Resources *[]VirtualMachineExtension `json:"resources,omitempty"` - // Identity - The identity of the virtual machine, if configured. - Identity *VirtualMachineIdentity `json:"identity,omitempty"` - // Zones - The virtual machine zones. - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachine. -func (VM VirtualMachine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if VM.Plan != nil { - objectMap["plan"] = VM.Plan - } - if VM.VirtualMachineProperties != nil { - objectMap["properties"] = VM.VirtualMachineProperties - } - if VM.Identity != nil { - objectMap["identity"] = VM.Identity - } - if VM.Zones != nil { - objectMap["zones"] = VM.Zones - } - if VM.Location != nil { - objectMap["location"] = VM.Location - } - if VM.Tags != nil { - objectMap["tags"] = VM.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct. -func (VM *VirtualMachine) 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 "plan": - if v != nil { - var plan Plan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - VM.Plan = &plan - } - case "properties": - if v != nil { - var virtualMachineProperties VirtualMachineProperties - err = json.Unmarshal(*v, &virtualMachineProperties) - if err != nil { - return err - } - VM.VirtualMachineProperties = &virtualMachineProperties - } - case "resources": - if v != nil { - var resources []VirtualMachineExtension - err = json.Unmarshal(*v, &resources) - if err != nil { - return err - } - VM.Resources = &resources - } - case "identity": - if v != nil { - var identity VirtualMachineIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - VM.Identity = &identity - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - VM.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - VM.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - VM.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - VM.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - VM.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - VM.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine. -type VirtualMachineAgentInstanceView struct { - // VMAgentVersion - The VM Agent full version. - VMAgentVersion *string `json:"vmAgentVersion,omitempty"` - // ExtensionHandlers - The virtual machine extension handler instance view. - ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// VirtualMachineCaptureParameters capture Virtual Machine parameters. -type VirtualMachineCaptureParameters struct { - // VhdPrefix - The captured virtual hard disk's name prefix. - VhdPrefix *string `json:"vhdPrefix,omitempty"` - // DestinationContainerName - The destination container name. - DestinationContainerName *string `json:"destinationContainerName,omitempty"` - // OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict. - OverwriteVhds *bool `json:"overwriteVhds,omitempty"` -} - -// VirtualMachineCaptureResult output of virtual machine capture operation. -type VirtualMachineCaptureResult struct { - autorest.Response `json:"-"` - // Schema - READ-ONLY; the schema of the captured virtual machine - Schema *string `json:"$schema,omitempty"` - // ContentVersion - READ-ONLY; the version of the content - ContentVersion *string `json:"contentVersion,omitempty"` - // Parameters - READ-ONLY; parameters of the captured virtual machine - Parameters interface{} `json:"parameters,omitempty"` - // Resources - READ-ONLY; a list of resource items of the captured virtual machine - Resources *[]interface{} `json:"resources,omitempty"` - // ID - Resource Id - 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:"-"` - *VirtualMachineExtensionProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineExtension. -func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vme.VirtualMachineExtensionProperties != nil { - objectMap["properties"] = vme.VirtualMachineExtensionProperties - } - if vme.Location != nil { - objectMap["location"] = vme.Location - } - if vme.Tags != nil { - objectMap["tags"] = vme.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct. -func (vme *VirtualMachineExtension) 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 virtualMachineExtensionProperties VirtualMachineExtensionProperties - err = json.Unmarshal(*v, &virtualMachineExtensionProperties) - if err != nil { - return err - } - vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vme.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vme.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vme.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vme.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vme.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler. -type VirtualMachineExtensionHandlerInstanceView struct { - // 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"` - // Status - The extension handler status. - Status *InstanceViewStatus `json:"status,omitempty"` -} - -// VirtualMachineExtensionImage describes a Virtual Machine Extension Image. -type VirtualMachineExtensionImage struct { - autorest.Response `json:"-"` - *VirtualMachineExtensionImageProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage. -func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmei.VirtualMachineExtensionImageProperties != nil { - objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties - } - if vmei.Location != nil { - objectMap["location"] = vmei.Location - } - if vmei.Tags != nil { - objectMap["tags"] = vmei.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct. -func (vmei *VirtualMachineExtensionImage) 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 virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties - err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties) - if err != nil { - return err - } - vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmei.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmei.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmei.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vmei.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmei.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image. -type VirtualMachineExtensionImageProperties struct { - // OperatingSystem - The operating system this extension supports. - OperatingSystem *string `json:"operatingSystem,omitempty"` - // ComputeRole - The type of role (IaaS or PaaS) this extension supports. - ComputeRole *string `json:"computeRole,omitempty"` - // HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema. - HandlerSchema *string `json:"handlerSchema,omitempty"` - // VMScaleSetEnabled - Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. - VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"` - // SupportsMultipleExtensions - Whether the handler can support multiple extensions. - SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"` -} - -// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension. -type VirtualMachineExtensionInstanceView struct { - // Name - The virtual machine extension name. - Name *string `json:"name,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"` - // Substatuses - The resource status information. - Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension. -type VirtualMachineExtensionProperties 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"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // InstanceView - The virtual machine extension instance view. - 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.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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result. -func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vme.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { - vme, err = client.CreateOrUpdateResponder(vme.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineExtensionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineExtensionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result. -func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineExtensionsListResult the List Extension operation response -type VirtualMachineExtensionsListResult struct { - autorest.Response `json:"-"` - // Value - The list of extensions - Value *[]VirtualMachineExtension `json:"value,omitempty"` -} - -// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineExtensionsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result. -func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vme.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { - vme, err = client.UpdateResponder(vme.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineExtensionUpdate describes a Virtual Machine Extension. -type VirtualMachineExtensionUpdate struct { - *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate. -func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmeu.VirtualMachineExtensionUpdateProperties != nil { - objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties - } - if vmeu.Tags != nil { - objectMap["tags"] = vmeu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct. -func (vmeu *VirtualMachineExtensionUpdate) 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 virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties - err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties) - if err != nil { - return err - } - vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmeu.Tags = tags - } - } - } - - 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"` -} - -// 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus. -func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineIdentity identity for the virtual machine. -type VirtualMachineIdentity struct { - // PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity. - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue. -func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineImage describes a Virtual Machine Image. -type VirtualMachineImage struct { - autorest.Response `json:"-"` - *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"` -} - -// 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"` - // 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"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` -} - -// 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 -} - -// 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()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineListResultPage) NotDone() bool { - return !page.vmlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineListResultPage) Response() VirtualMachineListResult { - return page.vmlr -} - -// 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, - } -} - -// 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"` - // 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"` - // 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineProperties. -func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmp.HardwareProfile != nil { - objectMap["hardwareProfile"] = vmp.HardwareProfile - } - 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.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.LicenseType != nil { - objectMap["licenseType"] = vmp.LicenseType - } - return json.Marshal(objectMap) -} - -// 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"` -} - -// VirtualMachineScaleSet describes a Virtual Machine Scale Set. -type VirtualMachineScaleSet struct { - autorest.Response `json:"-"` - // Sku - The virtual machine scale set sku. - Sku *Sku `json:"sku,omitempty"` - // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. - Plan *Plan `json:"plan,omitempty"` - *VirtualMachineScaleSetProperties `json:"properties,omitempty"` - // Identity - The identity of the virtual machine scale set, if configured. - Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` - // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSet. -func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmss.Sku != nil { - objectMap["sku"] = vmss.Sku - } - if vmss.Plan != nil { - objectMap["plan"] = vmss.Plan - } - if vmss.VirtualMachineScaleSetProperties != nil { - objectMap["properties"] = vmss.VirtualMachineScaleSetProperties - } - if vmss.Identity != nil { - objectMap["identity"] = vmss.Identity - } - if vmss.Zones != nil { - objectMap["zones"] = vmss.Zones - } - if vmss.Location != nil { - objectMap["location"] = vmss.Location - } - if vmss.Tags != nil { - objectMap["tags"] = vmss.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct. -func (vmss *VirtualMachineScaleSet) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - vmss.Sku = &sku - } - case "plan": - if v != nil { - var plan Plan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - vmss.Plan = &plan - } - case "properties": - if v != nil { - var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetProperties) - if err != nil { - return err - } - vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties - } - case "identity": - if v != nil { - var identity VirtualMachineScaleSetIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - vmss.Identity = &identity - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - vmss.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmss.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmss.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmss.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vmss.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmss.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk. -type VirtualMachineScaleSetDataDisk struct { - // Name - The disk name. - Name *string `json:"name,omitempty"` - // 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"` - // 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 - The create option. 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 *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` - // DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. - DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` - // DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. - DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` -} - -// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension. -type VirtualMachineScaleSetExtension struct { - autorest.Response `json:"-"` - // Name - The name of the extension. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension. -func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmsse.Name != nil { - objectMap["name"] = vmsse.Name - } - if vmsse.VirtualMachineScaleSetExtensionProperties != nil { - objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct. -func (vmsse *VirtualMachineScaleSetExtension) 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 - } - vmsse.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmsse.Type = &typeVar - } - case "properties": - if v != nil { - var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) - if err != nil { - return err - } - vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmsse.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response. -type VirtualMachineScaleSetExtensionListResult struct { - autorest.Response `json:"-"` - // Value - The list of VM scale set extensions. - Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of -// VirtualMachineScaleSetExtension values. -type VirtualMachineScaleSetExtensionListResultIterator struct { - i int - page VirtualMachineScaleSetExtensionListResultPage -} - -// 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 *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.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 *VirtualMachineScaleSetExtensionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetExtensionListResultIterator) 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 VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult { - 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 VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension { - if !iter.page.NotDone() { - return VirtualMachineScaleSetExtension{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type. -func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator { - return VirtualMachineScaleSetExtensionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmsselr.NextLink))) -} - -// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values. -type VirtualMachineScaleSetExtensionListResultPage struct { - fn func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error) - vmsselr VirtualMachineScaleSetExtensionListResult -} - -// 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 *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.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.vmsselr) - if err != nil { - return err - } - page.vmsselr = 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 *VirtualMachineScaleSetExtensionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool { - return !page.vmsselr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult { - return page.vmsselr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension { - if page.vmsselr.IsEmpty() { - return nil - } - return *page.vmsselr.Value -} - -// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type. -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. -type VirtualMachineScaleSetExtensionProfile struct { - // Extensions - The virtual machine scale set child extension resources. - Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"` -} - -// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set -// Extension. -type VirtualMachineScaleSetExtensionProperties struct { - // ForceUpdateTag - If a value is provided and is different from the previous value, the extension handler will 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"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned. - 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.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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result. -func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmsse.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent { - vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualMachineScaleSetExtensionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result. -func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualMachineScaleSetExtensionsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result. -func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmsse.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent { - vmsse, err = client.UpdateResponder(vmsse.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension. -type VirtualMachineScaleSetExtensionUpdate struct { - // Name - READ-ONLY; The name of the extension. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate. -func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmsseu.VirtualMachineScaleSetExtensionProperties != nil { - objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct. -func (vmsseu *VirtualMachineScaleSetExtensionUpdate) 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 - } - vmsseu.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmsseu.Type = &typeVar - } - case "properties": - if v != nil { - var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) - if err != nil { - return err - } - vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmsseu.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetIdentity identity for the virtual machine scale set. -type VirtualMachineScaleSetIdentity struct { - // PrincipalID - READ-ONLY; The principal id of virtual machine scale set 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 scale set. 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 scale set. 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 scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' - Type ResourceIdentityType `json:"type,omitempty"` - // UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. 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]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity. -func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssi.Type != "" { - objectMap["type"] = vmssi.Type - } - if vmssi.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities - } - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ... -type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. -func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set. -type VirtualMachineScaleSetInstanceView struct { - autorest.Response `json:"-"` - // VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set. - VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"` - // Extensions - READ-ONLY; The extensions information. - Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` - // OrchestrationServices - READ-ONLY; The orchestration services information. - 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 { - // StatusesSummary - READ-ONLY; The extensions information. - StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary. -func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP -// configuration. -type VirtualMachineScaleSetIPConfiguration struct { - // Name - The IP configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration. -func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssic.Name != nil { - objectMap["name"] = vmssic.Name - } - if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil { - objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties - } - if vmssic.ID != nil { - objectMap["id"] = vmssic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct. -func (vmssic *VirtualMachineScaleSetIPConfiguration) 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 - } - vmssic.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties) - if err != nil { - return err - } - vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssic.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's -// IP configuration properties. -type VirtualMachineScaleSetIPConfigurationProperties struct { - // Subnet - Specifies the identifier of the subnet. - Subnet *APIEntityReference `json:"subnet,omitempty"` - // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. - Primary *bool `json:"primary,omitempty"` - // PublicIPAddressConfiguration - The publicIPAddressConfiguration. - PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. - ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` - // ApplicationSecurityGroups - Specifies an array of references to application security group. - ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` - // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. - LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` - // LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. - LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` -} - -// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address. -type VirtualMachineScaleSetIPTag struct { - // IPTagType - IP tag type. Example: FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - // Tag - IP tag associated with the public IP. Example: SQL, Storage etc. - Tag *string `json:"tag,omitempty"` -} - -// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History -// operation response. -type VirtualMachineScaleSetListOSUpgradeHistory struct { - autorest.Response `json:"-"` - // Value - The list of OS upgrades performed on the virtual machine scale set. - Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of -// UpgradeOperationHistoricalStatusInfo values. -type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct { - i int - page VirtualMachineScaleSetListOSUpgradeHistoryPage -} - -// 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 *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.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 *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) 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 VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory { - 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 VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo { - if !iter.page.NotDone() { - return UpgradeOperationHistoricalStatusInfo{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type. -func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator { - return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmsslouh.NextLink))) -} - -// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo -// values. -type VirtualMachineScaleSetListOSUpgradeHistoryPage struct { - fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error) - vmsslouh VirtualMachineScaleSetListOSUpgradeHistory -} - -// 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 *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.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.vmsslouh) - if err != nil { - return err - } - page.vmsslouh = 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 *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool { - return !page.vmsslouh.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory { - return page.vmsslouh -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo { - if page.vmsslouh.IsEmpty() { - return nil - } - return *page.vmsslouh.Value -} - -// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type. -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. -type VirtualMachineScaleSetListResult struct { - autorest.Response `json:"-"` - // Value - The list of virtual machine scale sets. - Value *[]VirtualMachineScaleSet `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet -// values. -type VirtualMachineScaleSetListResultIterator struct { - i int - page VirtualMachineScaleSetListResultPage -} - -// 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 *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.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 *VirtualMachineScaleSetListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetListResultIterator) 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 VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult { - 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 VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet { - if !iter.page.NotDone() { - return VirtualMachineScaleSet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetListResultIterator type. -func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator { - return VirtualMachineScaleSetListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmsslr.NextLink))) -} - -// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values. -type VirtualMachineScaleSetListResultPage struct { - fn func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error) - vmsslr VirtualMachineScaleSetListResult -} - -// 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 *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.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.vmsslr) - if err != nil { - return err - } - page.vmsslr = 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 *VirtualMachineScaleSetListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetListResultPage) NotDone() bool { - return !page.vmsslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult { - return page.vmsslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet { - if page.vmsslr.IsEmpty() { - return nil - } - return *page.vmsslr.Value -} - -// Creates a new instance of the VirtualMachineScaleSetListResultPage type. -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. -type VirtualMachineScaleSetListSkusResult struct { - autorest.Response `json:"-"` - // Value - The list of skus available for the virtual machine scale set. - Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of -// VirtualMachineScaleSetSku values. -type VirtualMachineScaleSetListSkusResultIterator struct { - i int - page VirtualMachineScaleSetListSkusResultPage -} - -// 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 *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.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 *VirtualMachineScaleSetListSkusResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetListSkusResultIterator) 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 VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult { - 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 VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku { - if !iter.page.NotDone() { - return VirtualMachineScaleSetSku{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type. -func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator { - return VirtualMachineScaleSetListSkusResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmsslsr.NextLink))) -} - -// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values. -type VirtualMachineScaleSetListSkusResultPage struct { - fn func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error) - vmsslsr VirtualMachineScaleSetListSkusResult -} - -// 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 *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.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.vmsslsr) - if err != nil { - return err - } - page.vmsslsr = 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 *VirtualMachineScaleSetListSkusResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool { - return !page.vmsslsr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult { - return page.vmsslsr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku { - if page.vmsslsr.IsEmpty() { - return nil - } - return *page.vmsslsr.Value -} - -// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type. -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. -type VirtualMachineScaleSetListWithLinkResult struct { - autorest.Response `json:"-"` - // Value - The list of virtual machine scale sets. - Value *[]VirtualMachineScaleSet `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of -// VirtualMachineScaleSet values. -type VirtualMachineScaleSetListWithLinkResultIterator struct { - i int - page VirtualMachineScaleSetListWithLinkResultPage -} - -// 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 *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.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 *VirtualMachineScaleSetListWithLinkResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetListWithLinkResultIterator) 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 VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult { - 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 VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet { - if !iter.page.NotDone() { - return VirtualMachineScaleSet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type. -func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator { - return VirtualMachineScaleSetListWithLinkResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmsslwlr.NextLink))) -} - -// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values. -type VirtualMachineScaleSetListWithLinkResultPage struct { - fn func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error) - vmsslwlr VirtualMachineScaleSetListWithLinkResult -} - -// 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 *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.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.vmsslwlr) - if err != nil { - return err - } - page.vmsslwlr = 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 *VirtualMachineScaleSetListWithLinkResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool { - return !page.vmsslwlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult { - return page.vmsslwlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet { - if page.vmsslwlr.IsEmpty() { - return nil - } - return *page.vmsslwlr.Value -} - -// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type. -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. -type VirtualMachineScaleSetManagedDiskParameters struct { - // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS' - StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` - // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk. - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's -// network configurations. -type VirtualMachineScaleSetNetworkConfiguration struct { - // Name - The network configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration. -func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssnc.Name != nil { - objectMap["name"] = vmssnc.Name - } - if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil { - objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties - } - if vmssnc.ID != nil { - objectMap["id"] = vmssnc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct. -func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) 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 - } - vmssnc.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties) - if err != nil { - return err - } - vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssnc.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network -// configuration's DNS settings. -type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct { - // DNSServers - List of DNS servers IP addresses - DNSServers *[]string `json:"dnsServers,omitempty"` -} - -// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network -// profile's IP configuration. -type VirtualMachineScaleSetNetworkConfigurationProperties struct { - // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface. - Primary *bool `json:"primary,omitempty"` - // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - // NetworkSecurityGroup - The network security group. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - // DNSSettings - The dns settings to be applied on the network interfaces. - DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` - // IPConfigurations - Specifies the IP configurations of the network interface. - IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` - // EnableIPForwarding - Whether IP forwarding enabled on this NIC. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` -} - -// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile. -type VirtualMachineScaleSetNetworkProfile struct { - // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` - // NetworkInterfaceConfigurations - The list of network configurations. - NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` -} - -// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk. -type VirtualMachineScaleSetOSDisk struct { - // Name - The disk name. - Name *string `json:"name,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 machines in the scale set should be created.

    The only allowed value is: **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"` - // DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. - DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` - // DiskSizeGB - Specifies the size of the operating system 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"` - // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    **Windows**

    **Linux**. Possible values include: 'Windows', 'Linux' - OsType OperatingSystemTypes `json:"osType,omitempty"` - // Image - Specifies information about the unmanaged user image to base the scale set on. - Image *VirtualHardDisk `json:"image,omitempty"` - // VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set. - VhdContainers *[]string `json:"vhdContainers,omitempty"` - // ManagedDisk - The managed disk parameters. - ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` -} - -// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile. -type VirtualMachineScaleSetOSProfile struct { - // ComputerNamePrefix - Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. - ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"` - // AdminUsername - Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - AdminUsername *string `json:"adminUsername,omitempty"` - // AdminPassword - Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - AdminPassword *string `json:"adminPassword,omitempty"` - // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - CustomData *string `json:"customData,omitempty"` - // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. - WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,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)

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` - // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. - Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` -} - -// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set. -type VirtualMachineScaleSetProperties struct { - // UpgradePolicy - The upgrade policy. - UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` - // AutomaticRepairsPolicy - Policy for automatic repairs. - AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` - // VirtualMachineProfile - The virtual machine profile. - VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. - Overprovision *bool `json:"overprovision,omitempty"` - // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. - DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` - // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set. - UniqueID *string `json:"uniqueId,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. - SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` - // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. - ZoneBalance *bool `json:"zoneBalance,omitempty"` - // PlatformFaultDomainCount - Fault Domain count for each placement group. - PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` - // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. - ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. - 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.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 { - // Name - The publicIP address configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration. -func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmsspiac.Name != nil { - objectMap["name"] = vmsspiac.Name - } - if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil { - objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct. -func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) 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 - } - vmsspiac.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties) - if err != nil { - return err - } - vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties - } - } - } - - return nil -} - -// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets -// network configuration's DNS settings. -type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct { - // DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created - DomainNameLabel *string `json:"domainNameLabel,omitempty"` -} - -// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP -// Configuration's PublicIPAddress configuration -type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct { - // IdleTimeoutInMinutes - The idle timeout of the public IP address. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // DNSSettings - The dns settings to be applied on the publicIP addresses . - DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` - // IPTags - The list of IP tags associated with the public IP address. - IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"` - // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` -} - -// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. -type VirtualMachineScaleSetReimageParameters struct { - // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - InstanceIds *[]string `json:"instanceIds,omitempty"` - // 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"` -} - -// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualMachineScaleSetRollingUpgradesCancelFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result. -func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and -// retrieving the results of a long-running operation. -type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result. -func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result. -func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualMachineScaleSetsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result. -func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmss.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { - vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsDeallocateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result. -func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result. -func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualMachineScaleSetsDeleteInstancesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result. -func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetSku describes an available virtual machine scale set sku. -type VirtualMachineScaleSetSku struct { - // ResourceType - READ-ONLY; The type of resource the sku applies to. - ResourceType *string `json:"resourceType,omitempty"` - // Sku - READ-ONLY; The Sku. - Sku *Sku `json:"sku,omitempty"` - // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set. - Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku. -func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku. -type VirtualMachineScaleSetSkuCapacity struct { - // Minimum - READ-ONLY; The minimum capacity. - Minimum *int64 `json:"minimum,omitempty"` - // Maximum - READ-ONLY; The maximum capacity that can be set. - Maximum *int64 `json:"maximum,omitempty"` - // DefaultCapacity - READ-ONLY; The default capacity. - DefaultCapacity *int64 `json:"defaultCapacity,omitempty"` - // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone' - ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity. -func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualMachineScaleSetsPerformMaintenanceFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result. -func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsPowerOffFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result. -func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsRedeployFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result. -func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsReimageAllFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result. -func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsReimageFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result. -func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsRestartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result. -func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result. -func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsStartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result. -func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile. -type VirtualMachineScaleSetStorageProfile struct { - // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - ImageReference *ImageReference `json:"imageReference,omitempty"` - // OsDisk - Specifies information about the operating system disk used by the virtual machines in the scale set.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"` - // DataDisks - Specifies the parameters that are used to add data disks to the virtual machines in the scale set.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` -} - -// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result. -func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmss.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent { - vmss, err = client.UpdateResponder(vmss.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualMachineScaleSetsUpdateInstancesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result. -func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set. -type VirtualMachineScaleSetUpdate struct { - // Sku - The virtual machine scale set sku. - Sku *Sku `json:"sku,omitempty"` - // Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images. - Plan *Plan `json:"plan,omitempty"` - *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` - // Identity - The identity of the virtual machine scale set, if configured. - Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate. -func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssu.Sku != nil { - objectMap["sku"] = vmssu.Sku - } - if vmssu.Plan != nil { - objectMap["plan"] = vmssu.Plan - } - if vmssu.VirtualMachineScaleSetUpdateProperties != nil { - objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties - } - if vmssu.Identity != nil { - objectMap["identity"] = vmssu.Identity - } - if vmssu.Tags != nil { - objectMap["tags"] = vmssu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct. -func (vmssu *VirtualMachineScaleSetUpdate) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - vmssu.Sku = &sku - } - case "plan": - if v != nil { - var plan Plan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - vmssu.Plan = &plan - } - case "properties": - if v != nil { - var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties) - if err != nil { - return err - } - vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties - } - case "identity": - if v != nil { - var identity VirtualMachineScaleSetIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - vmssu.Identity = &identity - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmssu.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP -// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the -// new subnet are in the same virtual network -type VirtualMachineScaleSetUpdateIPConfiguration struct { - // Name - The IP configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration. -func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssuic.Name != nil { - objectMap["name"] = vmssuic.Name - } - if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil { - objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties - } - if vmssuic.ID != nil { - objectMap["id"] = vmssuic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct. -func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) 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 - } - vmssuic.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties) - if err != nil { - return err - } - vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssuic.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network -// profile's IP configuration properties. -type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { - // Subnet - The subnet. - Subnet *APIEntityReference `json:"subnet,omitempty"` - // Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. - Primary *bool `json:"primary,omitempty"` - // PublicIPAddressConfiguration - The publicIPAddressConfiguration. - PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // ApplicationGatewayBackendAddressPools - The application gateway backend address pools. - ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` - // ApplicationSecurityGroups - Specifies an array of references to application security group. - ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"` - // LoadBalancerBackendAddressPools - The load balancer backend address pools. - LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` - // LoadBalancerInboundNatPools - The load balancer inbound nat pools. - LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` -} - -// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's -// network configurations. -type VirtualMachineScaleSetUpdateNetworkConfiguration struct { - // Name - The network configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"` - // ID - Resource Id - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration. -func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssunc.Name != nil { - objectMap["name"] = vmssunc.Name - } - if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil { - objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties - } - if vmssunc.ID != nil { - objectMap["id"] = vmssunc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct. -func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) 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 - } - vmssunc.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties) - if err != nil { - return err - } - vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssunc.ID = &ID - } - } - } - - return nil -} - -// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set -// updatable network profile's IP configuration.Use this object for updating network profile's IP -// Configuration. -type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct { - // Primary - Whether this is a primary NIC on a virtual machine. - Primary *bool `json:"primary,omitempty"` - // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - // NetworkSecurityGroup - The network security group. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - // DNSSettings - The dns settings to be applied on the network interfaces. - DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` - // IPConfigurations - The virtual machine scale set IP Configuration. - IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"` - // EnableIPForwarding - Whether IP forwarding enabled on this NIC. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` -} - -// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile. -type VirtualMachineScaleSetUpdateNetworkProfile struct { - // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` - // NetworkInterfaceConfigurations - The list of network configurations. - NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` -} - -// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update -// Object. This should be used for Updating VMSS OS Disk. -type VirtualMachineScaleSetUpdateOSDisk struct { - // Caching - The caching type. 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"` - // DiskSizeGB - Specifies the size of the operating system 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"` - // Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. - Image *VirtualHardDisk `json:"image,omitempty"` - // VhdContainers - The list of virtual hard disk container uris. - VhdContainers *[]string `json:"vhdContainers,omitempty"` - // ManagedDisk - The managed disk parameters. - ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` -} - -// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile. -type VirtualMachineScaleSetUpdateOSProfile struct { - // CustomData - A base-64 encoded string of custom data. - CustomData *string `json:"customData,omitempty"` - // WindowsConfiguration - The Windows Configuration of the OS profile. - WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` - // LinuxConfiguration - The Linux Configuration of the OS profile. - LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` - // Secrets - The List of certificates for addition to the VM. - Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` -} - -// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set. -type VirtualMachineScaleSetUpdateProperties struct { - // UpgradePolicy - The upgrade policy. - UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` - // AutomaticRepairsPolicy - Policy for automatic repairs. - AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"` - // VirtualMachineProfile - The virtual machine profile. - VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` - // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned. - Overprovision *bool `json:"overprovision,omitempty"` - // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. - DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. - SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` - // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. - ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` - // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. - ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` -} - -// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP -// Configuration's PublicIPAddress configuration -type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct { - // Name - The publicIP address configuration name. - Name *string `json:"name,omitempty"` - *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration. -func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssupiac.Name != nil { - objectMap["name"] = vmssupiac.Name - } - if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil { - objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct. -func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) 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 - } - vmssupiac.Name = &name - } - case "properties": - if v != nil { - var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties) - if err != nil { - return err - } - vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - } - } - } - - return nil -} - -// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale -// set IP Configuration's PublicIPAddress configuration -type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct { - // IdleTimeoutInMinutes - The idle timeout of the public IP address. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // DNSSettings - The dns settings to be applied on the publicIP addresses . - DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` -} - -// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile. -type VirtualMachineScaleSetUpdateStorageProfile struct { - // ImageReference - The image reference. - ImageReference *ImageReference `json:"imageReference,omitempty"` - // OsDisk - The OS disk. - OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"` - // DataDisks - The data disks. - DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` -} - -// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile. -type VirtualMachineScaleSetUpdateVMProfile struct { - // OsProfile - The virtual machine scale set OS profile. - OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"` - // StorageProfile - The virtual machine scale set storage profile. - StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"` - // NetworkProfile - The virtual machine scale set network profile. - NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"` - // DiagnosticsProfile - The virtual machine scale set diagnostics profile. - DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` - // ExtensionProfile - The virtual machine scale set extension profile. - ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` - // LicenseType - The license type, which is for bring your own license scenario. - LicenseType *string `json:"licenseType,omitempty"` - // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

    Minimum api-version: 2019-03-01. - BillingProfile *BillingProfile `json:"billingProfile,omitempty"` - // ScheduledEventsProfile - Specifies Scheduled Event related configurations. - ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` -} - -// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine. -type VirtualMachineScaleSetVM struct { - autorest.Response `json:"-"` - // InstanceID - READ-ONLY; The virtual machine instance ID. - InstanceID *string `json:"instanceId,omitempty"` - // Sku - READ-ONLY; The virtual machine SKU. - Sku *Sku `json:"sku,omitempty"` - *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` - // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. - Plan *Plan `json:"plan,omitempty"` - // Resources - READ-ONLY; The virtual machine child extension resources. - Resources *[]VirtualMachineExtension `json:"resources,omitempty"` - // Zones - READ-ONLY; The virtual machine zones. - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM. -func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmssv.VirtualMachineScaleSetVMProperties != nil { - objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties - } - if vmssv.Plan != nil { - objectMap["plan"] = vmssv.Plan - } - if vmssv.Location != nil { - objectMap["location"] = vmssv.Location - } - if vmssv.Tags != nil { - objectMap["tags"] = vmssv.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct. -func (vmssv *VirtualMachineScaleSetVM) 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 "instanceId": - if v != nil { - var instanceID string - err = json.Unmarshal(*v, &instanceID) - if err != nil { - return err - } - vmssv.InstanceID = &instanceID - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - vmssv.Sku = &sku - } - case "properties": - if v != nil { - var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties - err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties) - if err != nil { - return err - } - vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties - } - case "plan": - if v != nil { - var plan Plan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - vmssv.Plan = &plan - } - case "resources": - if v != nil { - var resources []VirtualMachineExtension - err = json.Unmarshal(*v, &resources) - if err != nil { - return err - } - vmssv.Resources = &resources - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - vmssv.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vmssv.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vmssv.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vmssv.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vmssv.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmssv.Tags = tags - } - } - } - - return nil -} - -// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result. -func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vme.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { - vme, err = client.CreateOrUpdateResponder(vme.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualMachineScaleSetVMExtensionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result. -func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine -// scale set. -type VirtualMachineScaleSetVMExtensionsSummary struct { - // Name - READ-ONLY; The extension name. - Name *string `json:"name,omitempty"` - // StatusesSummary - READ-ONLY; The extensions information. - StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary. -func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualMachineScaleSetVMExtensionsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result. -func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vme.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent { - vme, err = client.UpdateResponder(vme.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale -// set. -type VirtualMachineScaleSetVMInstanceIDs struct { - // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - InstanceIds *[]string `json:"instanceIds,omitempty"` -} - -// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM -// scale set. -type VirtualMachineScaleSetVMInstanceRequiredIDs struct { - // InstanceIds - The virtual machine scale set instance ids. - InstanceIds *[]string `json:"instanceIds,omitempty"` -} - -// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM. -type VirtualMachineScaleSetVMInstanceView struct { - autorest.Response `json:"-"` - // PlatformUpdateDomain - The Update Domain count. - PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` - // PlatformFaultDomain - The Fault Domain count. - PlatformFaultDomain *int32 `json:"platformFaultDomain,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 disks 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"` - // Statuses - The resource status information. - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` - // PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. - 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:"-"` - // Value - The list of virtual machine scale sets VMs. - Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of -// VirtualMachineScaleSetVM values. -type VirtualMachineScaleSetVMListResultIterator struct { - i int - page VirtualMachineScaleSetVMListResultPage -} - -// 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 *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.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 *VirtualMachineScaleSetVMListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualMachineScaleSetVMListResultIterator) 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 VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult { - 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 VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM { - if !iter.page.NotDone() { - return VirtualMachineScaleSetVM{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type. -func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator { - return VirtualMachineScaleSetVMListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vmssvlr.NextLink))) -} - -// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values. -type VirtualMachineScaleSetVMListResultPage struct { - fn func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error) - vmssvlr VirtualMachineScaleSetVMListResult -} - -// 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 *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.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.vmssvlr) - if err != nil { - return err - } - page.vmssvlr = 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 *VirtualMachineScaleSetVMListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool { - return !page.vmssvlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult { - return page.vmssvlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM { - if page.vmssvlr.IsEmpty() { - return nil - } - return *page.vmssvlr.Value -} - -// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type. -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 -// profile. -type VirtualMachineScaleSetVMNetworkProfileConfiguration struct { - // NetworkInterfaceConfigurations - The list of network configurations. - NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` -} - -// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile. -type VirtualMachineScaleSetVMProfile struct { - // OsProfile - Specifies the operating system settings for the virtual machines in the scale set. - OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` - // StorageProfile - Specifies the storage settings for the virtual machine disks. - StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` - // NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set. - NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` - // DiagnosticsProfile - Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. - 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 *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"` - // 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 VMSS.

    Minimum api-version: 2019-03-01. - BillingProfile *BillingProfile `json:"billingProfile,omitempty"` - // ScheduledEventsProfile - Specifies Scheduled Event related configurations. - ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` -} - -// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual -// machine. -type VirtualMachineScaleSetVMProperties struct { - // LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine. - LatestModelApplied *bool `json:"latestModelApplied,omitempty"` - // VMID - READ-ONLY; Azure VM unique ID. - VMID *string `json:"vmId,omitempty"` - // InstanceView - READ-ONLY; The virtual machine instance view. - InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"` - // 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 in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // OsProfile - Specifies the operating system settings for the virtual machine. - OsProfile *OSProfile `json:"osProfile,omitempty"` - // NetworkProfile - Specifies the network interfaces of the virtual machine. - NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` - // NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine. - NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,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. An existing VM cannot be added to an availability set. - 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 *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"` - // ProtectionPolicy - Specifies the protection policy of the virtual machine. - 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.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. - ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"` - // ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM. - ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"` -} - -// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters. -type VirtualMachineScaleSetVMReimageParameters 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"` -} - -// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsDeallocateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result. -func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result. -func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result. -func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsPowerOffFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result. -func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsRedeployFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result. -func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsReimageAllFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result. -func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsReimageFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result. -func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsRestartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result. -func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsRunCommandFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result. -func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rcr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { - rcr, err = client.RunCommandResponder(rcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsStartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result. -func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachineScaleSetVMsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result. -func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmssv.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent { - vmssv, err = client.UpdateResponder(vmssv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesCaptureFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesCaptureFuture.Result. -func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vmcr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent { - vmcr, err = client.CaptureResponder(vmcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachinesConvertToManagedDisksFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result. -func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachinesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (VirtualMachine, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result. -func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - VM.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { - VM, err = client.CreateOrUpdateResponder(VM.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachinesDeallocateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesDeallocateFuture.Result. -func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesDeleteFuture.Result. -func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineSize describes the properties of a VM size. -type VirtualMachineSize struct { - // Name - The name of the virtual machine size. - Name *string `json:"name,omitempty"` - // NumberOfCores - The number of cores supported by the virtual machine size. - NumberOfCores *int32 `json:"numberOfCores,omitempty"` - // OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size. - OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"` - // ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size. - ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"` - // MemoryInMB - The amount of memory, in MB, supported by the virtual machine size. - MemoryInMB *int32 `json:"memoryInMB,omitempty"` - // MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size. - MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` -} - -// VirtualMachineSizeListResult the List Virtual Machine operation response. -type VirtualMachineSizeListResult struct { - autorest.Response `json:"-"` - // Value - The list of virtual machine sizes. - Value *[]VirtualMachineSize `json:"value,omitempty"` -} - -// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachinesPerformMaintenanceFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result. -func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesPowerOffFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesPowerOffFuture.Result. -func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesReapplyFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesReapplyFuture.Result. -func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesRedeployFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesRedeployFuture.Result. -func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesReimageFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesReimageFuture.Result. -func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesRestartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesRestartFuture.Result. -func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualMachinesRunCommandFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (RunCommandResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesRunCommandFuture.Result. -func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rcr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent { - rcr, err = client.RunCommandResponder(rcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesStartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesStartFuture.Result. -func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view -// status summary. -type VirtualMachineStatusCodeCount struct { - // Code - READ-ONLY; The instance view status code. - Code *string `json:"code,omitempty"` - // Count - READ-ONLY; The number of instances having a particular status code. - Count *int32 `json:"count,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount. -func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualMachinesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualMachinesClient) (VirtualMachine, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualMachinesUpdateFuture.Result. -func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - VM.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent { - VM, err = client.UpdateResponder(VM.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualMachineUpdate describes a Virtual Machine Update. -type VirtualMachineUpdate struct { - // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. - Plan *Plan `json:"plan,omitempty"` - *VirtualMachineProperties `json:"properties,omitempty"` - // Identity - The identity of the virtual machine, if configured. - Identity *VirtualMachineIdentity `json:"identity,omitempty"` - // Zones - The virtual machine zones. - Zones *[]string `json:"zones,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for VirtualMachineUpdate. -func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vmu.Plan != nil { - objectMap["plan"] = vmu.Plan - } - if vmu.VirtualMachineProperties != nil { - objectMap["properties"] = vmu.VirtualMachineProperties - } - if vmu.Identity != nil { - objectMap["identity"] = vmu.Identity - } - if vmu.Zones != nil { - objectMap["zones"] = vmu.Zones - } - if vmu.Tags != nil { - objectMap["tags"] = vmu.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct. -func (vmu *VirtualMachineUpdate) 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 "plan": - if v != nil { - var plan Plan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - vmu.Plan = &plan - } - case "properties": - if v != nil { - var virtualMachineProperties VirtualMachineProperties - err = json.Unmarshal(*v, &virtualMachineProperties) - if err != nil { - return err - } - vmu.VirtualMachineProperties = &virtualMachineProperties - } - case "identity": - if v != nil { - var identity VirtualMachineIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - vmu.Identity = &identity - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - vmu.Zones = &zones - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vmu.Tags = tags - } - } - } - - return nil -} - -// VMScaleSetConvertToSinglePlacementGroupInput ... -type VMScaleSetConvertToSinglePlacementGroupInput struct { - // ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. - ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"` -} - -// WindowsConfiguration specifies Windows operating system settings on the virtual machine. -type WindowsConfiguration struct { - // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. - ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` - // EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.

    For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. - EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` - // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

    Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones). - TimeZone *string `json:"timeZone,omitempty"` - // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` - // WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRM *WinRMConfiguration `json:"winRM,omitempty"` -} - -// WinRMConfiguration describes Windows Remote Management configuration of the VM -type WinRMConfiguration struct { - // Listeners - The list of Windows Remote Management listeners - Listeners *[]WinRMListener `json:"listeners,omitempty"` -} - -// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener -type WinRMListener struct { - // Protocol - Specifies the protocol of WinRM listener.

    Possible values are:
    **http**

    **https**. Possible values include: 'HTTP', 'HTTPS' - Protocol ProtocolTypes `json:"protocol,omitempty"` - // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    } - CertificateURL *string `json:"certificateUrl,omitempty"` -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go deleted file mode 100644 index 516c9a375cd2..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go +++ /dev/null @@ -1,98 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the compute Client -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of compute operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Compute/operations"), - 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go deleted file mode 100644 index 9eae72328b40..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go +++ /dev/null @@ -1,575 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ProximityPlacementGroupsClient is the compute Client -type ProximityPlacementGroupsClient struct { - BaseClient -} - -// NewProximityPlacementGroupsClient creates an instance of the ProximityPlacementGroupsClient client. -func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacementGroupsClient { - return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient 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 NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient { - return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a proximity placement group. -// Parameters: -// resourceGroupName - the name of the resource group. -// proximityPlacementGroupName - the name of the proximity placement group. -// parameters - parameters supplied to the Create Proximity Placement Group operation. -func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (result ProximityPlacementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ProximityPlacementGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ProximityPlacementGroup, 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 delete a proximity placement group. -// Parameters: -// resourceGroupName - the name of the resource group. -// proximityPlacementGroupName - the name of the proximity placement group. -func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, proximityPlacementGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get retrieves information about a proximity placement group . -// Parameters: -// resourceGroupName - the name of the resource group. -// proximityPlacementGroupName - the name of the proximity placement group. -// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the -// resources in the proximity placement group. -func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.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, proximityPlacementGroupName, includeColocationStatus) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "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.ProximityPlacementGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(includeColocationStatus) > 0 { - queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", 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 ProximityPlacementGroupsClient) 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 ProximityPlacementGroupsClient) GetResponder(resp *http.Response) (result ProximityPlacementGroup, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup lists all proximity placement groups in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.ppglr.Response.Response != nil { - sc = result.ppglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.ppglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.ppglr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/proximityPlacementGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ProximityPlacementGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ProximityPlacementGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) { - req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListBySubscription lists all proximity placement groups in a subscription. -func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Context) (result ProximityPlacementGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription") - defer func() { - sc := -1 - if result.ppglr.Response.Response != nil { - sc = result.ppglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.ppglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.ppglr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client ProximityPlacementGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client ProximityPlacementGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) { - req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result ProximityPlacementGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription") - 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.ListBySubscription(ctx) - return -} - -// Update update a proximity placement group. -// Parameters: -// resourceGroupName - the name of the resource group. -// proximityPlacementGroupName - the name of the proximity placement group. -// parameters - parameters supplied to the Update Proximity Placement Group operation. -func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (result ProximityPlacementGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ProximityPlacementGroupsClient) UpdateResponder(resp *http.Response) (result ProximityPlacementGroup, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go deleted file mode 100644 index 9c967d93aa8d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go +++ /dev/null @@ -1,149 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ResourceSkusClient is the compute Client -type ResourceSkusClient struct { - BaseClient -} - -// NewResourceSkusClient creates an instance of the ResourceSkusClient client. -func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { - return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient 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 NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient { - return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets the list of Microsoft.Compute SKUs available for your Subscription. -// Parameters: -// filter - the filter to apply on the operation. Only **location** filter is supported currently. -func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") - defer func() { - sc := -1 - if result.rsr.Response.Response != nil { - sc = result.rsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request") - return - } - - result.rsr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request") - return - } - if result.rsr.hasNextLink() && result.rsr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", 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 ResourceSkusClient) 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 ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, 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 ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) { - req, err := lastResults.resourceSkusResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "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.ResourceSkusClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string) (result ResourceSkusResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.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, filter) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go deleted file mode 100644 index 986664e4603d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go +++ /dev/null @@ -1,767 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// SnapshotsClient is the compute Client -type SnapshotsClient struct { - BaseClient -} - -// NewSnapshotsClient creates an instance of the SnapshotsClient client. -func NewSnapshotsClient(subscriptionID string) SnapshotsClient { - return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient 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 NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { - return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -// snapshot - snapshot object supplied in the body of the Put disk operation. -func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: snapshot, - Constraints: []validation.Constraint{{Target: "snapshot.SnapshotProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - snapshot.ManagedBy = nil - 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/snapshots/{snapshotName}", pathParameters), - autorest.WithJSON(snapshot), - 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 SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, snapshotName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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/snapshots/{snapshotName}", 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 SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) 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 information about a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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, snapshotName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "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.SnapshotsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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.Compute/snapshots/{snapshotName}", 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 SnapshotsClient) 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 SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GrantAccess grants access to a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -// grantAccessData - access data object supplied in the body of the get snapshot access operation. -func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (result SnapshotsGrantAccessFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.GrantAccess") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: grantAccessData, - Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.SnapshotsClient", "GrantAccess", err.Error()) - } - - req, err := client.GrantAccessPreparer(ctx, resourceGroupName, snapshotName, grantAccessData) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure preparing request") - return - } - - result, err = client.GrantAccessSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request") - return - } - - return -} - -// GrantAccessPreparer prepares the GrantAccess request. -func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", pathParameters), - autorest.WithJSON(grantAccessData), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GrantAccessSender sends the GrantAccess request. The method will close the -// http.Response Body if it receives an error. -func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GrantAccessResponder handles the response to the GrantAccess request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists snapshots under a subscription. -func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List") - defer func() { - sc := -1 - if result.sl.Response.Response != nil { - sc = result.sl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.sl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", 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 SnapshotsClient) 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 SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotList, 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 SnapshotsClient) listNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) { - req, err := lastResults.snapshotListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "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.SnapshotsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client SnapshotsClient) ListComplete(ctx context.Context) (result SnapshotListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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) - return -} - -// ListByResourceGroup lists snapshots under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SnapshotListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.sl.Response.Response != nil { - sc = result.sl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.sl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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.Compute/snapshots", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client SnapshotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) { - req, err := lastResults.snapshotListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SnapshotListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// RevokeAccess revokes access to a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsRevokeAccessFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, snapshotName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure preparing request") - return - } - - result, err = client.RevokeAccessSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request") - return - } - - return -} - -// RevokeAccessPreparer prepares the RevokeAccess request. -func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RevokeAccessSender sends the RevokeAccess request. The method will close the -// http.Response Body if it receives an error. -func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RevokeAccessResponder handles the response to the RevokeAccess request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates (patches) a snapshot. -// Parameters: -// resourceGroupName - the name of the resource group. -// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. -// snapshot - snapshot object supplied in the body of the Patch snapshot operation. -func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotName": autorest.Encode("path", snapshotName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-11-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/snapshots/{snapshotName}", pathParameters), - autorest.WithJSON(snapshot), - 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 SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go deleted file mode 100644 index 017269b6188a..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go +++ /dev/null @@ -1,649 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SSHPublicKeysClient is the compute Client -type SSHPublicKeysClient struct { - BaseClient -} - -// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client. -func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient { - return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient 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 NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient { - return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a new SSH public key resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// SSHPublicKeyName - the name of the SSH public key. -// parameters - parameters supplied to create the SSH public key. -func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Create") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/sshPublicKeys/{sshPublicKeyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, 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 delete an SSH public key. -// Parameters: -// resourceGroupName - the name of the resource group. -// SSHPublicKeyName - the name of the SSH public key. -func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/sshPublicKeys/{sshPublicKeyName}", 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 SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the -// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key -// resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// SSHPublicKeyName - the name of the SSH public key. -func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request") - return - } - - resp, err := client.GenerateKeyPairSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request") - return - } - - result, err = client.GenerateKeyPairResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request") - return - } - - return -} - -// GenerateKeyPairPreparer prepares the GenerateKeyPair request. -func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the -// http.Response Body if it receives an error. -func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get retrieves information about an SSH public key. -// Parameters: -// resourceGroupName - the name of the resource group. -// SSHPublicKeyName - the name of the SSH public key. -func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.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, SSHPublicKeyName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "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.SSHPublicKeysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/sshPublicKeys/{sshPublicKeyName}", 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 SSHPublicKeysClient) 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 SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in -// the response to get the next page of SSH public keys. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.spkglr.Response.Response != nil { - sc = result.spkglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.spkglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.spkglr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/sshPublicKeys", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { - req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListBySubscription lists all of the SSH public keys in the subscription. Use the nextLink property in the response -// to get the next page of SSH public keys. -func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") - defer func() { - sc := -1 - if result.spkglr.Response.Response != nil { - sc = result.spkglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.spkglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.spkglr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { - req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") - 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.ListBySubscription(ctx) - return -} - -// Update updates a new SSH public key resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// SSHPublicKeyName - the name of the SSH public key. -// parameters - parameters supplied to update the SSH public key. -func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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/sshPublicKeys/{sshPublicKeyName}", pathParameters), - autorest.WithJSON(parameters), - 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 SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go deleted file mode 100644 index 3231cc193eb5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go +++ /dev/null @@ -1,155 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// UsageClient is the compute Client -type UsageClient struct { - BaseClient -} - -// NewUsageClient creates an instance of the UsageClient client. -func NewUsageClient(subscriptionID string) UsageClient { - return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewUsageClientWithBaseURI creates an instance of the UsageClient 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 NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { - return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets, for the specified location, the current compute resource usage information as well as the limits for -// compute resources under the subscription. -// Parameters: -// location - the location for which resource usage is queried. -func (client UsageClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.List") - defer func() { - sc := -1 - if result.lur.Response.Response != nil { - sc = result.lur.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.UsageClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lur.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure sending request") - return - } - - result.lur, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure responding to request") - return - } - if result.lur.hasNextLink() && result.lur.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client UsageClient) 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 = "2019-12-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}/usages", 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 UsageClient) 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 UsageClient) ListResponder(resp *http.Response) (result ListUsagesResult, 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 UsageClient) listNextResults(ctx context.Context, lastResults ListUsagesResult) (result ListUsagesResult, err error) { - req, err := lastResults.listUsagesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.UsageClient", "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.UsageClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UsageClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go deleted file mode 100644 index a4893da4aa36..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package compute - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " compute/2019-12-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go deleted file mode 100644 index 334f878d21ee..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go +++ /dev/null @@ -1,270 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineExtensionImagesClient is the compute Client -type VirtualMachineExtensionImagesClient struct { - BaseClient -} - -// NewVirtualMachineExtensionImagesClient creates an instance of the VirtualMachineExtensionImagesClient client. -func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachineExtensionImagesClient { - return NewVirtualMachineExtensionImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { - return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a virtual machine extension image. -// Parameters: -// location - the name of a supported Azure region. -func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, location string, publisherName string, typeParameter string, version string) (result VirtualMachineExtensionImage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.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, location, publisherName, typeParameter, version) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "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.VirtualMachineExtensionImagesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, typeParameter string, version string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "publisherName": autorest.Encode("path", publisherName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "type": autorest.Encode("path", typeParameter), - "version": autorest.Encode("path", version), - } - - const APIVersion = "2019-12-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}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", 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 VirtualMachineExtensionImagesClient) 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 VirtualMachineExtensionImagesClient) GetResponder(resp *http.Response) (result VirtualMachineExtensionImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListTypes gets a list of virtual machine extension image types. -// Parameters: -// location - the name of a supported Azure region. -func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, location string, publisherName string) (result ListVirtualMachineExtensionImage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListTypes") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListTypesPreparer(ctx, location, publisherName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", nil, "Failure preparing request") - return - } - - resp, err := client.ListTypesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure sending request") - return - } - - result, err = client.ListTypesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request") - return - } - - return -} - -// ListTypesPreparer prepares the ListTypes request. -func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "publisherName": autorest.Encode("path", publisherName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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}/publishers/{publisherName}/artifacttypes/vmextension/types", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListTypesSender sends the ListTypes request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListTypesResponder handles the response to the ListTypes request. The method always -// closes the http.Response Body. -func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListVersions gets a list of virtual machine extension image versions. -// Parameters: -// location - the name of a supported Azure region. -// filter - the filter to apply on the operation. -func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result ListVirtualMachineExtensionImage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListVersions") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListVersionsPreparer(ctx, location, publisherName, typeParameter, filter, top, orderby) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", nil, "Failure preparing request") - return - } - - resp, err := client.ListVersionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure sending request") - return - } - - result, err = client.ListVersionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request") - return - } - - return -} - -// ListVersionsPreparer prepares the ListVersions request. -func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "publisherName": autorest.Encode("path", publisherName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "type": autorest.Encode("path", typeParameter), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(orderby) > 0 { - queryParameters["$orderby"] = autorest.Encode("query", orderby) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVersionsSender sends the ListVersions request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVersionsResponder handles the response to the ListVersions request. The method always -// closes the http.Response Body. -func (client VirtualMachineExtensionImagesClient) ListVersionsResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go deleted file mode 100644 index e31db946f2f1..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go +++ /dev/null @@ -1,442 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineExtensionsClient is the compute Client -type VirtualMachineExtensionsClient struct { - BaseClient -} - -// NewVirtualMachineExtensionsClient creates an instance of the VirtualMachineExtensionsClient client. -func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExtensionsClient { - return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient 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 NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient { - return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate the operation to create or update the extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine where the extension should be created or updated. -// VMExtensionName - the name of the virtual machine extension. -// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation. -func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineExtensionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmName": autorest.Encode("path", VMName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine where the extension should be deleted. -// VMExtensionName - the name of the virtual machine extension. -func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (result VirtualMachineExtensionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, VMExtensionName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmName": autorest.Encode("path", VMName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", 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 VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachineExtensionsClient) 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine containing the extension. -// VMExtensionName - the name of the virtual machine extension. -// expand - the expand expression to apply on the operation. -func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.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, VMName, VMExtensionName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "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.VirtualMachineExtensionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmName": autorest.Encode("path", VMName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", 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 VirtualMachineExtensionsClient) 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 VirtualMachineExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, 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 extensions of a Virtual Machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine containing the extension. -// expand - the expand expression to apply on the operation. -func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, VMName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineExtensionsClient) ListPreparer(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 = "2019-12-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}/extensions", 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 VirtualMachineExtensionsClient) 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 VirtualMachineExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update the operation to update the extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine where the extension should be updated. -// VMExtensionName - the name of the virtual machine extension. -// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation. -func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineExtensionsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmName": autorest.Encode("path", VMName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualMachineExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go deleted file mode 100644 index 2032e8e25413..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go +++ /dev/null @@ -1,432 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineImagesClient is the compute Client -type VirtualMachineImagesClient struct { - BaseClient -} - -// NewVirtualMachineImagesClient creates an instance of the VirtualMachineImagesClient client. -func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesClient { - return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient 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 NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient { - return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a virtual machine image. -// Parameters: -// location - the name of a supported Azure region. -// publisherName - a valid image publisher. -// offer - a valid image publisher offer. -// skus - a valid image SKU. -// version - a valid image SKU version. -func (client VirtualMachineImagesClient) Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.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, location, publisherName, offer, skus, version) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "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.VirtualMachineImagesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "offer": autorest.Encode("path", offer), - "publisherName": autorest.Encode("path", publisherName), - "skus": autorest.Encode("path", skus), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "version": autorest.Encode("path", version), - } - - const APIVersion = "2019-12-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}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", 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 VirtualMachineImagesClient) 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 VirtualMachineImagesClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. -// Parameters: -// location - the name of a supported Azure region. -// publisherName - a valid image publisher. -// offer - a valid image publisher offer. -// skus - a valid image SKU. -// expand - the expand expression to apply on the operation. -func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, expand, top, orderby) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "offer": autorest.Encode("path", offer), - "publisherName": autorest.Encode("path", publisherName), - "skus": autorest.Encode("path", skus), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(orderby) > 0 { - queryParameters["$orderby"] = autorest.Encode("query", orderby) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", 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 VirtualMachineImagesClient) 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 VirtualMachineImagesClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListOffers gets a list of virtual machine image offers for the specified location and publisher. -// Parameters: -// location - the name of a supported Azure region. -// publisherName - a valid image publisher. -func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, location string, publisherName string) (result ListVirtualMachineImageResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListOffers") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListOffersPreparer(ctx, location, publisherName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", nil, "Failure preparing request") - return - } - - resp, err := client.ListOffersSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure sending request") - return - } - - result, err = client.ListOffersResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request") - return - } - - return -} - -// ListOffersPreparer prepares the ListOffers request. -func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "publisherName": autorest.Encode("path", publisherName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListOffersSender sends the ListOffers request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListOffersResponder handles the response to the ListOffers request. The method always -// closes the http.Response Body. -func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListPublishers gets a list of virtual machine image publishers for the specified Azure location. -// Parameters: -// location - the name of a supported Azure region. -func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, location string) (result ListVirtualMachineImageResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListPublishers") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPublishersPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", nil, "Failure preparing request") - return - } - - resp, err := client.ListPublishersSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure sending request") - return - } - - result, err = client.ListPublishersResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request") - return - } - - return -} - -// ListPublishersPreparer prepares the ListPublishers request. -func (client VirtualMachineImagesClient) ListPublishersPreparer(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 = "2019-12-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}/publishers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListPublishersSender sends the ListPublishers request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListPublishersResponder handles the response to the ListPublishers request. The method always -// closes the http.Response Body. -func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListSkus gets a list of virtual machine image SKUs for the specified location, publisher, and offer. -// Parameters: -// location - the name of a supported Azure region. -// publisherName - a valid image publisher. -// offer - a valid image publisher offer. -func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListSkus") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListSkusPreparer(ctx, location, publisherName, offer) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", nil, "Failure preparing request") - return - } - - resp, err := client.ListSkusSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure sending request") - return - } - - result, err = client.ListSkusResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request") - return - } - - return -} - -// ListSkusPreparer prepares the ListSkus request. -func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, location string, publisherName string, offer string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "offer": autorest.Encode("path", offer), - "publisherName": autorest.Encode("path", publisherName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSkusSender sends the ListSkus request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListSkusResponder handles the response to the ListSkus request. The method always -// closes the http.Response Body. -func (client VirtualMachineImagesClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go deleted file mode 100644 index 250d8156520f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go +++ /dev/null @@ -1,237 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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 - } - - 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 = "2019-12-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 - } - if result.rclr.hasNextLink() && result.rclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - 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 = "2019-12-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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go deleted file mode 100644 index c872f43df71f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go +++ /dev/null @@ -1,1945 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualMachinesClient is the compute Client -type VirtualMachinesClient struct { - BaseClient -} - -// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client. -func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { - return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient 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 NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient { - return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Capture captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create -// similar VMs. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// parameters - parameters supplied to the Capture Virtual Machine operation. -func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (result VirtualMachinesCaptureFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Capture") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VhdPrefix", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.DestinationContainerName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.OverwriteVhds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachinesClient", "Capture", err.Error()) - } - - req, err := client.CapturePreparer(ctx, resourceGroupName, VMName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure preparing request") - return - } - - result, err = client.CaptureSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request") - return - } - - return -} - -// CapturePreparer prepares the Capture request. -func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CaptureSender sends the Capture request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CaptureResponder handles the response to the Capture request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (result VirtualMachineCaptureResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ConvertToManagedDisks converts virtual machine disks from blob-based to managed disks. Virtual machine must be -// stop-deallocated before invoking this operation.
    For Windows, please refer to [Convert a virtual machine from -// unmanaged disks to managed -// disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).
    For -// Linux, please refer to [Convert a virtual machine from unmanaged disks to managed -// disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks). -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesConvertToManagedDisksFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ConvertToManagedDisks") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ConvertToManagedDisksPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure preparing request") - return - } - - result, err = client.ConvertToManagedDisksSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request") - return - } - - return -} - -// ConvertToManagedDisksPreparer prepares the ConvertToManagedDisks request. -func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ConvertToManagedDisksResponder handles the response to the ConvertToManagedDisks request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only -// during virtual machine creation. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// parameters - parameters supplied to the Create Virtual Machine operation. -func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachinesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Resources = nil - 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}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachine, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Deallocate shuts down the virtual machine and releases the compute resources. You are not billed for the compute -// resources that this virtual machine uses. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeallocateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure preparing request") - return - } - - result, err = client.DeallocateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request") - return - } - - return -} - -// DeallocatePreparer prepares the Deallocate request. -func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeallocateSender sends the Deallocate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeallocateResponder handles the response to the Deallocate request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Delete the operation to delete a virtual machine. -// 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) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-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}", 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 VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) 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 -} - -// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine -// before performing this operation.
    For Windows, please refer to [Create a managed image of a generalized VM in -// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).
    For Linux, please -// refer to [How to create an image of a virtual machine or -// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GeneralizePreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", nil, "Failure preparing request") - return - } - - resp, err := client.GeneralizeSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure sending request") - return - } - - result, err = client.GeneralizeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request") - return - } - - return -} - -// GeneralizePreparer prepares the Generalize request. -func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GeneralizeSender sends the Generalize request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) GeneralizeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GeneralizeResponder handles the response to the Generalize request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get retrieves information about the model view or the instance view of a virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// expand - the expand expression to apply on the operation. -func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (result VirtualMachine, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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, VMName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "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.VirtualMachinesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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}", 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 VirtualMachinesClient) 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 VirtualMachinesClient) GetResponder(resp *http.Response) (result VirtualMachine, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// InstanceView retrieves information about the run-time state of a virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineInstanceView, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstanceView") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.InstanceViewPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", nil, "Failure preparing request") - return - } - - resp, err := client.InstanceViewSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure sending request") - return - } - - result, err = client.InstanceViewResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request") - return - } - - return -} - -// InstanceViewPreparer prepares the InstanceView request. -func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-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.Compute/virtualMachines/{vmName}/instanceView", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// InstanceViewSender sends the InstanceView request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) InstanceViewSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// InstanceViewResponder handles the response to the InstanceView request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) InstanceViewResponder(resp *http.Response) (result VirtualMachineInstanceView, 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 of the virtual machines in the specified resource group. Use the nextLink property in the response to -// get the next page of virtual machines. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List") - defer func() { - sc := -1 - if result.vmlr.Response.Response != nil { - sc = result.vmlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vmlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/virtualMachines", 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 VirtualMachinesClient) 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 VirtualMachinesClient) ListResponder(resp *http.Response) (result VirtualMachineListResult, 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 VirtualMachinesClient) listNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { - req, err := lastResults.virtualMachineListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "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.VirtualMachinesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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) - return -} - -// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response -// to get the next page of virtual machines. -// Parameters: -// statusOnly - statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. -func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly string) (result VirtualMachineListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll") - defer func() { - sc := -1 - if result.vmlr.Response.Response != nil { - sc = result.vmlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx, statusOnly) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.vmlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusOnly string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(statusOnly) > 0 { - queryParameters["statusOnly"] = autorest.Encode("query", statusOnly) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { - req, err := lastResults.virtualMachineListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachinesClient) ListAllComplete(ctx context.Context, statusOnly string) (result VirtualMachineListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll") - 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.ListAll(ctx, statusOnly) - return -} - -// ListAvailableSizes lists all available virtual machine sizes to which the specified virtual machine can be resized. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAvailableSizes") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableSizesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableSizesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableSizesPreparer prepares the ListAvailableSizes request. -func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-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.Compute/virtualMachines/{vmName}/vmSizes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByLocation gets all the virtual machines under the specified subscription for the specified location. -// Parameters: -// location - the location for which virtual machines under the subscription are queried. -func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation") - defer func() { - sc := -1 - if result.vmlr.Response.Response != nil { - sc = result.vmlr.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.VirtualMachinesClient", "ListByLocation", err.Error()) - } - - result.fn = client.listByLocationNextResults - req, err := client.ListByLocationPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByLocationSender(req) - if err != nil { - result.vmlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByLocationPreparer prepares the ListByLocation request. -func (client VirtualMachinesClient) ListByLocationPreparer(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 = "2019-12-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}/virtualMachines", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByLocationSender sends the ListByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByLocationResponder handles the response to the ListByLocation request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByLocationNextResults retrieves the next set of results, if any. -func (client VirtualMachinesClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) { - req, err := lastResults.virtualMachineListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation") - 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.ListByLocation(ctx, location) - return -} - -// PerformMaintenance shuts down the virtual machine, moves it to an already updated node, and powers it back on during -// the self-service phase of planned maintenance. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPerformMaintenanceFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PerformMaintenance") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure preparing request") - return - } - - result, err = client.PerformMaintenanceSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request") - return - } - - return -} - -// PerformMaintenancePreparer prepares the PerformMaintenance request. -func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// PowerOff the operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same -// provisioned resources. You are still charged for this virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates -// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not -// specified -func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (result VirtualMachinesPowerOffFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName, skipShutdown) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure preparing request") - return - } - - result, err = client.PowerOffSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request") - return - } - - return -} - -// PowerOffPreparer prepares the PowerOff request. -func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if skipShutdown != nil { - queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) - } else { - queryParameters["skipShutdown"] = autorest.Encode("query", false) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PowerOffSender sends the PowerOff request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PowerOffResponder handles the response to the PowerOff request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Reapply the operation to reapply a virtual machine's state. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesReapplyFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reapply") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReapplyPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure preparing request") - return - } - - result, err = client.ReapplySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request") - return - } - - return -} - -// ReapplyPreparer prepares the Reapply request. -func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReapplySender sends the Reapply request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReapplyResponder handles the response to the Reapply request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ReapplyResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Redeploy shuts down the virtual machine, moves it to a new node, and powers it back on. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRedeployFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RedeployPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure preparing request") - return - } - - result, err = client.RedeploySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request") - return - } - - return -} - -// RedeployPreparer prepares the Redeploy request. -func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RedeploySender sends the Redeploy request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RedeployResponder handles the response to the Redeploy request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Reimage reimages the virtual machine which has an ephemeral OS disk back to its initial state. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// parameters - parameters supplied to the Reimage Virtual Machine operation. -func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (result VirtualMachinesReimageFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReimagePreparer(ctx, resourceGroupName, VMName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure preparing request") - return - } - - result, err = client.ReimageSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request") - return - } - - return -} - -// ReimagePreparer prepares the Reimage request. -func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReimageSender sends the Reimage request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReimageResponder handles the response to the Reimage request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Restart the operation to restart a virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRestartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RestartPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure preparing request") - return - } - - result, err = client.RestartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request") - return - } - - return -} - -// RestartPreparer prepares the Restart request. -func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestartSender sends the Restart request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RestartResponder handles the response to the Restart request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// RunCommand run command on the VM. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// parameters - parameters supplied to the Run command operation. -func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (result VirtualMachinesRunCommandFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RunCommand") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachinesClient", "RunCommand", err.Error()) - } - - req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure preparing request") - return - } - - result, err = client.RunCommandSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request") - return - } - - return -} - -// RunCommandPreparer prepares the RunCommand request. -func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RunCommandSender sends the RunCommand request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RunCommandResponder handles the response to the RunCommand request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 -// minutes of calling the API -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request") - return - } - - resp, err := client.SimulateEvictionSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request") - return - } - - result, err = client.SimulateEvictionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request") - return - } - - return -} - -// SimulateEvictionPreparer prepares the SimulateEviction request. -func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SimulateEvictionSender sends the SimulateEviction request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Start the operation to start a virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesStartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartPreparer(ctx, resourceGroupName, VMName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure preparing request") - return - } - - result, err = client.StartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request") - return - } - - return -} - -// StartPreparer prepares the Start request. -func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceGroupName string, VMName 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartSender sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartResponder handles the response to the Start request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update the operation to update a virtual machine. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMName - the name of the virtual machine. -// parameters - parameters supplied to the Update Virtual Machine operation. -func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (result VirtualMachinesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (*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 = "2019-12-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}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualMachinesClient) UpdateResponder(resp *http.Response) (result VirtualMachine, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go deleted file mode 100644 index c5835208907e..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go +++ /dev/null @@ -1,483 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineScaleSetExtensionsClient is the compute Client -type VirtualMachineScaleSetExtensionsClient struct { - BaseClient -} - -// NewVirtualMachineScaleSetExtensionsClient creates an instance of the VirtualMachineScaleSetExtensionsClient client. -func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMachineScaleSetExtensionsClient { - return NewVirtualMachineScaleSetExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient 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 NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient { - return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate the operation to create or update an extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set where the extension should be create or updated. -// vmssExtensionName - the name of the VM scale set extension. -// extensionParameters - parameters supplied to the Create VM scale set Extension operation. -func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (result VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - "vmssExtensionName": autorest.Encode("path", vmssExtensionName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - extensionParameters.Type = nil - 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}/extensions/{vmssExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set where the extension should be deleted. -// vmssExtensionName - the name of the VM scale set extension. -func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result VirtualMachineScaleSetExtensionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - "vmssExtensionName": autorest.Encode("path", vmssExtensionName), - } - - const APIVersion = "2019-12-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}/extensions/{vmssExtensionName}", 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 VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetExtensionsClient) 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set containing the extension. -// vmssExtensionName - the name of the VM scale set extension. -// expand - the expand expression to apply on the operation. -func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.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, vmssExtensionName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "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.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - "vmssExtensionName": autorest.Encode("path", vmssExtensionName), - } - - const APIVersion = "2019-12-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}/extensions/{vmssExtensionName}", 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 VirtualMachineScaleSetExtensionsClient) 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 VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all extensions in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set containing the extension. -func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List") - defer func() { - sc := -1 - if result.vmsselr.Response.Response != nil { - sc = result.vmsselr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vmsselr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure sending request") - return - } - - result.vmsselr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request") - return - } - if result.vmsselr.hasNextLink() && result.vmsselr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", 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 VirtualMachineScaleSetExtensionsClient) 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 VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetExtensionListResult, 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 VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) { - req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "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.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.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) - return -} - -// Update the operation to update an extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set where the extension should be updated. -// vmssExtensionName - the name of the VM scale set extension. -// extensionParameters - parameters supplied to the Update VM scale set Extension operation. -func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - "vmssExtensionName": autorest.Encode("path", vmssExtensionName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - extensionParameters.Name = nil - extensionParameters.Type = nil - 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}/extensions/{vmssExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go deleted file mode 100644 index b0d5b63e0df7..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go +++ /dev/null @@ -1,346 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineScaleSetRollingUpgradesClient is the compute Client -type VirtualMachineScaleSetRollingUpgradesClient struct { - BaseClient -} - -// NewVirtualMachineScaleSetRollingUpgradesClient creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. -func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { - return NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient 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 NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { - return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Cancel cancels the current virtual machine scale set rolling upgrade. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.Cancel") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CancelPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure preparing request") - return - } - - result, err = client.CancelSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request") - return - } - - return -} - -// CancelPreparer prepares the Cancel request. -func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSender sends the Cancel request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CancelResponder handles the response to the Cancel request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// GetLatest gets the status of the latest virtual machine scale set rolling upgrade. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.GetLatest") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetLatestPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request") - return - } - - resp, err := client.GetLatestSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure sending request") - return - } - - result, err = client.GetLatestResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request") - return - } - - return -} - -// GetLatestPreparer prepares the GetLatest request. -func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetLatestSender sends the GetLatest request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetLatestResponder handles the response to the GetLatest request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(resp *http.Response) (result RollingUpgradeStatusInfo, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// StartExtensionUpgrade starts a rolling upgrade to move all extensions for all virtual machine scale set instances to -// the latest available extension version. Instances which are already running the latest extension versions are not -// affected. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request") - return - } - - result, err = client.StartExtensionUpgradeSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request") - return - } - - return -} - -// StartExtensionUpgradePreparer prepares the StartExtensionUpgrade request. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartExtensionUpgradeResponder handles the response to the StartExtensionUpgrade request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available -// Platform Image OS version. Instances which are already running the latest available OS version are not affected. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartOSUpgradePreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure preparing request") - return - } - - result, err = client.StartOSUpgradeSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request") - return - } - - return -} - -// StartOSUpgradePreparer prepares the StartOSUpgrade request. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartOSUpgradeResponder handles the response to the StartOSUpgrade request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go deleted file mode 100644 index a14352bdc23c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go +++ /dev/null @@ -1,2018 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualMachineScaleSetsClient is the compute Client -type VirtualMachineScaleSetsClient struct { - BaseClient -} - -// NewVirtualMachineScaleSetsClient creates an instance of the VirtualMachineScaleSetsClient client. -func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient { - return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient 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 NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient { - return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to true for a existing virtual machine scale -// set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the virtual machine scale set to create or update. -// parameters - the input object for ConvertToSinglePlacementGroup API. -func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ConvertToSinglePlacementGroupPreparer(ctx, resourceGroupName, VMScaleSetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ConvertToSinglePlacementGroupSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure sending request") - return - } - - result, err = client.ConvertToSinglePlacementGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request") - return - } - - return -} - -// ConvertToSinglePlacementGroupPreparer prepares the ConvertToSinglePlacementGroup request. -func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate create or update a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set to create or update. -// parameters - the scale set object. -func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (result VirtualMachineScaleSetsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, - }}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, - }}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Deallocate deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the -// compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsDeallocateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Deallocate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure preparing request") - return - } - - result, err = client.DeallocateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request") - return - } - - return -} - -// DeallocatePreparer prepares the Deallocate request. -func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeallocateSender sends the Deallocate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeallocateResponder handles the response to the Deallocate request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Delete deletes a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}", 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 VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) 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 -} - -// DeleteInstances deletes virtual machines in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsDeleteInstancesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: VMInstanceIDs, - Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "DeleteInstances", err.Error()) - } - - req, err := client.DeleteInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure preparing request") - return - } - - result, err = client.DeleteInstancesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request") - return - } - - return -} - -// DeleteInstancesPreparer prepares the DeleteInstances request. -func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", pathParameters), - autorest.WithJSON(VMInstanceIDs), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteInstancesSender sends the DeleteInstances request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// ForceRecoveryServiceFabricPlatformUpdateDomainWalk manual platform update domain walk to update virtual machines in -// a service fabric virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// platformUpdateDomain - the platform update domain for which a manual recovery walk is requested -func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result RecoveryWalkResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx, resourceGroupName, VMScaleSetName, platformUpdateDomain) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", nil, "Failure preparing request") - return - } - - resp, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure sending request") - return - } - - result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request") - return - } - - return -} - -// ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer prepares the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. -func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp *http.Response) (result RecoveryWalkResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get display information about a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "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.VirtualMachineScaleSetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}", 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 VirtualMachineScaleSetsClient) 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 VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetInstanceView gets the status of a VM scale set instance. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetInstanceView") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", nil, "Failure preparing request") - return - } - - resp, err := client.GetInstanceViewSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure sending request") - return - } - - result, err = client.GetInstanceViewResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request") - return - } - - return -} - -// GetInstanceViewPreparer prepares the GetInstanceView request. -func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetInstanceViewSender sends the GetInstanceView request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetInstanceView, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetOSUpgradeHistory gets list of OS upgrades on a VM scale set instance. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory") - defer func() { - sc := -1 - if result.vmsslouh.Response.Response != nil { - sc = result.vmsslouh.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.getOSUpgradeHistoryNextResults - req, err := client.GetOSUpgradeHistoryPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", nil, "Failure preparing request") - return - } - - resp, err := client.GetOSUpgradeHistorySender(req) - if err != nil { - result.vmsslouh.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// GetOSUpgradeHistoryPreparer prepares the GetOSUpgradeHistory request. -func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryResponder(resp *http.Response) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// getOSUpgradeHistoryNextResults retrieves the next set of results, if any. -func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) { - req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.GetOSUpgradeHistorySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure sending next results request") - } - result, err = client.GetOSUpgradeHistoryResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure responding to next results request") - } - return -} - -// GetOSUpgradeHistoryComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory") - 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.GetOSUpgradeHistory(ctx, resourceGroupName, VMScaleSetName) - return -} - -// List gets a list of all VM scale sets under a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List") - defer func() { - sc := -1 - if result.vmsslr.Response.Response != nil { - sc = result.vmsslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vmsslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets", 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 VirtualMachineScaleSetsClient) 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 VirtualMachineScaleSetsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetListResult, 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 VirtualMachineScaleSetsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) { - req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "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.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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) - return -} - -// ListAll gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use -// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all -// the VM Scale Sets. -func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll") - defer func() { - sc := -1 - if result.vmsslwlr.Response.Response != nil { - sc = result.vmsslwlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.vmsslwlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ListAllResponder(resp *http.Response) (result VirtualMachineScaleSetListWithLinkResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client VirtualMachineScaleSetsClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListWithLinkResult) (result VirtualMachineScaleSetListWithLinkResult, err error) { - req, err := lastResults.virtualMachineScaleSetListWithLinkResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetsClient) ListAllComplete(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListSkus gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed -// for each SKU. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus") - defer func() { - sc := -1 - if result.vmsslsr.Response.Response != nil { - sc = result.vmsslsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listSkusNextResults - req, err := client.ListSkusPreparer(ctx, resourceGroupName, VMScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", nil, "Failure preparing request") - return - } - - resp, err := client.ListSkusSender(req) - if err != nil { - result.vmsslsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListSkusPreparer prepares the ListSkus request. -func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSkusSender sends the ListSkus request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ListSkusSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListSkusResponder handles the response to the ListSkus request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ListSkusResponder(resp *http.Response) (result VirtualMachineScaleSetListSkusResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listSkusNextResults retrieves the next set of results, if any. -func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) { - req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSkusSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure sending next results request") - } - result, err = client.ListSkusResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListSkusComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus") - 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.ListSkus(ctx, resourceGroupName, VMScaleSetName) - return -} - -// PerformMaintenance perform maintenance on one or more virtual machines in a VM scale set. Operation on instances -// which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: -// https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPerformMaintenanceFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure preparing request") - return - } - - result, err = client.PerformMaintenanceSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request") - return - } - - return -} - -// PerformMaintenancePreparer prepares the PerformMaintenance request. -func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and -// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates -// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not -// specified -func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (result VirtualMachineScaleSetsPowerOffFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, skipShutdown) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure preparing request") - return - } - - result, err = client.PowerOffSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request") - return - } - - return -} - -// PowerOffPreparer prepares the PowerOff request. -func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if skipShutdown != nil { - queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) - } else { - queryParameters["skipShutdown"] = autorest.Encode("query", false) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PowerOffSender sends the PowerOff request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PowerOffResponder handles the response to the PowerOff request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Redeploy shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers -// them back on. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRedeployFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure preparing request") - return - } - - result, err = client.RedeploySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request") - return - } - - return -} - -// RedeployPreparer prepares the Redeploy request. -func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RedeploySender sends the Redeploy request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RedeployResponder handles the response to the Redeploy request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a -// ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMScaleSetReimageInput - parameters for Reimaging VM ScaleSet. -func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (result VirtualMachineScaleSetsReimageFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMScaleSetReimageInput) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request") - return - } - - result, err = client.ReimageSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request") - return - } - - return -} - -// ReimagePreparer prepares the Reimage request. -func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMScaleSetReimageInput != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMScaleSetReimageInput)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReimageSender sends the Reimage request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReimageResponder handles the response to the Reimage request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation -// is only supported for managed disks. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageAllFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request") - return - } - - result, err = client.ReimageAllSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request") - return - } - - return -} - -// ReimageAllPreparer prepares the ReimageAll request. -func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReimageAllSender sends the ReimageAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReimageAllResponder handles the response to the ReimageAll request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Restart restarts one or more virtual machines in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRestartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure preparing request") - return - } - - result, err = client.RestartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request") - return - } - - return -} - -// RestartPreparer prepares the Restart request. -func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestartSender sends the Restart request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RestartResponder handles the response to the Restart request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// SetOrchestrationServiceState changes ServiceState property for a given service -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the virtual machine scale set to create or update. -// parameters - the input object for SetOrchestrationServiceState API. -func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request") - return - } - - result, err = client.SetOrchestrationServiceStateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request") - return - } - - return -} - -// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request. -func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Start starts one or more virtual machines in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsStartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure preparing request") - return - } - - result, err = client.StartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request") - return - } - - return -} - -// StartPreparer prepares the Start request. -func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMInstanceIDs != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMInstanceIDs)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartSender sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartResponder handles the response to the Start request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update update a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set to create or update. -// parameters - the scale set object. -func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (result VirtualMachineScaleSetsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateInstances upgrades one or more virtual machines to the latest SKU set in the VM scale set model. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set. -func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsUpdateInstancesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.UpdateInstances") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: VMInstanceIDs, - Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "UpdateInstances", err.Error()) - } - - req, err := client.UpdateInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure preparing request") - return - } - - result, err = client.UpdateInstancesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateInstancesPreparer prepares the UpdateInstances request. -func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", pathParameters), - autorest.WithJSON(VMInstanceIDs), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateInstancesSender sends the UpdateInstances request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateInstancesResponder handles the response to the UpdateInstances request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetsClient) UpdateInstancesResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go deleted file mode 100644 index d028fd0f510c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go +++ /dev/null @@ -1,453 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualMachineScaleSetVMExtensionsClient is the compute Client -type VirtualMachineScaleSetVMExtensionsClient struct { - BaseClient -} - -// NewVirtualMachineScaleSetVMExtensionsClient creates an instance of the VirtualMachineScaleSetVMExtensionsClient -// client. -func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { - return NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetVMExtensionsClient 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 NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { - return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate the operation to create or update the VMSS VM extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// 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) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// 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) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// 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) { - 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -// VMExtensionName - the name of the virtual machine extension. -func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (result VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", 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 VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMExtensionsClient) 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 extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// 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) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.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, VMExtensionName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "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.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName 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), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", 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 VirtualMachineScaleSetVMExtensionsClient) 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 VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, 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 extensions 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 VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineExtensionsListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineScaleSetVMExtensionsClient) 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 = "2019-12-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}/extensions", 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 VirtualMachineScaleSetVMExtensionsClient) 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 VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update the operation to update the VMSS VM extension. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// 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) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// 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) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vmExtensionName": autorest.Encode("path", VMExtensionName), - "vmScaleSetName": autorest.Encode("path", VMScaleSetName), - } - - const APIVersion = "2019-12-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}/extensions/{vmExtensionName}", pathParameters), - autorest.WithJSON(extensionParameters), - 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 VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// 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) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go deleted file mode 100644 index 3f5dcbfaa930..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go +++ /dev/null @@ -1,1341 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualMachineScaleSetVMsClient is the compute Client -type VirtualMachineScaleSetVMsClient struct { - BaseClient -} - -// NewVirtualMachineScaleSetVMsClient creates an instance of the VirtualMachineScaleSetVMsClient client. -func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineScaleSetVMsClient { - return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient 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 NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient { - return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the -// compute resources it uses. You are not billed for the compute resources of this virtual machine once it is -// deallocated. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeallocateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Deallocate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure preparing request") - return - } - - result, err = client.DeallocateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request") - return - } - - return -} - -// DeallocatePreparer prepares the Deallocate request. -func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeallocateSender sends the Deallocate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeallocateResponder handles the response to the Deallocate request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Delete deletes a virtual machine from a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-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}", 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 VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) 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 a virtual machine from a VM scale set. -// 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 VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (result VirtualMachineScaleSetVM, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "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.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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}", 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 VirtualMachineScaleSetVMsClient) 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 VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetInstanceView gets the status of a virtual machine from a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.GetInstanceView") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", nil, "Failure preparing request") - return - } - - resp, err := client.GetInstanceViewSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure sending request") - return - } - - result, err = client.GetInstanceViewResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request") - return - } - - return -} - -// GetInstanceViewPreparer prepares the GetInstanceView request. -func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetInstanceViewSender sends the GetInstanceView request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetVMInstanceView, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all virtual machines in a VM scale sets. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the VM scale set. -// filter - the filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, -// 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. -// selectParameter - the list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. -// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'. -func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List") - defer func() { - sc := -1 - if result.vmssvlr.Response.Response != nil { - sc = result.vmssvlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vmssvlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(selectParameter) > 0 { - queryParameters["$select"] = autorest.Encode("query", selectParameter) - } - 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/{virtualMachineScaleSetName}/virtualMachines", 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 VirtualMachineScaleSetVMsClient) 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 VirtualMachineScaleSetVMsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMListResult, 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 VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) { - req, err := lastResults.virtualMachineScaleSetVMListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "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.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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, virtualMachineScaleSetName, filter, selectParameter, expand) - return -} - -// PerformMaintenance shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers -// it back on during the self-service phase of planned maintenance. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure preparing request") - return - } - - result, err = client.PerformMaintenanceSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request") - return - } - - return -} - -// PerformMaintenancePreparer prepares the PerformMaintenance request. -func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// PowerOff power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are -// getting charged for the resources. Instead, use deallocate to release resources and avoid charges. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates -// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not -// specified -func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, skipShutdown) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure preparing request") - return - } - - result, err = client.PowerOffSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request") - return - } - - return -} - -// PowerOffPreparer prepares the PowerOff request. -func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if skipShutdown != nil { - queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown) - } else { - queryParameters["skipShutdown"] = autorest.Encode("query", false) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PowerOffSender sends the PowerOff request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PowerOffResponder handles the response to the PowerOff request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Redeploy shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back -// on. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRedeployFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure preparing request") - return - } - - result, err = client.RedeploySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request") - return - } - - return -} - -// RedeployPreparer prepares the Redeploy request. -func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RedeploySender sends the Redeploy request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RedeployResponder handles the response to the Redeploy request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Reimage reimages (upgrade the operating system) a specific virtual machine in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -// VMScaleSetVMReimageInput - parameters for the Reimaging Virtual machine in ScaleSet. -func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (result VirtualMachineScaleSetVMsReimageFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMScaleSetVMReimageInput) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure preparing request") - return - } - - result, err = client.ReimageSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request") - return - } - - return -} - -// ReimagePreparer prepares the Reimage request. -func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if VMScaleSetVMReimageInput != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(VMScaleSetVMReimageInput)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReimageSender sends the Reimage request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReimageResponder handles the response to the Reimage request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// ReimageAll allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This -// operation is only supported for managed disks. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageAllFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure preparing request") - return - } - - result, err = client.ReimageAllSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request") - return - } - - return -} - -// ReimageAllPreparer prepares the ReimageAll request. -func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ReimageAllSender sends the ReimageAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ReimageAllResponder handles the response to the ReimageAll request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Restart restarts a virtual machine in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRestartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure preparing request") - return - } - - result, err = client.RestartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request") - return - } - - return -} - -// RestartPreparer prepares the Restart request. -func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestartSender sends the Restart request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RestartResponder handles the response to the Restart request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// RunCommand run command on a virtual machine in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -// parameters - parameters supplied to the Run command operation. -func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (result VirtualMachineScaleSetVMsRunCommandFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "RunCommand", err.Error()) - } - - req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure preparing request") - return - } - - result, err = client.RunCommandSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request") - return - } - - return -} - -// RunCommandPreparer prepares the RunCommand request. -func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RunCommandSender sends the RunCommand request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RunCommandResponder handles the response to the RunCommand request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - 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 -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request") - return - } - - resp, err := client.SimulateEvictionSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request") - return - } - - result, err = client.SimulateEvictionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request") - return - } - - return -} - -// SimulateEvictionPreparer prepares the SimulateEviction request. -func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SimulateEvictionSender sends the SimulateEviction request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Start starts a virtual machine in a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set. -// instanceID - the instance ID of the virtual machine. -func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsStartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure preparing request") - return - } - - result, err = client.StartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request") - return - } - - return -} - -// StartPreparer prepares the Start request. -func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID 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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartSender sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartResponder handles the response to the Start request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates a virtual machine of a VM scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// VMScaleSetName - the name of the VM scale set where the extension should be create or updated. -// instanceID - the instance ID of the virtual machine. -// parameters - parameters supplied to the Update Virtual Machine Scale Sets VM operation. -func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (result VirtualMachineScaleSetVMsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (*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 = "2019-12-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.InstanceID = nil - parameters.Sku = nil - parameters.Resources = nil - parameters.Zones = nil - 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}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualMachineScaleSetVMsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go deleted file mode 100644 index caa2b60e5403..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go +++ /dev/null @@ -1,114 +0,0 @@ -package compute - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualMachineSizesClient is the compute Client -type VirtualMachineSizesClient struct { - BaseClient -} - -// NewVirtualMachineSizesClient creates an instance of the VirtualMachineSizesClient client. -func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient { - return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient 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 NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient { - return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List this API is deprecated. Use [Resources -// Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) -// Parameters: -// location - the location upon which virtual-machine-sizes is queried. -func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List") - 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.VirtualMachineSizesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualMachineSizesClient) 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 = "2019-12-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}/vmSizes", 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 VirtualMachineSizesClient) 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 VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json deleted file mode 100644 index 6c978b532d82..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md", - "tag": "package-2019-05", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go deleted file mode 100644 index f329deac33c0..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package containerregistry implements the Azure ARM Containerregistry service API version . -// -// -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Containerregistry - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Containerregistry. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient 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 NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/enums.go deleted file mode 100644 index 289fec598ebf..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/enums.go +++ /dev/null @@ -1,513 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// 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} -} - -// Architecture enumerates the values for architecture. -type Architecture string - -const ( - // Amd64 ... - Amd64 Architecture = "amd64" - // Arm ... - Arm Architecture = "arm" - // X86 ... - X86 Architecture = "x86" -) - -// PossibleArchitectureValues returns an array of possible values for the Architecture const type. -func PossibleArchitectureValues() []Architecture { - return []Architecture{Amd64, Arm, X86} -} - -// BaseImageDependencyType enumerates the values for base image dependency type. -type BaseImageDependencyType string - -const ( - // BuildTime ... - BuildTime BaseImageDependencyType = "BuildTime" - // RunTime ... - RunTime BaseImageDependencyType = "RunTime" -) - -// PossibleBaseImageDependencyTypeValues returns an array of possible values for the BaseImageDependencyType const type. -func PossibleBaseImageDependencyTypeValues() []BaseImageDependencyType { - return []BaseImageDependencyType{BuildTime, RunTime} -} - -// BaseImageTriggerType enumerates the values for base image trigger type. -type BaseImageTriggerType string - -const ( - // All ... - All BaseImageTriggerType = "All" - // Runtime ... - Runtime BaseImageTriggerType = "Runtime" -) - -// PossibleBaseImageTriggerTypeValues returns an array of possible values for the BaseImageTriggerType const type. -func PossibleBaseImageTriggerTypeValues() []BaseImageTriggerType { - return []BaseImageTriggerType{All, Runtime} -} - -// DefaultAction enumerates the values for default action. -type DefaultAction string - -const ( - // DefaultActionAllow ... - DefaultActionAllow DefaultAction = "Allow" - // DefaultActionDeny ... - DefaultActionDeny DefaultAction = "Deny" -) - -// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. -func PossibleDefaultActionValues() []DefaultAction { - return []DefaultAction{DefaultActionAllow, DefaultActionDeny} -} - -// ImportMode enumerates the values for import mode. -type ImportMode string - -const ( - // Force ... - Force ImportMode = "Force" - // NoForce ... - NoForce ImportMode = "NoForce" -) - -// PossibleImportModeValues returns an array of possible values for the ImportMode const type. -func PossibleImportModeValues() []ImportMode { - return []ImportMode{Force, NoForce} -} - -// OS enumerates the values for os. -type OS string - -const ( - // Linux ... - Linux OS = "Linux" - // Windows ... - Windows OS = "Windows" -) - -// PossibleOSValues returns an array of possible values for the OS const type. -func PossibleOSValues() []OS { - return []OS{Linux, Windows} -} - -// PasswordName enumerates the values for password name. -type PasswordName string - -const ( - // Password ... - Password PasswordName = "password" - // Password2 ... - Password2 PasswordName = "password2" -) - -// PossiblePasswordNameValues returns an array of possible values for the PasswordName const type. -func PossiblePasswordNameValues() []PasswordName { - return []PasswordName{Password, Password2} -} - -// PolicyStatus enumerates the values for policy status. -type PolicyStatus string - -const ( - // Disabled ... - Disabled PolicyStatus = "disabled" - // Enabled ... - Enabled PolicyStatus = "enabled" -) - -// PossiblePolicyStatusValues returns an array of possible values for the PolicyStatus const type. -func PossiblePolicyStatusValues() []PolicyStatus { - return []PolicyStatus{Disabled, Enabled} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Canceled ... - Canceled ProvisioningState = "Canceled" - // Creating ... - Creating ProvisioningState = "Creating" - // 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{Canceled, Creating, Deleting, Failed, Succeeded, Updating} -} - -// RegistryUsageUnit enumerates the values for registry usage unit. -type RegistryUsageUnit string - -const ( - // Bytes ... - Bytes RegistryUsageUnit = "Bytes" - // Count ... - Count RegistryUsageUnit = "Count" -) - -// PossibleRegistryUsageUnitValues returns an array of possible values for the RegistryUsageUnit const type. -func PossibleRegistryUsageUnitValues() []RegistryUsageUnit { - return []RegistryUsageUnit{Bytes, Count} -} - -// 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} -} - -// RunStatus enumerates the values for run status. -type RunStatus string - -const ( - // RunStatusCanceled ... - RunStatusCanceled RunStatus = "Canceled" - // RunStatusError ... - RunStatusError RunStatus = "Error" - // RunStatusFailed ... - RunStatusFailed RunStatus = "Failed" - // RunStatusQueued ... - RunStatusQueued RunStatus = "Queued" - // RunStatusRunning ... - RunStatusRunning RunStatus = "Running" - // RunStatusStarted ... - RunStatusStarted RunStatus = "Started" - // RunStatusSucceeded ... - RunStatusSucceeded RunStatus = "Succeeded" - // RunStatusTimeout ... - RunStatusTimeout RunStatus = "Timeout" -) - -// PossibleRunStatusValues returns an array of possible values for the RunStatus const type. -func PossibleRunStatusValues() []RunStatus { - return []RunStatus{RunStatusCanceled, RunStatusError, RunStatusFailed, RunStatusQueued, RunStatusRunning, RunStatusStarted, RunStatusSucceeded, RunStatusTimeout} -} - -// RunType enumerates the values for run type. -type RunType string - -const ( - // AutoBuild ... - AutoBuild RunType = "AutoBuild" - // AutoRun ... - AutoRun RunType = "AutoRun" - // QuickBuild ... - QuickBuild RunType = "QuickBuild" - // QuickRun ... - QuickRun RunType = "QuickRun" -) - -// PossibleRunTypeValues returns an array of possible values for the RunType const type. -func PossibleRunTypeValues() []RunType { - return []RunType{AutoBuild, AutoRun, QuickBuild, QuickRun} -} - -// SecretObjectType enumerates the values for secret object type. -type SecretObjectType string - -const ( - // Opaque ... - Opaque SecretObjectType = "Opaque" - // Vaultsecret ... - Vaultsecret SecretObjectType = "Vaultsecret" -) - -// PossibleSecretObjectTypeValues returns an array of possible values for the SecretObjectType const type. -func PossibleSecretObjectTypeValues() []SecretObjectType { - return []SecretObjectType{Opaque, Vaultsecret} -} - -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // Basic ... - Basic SkuName = "Basic" - // Classic ... - Classic SkuName = "Classic" - // Premium ... - Premium SkuName = "Premium" - // Standard ... - Standard SkuName = "Standard" -) - -// PossibleSkuNameValues returns an array of possible values for the SkuName const type. -func PossibleSkuNameValues() []SkuName { - return []SkuName{Basic, Classic, Premium, Standard} -} - -// SkuTier enumerates the values for sku tier. -type SkuTier string - -const ( - // SkuTierBasic ... - SkuTierBasic SkuTier = "Basic" - // SkuTierClassic ... - SkuTierClassic SkuTier = "Classic" - // SkuTierPremium ... - SkuTierPremium SkuTier = "Premium" - // SkuTierStandard ... - SkuTierStandard SkuTier = "Standard" -) - -// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. -func PossibleSkuTierValues() []SkuTier { - return []SkuTier{SkuTierBasic, SkuTierClassic, SkuTierPremium, SkuTierStandard} -} - -// SourceControlType enumerates the values for source control type. -type SourceControlType string - -const ( - // Github ... - Github SourceControlType = "Github" - // VisualStudioTeamService ... - VisualStudioTeamService SourceControlType = "VisualStudioTeamService" -) - -// PossibleSourceControlTypeValues returns an array of possible values for the SourceControlType const type. -func PossibleSourceControlTypeValues() []SourceControlType { - return []SourceControlType{Github, VisualStudioTeamService} -} - -// SourceRegistryLoginMode enumerates the values for source registry login mode. -type SourceRegistryLoginMode string - -const ( - // SourceRegistryLoginModeDefault ... - SourceRegistryLoginModeDefault SourceRegistryLoginMode = "Default" - // SourceRegistryLoginModeNone ... - SourceRegistryLoginModeNone SourceRegistryLoginMode = "None" -) - -// PossibleSourceRegistryLoginModeValues returns an array of possible values for the SourceRegistryLoginMode const type. -func PossibleSourceRegistryLoginModeValues() []SourceRegistryLoginMode { - return []SourceRegistryLoginMode{SourceRegistryLoginModeDefault, SourceRegistryLoginModeNone} -} - -// SourceTriggerEvent enumerates the values for source trigger event. -type SourceTriggerEvent string - -const ( - // Commit ... - Commit SourceTriggerEvent = "commit" - // Pullrequest ... - Pullrequest SourceTriggerEvent = "pullrequest" -) - -// PossibleSourceTriggerEventValues returns an array of possible values for the SourceTriggerEvent const type. -func PossibleSourceTriggerEventValues() []SourceTriggerEvent { - return []SourceTriggerEvent{Commit, Pullrequest} -} - -// TaskStatus enumerates the values for task status. -type TaskStatus string - -const ( - // TaskStatusDisabled ... - TaskStatusDisabled TaskStatus = "Disabled" - // TaskStatusEnabled ... - TaskStatusEnabled TaskStatus = "Enabled" -) - -// PossibleTaskStatusValues returns an array of possible values for the TaskStatus const type. -func PossibleTaskStatusValues() []TaskStatus { - return []TaskStatus{TaskStatusDisabled, TaskStatusEnabled} -} - -// TokenType enumerates the values for token type. -type TokenType string - -const ( - // OAuth ... - OAuth TokenType = "OAuth" - // PAT ... - PAT TokenType = "PAT" -) - -// PossibleTokenTypeValues returns an array of possible values for the TokenType const type. -func PossibleTokenTypeValues() []TokenType { - return []TokenType{OAuth, PAT} -} - -// TriggerStatus enumerates the values for trigger status. -type TriggerStatus string - -const ( - // TriggerStatusDisabled ... - TriggerStatusDisabled TriggerStatus = "Disabled" - // TriggerStatusEnabled ... - TriggerStatusEnabled TriggerStatus = "Enabled" -) - -// PossibleTriggerStatusValues returns an array of possible values for the TriggerStatus const type. -func PossibleTriggerStatusValues() []TriggerStatus { - return []TriggerStatus{TriggerStatusDisabled, TriggerStatusEnabled} -} - -// TrustPolicyType enumerates the values for trust policy type. -type TrustPolicyType string - -const ( - // Notary ... - Notary TrustPolicyType = "Notary" -) - -// PossibleTrustPolicyTypeValues returns an array of possible values for the TrustPolicyType const type. -func PossibleTrustPolicyTypeValues() []TrustPolicyType { - return []TrustPolicyType{Notary} -} - -// Type enumerates the values for type. -type Type string - -const ( - // TypeDockerBuildRequest ... - TypeDockerBuildRequest Type = "DockerBuildRequest" - // TypeEncodedTaskRunRequest ... - TypeEncodedTaskRunRequest Type = "EncodedTaskRunRequest" - // TypeFileTaskRunRequest ... - TypeFileTaskRunRequest Type = "FileTaskRunRequest" - // TypeRunRequest ... - TypeRunRequest Type = "RunRequest" - // TypeTaskRunRequest ... - TypeTaskRunRequest Type = "TaskRunRequest" -) - -// PossibleTypeValues returns an array of possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{TypeDockerBuildRequest, TypeEncodedTaskRunRequest, TypeFileTaskRunRequest, TypeRunRequest, TypeTaskRunRequest} -} - -// TypeBasicTaskStepProperties enumerates the values for type basic task step properties. -type TypeBasicTaskStepProperties string - -const ( - // TypeDocker ... - TypeDocker TypeBasicTaskStepProperties = "Docker" - // TypeEncodedTask ... - TypeEncodedTask TypeBasicTaskStepProperties = "EncodedTask" - // TypeFileTask ... - TypeFileTask TypeBasicTaskStepProperties = "FileTask" - // TypeTaskStepProperties ... - TypeTaskStepProperties TypeBasicTaskStepProperties = "TaskStepProperties" -) - -// PossibleTypeBasicTaskStepPropertiesValues returns an array of possible values for the TypeBasicTaskStepProperties const type. -func PossibleTypeBasicTaskStepPropertiesValues() []TypeBasicTaskStepProperties { - return []TypeBasicTaskStepProperties{TypeDocker, TypeEncodedTask, TypeFileTask, TypeTaskStepProperties} -} - -// TypeBasicTaskStepUpdateParameters enumerates the values for type basic task step update parameters. -type TypeBasicTaskStepUpdateParameters string - -const ( - // TypeBasicTaskStepUpdateParametersTypeDocker ... - TypeBasicTaskStepUpdateParametersTypeDocker TypeBasicTaskStepUpdateParameters = "Docker" - // TypeBasicTaskStepUpdateParametersTypeEncodedTask ... - TypeBasicTaskStepUpdateParametersTypeEncodedTask TypeBasicTaskStepUpdateParameters = "EncodedTask" - // TypeBasicTaskStepUpdateParametersTypeFileTask ... - TypeBasicTaskStepUpdateParametersTypeFileTask TypeBasicTaskStepUpdateParameters = "FileTask" - // TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters ... - TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters TypeBasicTaskStepUpdateParameters = "TaskStepUpdateParameters" -) - -// PossibleTypeBasicTaskStepUpdateParametersValues returns an array of possible values for the TypeBasicTaskStepUpdateParameters const type. -func PossibleTypeBasicTaskStepUpdateParametersValues() []TypeBasicTaskStepUpdateParameters { - return []TypeBasicTaskStepUpdateParameters{TypeBasicTaskStepUpdateParametersTypeDocker, TypeBasicTaskStepUpdateParametersTypeEncodedTask, TypeBasicTaskStepUpdateParametersTypeFileTask, TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters} -} - -// Variant enumerates the values for variant. -type Variant string - -const ( - // V6 ... - V6 Variant = "v6" - // V7 ... - V7 Variant = "v7" - // V8 ... - V8 Variant = "v8" -) - -// PossibleVariantValues returns an array of possible values for the Variant const type. -func PossibleVariantValues() []Variant { - return []Variant{V6, V7, V8} -} - -// WebhookAction enumerates the values for webhook action. -type WebhookAction string - -const ( - // ChartDelete ... - ChartDelete WebhookAction = "chart_delete" - // ChartPush ... - ChartPush WebhookAction = "chart_push" - // Delete ... - Delete WebhookAction = "delete" - // Push ... - Push WebhookAction = "push" - // Quarantine ... - Quarantine WebhookAction = "quarantine" -) - -// PossibleWebhookActionValues returns an array of possible values for the WebhookAction const type. -func PossibleWebhookActionValues() []WebhookAction { - return []WebhookAction{ChartDelete, ChartPush, Delete, Push, Quarantine} -} - -// WebhookStatus enumerates the values for webhook status. -type WebhookStatus string - -const ( - // WebhookStatusDisabled ... - WebhookStatusDisabled WebhookStatus = "disabled" - // WebhookStatusEnabled ... - WebhookStatusEnabled WebhookStatus = "enabled" -) - -// PossibleWebhookStatusValues returns an array of possible values for the WebhookStatus const type. -func PossibleWebhookStatusValues() []WebhookStatus { - return []WebhookStatus{WebhookStatusDisabled, WebhookStatusEnabled} -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/models.go deleted file mode 100644 index d43ac2746328..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/models.go +++ /dev/null @@ -1,5094 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry" - -// Actor the agent that initiated the event. For most situations, this could be from the authorization -// context of the request. -type Actor struct { - // Name - The subject or username associated with the request context that generated the event. - Name *string `json:"name,omitempty"` -} - -// AgentProperties the properties that determine the run agent configuration. -type AgentProperties struct { - // CPU - The CPU configuration in terms of number of cores required for the run. - CPU *int32 `json:"cpu,omitempty"` -} - -// Argument the properties of a run argument. -type Argument struct { - // Name - The name of the argument. - Name *string `json:"name,omitempty"` - // Value - The value of the argument. - Value *string `json:"value,omitempty"` - // IsSecret - Flag to indicate whether the argument represents a secret and want to be removed from build logs. - IsSecret *bool `json:"isSecret,omitempty"` -} - -// AuthInfo the authorization properties for accessing the source code repository. -type AuthInfo struct { - // TokenType - The type of Auth token. Possible values include: 'PAT', 'OAuth' - TokenType TokenType `json:"tokenType,omitempty"` - // Token - The access token used to access the source control provider. - Token *string `json:"token,omitempty"` - // RefreshToken - The refresh token used to refresh the access token. - RefreshToken *string `json:"refreshToken,omitempty"` - // Scope - The scope of the access token. - Scope *string `json:"scope,omitempty"` - // ExpiresIn - Time in seconds that the token remains valid - ExpiresIn *int32 `json:"expiresIn,omitempty"` -} - -// AuthInfoUpdateParameters the authorization properties for accessing the source code repository. -type AuthInfoUpdateParameters struct { - // TokenType - The type of Auth token. Possible values include: 'PAT', 'OAuth' - TokenType TokenType `json:"tokenType,omitempty"` - // Token - The access token used to access the source control provider. - Token *string `json:"token,omitempty"` - // RefreshToken - The refresh token used to refresh the access token. - RefreshToken *string `json:"refreshToken,omitempty"` - // Scope - The scope of the access token. - Scope *string `json:"scope,omitempty"` - // ExpiresIn - Time in seconds that the token remains valid - ExpiresIn *int32 `json:"expiresIn,omitempty"` -} - -// BaseImageDependency properties that describe a base image dependency. -type BaseImageDependency struct { - // Type - The type of the base image dependency. Possible values include: 'BuildTime', 'RunTime' - Type BaseImageDependencyType `json:"type,omitempty"` - // Registry - The registry login server. - Registry *string `json:"registry,omitempty"` - // Repository - The repository name. - Repository *string `json:"repository,omitempty"` - // Tag - The tag name. - Tag *string `json:"tag,omitempty"` - // Digest - The sha256-based digest of the image manifest. - Digest *string `json:"digest,omitempty"` -} - -// BaseImageTrigger the trigger based on base image dependency. -type BaseImageTrigger struct { - // BaseImageTriggerType - The type of the auto trigger for base image dependency updates. Possible values include: 'All', 'Runtime' - BaseImageTriggerType BaseImageTriggerType `json:"baseImageTriggerType,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// BaseImageTriggerUpdateParameters the properties for updating base image dependency trigger. -type BaseImageTriggerUpdateParameters struct { - // BaseImageTriggerType - The type of the auto trigger for base image dependency updates. Possible values include: 'All', 'Runtime' - BaseImageTriggerType BaseImageTriggerType `json:"baseImageTriggerType,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// CallbackConfig the configuration of service URI and custom headers for the webhook. -type CallbackConfig struct { - autorest.Response `json:"-"` - // ServiceURI - The service URI for the webhook to post notifications. - ServiceURI *string `json:"serviceUri,omitempty"` - // CustomHeaders - Custom headers that will be added to the webhook notifications. - CustomHeaders map[string]*string `json:"customHeaders"` -} - -// MarshalJSON is the custom marshaler for CallbackConfig. -func (cc CallbackConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cc.ServiceURI != nil { - objectMap["serviceUri"] = cc.ServiceURI - } - if cc.CustomHeaders != nil { - objectMap["customHeaders"] = cc.CustomHeaders - } - return json.Marshal(objectMap) -} - -// Credentials the parameters that describes a set of credentials that will be used when a run is invoked. -type Credentials struct { - // SourceRegistry - Describes the credential parameters for accessing the source registry. - SourceRegistry *SourceRegistryCredentials `json:"sourceRegistry,omitempty"` - // CustomRegistries - Describes the credential parameters for accessing other custom registries. The key - // for the dictionary item will be the registry login server (myregistry.azurecr.io) and - // the value of the item will be the registry credentials for accessing the registry. - CustomRegistries map[string]*CustomRegistryCredentials `json:"customRegistries"` -} - -// MarshalJSON is the custom marshaler for Credentials. -func (c Credentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.SourceRegistry != nil { - objectMap["sourceRegistry"] = c.SourceRegistry - } - if c.CustomRegistries != nil { - objectMap["customRegistries"] = c.CustomRegistries - } - return json.Marshal(objectMap) -} - -// CustomRegistryCredentials describes the credentials that will be used to access a custom registry during -// a run. -type CustomRegistryCredentials struct { - // UserName - The username for logging into the custom registry. - UserName *SecretObject `json:"userName,omitempty"` - // Password - The password for logging into the custom registry. The password is a secret - // object that allows multiple ways of providing the value for it. - Password *SecretObject `json:"password,omitempty"` - // Identity - Indicates the managed identity assigned to the custom credential. If a user-assigned identity - // this value is the Client ID. If a system-assigned identity, the value will be `system`. In - // the case of a system-assigned identity, the Client ID will be determined by the runner. This - // identity may be used to authenticate to key vault to retrieve credentials or it may be the only - // source of authentication used for accessing the registry. - Identity *string `json:"identity,omitempty"` -} - -// DockerBuildRequest the parameters for a docker quick build. -type DockerBuildRequest struct { - // ImageNames - The fully qualified image names including the repository and tag. - ImageNames *[]string `json:"imageNames,omitempty"` - // IsPushEnabled - The value of this property indicates whether the image built should be pushed to the registry or not. - IsPushEnabled *bool `json:"isPushEnabled,omitempty"` - // NoCache - The value of this property indicates whether the image cache is enabled or not. - NoCache *bool `json:"noCache,omitempty"` - // DockerFilePath - The Docker file path relative to the source location. - DockerFilePath *string `json:"dockerFilePath,omitempty"` - // Target - The name of the target build stage for the docker build. - Target *string `json:"target,omitempty"` - // Arguments - The collection of override arguments to be used when executing the run. - Arguments *[]Argument `json:"arguments,omitempty"` - // Timeout - Run timeout in seconds. - Timeout *int32 `json:"timeout,omitempty"` - // Platform - The platform properties against which the run has to happen. - Platform *PlatformProperties `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // SourceLocation - The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. - // If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. - SourceLocation *string `json:"sourceLocation,omitempty"` - // Credentials - The properties that describes a set of credentials that will be used when this run is invoked. - Credentials *Credentials `json:"credentials,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled for the run or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // Type - Possible values include: 'TypeRunRequest', 'TypeDockerBuildRequest', 'TypeFileTaskRunRequest', 'TypeTaskRunRequest', 'TypeEncodedTaskRunRequest' - Type Type `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DockerBuildRequest. -func (dbr DockerBuildRequest) MarshalJSON() ([]byte, error) { - dbr.Type = TypeDockerBuildRequest - objectMap := make(map[string]interface{}) - if dbr.ImageNames != nil { - objectMap["imageNames"] = dbr.ImageNames - } - if dbr.IsPushEnabled != nil { - objectMap["isPushEnabled"] = dbr.IsPushEnabled - } - if dbr.NoCache != nil { - objectMap["noCache"] = dbr.NoCache - } - if dbr.DockerFilePath != nil { - objectMap["dockerFilePath"] = dbr.DockerFilePath - } - if dbr.Target != nil { - objectMap["target"] = dbr.Target - } - if dbr.Arguments != nil { - objectMap["arguments"] = dbr.Arguments - } - if dbr.Timeout != nil { - objectMap["timeout"] = dbr.Timeout - } - if dbr.Platform != nil { - objectMap["platform"] = dbr.Platform - } - if dbr.AgentConfiguration != nil { - objectMap["agentConfiguration"] = dbr.AgentConfiguration - } - if dbr.SourceLocation != nil { - objectMap["sourceLocation"] = dbr.SourceLocation - } - if dbr.Credentials != nil { - objectMap["credentials"] = dbr.Credentials - } - if dbr.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = dbr.IsArchiveEnabled - } - if dbr.Type != "" { - objectMap["type"] = dbr.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsDockerBuildRequest() (*DockerBuildRequest, bool) { - return &dbr, true -} - -// AsFileTaskRunRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsFileTaskRunRequest() (*FileTaskRunRequest, bool) { - return nil, false -} - -// AsTaskRunRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsTaskRunRequest() (*TaskRunRequest, bool) { - return nil, false -} - -// AsEncodedTaskRunRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) { - return nil, false -} - -// AsRunRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsRunRequest() (*RunRequest, bool) { - return nil, false -} - -// AsBasicRunRequest is the BasicRunRequest implementation for DockerBuildRequest. -func (dbr DockerBuildRequest) AsBasicRunRequest() (BasicRunRequest, bool) { - return &dbr, true -} - -// DockerBuildStep the Docker build step. -type DockerBuildStep struct { - // ImageNames - The fully qualified image names including the repository and tag. - ImageNames *[]string `json:"imageNames,omitempty"` - // IsPushEnabled - The value of this property indicates whether the image built should be pushed to the registry or not. - IsPushEnabled *bool `json:"isPushEnabled,omitempty"` - // NoCache - The value of this property indicates whether the image cache is enabled or not. - NoCache *bool `json:"noCache,omitempty"` - // DockerFilePath - The Docker file path relative to the source context. - DockerFilePath *string `json:"dockerFilePath,omitempty"` - // Target - The name of the target build stage for the docker build. - Target *string `json:"target,omitempty"` - // Arguments - The collection of override arguments to be used when executing this build step. - Arguments *[]Argument `json:"arguments,omitempty"` - // BaseImageDependencies - READ-ONLY; List of base image dependencies for a step. - BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeTaskStepProperties', 'TypeDocker', 'TypeFileTask', 'TypeEncodedTask' - Type TypeBasicTaskStepProperties `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DockerBuildStep. -func (dbs DockerBuildStep) MarshalJSON() ([]byte, error) { - dbs.Type = TypeDocker - objectMap := make(map[string]interface{}) - if dbs.ImageNames != nil { - objectMap["imageNames"] = dbs.ImageNames - } - if dbs.IsPushEnabled != nil { - objectMap["isPushEnabled"] = dbs.IsPushEnabled - } - if dbs.NoCache != nil { - objectMap["noCache"] = dbs.NoCache - } - if dbs.DockerFilePath != nil { - objectMap["dockerFilePath"] = dbs.DockerFilePath - } - if dbs.Target != nil { - objectMap["target"] = dbs.Target - } - if dbs.Arguments != nil { - objectMap["arguments"] = dbs.Arguments - } - if dbs.ContextPath != nil { - objectMap["contextPath"] = dbs.ContextPath - } - if dbs.ContextAccessToken != nil { - objectMap["contextAccessToken"] = dbs.ContextAccessToken - } - if dbs.Type != "" { - objectMap["type"] = dbs.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStep is the BasicTaskStepProperties implementation for DockerBuildStep. -func (dbs DockerBuildStep) AsDockerBuildStep() (*DockerBuildStep, bool) { - return &dbs, true -} - -// AsFileTaskStep is the BasicTaskStepProperties implementation for DockerBuildStep. -func (dbs DockerBuildStep) AsFileTaskStep() (*FileTaskStep, bool) { - return nil, false -} - -// AsEncodedTaskStep is the BasicTaskStepProperties implementation for DockerBuildStep. -func (dbs DockerBuildStep) AsEncodedTaskStep() (*EncodedTaskStep, bool) { - return nil, false -} - -// AsTaskStepProperties is the BasicTaskStepProperties implementation for DockerBuildStep. -func (dbs DockerBuildStep) AsTaskStepProperties() (*TaskStepProperties, bool) { - return nil, false -} - -// AsBasicTaskStepProperties is the BasicTaskStepProperties implementation for DockerBuildStep. -func (dbs DockerBuildStep) AsBasicTaskStepProperties() (BasicTaskStepProperties, bool) { - return &dbs, true -} - -// DockerBuildStepUpdateParameters the properties for updating a docker build step. -type DockerBuildStepUpdateParameters struct { - // ImageNames - The fully qualified image names including the repository and tag. - ImageNames *[]string `json:"imageNames,omitempty"` - // IsPushEnabled - The value of this property indicates whether the image built should be pushed to the registry or not. - IsPushEnabled *bool `json:"isPushEnabled,omitempty"` - // NoCache - The value of this property indicates whether the image cache is enabled or not. - NoCache *bool `json:"noCache,omitempty"` - // DockerFilePath - The Docker file path relative to the source context. - DockerFilePath *string `json:"dockerFilePath,omitempty"` - // Arguments - The collection of override arguments to be used when executing this build step. - Arguments *[]Argument `json:"arguments,omitempty"` - // Target - The name of the target build stage for the docker build. - Target *string `json:"target,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters', 'TypeBasicTaskStepUpdateParametersTypeDocker', 'TypeBasicTaskStepUpdateParametersTypeFileTask', 'TypeBasicTaskStepUpdateParametersTypeEncodedTask' - Type TypeBasicTaskStepUpdateParameters `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) MarshalJSON() ([]byte, error) { - dbsup.Type = TypeBasicTaskStepUpdateParametersTypeDocker - objectMap := make(map[string]interface{}) - if dbsup.ImageNames != nil { - objectMap["imageNames"] = dbsup.ImageNames - } - if dbsup.IsPushEnabled != nil { - objectMap["isPushEnabled"] = dbsup.IsPushEnabled - } - if dbsup.NoCache != nil { - objectMap["noCache"] = dbsup.NoCache - } - if dbsup.DockerFilePath != nil { - objectMap["dockerFilePath"] = dbsup.DockerFilePath - } - if dbsup.Arguments != nil { - objectMap["arguments"] = dbsup.Arguments - } - if dbsup.Target != nil { - objectMap["target"] = dbsup.Target - } - if dbsup.ContextPath != nil { - objectMap["contextPath"] = dbsup.ContextPath - } - if dbsup.ContextAccessToken != nil { - objectMap["contextAccessToken"] = dbsup.ContextAccessToken - } - if dbsup.Type != "" { - objectMap["type"] = dbsup.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) AsDockerBuildStepUpdateParameters() (*DockerBuildStepUpdateParameters, bool) { - return &dbsup, true -} - -// AsFileTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) AsFileTaskStepUpdateParameters() (*FileTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsEncodedTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) AsEncodedTaskStepUpdateParameters() (*EncodedTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) AsTaskStepUpdateParameters() (*TaskStepUpdateParameters, bool) { - return nil, false -} - -// AsBasicTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for DockerBuildStepUpdateParameters. -func (dbsup DockerBuildStepUpdateParameters) AsBasicTaskStepUpdateParameters() (BasicTaskStepUpdateParameters, bool) { - return &dbsup, true -} - -// EncodedTaskRunRequest the parameters for a quick task run request. -type EncodedTaskRunRequest struct { - // EncodedTaskContent - Base64 encoded value of the template/definition file content. - EncodedTaskContent *string `json:"encodedTaskContent,omitempty"` - // EncodedValuesContent - Base64 encoded value of the parameters/values file content. - EncodedValuesContent *string `json:"encodedValuesContent,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // Timeout - Run timeout in seconds. - Timeout *int32 `json:"timeout,omitempty"` - // Platform - The platform properties against which the run has to happen. - Platform *PlatformProperties `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // SourceLocation - The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. - // If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. - SourceLocation *string `json:"sourceLocation,omitempty"` - // Credentials - The properties that describes a set of credentials that will be used when this run is invoked. - Credentials *Credentials `json:"credentials,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled for the run or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // Type - Possible values include: 'TypeRunRequest', 'TypeDockerBuildRequest', 'TypeFileTaskRunRequest', 'TypeTaskRunRequest', 'TypeEncodedTaskRunRequest' - Type Type `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) MarshalJSON() ([]byte, error) { - etrr.Type = TypeEncodedTaskRunRequest - objectMap := make(map[string]interface{}) - if etrr.EncodedTaskContent != nil { - objectMap["encodedTaskContent"] = etrr.EncodedTaskContent - } - if etrr.EncodedValuesContent != nil { - objectMap["encodedValuesContent"] = etrr.EncodedValuesContent - } - if etrr.Values != nil { - objectMap["values"] = etrr.Values - } - if etrr.Timeout != nil { - objectMap["timeout"] = etrr.Timeout - } - if etrr.Platform != nil { - objectMap["platform"] = etrr.Platform - } - if etrr.AgentConfiguration != nil { - objectMap["agentConfiguration"] = etrr.AgentConfiguration - } - if etrr.SourceLocation != nil { - objectMap["sourceLocation"] = etrr.SourceLocation - } - if etrr.Credentials != nil { - objectMap["credentials"] = etrr.Credentials - } - if etrr.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = etrr.IsArchiveEnabled - } - if etrr.Type != "" { - objectMap["type"] = etrr.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsDockerBuildRequest() (*DockerBuildRequest, bool) { - return nil, false -} - -// AsFileTaskRunRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsFileTaskRunRequest() (*FileTaskRunRequest, bool) { - return nil, false -} - -// AsTaskRunRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsTaskRunRequest() (*TaskRunRequest, bool) { - return nil, false -} - -// AsEncodedTaskRunRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) { - return &etrr, true -} - -// AsRunRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsRunRequest() (*RunRequest, bool) { - return nil, false -} - -// AsBasicRunRequest is the BasicRunRequest implementation for EncodedTaskRunRequest. -func (etrr EncodedTaskRunRequest) AsBasicRunRequest() (BasicRunRequest, bool) { - return &etrr, true -} - -// EncodedTaskStep the properties of a encoded task step. -type EncodedTaskStep struct { - // EncodedTaskContent - Base64 encoded value of the template/definition file content. - EncodedTaskContent *string `json:"encodedTaskContent,omitempty"` - // EncodedValuesContent - Base64 encoded value of the parameters/values file content. - EncodedValuesContent *string `json:"encodedValuesContent,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // BaseImageDependencies - READ-ONLY; List of base image dependencies for a step. - BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeTaskStepProperties', 'TypeDocker', 'TypeFileTask', 'TypeEncodedTask' - Type TypeBasicTaskStepProperties `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncodedTaskStep. -func (ets EncodedTaskStep) MarshalJSON() ([]byte, error) { - ets.Type = TypeEncodedTask - objectMap := make(map[string]interface{}) - if ets.EncodedTaskContent != nil { - objectMap["encodedTaskContent"] = ets.EncodedTaskContent - } - if ets.EncodedValuesContent != nil { - objectMap["encodedValuesContent"] = ets.EncodedValuesContent - } - if ets.Values != nil { - objectMap["values"] = ets.Values - } - if ets.ContextPath != nil { - objectMap["contextPath"] = ets.ContextPath - } - if ets.ContextAccessToken != nil { - objectMap["contextAccessToken"] = ets.ContextAccessToken - } - if ets.Type != "" { - objectMap["type"] = ets.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStep is the BasicTaskStepProperties implementation for EncodedTaskStep. -func (ets EncodedTaskStep) AsDockerBuildStep() (*DockerBuildStep, bool) { - return nil, false -} - -// AsFileTaskStep is the BasicTaskStepProperties implementation for EncodedTaskStep. -func (ets EncodedTaskStep) AsFileTaskStep() (*FileTaskStep, bool) { - return nil, false -} - -// AsEncodedTaskStep is the BasicTaskStepProperties implementation for EncodedTaskStep. -func (ets EncodedTaskStep) AsEncodedTaskStep() (*EncodedTaskStep, bool) { - return &ets, true -} - -// AsTaskStepProperties is the BasicTaskStepProperties implementation for EncodedTaskStep. -func (ets EncodedTaskStep) AsTaskStepProperties() (*TaskStepProperties, bool) { - return nil, false -} - -// AsBasicTaskStepProperties is the BasicTaskStepProperties implementation for EncodedTaskStep. -func (ets EncodedTaskStep) AsBasicTaskStepProperties() (BasicTaskStepProperties, bool) { - return &ets, true -} - -// EncodedTaskStepUpdateParameters the properties for updating encoded task step. -type EncodedTaskStepUpdateParameters struct { - // EncodedTaskContent - Base64 encoded value of the template/definition file content. - EncodedTaskContent *string `json:"encodedTaskContent,omitempty"` - // EncodedValuesContent - Base64 encoded value of the parameters/values file content. - EncodedValuesContent *string `json:"encodedValuesContent,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters', 'TypeBasicTaskStepUpdateParametersTypeDocker', 'TypeBasicTaskStepUpdateParametersTypeFileTask', 'TypeBasicTaskStepUpdateParametersTypeEncodedTask' - Type TypeBasicTaskStepUpdateParameters `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) MarshalJSON() ([]byte, error) { - etsup.Type = TypeBasicTaskStepUpdateParametersTypeEncodedTask - objectMap := make(map[string]interface{}) - if etsup.EncodedTaskContent != nil { - objectMap["encodedTaskContent"] = etsup.EncodedTaskContent - } - if etsup.EncodedValuesContent != nil { - objectMap["encodedValuesContent"] = etsup.EncodedValuesContent - } - if etsup.Values != nil { - objectMap["values"] = etsup.Values - } - if etsup.ContextPath != nil { - objectMap["contextPath"] = etsup.ContextPath - } - if etsup.ContextAccessToken != nil { - objectMap["contextAccessToken"] = etsup.ContextAccessToken - } - if etsup.Type != "" { - objectMap["type"] = etsup.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) AsDockerBuildStepUpdateParameters() (*DockerBuildStepUpdateParameters, bool) { - return nil, false -} - -// AsFileTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) AsFileTaskStepUpdateParameters() (*FileTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsEncodedTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) AsEncodedTaskStepUpdateParameters() (*EncodedTaskStepUpdateParameters, bool) { - return &etsup, true -} - -// AsTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) AsTaskStepUpdateParameters() (*TaskStepUpdateParameters, bool) { - return nil, false -} - -// AsBasicTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for EncodedTaskStepUpdateParameters. -func (etsup EncodedTaskStepUpdateParameters) AsBasicTaskStepUpdateParameters() (BasicTaskStepUpdateParameters, bool) { - return &etsup, true -} - -// Event the event for a webhook. -type Event struct { - // EventRequestMessage - The event request message sent to the service URI. - EventRequestMessage *EventRequestMessage `json:"eventRequestMessage,omitempty"` - // EventResponseMessage - The event response message received from the service URI. - EventResponseMessage *EventResponseMessage `json:"eventResponseMessage,omitempty"` - // ID - The event ID. - ID *string `json:"id,omitempty"` -} - -// EventContent the content of the event request message. -type EventContent struct { - // ID - The event ID. - ID *string `json:"id,omitempty"` - // Timestamp - The time at which the event occurred. - Timestamp *date.Time `json:"timestamp,omitempty"` - // Action - The action that encompasses the provided event. - Action *string `json:"action,omitempty"` - // Target - The target of the event. - Target *Target `json:"target,omitempty"` - // Request - The request that generated the event. - Request *Request `json:"request,omitempty"` - // Actor - The agent that initiated the event. For most situations, this could be from the authorization context of the request. - Actor *Actor `json:"actor,omitempty"` - // Source - The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. - Source *Source `json:"source,omitempty"` -} - -// EventInfo the basic information of an event. -type EventInfo struct { - autorest.Response `json:"-"` - // ID - The event ID. - ID *string `json:"id,omitempty"` -} - -// EventListResult the result of a request to list events for a webhook. -type EventListResult struct { - autorest.Response `json:"-"` - // Value - The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events. - Value *[]Event `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next list of events. - NextLink *string `json:"nextLink,omitempty"` -} - -// EventListResultIterator provides access to a complete listing of Event values. -type EventListResultIterator struct { - i int - page EventListResultPage -} - -// 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 *EventListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventListResultIterator.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 *EventListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EventListResultIterator) 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 EventListResultIterator) Response() EventListResult { - 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 EventListResultIterator) Value() Event { - if !iter.page.NotDone() { - return Event{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EventListResultIterator type. -func NewEventListResultIterator(page EventListResultPage) EventListResultIterator { - return EventListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (elr EventListResult) IsEmpty() bool { - return elr.Value == nil || len(*elr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (elr EventListResult) hasNextLink() bool { - return elr.NextLink != nil && len(*elr.NextLink) != 0 -} - -// eventListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (elr EventListResult) eventListResultPreparer(ctx context.Context) (*http.Request, error) { - if !elr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(elr.NextLink))) -} - -// EventListResultPage contains a page of Event values. -type EventListResultPage struct { - fn func(context.Context, EventListResult) (EventListResult, error) - elr EventListResult -} - -// 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 *EventListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventListResultPage.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.elr) - if err != nil { - return err - } - page.elr = 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 *EventListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EventListResultPage) NotDone() bool { - return !page.elr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EventListResultPage) Response() EventListResult { - return page.elr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EventListResultPage) Values() []Event { - if page.elr.IsEmpty() { - return nil - } - return *page.elr.Value -} - -// Creates a new instance of the EventListResultPage type. -func NewEventListResultPage(cur EventListResult, getNextPage func(context.Context, EventListResult) (EventListResult, error)) EventListResultPage { - return EventListResultPage{ - fn: getNextPage, - elr: cur, - } -} - -// EventRequestMessage the event request message sent to the service URI. -type EventRequestMessage struct { - // Content - The content of the event request message. - Content *EventContent `json:"content,omitempty"` - // Headers - The headers of the event request message. - Headers map[string]*string `json:"headers"` - // Method - The HTTP method used to send the event request message. - Method *string `json:"method,omitempty"` - // RequestURI - The URI used to send the event request message. - RequestURI *string `json:"requestUri,omitempty"` - // Version - The HTTP message version. - Version *string `json:"version,omitempty"` -} - -// MarshalJSON is the custom marshaler for EventRequestMessage. -func (erm EventRequestMessage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erm.Content != nil { - objectMap["content"] = erm.Content - } - if erm.Headers != nil { - objectMap["headers"] = erm.Headers - } - if erm.Method != nil { - objectMap["method"] = erm.Method - } - if erm.RequestURI != nil { - objectMap["requestUri"] = erm.RequestURI - } - if erm.Version != nil { - objectMap["version"] = erm.Version - } - return json.Marshal(objectMap) -} - -// EventResponseMessage the event response message received from the service URI. -type EventResponseMessage struct { - // Content - The content of the event response message. - Content *string `json:"content,omitempty"` - // Headers - The headers of the event response message. - Headers map[string]*string `json:"headers"` - // ReasonPhrase - The reason phrase of the event response message. - ReasonPhrase *string `json:"reasonPhrase,omitempty"` - // StatusCode - The status code of the event response message. - StatusCode *string `json:"statusCode,omitempty"` - // Version - The HTTP message version. - Version *string `json:"version,omitempty"` -} - -// MarshalJSON is the custom marshaler for EventResponseMessage. -func (erm EventResponseMessage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erm.Content != nil { - objectMap["content"] = erm.Content - } - if erm.Headers != nil { - objectMap["headers"] = erm.Headers - } - if erm.ReasonPhrase != nil { - objectMap["reasonPhrase"] = erm.ReasonPhrase - } - if erm.StatusCode != nil { - objectMap["statusCode"] = erm.StatusCode - } - if erm.Version != nil { - objectMap["version"] = erm.Version - } - return json.Marshal(objectMap) -} - -// FileTaskRunRequest the request parameters for a scheduling run against a task file. -type FileTaskRunRequest struct { - // TaskFilePath - The template/definition file path relative to the source. - TaskFilePath *string `json:"taskFilePath,omitempty"` - // ValuesFilePath - The values/parameters file path relative to the source. - ValuesFilePath *string `json:"valuesFilePath,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // Timeout - Run timeout in seconds. - Timeout *int32 `json:"timeout,omitempty"` - // Platform - The platform properties against which the run has to happen. - Platform *PlatformProperties `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // SourceLocation - The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. - // If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. - SourceLocation *string `json:"sourceLocation,omitempty"` - // Credentials - The properties that describes a set of credentials that will be used when this run is invoked. - Credentials *Credentials `json:"credentials,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled for the run or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // Type - Possible values include: 'TypeRunRequest', 'TypeDockerBuildRequest', 'TypeFileTaskRunRequest', 'TypeTaskRunRequest', 'TypeEncodedTaskRunRequest' - Type Type `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) MarshalJSON() ([]byte, error) { - ftrr.Type = TypeFileTaskRunRequest - objectMap := make(map[string]interface{}) - if ftrr.TaskFilePath != nil { - objectMap["taskFilePath"] = ftrr.TaskFilePath - } - if ftrr.ValuesFilePath != nil { - objectMap["valuesFilePath"] = ftrr.ValuesFilePath - } - if ftrr.Values != nil { - objectMap["values"] = ftrr.Values - } - if ftrr.Timeout != nil { - objectMap["timeout"] = ftrr.Timeout - } - if ftrr.Platform != nil { - objectMap["platform"] = ftrr.Platform - } - if ftrr.AgentConfiguration != nil { - objectMap["agentConfiguration"] = ftrr.AgentConfiguration - } - if ftrr.SourceLocation != nil { - objectMap["sourceLocation"] = ftrr.SourceLocation - } - if ftrr.Credentials != nil { - objectMap["credentials"] = ftrr.Credentials - } - if ftrr.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = ftrr.IsArchiveEnabled - } - if ftrr.Type != "" { - objectMap["type"] = ftrr.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsDockerBuildRequest() (*DockerBuildRequest, bool) { - return nil, false -} - -// AsFileTaskRunRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsFileTaskRunRequest() (*FileTaskRunRequest, bool) { - return &ftrr, true -} - -// AsTaskRunRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsTaskRunRequest() (*TaskRunRequest, bool) { - return nil, false -} - -// AsEncodedTaskRunRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) { - return nil, false -} - -// AsRunRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsRunRequest() (*RunRequest, bool) { - return nil, false -} - -// AsBasicRunRequest is the BasicRunRequest implementation for FileTaskRunRequest. -func (ftrr FileTaskRunRequest) AsBasicRunRequest() (BasicRunRequest, bool) { - return &ftrr, true -} - -// FileTaskStep the properties of a task step. -type FileTaskStep struct { - // TaskFilePath - The task template/definition file path relative to the source context. - TaskFilePath *string `json:"taskFilePath,omitempty"` - // ValuesFilePath - The task values/parameters file path relative to the source context. - ValuesFilePath *string `json:"valuesFilePath,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // BaseImageDependencies - READ-ONLY; List of base image dependencies for a step. - BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeTaskStepProperties', 'TypeDocker', 'TypeFileTask', 'TypeEncodedTask' - Type TypeBasicTaskStepProperties `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileTaskStep. -func (fts FileTaskStep) MarshalJSON() ([]byte, error) { - fts.Type = TypeFileTask - objectMap := make(map[string]interface{}) - if fts.TaskFilePath != nil { - objectMap["taskFilePath"] = fts.TaskFilePath - } - if fts.ValuesFilePath != nil { - objectMap["valuesFilePath"] = fts.ValuesFilePath - } - if fts.Values != nil { - objectMap["values"] = fts.Values - } - if fts.ContextPath != nil { - objectMap["contextPath"] = fts.ContextPath - } - if fts.ContextAccessToken != nil { - objectMap["contextAccessToken"] = fts.ContextAccessToken - } - if fts.Type != "" { - objectMap["type"] = fts.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStep is the BasicTaskStepProperties implementation for FileTaskStep. -func (fts FileTaskStep) AsDockerBuildStep() (*DockerBuildStep, bool) { - return nil, false -} - -// AsFileTaskStep is the BasicTaskStepProperties implementation for FileTaskStep. -func (fts FileTaskStep) AsFileTaskStep() (*FileTaskStep, bool) { - return &fts, true -} - -// AsEncodedTaskStep is the BasicTaskStepProperties implementation for FileTaskStep. -func (fts FileTaskStep) AsEncodedTaskStep() (*EncodedTaskStep, bool) { - return nil, false -} - -// AsTaskStepProperties is the BasicTaskStepProperties implementation for FileTaskStep. -func (fts FileTaskStep) AsTaskStepProperties() (*TaskStepProperties, bool) { - return nil, false -} - -// AsBasicTaskStepProperties is the BasicTaskStepProperties implementation for FileTaskStep. -func (fts FileTaskStep) AsBasicTaskStepProperties() (BasicTaskStepProperties, bool) { - return &fts, true -} - -// FileTaskStepUpdateParameters the properties of updating a task step. -type FileTaskStepUpdateParameters struct { - // TaskFilePath - The task template/definition file path relative to the source context. - TaskFilePath *string `json:"taskFilePath,omitempty"` - // ValuesFilePath - The values/parameters file path relative to the source context. - ValuesFilePath *string `json:"valuesFilePath,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters', 'TypeBasicTaskStepUpdateParametersTypeDocker', 'TypeBasicTaskStepUpdateParametersTypeFileTask', 'TypeBasicTaskStepUpdateParametersTypeEncodedTask' - Type TypeBasicTaskStepUpdateParameters `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) MarshalJSON() ([]byte, error) { - ftsup.Type = TypeBasicTaskStepUpdateParametersTypeFileTask - objectMap := make(map[string]interface{}) - if ftsup.TaskFilePath != nil { - objectMap["taskFilePath"] = ftsup.TaskFilePath - } - if ftsup.ValuesFilePath != nil { - objectMap["valuesFilePath"] = ftsup.ValuesFilePath - } - if ftsup.Values != nil { - objectMap["values"] = ftsup.Values - } - if ftsup.ContextPath != nil { - objectMap["contextPath"] = ftsup.ContextPath - } - if ftsup.ContextAccessToken != nil { - objectMap["contextAccessToken"] = ftsup.ContextAccessToken - } - if ftsup.Type != "" { - objectMap["type"] = ftsup.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) AsDockerBuildStepUpdateParameters() (*DockerBuildStepUpdateParameters, bool) { - return nil, false -} - -// AsFileTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) AsFileTaskStepUpdateParameters() (*FileTaskStepUpdateParameters, bool) { - return &ftsup, true -} - -// AsEncodedTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) AsEncodedTaskStepUpdateParameters() (*EncodedTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) AsTaskStepUpdateParameters() (*TaskStepUpdateParameters, bool) { - return nil, false -} - -// AsBasicTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for FileTaskStepUpdateParameters. -func (ftsup FileTaskStepUpdateParameters) AsBasicTaskStepUpdateParameters() (BasicTaskStepUpdateParameters, bool) { - return &ftsup, true -} - -// IdentityProperties managed identity for the resource. -type IdentityProperties struct { - // PrincipalID - The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty"` - // Type - The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None' - Type ResourceIdentityType `json:"type,omitempty"` - // UserAssignedIdentities - The list of user identities associated with the resource. 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]*UserIdentityProperties `json:"userAssignedIdentities"` -} - -// MarshalJSON is the custom marshaler for IdentityProperties. -func (IP IdentityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if IP.PrincipalID != nil { - objectMap["principalId"] = IP.PrincipalID - } - if IP.TenantID != nil { - objectMap["tenantId"] = IP.TenantID - } - if IP.Type != "" { - objectMap["type"] = IP.Type - } - if IP.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = IP.UserAssignedIdentities - } - return json.Marshal(objectMap) -} - -// ImageDescriptor properties for a registry image. -type ImageDescriptor struct { - // Registry - The registry login server. - Registry *string `json:"registry,omitempty"` - // Repository - The repository name. - Repository *string `json:"repository,omitempty"` - // Tag - The tag name. - Tag *string `json:"tag,omitempty"` - // Digest - The sha256-based digest of the image manifest. - Digest *string `json:"digest,omitempty"` -} - -// ImageUpdateTrigger the image update trigger that caused a build. -type ImageUpdateTrigger struct { - // ID - The unique ID of the trigger. - ID *string `json:"id,omitempty"` - // Timestamp - The timestamp when the image update happened. - Timestamp *date.Time `json:"timestamp,omitempty"` - // Images - The list of image updates that caused the build. - Images *[]ImageDescriptor `json:"images,omitempty"` -} - -// ImportImageParameters ... -type ImportImageParameters struct { - // Source - The source of the image. - Source *ImportSource `json:"source,omitempty"` - // TargetTags - List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted). - TargetTags *[]string `json:"targetTags,omitempty"` - // UntaggedTargetRepositories - List of strings of repository names to do a manifest only copy. No tag will be created. - UntaggedTargetRepositories *[]string `json:"untaggedTargetRepositories,omitempty"` - // Mode - When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins. Possible values include: 'NoForce', 'Force' - Mode ImportMode `json:"mode,omitempty"` -} - -// ImportSource ... -type ImportSource struct { - // ResourceID - The resource identifier of the source Azure Container Registry. - ResourceID *string `json:"resourceId,omitempty"` - // RegistryURI - The address of the source registry (e.g. 'mcr.microsoft.com'). - RegistryURI *string `json:"registryUri,omitempty"` - // Credentials - Credentials used when importing from a registry uri. - Credentials *ImportSourceCredentials `json:"credentials,omitempty"` - // SourceImage - Repository name of the source image. - // Specify an image by repository ('hello-world'). This will use the 'latest' tag. - // Specify an image by tag ('hello-world:latest'). - // Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - SourceImage *string `json:"sourceImage,omitempty"` -} - -// ImportSourceCredentials ... -type ImportSourceCredentials struct { - // Username - The username to authenticate with the source registry. - Username *string `json:"username,omitempty"` - // Password - The password used to authenticate with the source registry. - Password *string `json:"password,omitempty"` -} - -// IPRule IP rule with specific IP or IP range in CIDR format. -type IPRule struct { - // Action - The action of IP ACL rule. Possible values include: 'Allow' - Action Action `json:"action,omitempty"` - // IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. - IPAddressOrRange *string `json:"value,omitempty"` -} - -// NetworkRuleSet the network rule set for a container registry. -type NetworkRuleSet struct { - // DefaultAction - The default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' - DefaultAction DefaultAction `json:"defaultAction,omitempty"` - // VirtualNetworkRules - The virtual network rules. - VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` - // IPRules - The IP ACL rules. - IPRules *[]IPRule `json:"ipRules,omitempty"` -} - -// OperationDefinition the definition of a container registry operation. -type OperationDefinition struct { - // Origin - The origin information of the container registry operation. - Origin *string `json:"origin,omitempty"` - // Name - Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` - // Display - The display information for the container registry operation. - Display *OperationDisplayDefinition `json:"display,omitempty"` - // OperationPropertiesDefinition - The properties information for the container registry operation. - *OperationPropertiesDefinition `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationDefinition. -func (od OperationDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if od.Origin != nil { - objectMap["origin"] = od.Origin - } - if od.Name != nil { - objectMap["name"] = od.Name - } - if od.Display != nil { - objectMap["display"] = od.Display - } - if od.OperationPropertiesDefinition != nil { - objectMap["properties"] = od.OperationPropertiesDefinition - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OperationDefinition struct. -func (od *OperationDefinition) 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 "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - od.Origin = &origin - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - od.Name = &name - } - case "display": - if v != nil { - var display OperationDisplayDefinition - err = json.Unmarshal(*v, &display) - if err != nil { - return err - } - od.Display = &display - } - case "properties": - if v != nil { - var operationPropertiesDefinition OperationPropertiesDefinition - err = json.Unmarshal(*v, &operationPropertiesDefinition) - if err != nil { - return err - } - od.OperationPropertiesDefinition = &operationPropertiesDefinition - } - } - } - - return nil -} - -// OperationDisplayDefinition the display information for a container registry operation. -type OperationDisplayDefinition struct { - // Provider - The resource provider name: Microsoft.ContainerRegistry. - Provider *string `json:"provider,omitempty"` - // Resource - The resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - The operation that users can perform. - Operation *string `json:"operation,omitempty"` - // Description - The description for the operation. - Description *string `json:"description,omitempty"` -} - -// OperationListResult the result of a request to list container registry operations. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - The list of container registry operations. Since this list may be incomplete, the nextLink field should be used to request the next list of operations. - Value *[]OperationDefinition `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next list of container registry operations. - NextLink *string `json:"nextLink,omitempty"` -} - -// OperationListResultIterator provides access to a complete listing of OperationDefinition values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// 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 *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.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 *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) 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 OperationListResultIterator) Response() OperationListResult { - 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 OperationListResultIterator) Value() OperationDefinition { - if !iter.page.NotDone() { - return OperationDefinition{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of OperationDefinition values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// 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 *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.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.olr) - if err != nil { - return err - } - page.olr = 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 *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []OperationDefinition { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// OperationMetricSpecificationDefinition the definition of Azure Monitoring metric. -type OperationMetricSpecificationDefinition struct { - // Name - Metric name. - Name *string `json:"name,omitempty"` - // DisplayName - Metric display name. - DisplayName *string `json:"displayName,omitempty"` - // DisplayDescription - Metric description. - DisplayDescription *string `json:"displayDescription,omitempty"` - // Unit - Metric unit. - Unit *string `json:"unit,omitempty"` - // AggregationType - Metric aggregation type. - AggregationType *string `json:"aggregationType,omitempty"` - // InternalMetricName - Internal metric name. - InternalMetricName *string `json:"internalMetricName,omitempty"` -} - -// OperationPropertiesDefinition the definition of Azure Monitoring properties. -type OperationPropertiesDefinition struct { - // ServiceSpecification - The definition of Azure Monitoring service. - ServiceSpecification *OperationServiceSpecificationDefinition `json:"serviceSpecification,omitempty"` -} - -// OperationServiceSpecificationDefinition the definition of Azure Monitoring list. -type OperationServiceSpecificationDefinition struct { - // MetricSpecifications - A list of Azure Monitoring metrics definition. - MetricSpecifications *[]OperationMetricSpecificationDefinition `json:"metricSpecifications,omitempty"` -} - -// PlatformProperties the platform properties against which the run has to happen. -type PlatformProperties struct { - // Os - The operating system type required for the run. Possible values include: 'Windows', 'Linux' - Os OS `json:"os,omitempty"` - // Architecture - The OS architecture. Possible values include: 'Amd64', 'X86', 'Arm' - Architecture Architecture `json:"architecture,omitempty"` - // Variant - Variant of the CPU. Possible values include: 'V6', 'V7', 'V8' - Variant Variant `json:"variant,omitempty"` -} - -// PlatformUpdateParameters the properties for updating the platform configuration. -type PlatformUpdateParameters struct { - // Os - The operating system type required for the run. Possible values include: 'Windows', 'Linux' - Os OS `json:"os,omitempty"` - // Architecture - The OS architecture. Possible values include: 'Amd64', 'X86', 'Arm' - Architecture Architecture `json:"architecture,omitempty"` - // Variant - Variant of the CPU. Possible values include: 'V6', 'V7', 'V8' - Variant Variant `json:"variant,omitempty"` -} - -// Policies the policies for a container registry. -type Policies struct { - // QuarantinePolicy - The quarantine policy for a container registry. - QuarantinePolicy *QuarantinePolicy `json:"quarantinePolicy,omitempty"` - // TrustPolicy - The content trust policy for a container registry. - TrustPolicy *TrustPolicy `json:"trustPolicy,omitempty"` - // RetentionPolicy - The retention policy for a container registry. - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` -} - -// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than -// required location and tags. -type ProxyResource struct { - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// QuarantinePolicy the quarantine policy for a container registry. -type QuarantinePolicy struct { - // Status - The value that indicates whether the policy is enabled or not. Possible values include: 'Enabled', 'Disabled' - Status PolicyStatus `json:"status,omitempty"` -} - -// RegenerateCredentialParameters the parameters used to regenerate the login credential. -type RegenerateCredentialParameters struct { - // Name - Specifies name of the password which should be regenerated -- password or password2. Possible values include: 'Password', 'Password2' - Name PasswordName `json:"name,omitempty"` -} - -// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RegistriesCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RegistriesClient) (Registry, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RegistriesCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RegistriesCreateFuture.Result. -func (future *RegistriesCreateFuture) result(client RegistriesClient) (r Registry, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.CreateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesCreateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RegistriesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RegistriesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RegistriesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RegistriesDeleteFuture.Result. -func (future *RegistriesDeleteFuture) result(client RegistriesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RegistriesImportImageFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RegistriesImportImageFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RegistriesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RegistriesImportImageFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RegistriesImportImageFuture.Result. -func (future *RegistriesImportImageFuture) result(client RegistriesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesImportImageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture") - return - } - ar.Response = future.Response() - return -} - -// RegistriesScheduleRunFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RegistriesScheduleRunFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RegistriesClient) (Run, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RegistriesScheduleRunFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RegistriesScheduleRunFuture.Result. -func (future *RegistriesScheduleRunFuture) result(client RegistriesClient) (r Run, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesScheduleRunFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesScheduleRunFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.ScheduleRunResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesScheduleRunFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RegistriesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RegistriesClient) (Registry, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RegistriesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RegistriesUpdateFuture.Result. -func (future *RegistriesUpdateFuture) result(client RegistriesClient) (r Registry, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.UpdateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesUpdateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// Registry an object that represents a container registry. -type Registry struct { - autorest.Response `json:"-"` - // Sku - The SKU of the container registry. - Sku *Sku `json:"sku,omitempty"` - // RegistryProperties - The properties of the container registry. - *RegistryProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` - // Location - The location of the resource. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // Tags - The tags of the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Registry. -func (r Registry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Sku != nil { - objectMap["sku"] = r.Sku - } - if r.RegistryProperties != nil { - objectMap["properties"] = r.RegistryProperties - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Registry struct. -func (r *Registry) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - r.Sku = &sku - } - case "properties": - if v != nil { - var registryProperties RegistryProperties - err = json.Unmarshal(*v, ®istryProperties) - if err != nil { - return err - } - r.RegistryProperties = ®istryProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - r.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - r.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - r.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - r.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - r.Tags = tags - } - } - } - - return nil -} - -// RegistryListCredentialsResult the response from the ListCredentials operation. -type RegistryListCredentialsResult struct { - autorest.Response `json:"-"` - // Username - The username for a container registry. - Username *string `json:"username,omitempty"` - // Passwords - The list of passwords for a container registry. - Passwords *[]RegistryPassword `json:"passwords,omitempty"` -} - -// RegistryListResult the result of a request to list container registries. -type RegistryListResult struct { - autorest.Response `json:"-"` - // Value - The list of container registries. Since this list may be incomplete, the nextLink field should be used to request the next list of container registries. - Value *[]Registry `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next list of container registries. - NextLink *string `json:"nextLink,omitempty"` -} - -// RegistryListResultIterator provides access to a complete listing of Registry values. -type RegistryListResultIterator struct { - i int - page RegistryListResultPage -} - -// 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 *RegistryListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistryListResultIterator.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 *RegistryListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RegistryListResultIterator) 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 RegistryListResultIterator) Response() RegistryListResult { - 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 RegistryListResultIterator) Value() Registry { - if !iter.page.NotDone() { - return Registry{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RegistryListResultIterator type. -func NewRegistryListResultIterator(page RegistryListResultPage) RegistryListResultIterator { - return RegistryListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rlr RegistryListResult) IsEmpty() bool { - return rlr.Value == nil || len(*rlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rlr RegistryListResult) hasNextLink() bool { - return rlr.NextLink != nil && len(*rlr.NextLink) != 0 -} - -// registryListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rlr RegistryListResult) registryListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rlr.NextLink))) -} - -// RegistryListResultPage contains a page of Registry values. -type RegistryListResultPage struct { - fn func(context.Context, RegistryListResult) (RegistryListResult, error) - rlr RegistryListResult -} - -// 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 *RegistryListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistryListResultPage.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.rlr) - if err != nil { - return err - } - page.rlr = 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 *RegistryListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RegistryListResultPage) NotDone() bool { - return !page.rlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RegistryListResultPage) Response() RegistryListResult { - return page.rlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RegistryListResultPage) Values() []Registry { - if page.rlr.IsEmpty() { - return nil - } - return *page.rlr.Value -} - -// Creates a new instance of the RegistryListResultPage type. -func NewRegistryListResultPage(cur RegistryListResult, getNextPage func(context.Context, RegistryListResult) (RegistryListResult, error)) RegistryListResultPage { - return RegistryListResultPage{ - fn: getNextPage, - rlr: cur, - } -} - -// RegistryNameCheckRequest a request to check whether a container registry name is available. -type RegistryNameCheckRequest struct { - // Name - The name of the container registry. - Name *string `json:"name,omitempty"` - // Type - The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - Type *string `json:"type,omitempty"` -} - -// RegistryNameStatus the result of a request to check the availability of a container registry name. -type RegistryNameStatus struct { - autorest.Response `json:"-"` - // NameAvailable - The value that indicates whether the name is available. - NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - If any, the reason that the name is not available. - Reason *string `json:"reason,omitempty"` - // Message - If any, the error message that provides more detail for the reason that the name is not available. - Message *string `json:"message,omitempty"` -} - -// RegistryPassword the login password for the container registry. -type RegistryPassword struct { - // Name - The password name. Possible values include: 'Password', 'Password2' - Name PasswordName `json:"name,omitempty"` - // Value - The password value. - Value *string `json:"value,omitempty"` -} - -// RegistryProperties the properties of a container registry. -type RegistryProperties struct { - // LoginServer - READ-ONLY; The URL that can be used to log into the container registry. - LoginServer *string `json:"loginServer,omitempty"` - // CreationDate - READ-ONLY; The creation date of the container registry in ISO8601 format. - CreationDate *date.Time `json:"creationDate,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the container registry at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Status - READ-ONLY; The status of the container registry at the time the operation was called. - Status *Status `json:"status,omitempty"` - // AdminUserEnabled - The value that indicates whether the admin user is enabled. - AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` - // StorageAccount - The properties of the storage account for the container registry. Only applicable to Classic SKU. - StorageAccount *StorageAccountProperties `json:"storageAccount,omitempty"` - // NetworkRuleSet - The network rule set for a container registry. - NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` - // Policies - The policies for a container registry. - Policies *Policies `json:"policies,omitempty"` -} - -// MarshalJSON is the custom marshaler for RegistryProperties. -func (rp RegistryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rp.AdminUserEnabled != nil { - objectMap["adminUserEnabled"] = rp.AdminUserEnabled - } - if rp.StorageAccount != nil { - objectMap["storageAccount"] = rp.StorageAccount - } - if rp.NetworkRuleSet != nil { - objectMap["networkRuleSet"] = rp.NetworkRuleSet - } - if rp.Policies != nil { - objectMap["policies"] = rp.Policies - } - return json.Marshal(objectMap) -} - -// RegistryPropertiesUpdateParameters the parameters for updating the properties of a container registry. -type RegistryPropertiesUpdateParameters struct { - // AdminUserEnabled - The value that indicates whether the admin user is enabled. - AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` - // NetworkRuleSet - The network rule set for a container registry. - NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` - // Policies - The policies for a container registry. - Policies *Policies `json:"policies,omitempty"` -} - -// RegistryUpdateParameters the parameters for updating a container registry. -type RegistryUpdateParameters struct { - // Tags - The tags for the container registry. - Tags map[string]*string `json:"tags"` - // Sku - The SKU of the container registry. - Sku *Sku `json:"sku,omitempty"` - // RegistryPropertiesUpdateParameters - The properties that the container registry will be updated with. - *RegistryPropertiesUpdateParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for RegistryUpdateParameters. -func (rup RegistryUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rup.Tags != nil { - objectMap["tags"] = rup.Tags - } - if rup.Sku != nil { - objectMap["sku"] = rup.Sku - } - if rup.RegistryPropertiesUpdateParameters != nil { - objectMap["properties"] = rup.RegistryPropertiesUpdateParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RegistryUpdateParameters struct. -func (rup *RegistryUpdateParameters) 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 "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rup.Tags = tags - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - rup.Sku = &sku - } - case "properties": - if v != nil { - var registryPropertiesUpdateParameters RegistryPropertiesUpdateParameters - err = json.Unmarshal(*v, ®istryPropertiesUpdateParameters) - if err != nil { - return err - } - rup.RegistryPropertiesUpdateParameters = ®istryPropertiesUpdateParameters - } - } - } - - return nil -} - -// RegistryUsage the quota usage for a container registry. -type RegistryUsage struct { - // Name - The name of the usage. - Name *string `json:"name,omitempty"` - // Limit - The limit of the usage. - Limit *int64 `json:"limit,omitempty"` - // CurrentValue - The current value of the usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - // Unit - The unit of measurement. Possible values include: 'Count', 'Bytes' - Unit RegistryUsageUnit `json:"unit,omitempty"` -} - -// RegistryUsageListResult the result of a request to get container registry quota usages. -type RegistryUsageListResult struct { - autorest.Response `json:"-"` - // Value - The list of container registry quota usages. - Value *[]RegistryUsage `json:"value,omitempty"` -} - -// Replication an object that represents a replication for a container registry. -type Replication struct { - autorest.Response `json:"-"` - // ReplicationProperties - The properties of the replication. - *ReplicationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` - // Location - The location of the resource. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // Tags - The tags of the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Replication. -func (r Replication) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.ReplicationProperties != nil { - objectMap["properties"] = r.ReplicationProperties - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Replication struct. -func (r *Replication) 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 replicationProperties ReplicationProperties - err = json.Unmarshal(*v, &replicationProperties) - if err != nil { - return err - } - r.ReplicationProperties = &replicationProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - r.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - r.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - r.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - r.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - r.Tags = tags - } - } - } - - return nil -} - -// ReplicationListResult the result of a request to list replications for a container registry. -type ReplicationListResult struct { - autorest.Response `json:"-"` - // Value - The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list of replications. - Value *[]Replication `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next list of replications. - NextLink *string `json:"nextLink,omitempty"` -} - -// ReplicationListResultIterator provides access to a complete listing of Replication values. -type ReplicationListResultIterator struct { - i int - page ReplicationListResultPage -} - -// 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 *ReplicationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationListResultIterator.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 *ReplicationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ReplicationListResultIterator) 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 ReplicationListResultIterator) Response() ReplicationListResult { - 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 ReplicationListResultIterator) Value() Replication { - if !iter.page.NotDone() { - return Replication{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ReplicationListResultIterator type. -func NewReplicationListResultIterator(page ReplicationListResultPage) ReplicationListResultIterator { - return ReplicationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rlr ReplicationListResult) IsEmpty() bool { - return rlr.Value == nil || len(*rlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rlr ReplicationListResult) hasNextLink() bool { - return rlr.NextLink != nil && len(*rlr.NextLink) != 0 -} - -// replicationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rlr ReplicationListResult) replicationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rlr.NextLink))) -} - -// ReplicationListResultPage contains a page of Replication values. -type ReplicationListResultPage struct { - fn func(context.Context, ReplicationListResult) (ReplicationListResult, error) - rlr ReplicationListResult -} - -// 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 *ReplicationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationListResultPage.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.rlr) - if err != nil { - return err - } - page.rlr = 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 *ReplicationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ReplicationListResultPage) NotDone() bool { - return !page.rlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ReplicationListResultPage) Response() ReplicationListResult { - return page.rlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ReplicationListResultPage) Values() []Replication { - if page.rlr.IsEmpty() { - return nil - } - return *page.rlr.Value -} - -// Creates a new instance of the ReplicationListResultPage type. -func NewReplicationListResultPage(cur ReplicationListResult, getNextPage func(context.Context, ReplicationListResult) (ReplicationListResult, error)) ReplicationListResultPage { - return ReplicationListResultPage{ - fn: getNextPage, - rlr: cur, - } -} - -// ReplicationProperties the properties of a replication. -type ReplicationProperties struct { - // ProvisioningState - READ-ONLY; The provisioning state of the replication at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Status - READ-ONLY; The status of the replication at the time the operation was called. - Status *Status `json:"status,omitempty"` -} - -// MarshalJSON is the custom marshaler for ReplicationProperties. -func (rp ReplicationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ReplicationsCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationsClient) (Replication, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationsCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationsCreateFuture.Result. -func (future *ReplicationsCreateFuture) result(client ReplicationsClient) (r Replication, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.CreateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsCreateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ReplicationsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationsDeleteFuture.Result. -func (future *ReplicationsDeleteFuture) result(client ReplicationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ReplicationsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ReplicationsClient) (Replication, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ReplicationsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ReplicationsUpdateFuture.Result. -func (future *ReplicationsUpdateFuture) result(client ReplicationsClient) (r Replication, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.UpdateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsUpdateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// ReplicationUpdateParameters the parameters for updating a replication. -type ReplicationUpdateParameters struct { - // Tags - The tags for the replication. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ReplicationUpdateParameters. -func (rup ReplicationUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rup.Tags != nil { - objectMap["tags"] = rup.Tags - } - return json.Marshal(objectMap) -} - -// Request the request that generated the event. -type Request struct { - // ID - The ID of the request that initiated the event. - ID *string `json:"id,omitempty"` - // Addr - The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request. - Addr *string `json:"addr,omitempty"` - // Host - The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests. - Host *string `json:"host,omitempty"` - // Method - The request method that generated the event. - Method *string `json:"method,omitempty"` - // Useragent - The user agent header of the request. - Useragent *string `json:"useragent,omitempty"` -} - -// Resource an Azure resource. -type Resource struct { - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` - // Location - The location of the resource. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // Tags - The tags of the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// RetentionPolicy the retention policy for a container registry. -type RetentionPolicy struct { - // Days - The number of days to retain an untagged manifest after which it gets purged. - Days *int32 `json:"days,omitempty"` - // LastUpdatedTime - READ-ONLY; The timestamp when the policy was last updated. - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` - // Status - The value that indicates whether the policy is enabled or not. Possible values include: 'Enabled', 'Disabled' - Status PolicyStatus `json:"status,omitempty"` -} - -// MarshalJSON is the custom marshaler for RetentionPolicy. -func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rp.Days != nil { - objectMap["days"] = rp.Days - } - if rp.Status != "" { - objectMap["status"] = rp.Status - } - return json.Marshal(objectMap) -} - -// Run run resource properties -type Run struct { - autorest.Response `json:"-"` - // RunProperties - The properties of a run. - *RunProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Run. -func (r Run) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.RunProperties != nil { - objectMap["properties"] = r.RunProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Run struct. -func (r *Run) 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 runProperties RunProperties - err = json.Unmarshal(*v, &runProperties) - if err != nil { - return err - } - r.RunProperties = &runProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - r.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - r.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - r.Type = &typeVar - } - } - } - - return nil -} - -// RunFilter properties that are enabled for Odata querying on runs. -type RunFilter struct { - // RunID - The unique identifier for the run. - RunID *string `json:"runId,omitempty"` - // RunType - The type of run. Possible values include: 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - RunType RunType `json:"runType,omitempty"` - // Status - The current status of the run. Possible values include: 'RunStatusQueued', 'RunStatusStarted', 'RunStatusRunning', 'RunStatusSucceeded', 'RunStatusFailed', 'RunStatusCanceled', 'RunStatusError', 'RunStatusTimeout' - Status RunStatus `json:"status,omitempty"` - // CreateTime - The create time for a run. - CreateTime *date.Time `json:"createTime,omitempty"` - // FinishTime - The time the run finished. - FinishTime *date.Time `json:"finishTime,omitempty"` - // OutputImageManifests - The list of comma-separated image manifests that were generated from the run. This is applicable if the run is of - // build type. - OutputImageManifests *string `json:"outputImageManifests,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // TaskName - The name of the task that the run corresponds to. - TaskName *string `json:"taskName,omitempty"` -} - -// RunGetLogResult the result of get log link operation. -type RunGetLogResult struct { - autorest.Response `json:"-"` - // LogLink - The link to logs for a run on a azure container registry. - LogLink *string `json:"logLink,omitempty"` -} - -// RunListResult collection of runs. -type RunListResult struct { - autorest.Response `json:"-"` - // Value - The collection value. - Value *[]Run `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next set of paged results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RunListResultIterator provides access to a complete listing of Run values. -type RunListResultIterator struct { - i int - page RunListResultPage -} - -// 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 *RunListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunListResultIterator.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 *RunListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RunListResultIterator) 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 RunListResultIterator) Response() RunListResult { - 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 RunListResultIterator) Value() Run { - if !iter.page.NotDone() { - return Run{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RunListResultIterator type. -func NewRunListResultIterator(page RunListResultPage) RunListResultIterator { - return RunListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rlr RunListResult) IsEmpty() bool { - return rlr.Value == nil || len(*rlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rlr RunListResult) hasNextLink() bool { - return rlr.NextLink != nil && len(*rlr.NextLink) != 0 -} - -// runListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rlr RunListResult) runListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rlr.NextLink))) -} - -// RunListResultPage contains a page of Run values. -type RunListResultPage struct { - fn func(context.Context, RunListResult) (RunListResult, error) - rlr RunListResult -} - -// 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 *RunListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunListResultPage.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.rlr) - if err != nil { - return err - } - page.rlr = 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 *RunListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RunListResultPage) NotDone() bool { - return !page.rlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RunListResultPage) Response() RunListResult { - return page.rlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RunListResultPage) Values() []Run { - if page.rlr.IsEmpty() { - return nil - } - return *page.rlr.Value -} - -// Creates a new instance of the RunListResultPage type. -func NewRunListResultPage(cur RunListResult, getNextPage func(context.Context, RunListResult) (RunListResult, error)) RunListResultPage { - return RunListResultPage{ - fn: getNextPage, - rlr: cur, - } -} - -// RunProperties the properties for a run. -type RunProperties struct { - // RunID - The unique identifier for the run. - RunID *string `json:"runId,omitempty"` - // Status - The current status of the run. Possible values include: 'RunStatusQueued', 'RunStatusStarted', 'RunStatusRunning', 'RunStatusSucceeded', 'RunStatusFailed', 'RunStatusCanceled', 'RunStatusError', 'RunStatusTimeout' - Status RunStatus `json:"status,omitempty"` - // LastUpdatedTime - The last updated time for the run. - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` - // RunType - The type of run. Possible values include: 'QuickBuild', 'QuickRun', 'AutoBuild', 'AutoRun' - RunType RunType `json:"runType,omitempty"` - // CreateTime - The time the run was scheduled. - CreateTime *date.Time `json:"createTime,omitempty"` - // StartTime - The time the run started. - StartTime *date.Time `json:"startTime,omitempty"` - // FinishTime - The time the run finished. - FinishTime *date.Time `json:"finishTime,omitempty"` - // OutputImages - The list of all images that were generated from the run. This is applicable if the run generates base image dependencies. - OutputImages *[]ImageDescriptor `json:"outputImages,omitempty"` - // Task - The task against which run was scheduled. - Task *string `json:"task,omitempty"` - // ImageUpdateTrigger - The image update trigger that caused the run. This is applicable if the task has base image trigger configured. - ImageUpdateTrigger *ImageUpdateTrigger `json:"imageUpdateTrigger,omitempty"` - // SourceTrigger - The source trigger that caused the run. - SourceTrigger *SourceTriggerDescriptor `json:"sourceTrigger,omitempty"` - // Platform - The platform properties against which the run will happen. - Platform *PlatformProperties `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // SourceRegistryAuth - The scope of the credentials that were used to login to the source registry during this run. - SourceRegistryAuth *string `json:"sourceRegistryAuth,omitempty"` - // CustomRegistries - The list of custom registries that were logged in during this run. - CustomRegistries *[]string `json:"customRegistries,omitempty"` - // RunErrorMessage - READ-ONLY; The error message received from backend systems after the run is scheduled. - RunErrorMessage *string `json:"runErrorMessage,omitempty"` - // ProvisioningState - The provisioning state of a run. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // TimerTrigger - The timer trigger that caused the run. - TimerTrigger *TimerTriggerDescriptor `json:"timerTrigger,omitempty"` -} - -// MarshalJSON is the custom marshaler for RunProperties. -func (rp RunProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rp.RunID != nil { - objectMap["runId"] = rp.RunID - } - if rp.Status != "" { - objectMap["status"] = rp.Status - } - if rp.LastUpdatedTime != nil { - objectMap["lastUpdatedTime"] = rp.LastUpdatedTime - } - if rp.RunType != "" { - objectMap["runType"] = rp.RunType - } - if rp.CreateTime != nil { - objectMap["createTime"] = rp.CreateTime - } - if rp.StartTime != nil { - objectMap["startTime"] = rp.StartTime - } - if rp.FinishTime != nil { - objectMap["finishTime"] = rp.FinishTime - } - if rp.OutputImages != nil { - objectMap["outputImages"] = rp.OutputImages - } - if rp.Task != nil { - objectMap["task"] = rp.Task - } - if rp.ImageUpdateTrigger != nil { - objectMap["imageUpdateTrigger"] = rp.ImageUpdateTrigger - } - if rp.SourceTrigger != nil { - objectMap["sourceTrigger"] = rp.SourceTrigger - } - if rp.Platform != nil { - objectMap["platform"] = rp.Platform - } - if rp.AgentConfiguration != nil { - objectMap["agentConfiguration"] = rp.AgentConfiguration - } - if rp.SourceRegistryAuth != nil { - objectMap["sourceRegistryAuth"] = rp.SourceRegistryAuth - } - if rp.CustomRegistries != nil { - objectMap["customRegistries"] = rp.CustomRegistries - } - if rp.ProvisioningState != "" { - objectMap["provisioningState"] = rp.ProvisioningState - } - if rp.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = rp.IsArchiveEnabled - } - if rp.TimerTrigger != nil { - objectMap["timerTrigger"] = rp.TimerTrigger - } - return json.Marshal(objectMap) -} - -// BasicRunRequest the request parameters for scheduling a run. -type BasicRunRequest interface { - AsDockerBuildRequest() (*DockerBuildRequest, bool) - AsFileTaskRunRequest() (*FileTaskRunRequest, bool) - AsTaskRunRequest() (*TaskRunRequest, bool) - AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) - AsRunRequest() (*RunRequest, bool) -} - -// RunRequest the request parameters for scheduling a run. -type RunRequest struct { - // IsArchiveEnabled - The value that indicates whether archiving is enabled for the run or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // Type - Possible values include: 'TypeRunRequest', 'TypeDockerBuildRequest', 'TypeFileTaskRunRequest', 'TypeTaskRunRequest', 'TypeEncodedTaskRunRequest' - Type Type `json:"type,omitempty"` -} - -func unmarshalBasicRunRequest(body []byte) (BasicRunRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["type"] { - case string(TypeDockerBuildRequest): - var dbr DockerBuildRequest - err := json.Unmarshal(body, &dbr) - return dbr, err - case string(TypeFileTaskRunRequest): - var ftrr FileTaskRunRequest - err := json.Unmarshal(body, &ftrr) - return ftrr, err - case string(TypeTaskRunRequest): - var trr TaskRunRequest - err := json.Unmarshal(body, &trr) - return trr, err - case string(TypeEncodedTaskRunRequest): - var etrr EncodedTaskRunRequest - err := json.Unmarshal(body, &etrr) - return etrr, err - default: - var rr RunRequest - err := json.Unmarshal(body, &rr) - return rr, err - } -} -func unmarshalBasicRunRequestArray(body []byte) ([]BasicRunRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - rrArray := make([]BasicRunRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - rr, err := unmarshalBasicRunRequest(*rawMessage) - if err != nil { - return nil, err - } - rrArray[index] = rr - } - return rrArray, nil -} - -// MarshalJSON is the custom marshaler for RunRequest. -func (rr RunRequest) MarshalJSON() ([]byte, error) { - rr.Type = TypeRunRequest - objectMap := make(map[string]interface{}) - if rr.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = rr.IsArchiveEnabled - } - if rr.Type != "" { - objectMap["type"] = rr.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsDockerBuildRequest() (*DockerBuildRequest, bool) { - return nil, false -} - -// AsFileTaskRunRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsFileTaskRunRequest() (*FileTaskRunRequest, bool) { - return nil, false -} - -// AsTaskRunRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsTaskRunRequest() (*TaskRunRequest, bool) { - return nil, false -} - -// AsEncodedTaskRunRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) { - return nil, false -} - -// AsRunRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsRunRequest() (*RunRequest, bool) { - return &rr, true -} - -// AsBasicRunRequest is the BasicRunRequest implementation for RunRequest. -func (rr RunRequest) AsBasicRunRequest() (BasicRunRequest, bool) { - return &rr, true -} - -// RunsCancelFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RunsCancelFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RunsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RunsCancelFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RunsCancelFuture.Result. -func (future *RunsCancelFuture) result(client RunsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsCancelFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RunsCancelFuture") - return - } - ar.Response = future.Response() - return -} - -// RunsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RunsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RunsClient) (Run, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RunsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RunsUpdateFuture.Result. -func (future *RunsUpdateFuture) result(client RunsClient) (r Run, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.RunsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.UpdateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsUpdateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// RunUpdateParameters the set of run properties that can be updated. -type RunUpdateParameters struct { - // IsArchiveEnabled - The value that indicates whether archiving is enabled or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` -} - -// SecretObject describes the properties of a secret object value. -type SecretObject struct { - // Value - The value of the secret. The format of this value will be determined - // based on the type of the secret object. If the type is Opaque, the value will be - // used as is without any modification. - Value *string `json:"value,omitempty"` - // Type - The type of the secret object which determines how the value of the secret object has to be - // interpreted. Possible values include: 'Opaque', 'Vaultsecret' - Type SecretObjectType `json:"type,omitempty"` -} - -// SetValue the properties of a overridable value that can be passed to a task template. -type SetValue struct { - // Name - The name of the overridable value. - Name *string `json:"name,omitempty"` - // Value - The overridable value. - Value *string `json:"value,omitempty"` - // IsSecret - Flag to indicate whether the value represents a secret or not. - IsSecret *bool `json:"isSecret,omitempty"` -} - -// Sku the SKU of a container registry. -type Sku struct { - // Name - The SKU name of the container registry. Required for registry creation. Possible values include: 'Classic', 'Basic', 'Standard', 'Premium' - Name SkuName `json:"name,omitempty"` - // Tier - READ-ONLY; The SKU tier based on the SKU name. Possible values include: 'SkuTierClassic', 'SkuTierBasic', 'SkuTierStandard', 'SkuTierPremium' - Tier SkuTier `json:"tier,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 - } - return json.Marshal(objectMap) -} - -// Source the registry node that generated the event. Put differently, while the actor initiates the event, -// the source generates it. -type Source struct { - // Addr - The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port. - Addr *string `json:"addr,omitempty"` - // InstanceID - The running instance of an application. Changes after each restart. - InstanceID *string `json:"instanceID,omitempty"` -} - -// SourceProperties the properties of the source code repository. -type SourceProperties struct { - // SourceControlType - The type of source control service. Possible values include: 'Github', 'VisualStudioTeamService' - SourceControlType SourceControlType `json:"sourceControlType,omitempty"` - // RepositoryURL - The full URL to the source code repository - RepositoryURL *string `json:"repositoryUrl,omitempty"` - // Branch - The branch name of the source code. - Branch *string `json:"branch,omitempty"` - // SourceControlAuthProperties - The authorization properties for accessing the source code repository and to set up - // webhooks for notifications. - SourceControlAuthProperties *AuthInfo `json:"sourceControlAuthProperties,omitempty"` -} - -// SourceRegistryCredentials describes the credential parameters for accessing the source registry. -type SourceRegistryCredentials struct { - // LoginMode - The authentication mode which determines the source registry login scope. The credentials for the source registry - // will be generated using the given scope. These credentials will be used to login to - // the source registry during the run. Possible values include: 'SourceRegistryLoginModeNone', 'SourceRegistryLoginModeDefault' - LoginMode SourceRegistryLoginMode `json:"loginMode,omitempty"` -} - -// SourceTrigger the properties of a source based trigger. -type SourceTrigger struct { - // SourceRepository - The properties that describes the source(code) for the task. - SourceRepository *SourceProperties `json:"sourceRepository,omitempty"` - // SourceTriggerEvents - The source event corresponding to the trigger. - SourceTriggerEvents *[]SourceTriggerEvent `json:"sourceTriggerEvents,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// SourceTriggerDescriptor the source trigger that caused a run. -type SourceTriggerDescriptor struct { - // ID - The unique ID of the trigger. - ID *string `json:"id,omitempty"` - // EventType - The event type of the trigger. - EventType *string `json:"eventType,omitempty"` - // CommitID - The unique ID that identifies a commit. - CommitID *string `json:"commitId,omitempty"` - // PullRequestID - The unique ID that identifies pull request. - PullRequestID *string `json:"pullRequestId,omitempty"` - // RepositoryURL - The repository URL. - RepositoryURL *string `json:"repositoryUrl,omitempty"` - // BranchName - The branch name in the repository. - BranchName *string `json:"branchName,omitempty"` - // ProviderType - The source control provider type. - ProviderType *string `json:"providerType,omitempty"` -} - -// SourceTriggerUpdateParameters the properties for updating a source based trigger. -type SourceTriggerUpdateParameters struct { - // SourceRepository - The properties that describes the source(code) for the task. - SourceRepository *SourceUpdateParameters `json:"sourceRepository,omitempty"` - // SourceTriggerEvents - The source event corresponding to the trigger. - SourceTriggerEvents *[]SourceTriggerEvent `json:"sourceTriggerEvents,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// SourceUpdateParameters the properties for updating the source code repository. -type SourceUpdateParameters struct { - // SourceControlType - The type of source control service. Possible values include: 'Github', 'VisualStudioTeamService' - SourceControlType SourceControlType `json:"sourceControlType,omitempty"` - // RepositoryURL - The full URL to the source code repository - RepositoryURL *string `json:"repositoryUrl,omitempty"` - // Branch - The branch name of the source code. - Branch *string `json:"branch,omitempty"` - // SourceControlAuthProperties - The authorization properties for accessing the source code repository and to set up - // webhooks for notifications. - SourceControlAuthProperties *AuthInfoUpdateParameters `json:"sourceControlAuthProperties,omitempty"` -} - -// SourceUploadDefinition the properties of a response to source upload request. -type SourceUploadDefinition struct { - autorest.Response `json:"-"` - // UploadURL - The URL where the client can upload the source. - UploadURL *string `json:"uploadUrl,omitempty"` - // RelativePath - The relative path to the source. This is used to submit the subsequent queue build request. - RelativePath *string `json:"relativePath,omitempty"` -} - -// Status the status of an Azure resource at the time the operation was called. -type Status struct { - // DisplayStatus - READ-ONLY; The short label for the status. - DisplayStatus *string `json:"displayStatus,omitempty"` - // Message - READ-ONLY; The detailed message for the status, including alerts and error messages. - Message *string `json:"message,omitempty"` - // Timestamp - READ-ONLY; The timestamp when the status was changed to the current value. - Timestamp *date.Time `json:"timestamp,omitempty"` -} - -// MarshalJSON is the custom marshaler for Status. -func (s Status) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// StorageAccountProperties the properties of a storage account for a container registry. Only applicable -// to Classic SKU. -type StorageAccountProperties struct { - // ID - The resource ID of the storage account. - ID *string `json:"id,omitempty"` -} - -// Target the target of the event. -type Target struct { - // MediaType - The MIME type of the referenced object. - MediaType *string `json:"mediaType,omitempty"` - // Size - The number of bytes of the content. Same as Length field. - Size *int64 `json:"size,omitempty"` - // Digest - The digest of the content, as defined by the Registry V2 HTTP API Specification. - Digest *string `json:"digest,omitempty"` - // Length - The number of bytes of the content. Same as Size field. - Length *int64 `json:"length,omitempty"` - // Repository - The repository name. - Repository *string `json:"repository,omitempty"` - // URL - The direct URL to the content. - URL *string `json:"url,omitempty"` - // Tag - The tag name. - Tag *string `json:"tag,omitempty"` - // Name - The name of the artifact. - Name *string `json:"name,omitempty"` - // Version - The version of the artifact. - Version *string `json:"version,omitempty"` -} - -// Task the task that has the ARM resource and task properties. -// The task will have all information to schedule a run against it. -type Task struct { - autorest.Response `json:"-"` - // Identity - Identity for the resource. - Identity *IdentityProperties `json:"identity,omitempty"` - // TaskProperties - The properties of a task. - *TaskProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` - // Location - The location of the resource. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // Tags - The tags of the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Task. -func (t Task) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if t.Identity != nil { - objectMap["identity"] = t.Identity - } - if t.TaskProperties != nil { - objectMap["properties"] = t.TaskProperties - } - if t.Location != nil { - objectMap["location"] = t.Location - } - if t.Tags != nil { - objectMap["tags"] = t.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Task struct. -func (t *Task) 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 "identity": - if v != nil { - var identity IdentityProperties - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - t.Identity = &identity - } - case "properties": - if v != nil { - var taskProperties TaskProperties - err = json.Unmarshal(*v, &taskProperties) - if err != nil { - return err - } - t.TaskProperties = &taskProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - t.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - t.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - t.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - t.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - t.Tags = tags - } - } - } - - return nil -} - -// TaskListResult the collection of tasks. -type TaskListResult struct { - autorest.Response `json:"-"` - // Value - The collection value. - Value *[]Task `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next set of paged results. - NextLink *string `json:"nextLink,omitempty"` -} - -// TaskListResultIterator provides access to a complete listing of Task values. -type TaskListResultIterator struct { - i int - page TaskListResultPage -} - -// 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 *TaskListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TaskListResultIterator.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 *TaskListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter TaskListResultIterator) 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 TaskListResultIterator) Response() TaskListResult { - 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 TaskListResultIterator) Value() Task { - if !iter.page.NotDone() { - return Task{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the TaskListResultIterator type. -func NewTaskListResultIterator(page TaskListResultPage) TaskListResultIterator { - return TaskListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (tlr TaskListResult) IsEmpty() bool { - return tlr.Value == nil || len(*tlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (tlr TaskListResult) hasNextLink() bool { - return tlr.NextLink != nil && len(*tlr.NextLink) != 0 -} - -// taskListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (tlr TaskListResult) taskListResultPreparer(ctx context.Context) (*http.Request, error) { - if !tlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(tlr.NextLink))) -} - -// TaskListResultPage contains a page of Task values. -type TaskListResultPage struct { - fn func(context.Context, TaskListResult) (TaskListResult, error) - tlr TaskListResult -} - -// 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 *TaskListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TaskListResultPage.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.tlr) - if err != nil { - return err - } - page.tlr = 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 *TaskListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page TaskListResultPage) NotDone() bool { - return !page.tlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page TaskListResultPage) Response() TaskListResult { - return page.tlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page TaskListResultPage) Values() []Task { - if page.tlr.IsEmpty() { - return nil - } - return *page.tlr.Value -} - -// Creates a new instance of the TaskListResultPage type. -func NewTaskListResultPage(cur TaskListResult, getNextPage func(context.Context, TaskListResult) (TaskListResult, error)) TaskListResultPage { - return TaskListResultPage{ - fn: getNextPage, - tlr: cur, - } -} - -// TaskProperties the properties of a task. -type TaskProperties struct { - // ProvisioningState - READ-ONLY; The provisioning state of the task. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // CreationDate - READ-ONLY; The creation date of task. - CreationDate *date.Time `json:"creationDate,omitempty"` - // Status - The current status of task. Possible values include: 'TaskStatusDisabled', 'TaskStatusEnabled' - Status TaskStatus `json:"status,omitempty"` - // Platform - The platform properties against which the run has to happen. - Platform *PlatformProperties `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // Timeout - Run timeout in seconds. - Timeout *int32 `json:"timeout,omitempty"` - // Step - The properties of a task step. - Step BasicTaskStepProperties `json:"step,omitempty"` - // Trigger - The properties that describe all triggers for the task. - Trigger *TriggerProperties `json:"trigger,omitempty"` - // Credentials - The properties that describes a set of credentials that will be used when this run is invoked. - Credentials *Credentials `json:"credentials,omitempty"` -} - -// MarshalJSON is the custom marshaler for TaskProperties. -func (tp TaskProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tp.Status != "" { - objectMap["status"] = tp.Status - } - if tp.Platform != nil { - objectMap["platform"] = tp.Platform - } - if tp.AgentConfiguration != nil { - objectMap["agentConfiguration"] = tp.AgentConfiguration - } - if tp.Timeout != nil { - objectMap["timeout"] = tp.Timeout - } - objectMap["step"] = tp.Step - if tp.Trigger != nil { - objectMap["trigger"] = tp.Trigger - } - if tp.Credentials != nil { - objectMap["credentials"] = tp.Credentials - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TaskProperties struct. -func (tp *TaskProperties) 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 "provisioningState": - if v != nil { - var provisioningState ProvisioningState - err = json.Unmarshal(*v, &provisioningState) - if err != nil { - return err - } - tp.ProvisioningState = provisioningState - } - case "creationDate": - if v != nil { - var creationDate date.Time - err = json.Unmarshal(*v, &creationDate) - if err != nil { - return err - } - tp.CreationDate = &creationDate - } - case "status": - if v != nil { - var status TaskStatus - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - tp.Status = status - } - case "platform": - if v != nil { - var platform PlatformProperties - err = json.Unmarshal(*v, &platform) - if err != nil { - return err - } - tp.Platform = &platform - } - case "agentConfiguration": - if v != nil { - var agentConfiguration AgentProperties - err = json.Unmarshal(*v, &agentConfiguration) - if err != nil { - return err - } - tp.AgentConfiguration = &agentConfiguration - } - case "timeout": - if v != nil { - var timeout int32 - err = json.Unmarshal(*v, &timeout) - if err != nil { - return err - } - tp.Timeout = &timeout - } - case "step": - if v != nil { - step, err := unmarshalBasicTaskStepProperties(*v) - if err != nil { - return err - } - tp.Step = step - } - case "trigger": - if v != nil { - var trigger TriggerProperties - err = json.Unmarshal(*v, &trigger) - if err != nil { - return err - } - tp.Trigger = &trigger - } - case "credentials": - if v != nil { - var credentials Credentials - err = json.Unmarshal(*v, &credentials) - if err != nil { - return err - } - tp.Credentials = &credentials - } - } - } - - return nil -} - -// TaskPropertiesUpdateParameters the properties for updating a task. -type TaskPropertiesUpdateParameters struct { - // Status - The current status of task. Possible values include: 'TaskStatusDisabled', 'TaskStatusEnabled' - Status TaskStatus `json:"status,omitempty"` - // Platform - The platform properties against which the run has to happen. - Platform *PlatformUpdateParameters `json:"platform,omitempty"` - // AgentConfiguration - The machine configuration of the run agent. - AgentConfiguration *AgentProperties `json:"agentConfiguration,omitempty"` - // Timeout - Run timeout in seconds. - Timeout *int32 `json:"timeout,omitempty"` - // Step - The properties for updating a task step. - Step BasicTaskStepUpdateParameters `json:"step,omitempty"` - // Trigger - The properties for updating trigger properties. - Trigger *TriggerUpdateParameters `json:"trigger,omitempty"` - // Credentials - The parameters that describes a set of credentials that will be used when this run is invoked. - Credentials *Credentials `json:"credentials,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for TaskPropertiesUpdateParameters struct. -func (tpup *TaskPropertiesUpdateParameters) 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 "status": - if v != nil { - var status TaskStatus - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - tpup.Status = status - } - case "platform": - if v != nil { - var platform PlatformUpdateParameters - err = json.Unmarshal(*v, &platform) - if err != nil { - return err - } - tpup.Platform = &platform - } - case "agentConfiguration": - if v != nil { - var agentConfiguration AgentProperties - err = json.Unmarshal(*v, &agentConfiguration) - if err != nil { - return err - } - tpup.AgentConfiguration = &agentConfiguration - } - case "timeout": - if v != nil { - var timeout int32 - err = json.Unmarshal(*v, &timeout) - if err != nil { - return err - } - tpup.Timeout = &timeout - } - case "step": - if v != nil { - step, err := unmarshalBasicTaskStepUpdateParameters(*v) - if err != nil { - return err - } - tpup.Step = step - } - case "trigger": - if v != nil { - var trigger TriggerUpdateParameters - err = json.Unmarshal(*v, &trigger) - if err != nil { - return err - } - tpup.Trigger = &trigger - } - case "credentials": - if v != nil { - var credentials Credentials - err = json.Unmarshal(*v, &credentials) - if err != nil { - return err - } - tpup.Credentials = &credentials - } - } - } - - return nil -} - -// TaskRunRequest the parameters for a task run request. -type TaskRunRequest struct { - // TaskName - The name of task against which run has to be queued. - TaskName *string `json:"taskName,omitempty"` - // Values - The collection of overridable values that can be passed when running a task. - Values *[]SetValue `json:"values,omitempty"` - // IsArchiveEnabled - The value that indicates whether archiving is enabled for the run or not. - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - // Type - Possible values include: 'TypeRunRequest', 'TypeDockerBuildRequest', 'TypeFileTaskRunRequest', 'TypeTaskRunRequest', 'TypeEncodedTaskRunRequest' - Type Type `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TaskRunRequest. -func (trr TaskRunRequest) MarshalJSON() ([]byte, error) { - trr.Type = TypeTaskRunRequest - objectMap := make(map[string]interface{}) - if trr.TaskName != nil { - objectMap["taskName"] = trr.TaskName - } - if trr.Values != nil { - objectMap["values"] = trr.Values - } - if trr.IsArchiveEnabled != nil { - objectMap["isArchiveEnabled"] = trr.IsArchiveEnabled - } - if trr.Type != "" { - objectMap["type"] = trr.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsDockerBuildRequest() (*DockerBuildRequest, bool) { - return nil, false -} - -// AsFileTaskRunRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsFileTaskRunRequest() (*FileTaskRunRequest, bool) { - return nil, false -} - -// AsTaskRunRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsTaskRunRequest() (*TaskRunRequest, bool) { - return &trr, true -} - -// AsEncodedTaskRunRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsEncodedTaskRunRequest() (*EncodedTaskRunRequest, bool) { - return nil, false -} - -// AsRunRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsRunRequest() (*RunRequest, bool) { - return nil, false -} - -// AsBasicRunRequest is the BasicRunRequest implementation for TaskRunRequest. -func (trr TaskRunRequest) AsBasicRunRequest() (BasicRunRequest, bool) { - return &trr, true -} - -// TasksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type TasksCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(TasksClient) (Task, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *TasksCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for TasksCreateFuture.Result. -func (future *TasksCreateFuture) result(client TasksClient) (t Task, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - t.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.TasksCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent { - t, err = client.CreateResponder(t.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksCreateFuture", "Result", t.Response.Response, "Failure responding to request") - } - } - return -} - -// TasksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type TasksDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(TasksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *TasksDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for TasksDeleteFuture.Result. -func (future *TasksDeleteFuture) result(client TasksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.TasksDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// BasicTaskStepProperties base properties for any task step. -type BasicTaskStepProperties interface { - AsDockerBuildStep() (*DockerBuildStep, bool) - AsFileTaskStep() (*FileTaskStep, bool) - AsEncodedTaskStep() (*EncodedTaskStep, bool) - AsTaskStepProperties() (*TaskStepProperties, bool) -} - -// TaskStepProperties base properties for any task step. -type TaskStepProperties struct { - // BaseImageDependencies - READ-ONLY; List of base image dependencies for a step. - BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeTaskStepProperties', 'TypeDocker', 'TypeFileTask', 'TypeEncodedTask' - Type TypeBasicTaskStepProperties `json:"type,omitempty"` -} - -func unmarshalBasicTaskStepProperties(body []byte) (BasicTaskStepProperties, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["type"] { - case string(TypeDocker): - var dbs DockerBuildStep - err := json.Unmarshal(body, &dbs) - return dbs, err - case string(TypeFileTask): - var fts FileTaskStep - err := json.Unmarshal(body, &fts) - return fts, err - case string(TypeEncodedTask): - var ets EncodedTaskStep - err := json.Unmarshal(body, &ets) - return ets, err - default: - var tsp TaskStepProperties - err := json.Unmarshal(body, &tsp) - return tsp, err - } -} -func unmarshalBasicTaskStepPropertiesArray(body []byte) ([]BasicTaskStepProperties, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - tspArray := make([]BasicTaskStepProperties, len(rawMessages)) - - for index, rawMessage := range rawMessages { - tsp, err := unmarshalBasicTaskStepProperties(*rawMessage) - if err != nil { - return nil, err - } - tspArray[index] = tsp - } - return tspArray, nil -} - -// MarshalJSON is the custom marshaler for TaskStepProperties. -func (tsp TaskStepProperties) MarshalJSON() ([]byte, error) { - tsp.Type = TypeTaskStepProperties - objectMap := make(map[string]interface{}) - if tsp.ContextPath != nil { - objectMap["contextPath"] = tsp.ContextPath - } - if tsp.ContextAccessToken != nil { - objectMap["contextAccessToken"] = tsp.ContextAccessToken - } - if tsp.Type != "" { - objectMap["type"] = tsp.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStep is the BasicTaskStepProperties implementation for TaskStepProperties. -func (tsp TaskStepProperties) AsDockerBuildStep() (*DockerBuildStep, bool) { - return nil, false -} - -// AsFileTaskStep is the BasicTaskStepProperties implementation for TaskStepProperties. -func (tsp TaskStepProperties) AsFileTaskStep() (*FileTaskStep, bool) { - return nil, false -} - -// AsEncodedTaskStep is the BasicTaskStepProperties implementation for TaskStepProperties. -func (tsp TaskStepProperties) AsEncodedTaskStep() (*EncodedTaskStep, bool) { - return nil, false -} - -// AsTaskStepProperties is the BasicTaskStepProperties implementation for TaskStepProperties. -func (tsp TaskStepProperties) AsTaskStepProperties() (*TaskStepProperties, bool) { - return &tsp, true -} - -// AsBasicTaskStepProperties is the BasicTaskStepProperties implementation for TaskStepProperties. -func (tsp TaskStepProperties) AsBasicTaskStepProperties() (BasicTaskStepProperties, bool) { - return &tsp, true -} - -// BasicTaskStepUpdateParameters base properties for updating any task step. -type BasicTaskStepUpdateParameters interface { - AsDockerBuildStepUpdateParameters() (*DockerBuildStepUpdateParameters, bool) - AsFileTaskStepUpdateParameters() (*FileTaskStepUpdateParameters, bool) - AsEncodedTaskStepUpdateParameters() (*EncodedTaskStepUpdateParameters, bool) - AsTaskStepUpdateParameters() (*TaskStepUpdateParameters, bool) -} - -// TaskStepUpdateParameters base properties for updating any task step. -type TaskStepUpdateParameters struct { - // ContextPath - The URL(absolute or relative) of the source context for the task step. - ContextPath *string `json:"contextPath,omitempty"` - // ContextAccessToken - The token (git PAT or SAS token of storage account blob) associated with the context for a step. - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - // Type - Possible values include: 'TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters', 'TypeBasicTaskStepUpdateParametersTypeDocker', 'TypeBasicTaskStepUpdateParametersTypeFileTask', 'TypeBasicTaskStepUpdateParametersTypeEncodedTask' - Type TypeBasicTaskStepUpdateParameters `json:"type,omitempty"` -} - -func unmarshalBasicTaskStepUpdateParameters(body []byte) (BasicTaskStepUpdateParameters, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["type"] { - case string(TypeBasicTaskStepUpdateParametersTypeDocker): - var dbsup DockerBuildStepUpdateParameters - err := json.Unmarshal(body, &dbsup) - return dbsup, err - case string(TypeBasicTaskStepUpdateParametersTypeFileTask): - var ftsup FileTaskStepUpdateParameters - err := json.Unmarshal(body, &ftsup) - return ftsup, err - case string(TypeBasicTaskStepUpdateParametersTypeEncodedTask): - var etsup EncodedTaskStepUpdateParameters - err := json.Unmarshal(body, &etsup) - return etsup, err - default: - var tsup TaskStepUpdateParameters - err := json.Unmarshal(body, &tsup) - return tsup, err - } -} -func unmarshalBasicTaskStepUpdateParametersArray(body []byte) ([]BasicTaskStepUpdateParameters, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - tsupArray := make([]BasicTaskStepUpdateParameters, len(rawMessages)) - - for index, rawMessage := range rawMessages { - tsup, err := unmarshalBasicTaskStepUpdateParameters(*rawMessage) - if err != nil { - return nil, err - } - tsupArray[index] = tsup - } - return tsupArray, nil -} - -// MarshalJSON is the custom marshaler for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) MarshalJSON() ([]byte, error) { - tsup.Type = TypeBasicTaskStepUpdateParametersTypeTaskStepUpdateParameters - objectMap := make(map[string]interface{}) - if tsup.ContextPath != nil { - objectMap["contextPath"] = tsup.ContextPath - } - if tsup.ContextAccessToken != nil { - objectMap["contextAccessToken"] = tsup.ContextAccessToken - } - if tsup.Type != "" { - objectMap["type"] = tsup.Type - } - return json.Marshal(objectMap) -} - -// AsDockerBuildStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) AsDockerBuildStepUpdateParameters() (*DockerBuildStepUpdateParameters, bool) { - return nil, false -} - -// AsFileTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) AsFileTaskStepUpdateParameters() (*FileTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsEncodedTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) AsEncodedTaskStepUpdateParameters() (*EncodedTaskStepUpdateParameters, bool) { - return nil, false -} - -// AsTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) AsTaskStepUpdateParameters() (*TaskStepUpdateParameters, bool) { - return &tsup, true -} - -// AsBasicTaskStepUpdateParameters is the BasicTaskStepUpdateParameters implementation for TaskStepUpdateParameters. -func (tsup TaskStepUpdateParameters) AsBasicTaskStepUpdateParameters() (BasicTaskStepUpdateParameters, bool) { - return &tsup, true -} - -// TasksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type TasksUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(TasksClient) (Task, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *TasksUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for TasksUpdateFuture.Result. -func (future *TasksUpdateFuture) result(client TasksClient) (t Task, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - t.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.TasksUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if t.Response.Response, err = future.GetResult(sender); err == nil && t.Response.Response.StatusCode != http.StatusNoContent { - t, err = client.UpdateResponder(t.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksUpdateFuture", "Result", t.Response.Response, "Failure responding to request") - } - } - return -} - -// TaskUpdateParameters the parameters for updating a task. -type TaskUpdateParameters struct { - // Identity - Identity for the resource. - Identity *IdentityProperties `json:"identity,omitempty"` - // TaskPropertiesUpdateParameters - The properties for updating a task. - *TaskPropertiesUpdateParameters `json:"properties,omitempty"` - // Tags - The ARM resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for TaskUpdateParameters. -func (tup TaskUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tup.Identity != nil { - objectMap["identity"] = tup.Identity - } - if tup.TaskPropertiesUpdateParameters != nil { - objectMap["properties"] = tup.TaskPropertiesUpdateParameters - } - if tup.Tags != nil { - objectMap["tags"] = tup.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TaskUpdateParameters struct. -func (tup *TaskUpdateParameters) 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 "identity": - if v != nil { - var identity IdentityProperties - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - tup.Identity = &identity - } - case "properties": - if v != nil { - var taskPropertiesUpdateParameters TaskPropertiesUpdateParameters - err = json.Unmarshal(*v, &taskPropertiesUpdateParameters) - if err != nil { - return err - } - tup.TaskPropertiesUpdateParameters = &taskPropertiesUpdateParameters - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - tup.Tags = tags - } - } - } - - return nil -} - -// TimerTrigger the properties of a timer trigger. -type TimerTrigger struct { - // Schedule - The CRON expression for the task schedule - Schedule *string `json:"schedule,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// TimerTriggerDescriptor ... -type TimerTriggerDescriptor struct { - // TimerTriggerName - The timer trigger name that caused the run. - TimerTriggerName *string `json:"timerTriggerName,omitempty"` - // ScheduleOccurrence - The occurrence that triggered the run. - ScheduleOccurrence *string `json:"scheduleOccurrence,omitempty"` -} - -// TimerTriggerUpdateParameters the properties for updating a timer trigger. -type TimerTriggerUpdateParameters struct { - // Schedule - The CRON expression for the task schedule - Schedule *string `json:"schedule,omitempty"` - // Status - The current status of trigger. Possible values include: 'TriggerStatusDisabled', 'TriggerStatusEnabled' - Status TriggerStatus `json:"status,omitempty"` - // Name - The name of the trigger. - Name *string `json:"name,omitempty"` -} - -// TriggerProperties the properties of a trigger. -type TriggerProperties struct { - // TimerTriggers - The collection of timer triggers. - TimerTriggers *[]TimerTrigger `json:"timerTriggers,omitempty"` - // SourceTriggers - The collection of triggers based on source code repository. - SourceTriggers *[]SourceTrigger `json:"sourceTriggers,omitempty"` - // BaseImageTrigger - The trigger based on base image dependencies. - BaseImageTrigger *BaseImageTrigger `json:"baseImageTrigger,omitempty"` -} - -// TriggerUpdateParameters the properties for updating triggers. -type TriggerUpdateParameters struct { - // TimerTriggers - The collection of timer triggers. - TimerTriggers *[]TimerTriggerUpdateParameters `json:"timerTriggers,omitempty"` - // SourceTriggers - The collection of triggers based on source code repository. - SourceTriggers *[]SourceTriggerUpdateParameters `json:"sourceTriggers,omitempty"` - // BaseImageTrigger - The trigger based on base image dependencies. - BaseImageTrigger *BaseImageTriggerUpdateParameters `json:"baseImageTrigger,omitempty"` -} - -// TrustPolicy the content trust policy for a container registry. -type TrustPolicy struct { - // Type - The type of trust policy. Possible values include: 'Notary' - Type TrustPolicyType `json:"type,omitempty"` - // Status - The value that indicates whether the policy is enabled or not. Possible values include: 'Enabled', 'Disabled' - Status PolicyStatus `json:"status,omitempty"` -} - -// UserIdentityProperties ... -type UserIdentityProperties struct { - // PrincipalID - The principal id of user assigned identity. - PrincipalID *string `json:"principalId,omitempty"` - // ClientID - The client id of user assigned identity. - ClientID *string `json:"clientId,omitempty"` -} - -// VirtualNetworkRule virtual network rule. -type VirtualNetworkRule struct { - // Action - The action of virtual network rule. Possible values include: 'Allow' - Action Action `json:"action,omitempty"` - // VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - VirtualNetworkResourceID *string `json:"id,omitempty"` -} - -// Webhook an object that represents a webhook for a container registry. -type Webhook struct { - autorest.Response `json:"-"` - // WebhookProperties - The properties of the webhook. - *WebhookProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource ID. - 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. - Type *string `json:"type,omitempty"` - // Location - The location of the resource. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // Tags - The tags of the resource. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Webhook. -func (w Webhook) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if w.WebhookProperties != nil { - objectMap["properties"] = w.WebhookProperties - } - if w.Location != nil { - objectMap["location"] = w.Location - } - if w.Tags != nil { - objectMap["tags"] = w.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Webhook struct. -func (w *Webhook) 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 webhookProperties WebhookProperties - err = json.Unmarshal(*v, &webhookProperties) - if err != nil { - return err - } - w.WebhookProperties = &webhookProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - w.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - w.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - w.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - w.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - w.Tags = tags - } - } - } - - return nil -} - -// WebhookCreateParameters the parameters for creating a webhook. -type WebhookCreateParameters struct { - // Tags - The tags for the webhook. - Tags map[string]*string `json:"tags"` - // Location - The location of the webhook. This cannot be changed after the resource is created. - Location *string `json:"location,omitempty"` - // WebhookPropertiesCreateParameters - The properties that the webhook will be created with. - *WebhookPropertiesCreateParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebhookCreateParameters. -func (wcp WebhookCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wcp.Tags != nil { - objectMap["tags"] = wcp.Tags - } - if wcp.Location != nil { - objectMap["location"] = wcp.Location - } - if wcp.WebhookPropertiesCreateParameters != nil { - objectMap["properties"] = wcp.WebhookPropertiesCreateParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WebhookCreateParameters struct. -func (wcp *WebhookCreateParameters) 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 "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - wcp.Tags = tags - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - wcp.Location = &location - } - case "properties": - if v != nil { - var webhookPropertiesCreateParameters WebhookPropertiesCreateParameters - err = json.Unmarshal(*v, &webhookPropertiesCreateParameters) - if err != nil { - return err - } - wcp.WebhookPropertiesCreateParameters = &webhookPropertiesCreateParameters - } - } - } - - return nil -} - -// WebhookListResult the result of a request to list webhooks for a container registry. -type WebhookListResult struct { - autorest.Response `json:"-"` - // Value - The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of webhooks. - Value *[]Webhook `json:"value,omitempty"` - // NextLink - The URI that can be used to request the next list of webhooks. - NextLink *string `json:"nextLink,omitempty"` -} - -// WebhookListResultIterator provides access to a complete listing of Webhook values. -type WebhookListResultIterator struct { - i int - page WebhookListResultPage -} - -// 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 *WebhookListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultIterator.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 *WebhookListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WebhookListResultIterator) 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 WebhookListResultIterator) Response() WebhookListResult { - 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 WebhookListResultIterator) Value() Webhook { - if !iter.page.NotDone() { - return Webhook{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WebhookListResultIterator type. -func NewWebhookListResultIterator(page WebhookListResultPage) WebhookListResultIterator { - return WebhookListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wlr WebhookListResult) IsEmpty() bool { - return wlr.Value == nil || len(*wlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wlr WebhookListResult) hasNextLink() bool { - return wlr.NextLink != nil && len(*wlr.NextLink) != 0 -} - -// webhookListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wlr WebhookListResult) webhookListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wlr.NextLink))) -} - -// WebhookListResultPage contains a page of Webhook values. -type WebhookListResultPage struct { - fn func(context.Context, WebhookListResult) (WebhookListResult, error) - wlr WebhookListResult -} - -// 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 *WebhookListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultPage.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.wlr) - if err != nil { - return err - } - page.wlr = 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 *WebhookListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WebhookListResultPage) NotDone() bool { - return !page.wlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WebhookListResultPage) Response() WebhookListResult { - return page.wlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WebhookListResultPage) Values() []Webhook { - if page.wlr.IsEmpty() { - return nil - } - return *page.wlr.Value -} - -// Creates a new instance of the WebhookListResultPage type. -func NewWebhookListResultPage(cur WebhookListResult, getNextPage func(context.Context, WebhookListResult) (WebhookListResult, error)) WebhookListResultPage { - return WebhookListResultPage{ - fn: getNextPage, - wlr: cur, - } -} - -// WebhookProperties the properties of a webhook. -type WebhookProperties struct { - // Status - The status of the webhook at the time the operation was called. Possible values include: 'WebhookStatusEnabled', 'WebhookStatusDisabled' - Status WebhookStatus `json:"status,omitempty"` - // Scope - The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - Scope *string `json:"scope,omitempty"` - // Actions - The list of actions that trigger the webhook to post notifications. - Actions *[]WebhookAction `json:"actions,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the webhook at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebhookProperties. -func (wp WebhookProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wp.Status != "" { - objectMap["status"] = wp.Status - } - if wp.Scope != nil { - objectMap["scope"] = wp.Scope - } - if wp.Actions != nil { - objectMap["actions"] = wp.Actions - } - return json.Marshal(objectMap) -} - -// WebhookPropertiesCreateParameters the parameters for creating the properties of a webhook. -type WebhookPropertiesCreateParameters struct { - // ServiceURI - The service URI for the webhook to post notifications. - ServiceURI *string `json:"serviceUri,omitempty"` - // CustomHeaders - Custom headers that will be added to the webhook notifications. - CustomHeaders map[string]*string `json:"customHeaders"` - // Status - The status of the webhook at the time the operation was called. Possible values include: 'WebhookStatusEnabled', 'WebhookStatusDisabled' - Status WebhookStatus `json:"status,omitempty"` - // Scope - The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - Scope *string `json:"scope,omitempty"` - // Actions - The list of actions that trigger the webhook to post notifications. - Actions *[]WebhookAction `json:"actions,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebhookPropertiesCreateParameters. -func (wpcp WebhookPropertiesCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wpcp.ServiceURI != nil { - objectMap["serviceUri"] = wpcp.ServiceURI - } - if wpcp.CustomHeaders != nil { - objectMap["customHeaders"] = wpcp.CustomHeaders - } - if wpcp.Status != "" { - objectMap["status"] = wpcp.Status - } - if wpcp.Scope != nil { - objectMap["scope"] = wpcp.Scope - } - if wpcp.Actions != nil { - objectMap["actions"] = wpcp.Actions - } - return json.Marshal(objectMap) -} - -// WebhookPropertiesUpdateParameters the parameters for updating the properties of a webhook. -type WebhookPropertiesUpdateParameters struct { - // ServiceURI - The service URI for the webhook to post notifications. - ServiceURI *string `json:"serviceUri,omitempty"` - // CustomHeaders - Custom headers that will be added to the webhook notifications. - CustomHeaders map[string]*string `json:"customHeaders"` - // Status - The status of the webhook at the time the operation was called. Possible values include: 'WebhookStatusEnabled', 'WebhookStatusDisabled' - Status WebhookStatus `json:"status,omitempty"` - // Scope - The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - Scope *string `json:"scope,omitempty"` - // Actions - The list of actions that trigger the webhook to post notifications. - Actions *[]WebhookAction `json:"actions,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebhookPropertiesUpdateParameters. -func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wpup.ServiceURI != nil { - objectMap["serviceUri"] = wpup.ServiceURI - } - if wpup.CustomHeaders != nil { - objectMap["customHeaders"] = wpup.CustomHeaders - } - if wpup.Status != "" { - objectMap["status"] = wpup.Status - } - if wpup.Scope != nil { - objectMap["scope"] = wpup.Scope - } - if wpup.Actions != nil { - objectMap["actions"] = wpup.Actions - } - return json.Marshal(objectMap) -} - -// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WebhooksCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WebhooksClient) (Webhook, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WebhooksCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WebhooksCreateFuture.Result. -func (future *WebhooksCreateFuture) result(client WebhooksClient) (w Webhook, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - w.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { - w, err = client.CreateResponder(w.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksCreateFuture", "Result", w.Response.Response, "Failure responding to request") - } - } - return -} - -// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WebhooksDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WebhooksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WebhooksDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WebhooksDeleteFuture.Result. -func (future *WebhooksDeleteFuture) result(client WebhooksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WebhooksUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WebhooksClient) (Webhook, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WebhooksUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WebhooksUpdateFuture.Result. -func (future *WebhooksUpdateFuture) result(client WebhooksClient) (w Webhook, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - w.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent { - w, err = client.UpdateResponder(w.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksUpdateFuture", "Result", w.Response.Response, "Failure responding to request") - } - } - return -} - -// WebhookUpdateParameters the parameters for updating a webhook. -type WebhookUpdateParameters struct { - // Tags - The tags for the webhook. - Tags map[string]*string `json:"tags"` - // WebhookPropertiesUpdateParameters - The properties that the webhook will be updated with. - *WebhookPropertiesUpdateParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebhookUpdateParameters. -func (wup WebhookUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wup.Tags != nil { - objectMap["tags"] = wup.Tags - } - if wup.WebhookPropertiesUpdateParameters != nil { - objectMap["properties"] = wup.WebhookPropertiesUpdateParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WebhookUpdateParameters struct. -func (wup *WebhookUpdateParameters) 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 "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - wup.Tags = tags - } - case "properties": - if v != nil { - var webhookPropertiesUpdateParameters WebhookPropertiesUpdateParameters - err = json.Unmarshal(*v, &webhookPropertiesUpdateParameters) - if err != nil { - return err - } - wup.WebhookPropertiesUpdateParameters = &webhookPropertiesUpdateParameters - } - } - } - - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go deleted file mode 100644 index 86a7947a8b6b..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go +++ /dev/null @@ -1,140 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the client for the Operations methods of the Containerregistry service. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available Azure Container Registry REST API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "List", resp, "Failure sending request") - return - } - - result.olr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "List", resp, "Failure responding to request") - return - } - if result.olr.hasNextLink() && result.olr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.ContainerRegistry/operations"), - 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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 OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "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, "containerregistry.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go deleted file mode 100644 index 48d1cb5de77e..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go +++ /dev/null @@ -1,1255 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// RegistriesClient is the client for the Registries methods of the Containerregistry service. -type RegistriesClient struct { - BaseClient -} - -// NewRegistriesClient creates an instance of the RegistriesClient client. -func NewRegistriesClient(subscriptionID string) RegistriesClient { - return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient 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 NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { - return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckNameAvailability checks whether the container registry name is available for use. The name must contain only -// alphanumeric characters, be globally unique, and between 5 and 50 characters in length. -// Parameters: -// registryNameCheckRequest - the object containing information for the availability request. -func (client RegistriesClient) CheckNameAvailability(ctx context.Context, registryNameCheckRequest RegistryNameCheckRequest) (result RegistryNameStatus, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.CheckNameAvailability") - 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: registryNameCheckRequest, - Constraints: []validation.Constraint{{Target: "registryNameCheckRequest.Name", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "registryNameCheckRequest.Name", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryNameCheckRequest.Name", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryNameCheckRequest.Name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}, - }}, - {Target: "registryNameCheckRequest.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "CheckNameAvailability", err.Error()) - } - - req, err := client.CheckNameAvailabilityPreparer(ctx, registryNameCheckRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "CheckNameAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "CheckNameAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "CheckNameAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client RegistriesClient) CheckNameAvailabilityPreparer(ctx context.Context, registryNameCheckRequest RegistryNameCheckRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability", pathParameters), - autorest.WithJSON(registryNameCheckRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always -// closes the http.Response Body. -func (client RegistriesClient) CheckNameAvailabilityResponder(resp *http.Response) (result RegistryNameStatus, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Create creates a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// registry - the parameters for creating a container registry. -func (client RegistriesClient) Create(ctx context.Context, resourceGroupName string, registryName string, registry Registry) (result RegistriesCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: registry, - Constraints: []validation.Constraint{{Target: "registry.Sku", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "registry.RegistryProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "registry.RegistryProperties.StorageAccount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "registry.RegistryProperties.StorageAccount.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, registryName, registry) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroupName string, registryName string, registry Registry) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}", pathParameters), - autorest.WithJSON(registry), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client RegistriesClient) CreateResponder(resp *http.Response) (result Registry, 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 deletes a container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client RegistriesClient) Delete(ctx context.Context, resourceGroupName string, registryName string) (result RegistriesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}", 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 RegistriesClient) DeleteSender(req *http.Request) (future RegistriesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RegistriesClient) 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 the properties of the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string) (result Registry, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RegistriesClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}", 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 RegistriesClient) 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 RegistriesClient) GetResponder(resp *http.Response) (result Registry, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetBuildSourceUploadURL get the upload location for the user to be able to upload the source. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client RegistriesClient) GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result SourceUploadDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.GetBuildSourceUploadURL") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "GetBuildSourceUploadURL", err.Error()) - } - - req, err := client.GetBuildSourceUploadURLPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "GetBuildSourceUploadURL", nil, "Failure preparing request") - return - } - - resp, err := client.GetBuildSourceUploadURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "GetBuildSourceUploadURL", resp, "Failure sending request") - return - } - - result, err = client.GetBuildSourceUploadURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "GetBuildSourceUploadURL", resp, "Failure responding to request") - return - } - - return -} - -// GetBuildSourceUploadURLPreparer prepares the GetBuildSourceUploadURL request. -func (client RegistriesClient) GetBuildSourceUploadURLPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetBuildSourceUploadURLSender sends the GetBuildSourceUploadURL request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) GetBuildSourceUploadURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetBuildSourceUploadURLResponder handles the response to the GetBuildSourceUploadURL request. The method always -// closes the http.Response Body. -func (client RegistriesClient) GetBuildSourceUploadURLResponder(resp *http.Response) (result SourceUploadDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ImportImage copies an image to this container registry from the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// parameters - the parameters specifying the image to copy and the source container registry. -func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters ImportImageParameters) (result RegistriesImportImageFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ImportImage") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Source.Credentials", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Source.Credentials.Password", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error()) - } - - req, err := client.ImportImagePreparer(ctx, resourceGroupName, registryName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ImportImage", nil, "Failure preparing request") - return - } - - result, err = client.ImportImageSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ImportImage", result.Response(), "Failure sending request") - return - } - - return -} - -// ImportImagePreparer prepares the ImportImage request. -func (client RegistriesClient) ImportImagePreparer(ctx context.Context, resourceGroupName string, registryName string, parameters ImportImageParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ImportImageSender sends the ImportImage request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) ImportImageSender(req *http.Request) (future RegistriesImportImageFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ImportImageResponder handles the response to the ImportImage request. The method always -// closes the http.Response Body. -func (client RegistriesClient) ImportImageResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// List lists all the container registries under the specified subscription. -func (client RegistriesClient) List(ctx context.Context) (result RegistryListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.List") - defer func() { - sc := -1 - if result.rlr.Response.Response != nil { - sc = result.rlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "List", resp, "Failure sending request") - return - } - - result.rlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "List", resp, "Failure responding to request") - return - } - if result.rlr.hasNextLink() && result.rlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client RegistriesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries", 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 RegistriesClient) 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 RegistriesClient) ListResponder(resp *http.Response) (result RegistryListResult, 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 RegistriesClient) listNextResults(ctx context.Context, lastResults RegistryListResult) (result RegistryListResult, err error) { - req, err := lastResults.registryListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "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, "containerregistry.RegistriesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegistriesClient) ListComplete(ctx context.Context) (result RegistryListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.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) - return -} - -// ListByResourceGroup lists all the container registries under the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -func (client RegistriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RegistryListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.rlr.Response.Response != nil { - sc = result.rlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "ListByResourceGroup", err.Error()) - } - - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.rlr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.rlr.hasNextLink() && result.rlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client RegistriesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client RegistriesClient) ListByResourceGroupResponder(resp *http.Response) (result RegistryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client RegistriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults RegistryListResult) (result RegistryListResult, err error) { - req, err := lastResults.registryListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegistriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RegistryListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListCredentials lists the login credentials for the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client RegistriesClient) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result RegistryListCredentialsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListCredentials") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "ListCredentials", err.Error()) - } - - req, err := client.ListCredentialsPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListCredentials", nil, "Failure preparing request") - return - } - - resp, err := client.ListCredentialsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListCredentials", resp, "Failure sending request") - return - } - - result, err = client.ListCredentialsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListCredentials", resp, "Failure responding to request") - return - } - - return -} - -// ListCredentialsPreparer prepares the ListCredentials request. -func (client RegistriesClient) ListCredentialsPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCredentialsSender sends the ListCredentials request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) ListCredentialsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCredentialsResponder handles the response to the ListCredentials request. The method always -// closes the http.Response Body. -func (client RegistriesClient) ListCredentialsResponder(resp *http.Response) (result RegistryListCredentialsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListUsages gets the quota usages for the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client RegistriesClient) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result RegistryUsageListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListUsages") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "ListUsages", err.Error()) - } - - req, err := client.ListUsagesPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", nil, "Failure preparing request") - return - } - - resp, err := client.ListUsagesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", resp, "Failure sending request") - return - } - - result, err = client.ListUsagesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", resp, "Failure responding to request") - return - } - - return -} - -// ListUsagesPreparer prepares the ListUsages request. -func (client RegistriesClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}/listUsages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListUsagesSender sends the ListUsages request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) ListUsagesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListUsagesResponder handles the response to the ListUsages request. The method always -// closes the http.Response Body. -func (client RegistriesClient) ListUsagesResponder(resp *http.Response) (result RegistryUsageListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// RegenerateCredential regenerates one of the login credentials for the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// regenerateCredentialParameters - specifies name of the password which should be regenerated -- password or -// password2. -func (client RegistriesClient) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters RegenerateCredentialParameters) (result RegistryListCredentialsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.RegenerateCredential") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "RegenerateCredential", err.Error()) - } - - req, err := client.RegenerateCredentialPreparer(ctx, resourceGroupName, registryName, regenerateCredentialParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "RegenerateCredential", nil, "Failure preparing request") - return - } - - resp, err := client.RegenerateCredentialSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "RegenerateCredential", resp, "Failure sending request") - return - } - - result, err = client.RegenerateCredentialResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "RegenerateCredential", resp, "Failure responding to request") - return - } - - return -} - -// RegenerateCredentialPreparer prepares the RegenerateCredential request. -func (client RegistriesClient) RegenerateCredentialPreparer(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters RegenerateCredentialParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential", pathParameters), - autorest.WithJSON(regenerateCredentialParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RegenerateCredentialSender sends the RegenerateCredential request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) RegenerateCredentialSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RegenerateCredentialResponder handles the response to the RegenerateCredential request. The method always -// closes the http.Response Body. -func (client RegistriesClient) RegenerateCredentialResponder(resp *http.Response) (result RegistryListCredentialsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ScheduleRun schedules a new run based on the request parameters and add it to the run queue. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// runRequest - the parameters of a run that needs to scheduled. -func (client RegistriesClient) ScheduleRun(ctx context.Context, resourceGroupName string, registryName string, runRequest BasicRunRequest) (result RegistriesScheduleRunFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ScheduleRun") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "ScheduleRun", err.Error()) - } - - req, err := client.ScheduleRunPreparer(ctx, resourceGroupName, registryName, runRequest) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ScheduleRun", nil, "Failure preparing request") - return - } - - result, err = client.ScheduleRunSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ScheduleRun", result.Response(), "Failure sending request") - return - } - - return -} - -// ScheduleRunPreparer prepares the ScheduleRun request. -func (client RegistriesClient) ScheduleRunPreparer(ctx context.Context, resourceGroupName string, registryName string, runRequest BasicRunRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun", pathParameters), - autorest.WithJSON(runRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ScheduleRunSender sends the ScheduleRun request. The method will close the -// http.Response Body if it receives an error. -func (client RegistriesClient) ScheduleRunSender(req *http.Request) (future RegistriesScheduleRunFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ScheduleRunResponder handles the response to the ScheduleRun request. The method always -// closes the http.Response Body. -func (client RegistriesClient) ScheduleRunResponder(resp *http.Response) (result Run, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// registryUpdateParameters - the parameters for updating a container registry. -func (client RegistriesClient) Update(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters) (result RegistriesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RegistriesClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, registryUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}", pathParameters), - autorest.WithJSON(registryUpdateParameters), - 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 RegistriesClient) UpdateSender(req *http.Request) (future RegistriesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RegistriesClient) UpdateResponder(resp *http.Response) (result Registry, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go deleted file mode 100644 index ef41cb806bd0..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go +++ /dev/null @@ -1,542 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ReplicationsClient is the client for the Replications methods of the Containerregistry service. -type ReplicationsClient struct { - BaseClient -} - -// NewReplicationsClient creates an instance of the ReplicationsClient client. -func NewReplicationsClient(subscriptionID string) ReplicationsClient { - return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient 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 NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { - return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a replication for a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// replicationName - the name of the replication. -// replication - the parameters for creating a replication. -func (client ReplicationsClient) Create(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replication Replication) (result ReplicationsCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: replicationName, - Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.ReplicationsClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, registryName, replicationName, replication) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replication Replication) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "replicationName": autorest.Encode("path", replicationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), - autorest.WithJSON(replication), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client ReplicationsClient) CreateSender(req *http.Request) (future ReplicationsCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client ReplicationsClient) CreateResponder(resp *http.Response) (result Replication, 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 deletes a replication from a container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// replicationName - the name of the replication. -func (client ReplicationsClient) Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result ReplicationsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: replicationName, - Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.ReplicationsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, registryName, replicationName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "replicationName": autorest.Encode("path", replicationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/replications/{replicationName}", 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 ReplicationsClient) DeleteSender(req *http.Request) (future ReplicationsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ReplicationsClient) 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 the properties of the specified replication. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// replicationName - the name of the replication. -func (client ReplicationsClient) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result Replication, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: replicationName, - Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.ReplicationsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, registryName, replicationName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ReplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "replicationName": autorest.Encode("path", replicationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}/replications/{replicationName}", 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 ReplicationsClient) 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 ReplicationsClient) GetResponder(resp *http.Response) (result Replication, 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 the replications for the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client ReplicationsClient) List(ctx context.Context, resourceGroupName string, registryName string) (result ReplicationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.List") - defer func() { - sc := -1 - if result.rlr.Response.Response != nil { - sc = result.rlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.ReplicationsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure sending request") - return - } - - result.rlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure responding to request") - return - } - if result.rlr.hasNextLink() && result.rlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ReplicationsClient) ListPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}/replications", 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 ReplicationsClient) 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 ReplicationsClient) ListResponder(resp *http.Response) (result ReplicationListResult, 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 ReplicationsClient) listNextResults(ctx context.Context, lastResults ReplicationListResult) (result ReplicationListResult, err error) { - req, err := lastResults.replicationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "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, "containerregistry.ReplicationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReplicationsClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result ReplicationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.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, registryName) - return -} - -// Update updates a replication for a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// replicationName - the name of the replication. -// replicationUpdateParameters - the parameters for updating a replication. -func (client ReplicationsClient) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters) (result ReplicationsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: replicationName, - Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.ReplicationsClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, replicationName, replicationUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "replicationName": autorest.Encode("path", replicationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), - autorest.WithJSON(replicationUpdateParameters), - 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 ReplicationsClient) UpdateSender(req *http.Request) (future ReplicationsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ReplicationsClient) UpdateResponder(resp *http.Response) (result Replication, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go deleted file mode 100644 index 3738750dc5ee..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go +++ /dev/null @@ -1,529 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// RunsClient is the client for the Runs methods of the Containerregistry service. -type RunsClient struct { - BaseClient -} - -// NewRunsClient creates an instance of the RunsClient client. -func NewRunsClient(subscriptionID string) RunsClient { - return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRunsClientWithBaseURI creates an instance of the RunsClient 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 NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient { - return RunsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Cancel cancel an existing run. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// runID - the run ID. -func (client RunsClient) Cancel(ctx context.Context, resourceGroupName string, registryName string, runID string) (result RunsCancelFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.Cancel") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RunsClient", "Cancel", err.Error()) - } - - req, err := client.CancelPreparer(ctx, resourceGroupName, registryName, runID) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", nil, "Failure preparing request") - return - } - - result, err = client.CancelSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", result.Response(), "Failure sending request") - return - } - - return -} - -// CancelPreparer prepares the Cancel request. -func (client RunsClient) CancelPreparer(ctx context.Context, resourceGroupName string, registryName string, runID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runId": autorest.Encode("path", runID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSender sends the Cancel request. The method will close the -// http.Response Body if it receives an error. -func (client RunsClient) CancelSender(req *http.Request) (future RunsCancelFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CancelResponder handles the response to the Cancel request. The method always -// closes the http.Response Body. -func (client RunsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the detailed information for a given run. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// runID - the run ID. -func (client RunsClient) Get(ctx context.Context, resourceGroupName string, registryName string, runID string) (result Run, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RunsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, registryName, runID) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RunsClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string, runID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runId": autorest.Encode("path", runID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/runs/{runId}", 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 RunsClient) 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 RunsClient) GetResponder(resp *http.Response) (result Run, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetLogSasURL gets a link to download the run logs. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// runID - the run ID. -func (client RunsClient) GetLogSasURL(ctx context.Context, resourceGroupName string, registryName string, runID string) (result RunGetLogResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.GetLogSasURL") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RunsClient", "GetLogSasURL", err.Error()) - } - - req, err := client.GetLogSasURLPreparer(ctx, resourceGroupName, registryName, runID) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "GetLogSasURL", nil, "Failure preparing request") - return - } - - resp, err := client.GetLogSasURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "GetLogSasURL", resp, "Failure sending request") - return - } - - result, err = client.GetLogSasURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "GetLogSasURL", resp, "Failure responding to request") - return - } - - return -} - -// GetLogSasURLPreparer prepares the GetLogSasURL request. -func (client RunsClient) GetLogSasURLPreparer(ctx context.Context, resourceGroupName string, registryName string, runID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runId": autorest.Encode("path", runID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetLogSasURLSender sends the GetLogSasURL request. The method will close the -// http.Response Body if it receives an error. -func (client RunsClient) GetLogSasURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetLogSasURLResponder handles the response to the GetLogSasURL request. The method always -// closes the http.Response Body. -func (client RunsClient) GetLogSasURLResponder(resp *http.Response) (result RunGetLogResult, 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 the runs for a registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// filter - the runs filter to apply on the operation. Arithmetic operators are not supported. The allowed -// string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. -// top - $top is supported for get list of runs, which limits the maximum number of runs to return. -func (client RunsClient) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result RunListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.List") - defer func() { - sc := -1 - if result.rlr.Response.Response != nil { - sc = result.rlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RunsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, registryName, filter, top) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "List", resp, "Failure sending request") - return - } - - result.rlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "List", resp, "Failure responding to request") - return - } - if result.rlr.hasNextLink() && result.rlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client RunsClient) ListPreparer(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs", 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 RunsClient) 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 RunsClient) ListResponder(resp *http.Response) (result RunListResult, 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 RunsClient) listNextResults(ctx context.Context, lastResults RunListResult) (result RunListResult, err error) { - req, err := lastResults.runListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.RunsClient", "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, "containerregistry.RunsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RunsClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result RunListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.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, registryName, filter, top) - return -} - -// Update patch the run properties. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// runID - the run ID. -// runUpdateParameters - the run update properties. -func (client RunsClient) Update(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters RunUpdateParameters) (result RunsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RunsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.RunsClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, runID, runUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RunsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters RunUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runId": autorest.Encode("path", runID), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/runs/{runId}", pathParameters), - autorest.WithJSON(runUpdateParameters), - 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 RunsClient) UpdateSender(req *http.Request) (future RunsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RunsClient) UpdateResponder(resp *http.Response) (result Run, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go deleted file mode 100644 index 84ed49bc8f46..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go +++ /dev/null @@ -1,646 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// TasksClient is the client for the Tasks methods of the Containerregistry service. -type TasksClient struct { - BaseClient -} - -// NewTasksClient creates an instance of the TasksClient client. -func NewTasksClient(subscriptionID string) TasksClient { - return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTasksClientWithBaseURI creates an instance of the TasksClient 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 NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { - return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a task for a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// taskName - the name of the container registry task. -// taskCreateParameters - the parameters for creating a task. -func (client TasksClient) Create(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskCreateParameters Task) (result TasksCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: taskName, - Constraints: []validation.Constraint{{Target: "taskName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "taskName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "taskName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-_]*$`, Chain: nil}}}, - {TargetValue: taskCreateParameters, - Constraints: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, - }}, - {Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Trigger.BaseImageTrigger", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Trigger.BaseImageTrigger.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, registryName, taskName, taskCreateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client TasksClient) CreatePreparer(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskCreateParameters Task) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "taskName": autorest.Encode("path", taskName), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/tasks/{taskName}", pathParameters), - autorest.WithJSON(taskCreateParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client TasksClient) CreateSender(req *http.Request) (future TasksCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client TasksClient) CreateResponder(resp *http.Response) (result Task, 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 deletes a specified task. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// taskName - the name of the container registry task. -func (client TasksClient) Delete(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result TasksDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: taskName, - Constraints: []validation.Constraint{{Target: "taskName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "taskName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "taskName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-_]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, registryName, taskName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client TasksClient) DeletePreparer(ctx context.Context, resourceGroupName string, registryName string, taskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "taskName": autorest.Encode("path", taskName), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/tasks/{taskName}", 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 TasksClient) DeleteSender(req *http.Request) (future TasksDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client TasksClient) 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 get the properties of a specified task. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// taskName - the name of the container registry task. -func (client TasksClient) Get(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result Task, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: taskName, - Constraints: []validation.Constraint{{Target: "taskName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "taskName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "taskName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-_]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, registryName, taskName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client TasksClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string, taskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "taskName": autorest.Encode("path", taskName), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/tasks/{taskName}", 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 TasksClient) 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 TasksClient) GetResponder(resp *http.Response) (result Task, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetDetails returns a task with extended information that includes all secrets. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// taskName - the name of the container registry task. -func (client TasksClient) GetDetails(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result Task, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.GetDetails") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: taskName, - Constraints: []validation.Constraint{{Target: "taskName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "taskName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "taskName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-_]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "GetDetails", err.Error()) - } - - req, err := client.GetDetailsPreparer(ctx, resourceGroupName, registryName, taskName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "GetDetails", nil, "Failure preparing request") - return - } - - resp, err := client.GetDetailsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "GetDetails", resp, "Failure sending request") - return - } - - result, err = client.GetDetailsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "GetDetails", resp, "Failure responding to request") - return - } - - return -} - -// GetDetailsPreparer prepares the GetDetails request. -func (client TasksClient) GetDetailsPreparer(ctx context.Context, resourceGroupName string, registryName string, taskName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "taskName": autorest.Encode("path", taskName), - } - - const APIVersion = "2019-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}/listDetails", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetDetailsSender sends the GetDetails request. The method will close the -// http.Response Body if it receives an error. -func (client TasksClient) GetDetailsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetDetailsResponder handles the response to the GetDetails request. The method always -// closes the http.Response Body. -func (client TasksClient) GetDetailsResponder(resp *http.Response) (result Task, 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 the tasks for a specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client TasksClient) List(ctx context.Context, resourceGroupName string, registryName string) (result TaskListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.List") - defer func() { - sc := -1 - if result.tlr.Response.Response != nil { - sc = result.tlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.tlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "List", resp, "Failure sending request") - return - } - - result.tlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "List", resp, "Failure responding to request") - return - } - if result.tlr.hasNextLink() && result.tlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client TasksClient) ListPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/tasks", 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 TasksClient) 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 TasksClient) ListResponder(resp *http.Response) (result TaskListResult, 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 TasksClient) listNextResults(ctx context.Context, lastResults TaskListResult) (result TaskListResult, err error) { - req, err := lastResults.taskListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.TasksClient", "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, "containerregistry.TasksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client TasksClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result TaskListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.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, registryName) - return -} - -// Update updates a task with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// taskName - the name of the container registry task. -// taskUpdateParameters - the parameters for updating a task. -func (client TasksClient) Update(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters TaskUpdateParameters) (result TasksUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: taskName, - Constraints: []validation.Constraint{{Target: "taskName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "taskName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "taskName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-_]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.TasksClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, taskName, taskUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client TasksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters TaskUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "taskName": autorest.Encode("path", taskName), - } - - const APIVersion = "2019-04-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.ContainerRegistry/registries/{registryName}/tasks/{taskName}", pathParameters), - autorest.WithJSON(taskUpdateParameters), - 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 TasksClient) UpdateSender(req *http.Request) (future TasksUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client TasksClient) UpdateResponder(resp *http.Response) (result Task, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go deleted file mode 100644 index fb255e3b7482..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package containerregistry - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " containerregistry/2019-05-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go deleted file mode 100644 index 1c520279eb92..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go +++ /dev/null @@ -1,866 +0,0 @@ -package containerregistry - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// WebhooksClient is the client for the Webhooks methods of the Containerregistry service. -type WebhooksClient struct { - BaseClient -} - -// NewWebhooksClient creates an instance of the WebhooksClient client. -func NewWebhooksClient(subscriptionID string) WebhooksClient { - return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient 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 NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { - return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a webhook for a container registry with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -// webhookCreateParameters - the parameters for creating a webhook. -func (client WebhooksClient) Create(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters) (result WebhooksCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookCreateParameters, - Constraints: []validation.Constraint{{Target: "webhookCreateParameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "webhookCreateParameters.WebhookPropertiesCreateParameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "webhookCreateParameters.WebhookPropertiesCreateParameters.ServiceURI", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "webhookCreateParameters.WebhookPropertiesCreateParameters.Actions", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, registryName, webhookName, webhookCreateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), - autorest.WithJSON(webhookCreateParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client WebhooksClient) CreateResponder(resp *http.Response) (result Webhook, 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 deletes a webhook from a container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -func (client WebhooksClient) Delete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result WebhooksDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, registryName, webhookName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", 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 WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client WebhooksClient) 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 the properties of the specified webhook. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -func (client WebhooksClient) Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result Webhook, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, registryName, webhookName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WebhooksClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", 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 WebhooksClient) 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 WebhooksClient) GetResponder(resp *http.Response) (result Webhook, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetCallbackConfig gets the configuration of service URI and custom headers for the webhook. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -func (client WebhooksClient) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result CallbackConfig, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.GetCallbackConfig") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "GetCallbackConfig", err.Error()) - } - - req, err := client.GetCallbackConfigPreparer(ctx, resourceGroupName, registryName, webhookName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", nil, "Failure preparing request") - return - } - - resp, err := client.GetCallbackConfigSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", resp, "Failure sending request") - return - } - - result, err = client.GetCallbackConfigResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", resp, "Failure responding to request") - return - } - - return -} - -// GetCallbackConfigPreparer prepares the GetCallbackConfig request. -func (client WebhooksClient) GetCallbackConfigPreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetCallbackConfigSender sends the GetCallbackConfig request. The method will close the -// http.Response Body if it receives an error. -func (client WebhooksClient) GetCallbackConfigSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetCallbackConfigResponder handles the response to the GetCallbackConfig request. The method always -// closes the http.Response Body. -func (client WebhooksClient) GetCallbackConfigResponder(resp *http.Response) (result CallbackConfig, 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 the webhooks for the specified container registry. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -func (client WebhooksClient) List(ctx context.Context, resourceGroupName string, registryName string) (result WebhookListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.List") - defer func() { - sc := -1 - if result.wlr.Response.Response != nil { - sc = result.wlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure sending request") - return - } - - result.wlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure responding to request") - return - } - if result.wlr.hasNextLink() && result.wlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WebhooksClient) ListPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.ContainerRegistry/registries/{registryName}/webhooks", 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 WebhooksClient) 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 WebhooksClient) ListResponder(resp *http.Response) (result WebhookListResult, 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 WebhooksClient) listNextResults(ctx context.Context, lastResults WebhookListResult) (result WebhookListResult, err error) { - req, err := lastResults.webhookListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "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, "containerregistry.WebhooksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebhooksClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result WebhookListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.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, registryName) - return -} - -// ListEvents lists recent events for the specified webhook. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -func (client WebhooksClient) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.ListEvents") - defer func() { - sc := -1 - if result.elr.Response.Response != nil { - sc = result.elr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "ListEvents", err.Error()) - } - - result.fn = client.listEventsNextResults - req, err := client.ListEventsPreparer(ctx, resourceGroupName, registryName, webhookName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", nil, "Failure preparing request") - return - } - - resp, err := client.ListEventsSender(req) - if err != nil { - result.elr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure sending request") - return - } - - result.elr, err = client.ListEventsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure responding to request") - return - } - if result.elr.hasNextLink() && result.elr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListEventsPreparer prepares the ListEvents request. -func (client WebhooksClient) ListEventsPreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListEventsSender sends the ListEvents request. The method will close the -// http.Response Body if it receives an error. -func (client WebhooksClient) ListEventsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListEventsResponder handles the response to the ListEvents request. The method always -// closes the http.Response Body. -func (client WebhooksClient) ListEventsResponder(resp *http.Response) (result EventListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listEventsNextResults retrieves the next set of results, if any. -func (client WebhooksClient) listEventsNextResults(ctx context.Context, lastResults EventListResult) (result EventListResult, err error) { - req, err := lastResults.eventListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listEventsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListEventsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listEventsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListEventsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listEventsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListEventsComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebhooksClient) ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.ListEvents") - 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.ListEvents(ctx, resourceGroupName, registryName, webhookName) - return -} - -// Ping triggers a ping event to be sent to the webhook. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -func (client WebhooksClient) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventInfo, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Ping") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "Ping", err.Error()) - } - - req, err := client.PingPreparer(ctx, resourceGroupName, registryName, webhookName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", nil, "Failure preparing request") - return - } - - resp, err := client.PingSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", resp, "Failure sending request") - return - } - - result, err = client.PingResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", resp, "Failure responding to request") - return - } - - return -} - -// PingPreparer prepares the Ping request. -func (client WebhooksClient) PingPreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PingSender sends the Ping request. The method will close the -// http.Response Body if it receives an error. -func (client WebhooksClient) PingSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// PingResponder handles the response to the Ping request. The method always -// closes the http.Response Body. -func (client WebhooksClient) PingResponder(resp *http.Response) (result EventInfo, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates a webhook with the specified parameters. -// Parameters: -// resourceGroupName - the name of the resource group to which the container registry belongs. -// registryName - the name of the container registry. -// webhookName - the name of the webhook. -// webhookUpdateParameters - the parameters for updating a webhook. -func (client WebhooksClient) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters) (result WebhooksUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: registryName, - Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: webhookName, - Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, - {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerregistry.WebhooksClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, webhookName, webhookUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "registryName": autorest.Encode("path", registryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webhookName": autorest.Encode("path", webhookName), - } - - const APIVersion = "2019-05-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.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), - autorest.WithJSON(webhookUpdateParameters), - 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 WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client WebhooksClient) UpdateResponder(resp *http.Response) (result Webhook, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json deleted file mode 100644 index 4c368f7df72e..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md", - "tag": "package-2020-04", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go deleted file mode 100644 index 67c2249c28f8..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go +++ /dev/null @@ -1,608 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// AgentPoolsClient is the the Container Service Client. -type AgentPoolsClient struct { - BaseClient -} - -// NewAgentPoolsClient creates an instance of the AgentPoolsClient client. -func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { - return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient 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 NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { - return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an agent pool in the specified managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// agentPoolName - the name of the agent pool. -// parameters - parameters supplied to the Create or Update an agent pool operation. -func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (result AgentPoolsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, agentPoolName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agentPoolName": autorest.Encode("path", agentPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters), - autorest.WithJSON(parameters), - 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 AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client AgentPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result AgentPool, 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 deletes the agent pool in the specified managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// agentPoolName - the name of the agent pool. -func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, agentPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agentPoolName": autorest.Encode("path", agentPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", 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 AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client AgentPoolsClient) 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 the details of the agent pool by managed cluster and resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// agentPoolName - the name of the agent pool. -func (client AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPool, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, agentPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AgentPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agentPoolName": autorest.Encode("path", agentPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", 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 AgentPoolsClient) 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 AgentPoolsClient) GetResponder(resp *http.Response) (result AgentPool, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetAvailableAgentPoolVersions gets a list of supported versions for the specified agent pool. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolAvailableVersions, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetAvailableAgentPoolVersions") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", err.Error()) - } - - req, err := client.GetAvailableAgentPoolVersionsPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", nil, "Failure preparing request") - return - } - - resp, err := client.GetAvailableAgentPoolVersionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure sending request") - return - } - - result, err = client.GetAvailableAgentPoolVersionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure responding to request") - return - } - - return -} - -// GetAvailableAgentPoolVersionsPreparer prepares the GetAvailableAgentPoolVersions request. -func (client AgentPoolsClient) GetAvailableAgentPoolVersionsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetAvailableAgentPoolVersionsSender sends the GetAvailableAgentPoolVersions request. The method will close the -// http.Response Body if it receives an error. -func (client AgentPoolsClient) GetAvailableAgentPoolVersionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetAvailableAgentPoolVersionsResponder handles the response to the GetAvailableAgentPoolVersions request. The method always -// closes the http.Response Body. -func (client AgentPoolsClient) GetAvailableAgentPoolVersionsResponder(resp *http.Response) (result AgentPoolAvailableVersions, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetUpgradeProfile gets the details of the upgrade profile for an agent pool with a specified resource group and -// managed cluster name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// agentPoolName - the name of the agent pool. -func (client AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolUpgradeProfile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetUpgradeProfile") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "GetUpgradeProfile", err.Error()) - } - - req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName, agentPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", nil, "Failure preparing request") - return - } - - resp, err := client.GetUpgradeProfileSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure sending request") - return - } - - result, err = client.GetUpgradeProfileResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure responding to request") - return - } - - return -} - -// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. -func (client AgentPoolsClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agentPoolName": autorest.Encode("path", agentPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the -// http.Response Body if it receives an error. -func (client AgentPoolsClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always -// closes the http.Response Body. -func (client AgentPoolsClient) GetUpgradeProfileResponder(resp *http.Response) (result AgentPoolUpgradeProfile, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent -// pool. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client AgentPoolsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List") - defer func() { - sc := -1 - if result.aplr.Response.Response != nil { - sc = result.aplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.AgentPoolsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.aplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure sending request") - return - } - - result.aplr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure responding to request") - return - } - if result.aplr.hasNextLink() && result.aplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client AgentPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/agentPools", 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 AgentPoolsClient) 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 AgentPoolsClient) ListResponder(resp *http.Response) (result AgentPoolListResult, 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 AgentPoolsClient) listNextResults(ctx context.Context, lastResults AgentPoolListResult) (result AgentPoolListResult, err error) { - req, err := lastResults.agentPoolListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "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, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AgentPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.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, resourceName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go deleted file mode 100644 index ce1a6043a98b..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package containerservice implements the Azure ARM Containerservice service API version . -// -// The Container Service Client. -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Containerservice - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Containerservice. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient 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 NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go deleted file mode 100644 index afd3daf68f3e..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go +++ /dev/null @@ -1,621 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ContainerServicesClient is the the Container Service Client. -type ContainerServicesClient struct { - BaseClient -} - -// NewContainerServicesClient creates an instance of the ContainerServicesClient client. -func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { - return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient 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 NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { - return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and -// agents. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -// parameters - parameters supplied to the Create or Update a Container Service operation. -func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, - {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-07-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.ContainerService/containerServices/{containerServiceName}", pathParameters), - autorest.WithJSON(parameters), - 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 ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the specified container service in the specified subscription and resource group. The operation does -// not delete other resources created as part of creating a container service, including storage accounts, VMs, and -// availability sets. All the other resources created with the container service are part of the same resource group -// and can be deleted individually. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-07-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.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) 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 the properties of the specified container service in the specified subscription and resource group. The -// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters -// and agents. -// Parameters: -// resourceGroupName - the name of the resource group. -// containerServiceName - the name of the container service in the specified subscription and resource group. -func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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, containerServiceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "containerServiceName": autorest.Encode("path", containerServiceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-07-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.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of container services in the specified subscription. The operation returns properties of each -// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. -func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List") - defer func() { - sc := -1 - if result.lr.Response.Response != nil { - sc = result.lr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request") - return - } - - result.lr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request") - return - } - if result.lr.hasNextLink() && result.lr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-07-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, 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 ContainerServicesClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { - req, err := lastResults.listResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "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, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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) - return -} - -// ListByResourceGroup gets a list of container services in the specified subscription and resource group. The -// operation returns properties of each container service including state, orchestrator, number of masters and agents, -// and FQDNs of masters and agents. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lr.Response.Response != nil { - sc = result.lr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.lr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.lr.hasNextLink() && result.lr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-07-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.ContainerService/containerServices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { - req, err := lastResults.listResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListOrchestrators gets a list of supported orchestrators in the specified subscription. The operation returns -// properties of each orchestrator including version, available upgrades and whether that version or upgrades are in -// preview. -// Parameters: -// location - the name of a supported Azure region. -// resourceType - resource type for which the list of orchestrators needs to be returned -func (client ContainerServicesClient) ListOrchestrators(ctx context.Context, location string, resourceType string) (result OrchestratorVersionProfileListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListOrchestrators") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListOrchestratorsPreparer(ctx, location, resourceType) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", nil, "Failure preparing request") - return - } - - resp, err := client.ListOrchestratorsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure sending request") - return - } - - result, err = client.ListOrchestratorsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure responding to request") - return - } - - return -} - -// ListOrchestratorsPreparer prepares the ListOrchestrators request. -func (client ContainerServicesClient) ListOrchestratorsPreparer(ctx context.Context, location string, resourceType string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(resourceType) > 0 { - queryParameters["resource-type"] = autorest.Encode("query", resourceType) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListOrchestratorsSender sends the ListOrchestrators request. The method will close the -// http.Response Body if it receives an error. -func (client ContainerServicesClient) ListOrchestratorsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListOrchestratorsResponder handles the response to the ListOrchestrators request. The method always -// closes the http.Response Body. -func (client ContainerServicesClient) ListOrchestratorsResponder(resp *http.Response) (result OrchestratorVersionProfileListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/enums.go deleted file mode 100644 index 13c22893adff..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/enums.go +++ /dev/null @@ -1,702 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AgentPoolMode enumerates the values for agent pool mode. -type AgentPoolMode string - -const ( - // System ... - System AgentPoolMode = "System" - // User ... - User AgentPoolMode = "User" -) - -// PossibleAgentPoolModeValues returns an array of possible values for the AgentPoolMode const type. -func PossibleAgentPoolModeValues() []AgentPoolMode { - return []AgentPoolMode{System, User} -} - -// AgentPoolType enumerates the values for agent pool type. -type AgentPoolType string - -const ( - // AvailabilitySet ... - AvailabilitySet AgentPoolType = "AvailabilitySet" - // VirtualMachineScaleSets ... - VirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" -) - -// PossibleAgentPoolTypeValues returns an array of possible values for the AgentPoolType const type. -func PossibleAgentPoolTypeValues() []AgentPoolType { - return []AgentPoolType{AvailabilitySet, VirtualMachineScaleSets} -} - -// Kind enumerates the values for kind. -type Kind string - -const ( - // KindAADIdentityProvider ... - KindAADIdentityProvider Kind = "AADIdentityProvider" - // KindOpenShiftManagedClusterBaseIdentityProvider ... - KindOpenShiftManagedClusterBaseIdentityProvider Kind = "OpenShiftManagedClusterBaseIdentityProvider" -) - -// PossibleKindValues returns an array of possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{KindAADIdentityProvider, KindOpenShiftManagedClusterBaseIdentityProvider} -} - -// LoadBalancerSku enumerates the values for load balancer sku. -type LoadBalancerSku string - -const ( - // Basic ... - Basic LoadBalancerSku = "basic" - // Standard ... - Standard LoadBalancerSku = "standard" -) - -// PossibleLoadBalancerSkuValues returns an array of possible values for the LoadBalancerSku const type. -func PossibleLoadBalancerSkuValues() []LoadBalancerSku { - return []LoadBalancerSku{Basic, Standard} -} - -// ManagedClusterSKUName enumerates the values for managed cluster sku name. -type ManagedClusterSKUName string - -const ( - // ManagedClusterSKUNameBasic ... - ManagedClusterSKUNameBasic ManagedClusterSKUName = "Basic" -) - -// PossibleManagedClusterSKUNameValues returns an array of possible values for the ManagedClusterSKUName const type. -func PossibleManagedClusterSKUNameValues() []ManagedClusterSKUName { - return []ManagedClusterSKUName{ManagedClusterSKUNameBasic} -} - -// ManagedClusterSKUTier enumerates the values for managed cluster sku tier. -type ManagedClusterSKUTier string - -const ( - // Free ... - Free ManagedClusterSKUTier = "Free" - // Paid ... - Paid ManagedClusterSKUTier = "Paid" -) - -// PossibleManagedClusterSKUTierValues returns an array of possible values for the ManagedClusterSKUTier const type. -func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier { - return []ManagedClusterSKUTier{Free, Paid} -} - -// NetworkMode enumerates the values for network mode. -type NetworkMode string - -const ( - // Bridge ... - Bridge NetworkMode = "bridge" - // Transparent ... - Transparent NetworkMode = "transparent" -) - -// PossibleNetworkModeValues returns an array of possible values for the NetworkMode const type. -func PossibleNetworkModeValues() []NetworkMode { - return []NetworkMode{Bridge, Transparent} -} - -// NetworkPlugin enumerates the values for network plugin. -type NetworkPlugin string - -const ( - // Azure ... - Azure NetworkPlugin = "azure" - // Kubenet ... - Kubenet NetworkPlugin = "kubenet" -) - -// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type. -func PossibleNetworkPluginValues() []NetworkPlugin { - return []NetworkPlugin{Azure, Kubenet} -} - -// NetworkPolicy enumerates the values for network policy. -type NetworkPolicy string - -const ( - // NetworkPolicyAzure ... - NetworkPolicyAzure NetworkPolicy = "azure" - // NetworkPolicyCalico ... - NetworkPolicyCalico NetworkPolicy = "calico" -) - -// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type. -func PossibleNetworkPolicyValues() []NetworkPolicy { - return []NetworkPolicy{NetworkPolicyAzure, NetworkPolicyCalico} -} - -// OpenShiftAgentPoolProfileRole enumerates the values for open shift agent pool profile role. -type OpenShiftAgentPoolProfileRole string - -const ( - // Compute ... - Compute OpenShiftAgentPoolProfileRole = "compute" - // Infra ... - Infra OpenShiftAgentPoolProfileRole = "infra" -) - -// PossibleOpenShiftAgentPoolProfileRoleValues returns an array of possible values for the OpenShiftAgentPoolProfileRole const type. -func PossibleOpenShiftAgentPoolProfileRoleValues() []OpenShiftAgentPoolProfileRole { - return []OpenShiftAgentPoolProfileRole{Compute, Infra} -} - -// OpenShiftContainerServiceVMSize enumerates the values for open shift container service vm size. -type OpenShiftContainerServiceVMSize string - -const ( - // StandardD16sV3 ... - StandardD16sV3 OpenShiftContainerServiceVMSize = "Standard_D16s_v3" - // StandardD2sV3 ... - StandardD2sV3 OpenShiftContainerServiceVMSize = "Standard_D2s_v3" - // StandardD32sV3 ... - StandardD32sV3 OpenShiftContainerServiceVMSize = "Standard_D32s_v3" - // StandardD4sV3 ... - StandardD4sV3 OpenShiftContainerServiceVMSize = "Standard_D4s_v3" - // StandardD64sV3 ... - StandardD64sV3 OpenShiftContainerServiceVMSize = "Standard_D64s_v3" - // StandardD8sV3 ... - StandardD8sV3 OpenShiftContainerServiceVMSize = "Standard_D8s_v3" - // StandardDS12V2 ... - StandardDS12V2 OpenShiftContainerServiceVMSize = "Standard_DS12_v2" - // StandardDS13V2 ... - StandardDS13V2 OpenShiftContainerServiceVMSize = "Standard_DS13_v2" - // StandardDS14V2 ... - StandardDS14V2 OpenShiftContainerServiceVMSize = "Standard_DS14_v2" - // StandardDS15V2 ... - StandardDS15V2 OpenShiftContainerServiceVMSize = "Standard_DS15_v2" - // StandardDS4V2 ... - StandardDS4V2 OpenShiftContainerServiceVMSize = "Standard_DS4_v2" - // StandardDS5V2 ... - StandardDS5V2 OpenShiftContainerServiceVMSize = "Standard_DS5_v2" - // StandardE16sV3 ... - StandardE16sV3 OpenShiftContainerServiceVMSize = "Standard_E16s_v3" - // StandardE20sV3 ... - StandardE20sV3 OpenShiftContainerServiceVMSize = "Standard_E20s_v3" - // StandardE32sV3 ... - StandardE32sV3 OpenShiftContainerServiceVMSize = "Standard_E32s_v3" - // StandardE4sV3 ... - StandardE4sV3 OpenShiftContainerServiceVMSize = "Standard_E4s_v3" - // StandardE64sV3 ... - StandardE64sV3 OpenShiftContainerServiceVMSize = "Standard_E64s_v3" - // StandardE8sV3 ... - StandardE8sV3 OpenShiftContainerServiceVMSize = "Standard_E8s_v3" - // StandardF16s ... - StandardF16s OpenShiftContainerServiceVMSize = "Standard_F16s" - // StandardF16sV2 ... - StandardF16sV2 OpenShiftContainerServiceVMSize = "Standard_F16s_v2" - // StandardF32sV2 ... - StandardF32sV2 OpenShiftContainerServiceVMSize = "Standard_F32s_v2" - // StandardF64sV2 ... - StandardF64sV2 OpenShiftContainerServiceVMSize = "Standard_F64s_v2" - // StandardF72sV2 ... - StandardF72sV2 OpenShiftContainerServiceVMSize = "Standard_F72s_v2" - // StandardF8s ... - StandardF8s OpenShiftContainerServiceVMSize = "Standard_F8s" - // StandardF8sV2 ... - StandardF8sV2 OpenShiftContainerServiceVMSize = "Standard_F8s_v2" - // StandardGS2 ... - StandardGS2 OpenShiftContainerServiceVMSize = "Standard_GS2" - // StandardGS3 ... - StandardGS3 OpenShiftContainerServiceVMSize = "Standard_GS3" - // StandardGS4 ... - StandardGS4 OpenShiftContainerServiceVMSize = "Standard_GS4" - // StandardGS5 ... - StandardGS5 OpenShiftContainerServiceVMSize = "Standard_GS5" - // StandardL16s ... - StandardL16s OpenShiftContainerServiceVMSize = "Standard_L16s" - // StandardL32s ... - StandardL32s OpenShiftContainerServiceVMSize = "Standard_L32s" - // StandardL4s ... - StandardL4s OpenShiftContainerServiceVMSize = "Standard_L4s" - // StandardL8s ... - StandardL8s OpenShiftContainerServiceVMSize = "Standard_L8s" -) - -// PossibleOpenShiftContainerServiceVMSizeValues returns an array of possible values for the OpenShiftContainerServiceVMSize const type. -func PossibleOpenShiftContainerServiceVMSizeValues() []OpenShiftContainerServiceVMSize { - return []OpenShiftContainerServiceVMSize{StandardD16sV3, StandardD2sV3, StandardD32sV3, StandardD4sV3, StandardD64sV3, StandardD8sV3, StandardDS12V2, StandardDS13V2, StandardDS14V2, StandardDS15V2, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE20sV3, StandardE32sV3, StandardE4sV3, StandardE64sV3, StandardE8sV3, StandardF16s, StandardF16sV2, StandardF32sV2, StandardF64sV2, StandardF72sV2, StandardF8s, StandardF8sV2, StandardGS2, StandardGS3, StandardGS4, StandardGS5, StandardL16s, StandardL32s, StandardL4s, StandardL8s} -} - -// OrchestratorTypes enumerates the values for orchestrator types. -type OrchestratorTypes string - -const ( - // Custom ... - Custom OrchestratorTypes = "Custom" - // DCOS ... - DCOS OrchestratorTypes = "DCOS" - // DockerCE ... - DockerCE OrchestratorTypes = "DockerCE" - // Kubernetes ... - Kubernetes OrchestratorTypes = "Kubernetes" - // Swarm ... - Swarm OrchestratorTypes = "Swarm" -) - -// PossibleOrchestratorTypesValues returns an array of possible values for the OrchestratorTypes const type. -func PossibleOrchestratorTypesValues() []OrchestratorTypes { - return []OrchestratorTypes{Custom, DCOS, DockerCE, Kubernetes, Swarm} -} - -// OSType enumerates the values for os type. -type OSType string - -const ( - // Linux ... - Linux OSType = "Linux" - // Windows ... - Windows OSType = "Windows" -) - -// PossibleOSTypeValues returns an array of possible values for the OSType const type. -func PossibleOSTypeValues() []OSType { - return []OSType{Linux, Windows} -} - -// OutboundType enumerates the values for outbound type. -type OutboundType string - -const ( - // LoadBalancer ... - LoadBalancer OutboundType = "loadBalancer" - // UserDefinedRouting ... - UserDefinedRouting OutboundType = "userDefinedRouting" -) - -// PossibleOutboundTypeValues returns an array of possible values for the OutboundType const type. -func PossibleOutboundTypeValues() []OutboundType { - return []OutboundType{LoadBalancer, UserDefinedRouting} -} - -// ResourceIdentityType enumerates the values for resource identity type. -type ResourceIdentityType string - -const ( - // None ... - None ResourceIdentityType = "None" - // SystemAssigned ... - SystemAssigned ResourceIdentityType = "SystemAssigned" -) - -// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{None, SystemAssigned} -} - -// ScaleSetEvictionPolicy enumerates the values for scale set eviction policy. -type ScaleSetEvictionPolicy string - -const ( - // Deallocate ... - Deallocate ScaleSetEvictionPolicy = "Deallocate" - // Delete ... - Delete ScaleSetEvictionPolicy = "Delete" -) - -// PossibleScaleSetEvictionPolicyValues returns an array of possible values for the ScaleSetEvictionPolicy const type. -func PossibleScaleSetEvictionPolicyValues() []ScaleSetEvictionPolicy { - return []ScaleSetEvictionPolicy{Deallocate, Delete} -} - -// ScaleSetPriority enumerates the values for scale set priority. -type ScaleSetPriority string - -const ( - // Regular ... - Regular ScaleSetPriority = "Regular" - // Spot ... - Spot ScaleSetPriority = "Spot" -) - -// PossibleScaleSetPriorityValues returns an array of possible values for the ScaleSetPriority const type. -func PossibleScaleSetPriorityValues() []ScaleSetPriority { - return []ScaleSetPriority{Regular, Spot} -} - -// StorageProfileTypes enumerates the values for storage profile types. -type StorageProfileTypes string - -const ( - // ManagedDisks ... - ManagedDisks StorageProfileTypes = "ManagedDisks" - // StorageAccount ... - StorageAccount StorageProfileTypes = "StorageAccount" -) - -// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type. -func PossibleStorageProfileTypesValues() []StorageProfileTypes { - return []StorageProfileTypes{ManagedDisks, StorageAccount} -} - -// VMSizeTypes enumerates the values for vm size types. -type VMSizeTypes string - -const ( - // VMSizeTypesStandardA1 ... - VMSizeTypesStandardA1 VMSizeTypes = "Standard_A1" - // VMSizeTypesStandardA10 ... - VMSizeTypesStandardA10 VMSizeTypes = "Standard_A10" - // VMSizeTypesStandardA11 ... - VMSizeTypesStandardA11 VMSizeTypes = "Standard_A11" - // VMSizeTypesStandardA1V2 ... - VMSizeTypesStandardA1V2 VMSizeTypes = "Standard_A1_v2" - // VMSizeTypesStandardA2 ... - VMSizeTypesStandardA2 VMSizeTypes = "Standard_A2" - // VMSizeTypesStandardA2mV2 ... - VMSizeTypesStandardA2mV2 VMSizeTypes = "Standard_A2m_v2" - // VMSizeTypesStandardA2V2 ... - VMSizeTypesStandardA2V2 VMSizeTypes = "Standard_A2_v2" - // VMSizeTypesStandardA3 ... - VMSizeTypesStandardA3 VMSizeTypes = "Standard_A3" - // VMSizeTypesStandardA4 ... - VMSizeTypesStandardA4 VMSizeTypes = "Standard_A4" - // VMSizeTypesStandardA4mV2 ... - VMSizeTypesStandardA4mV2 VMSizeTypes = "Standard_A4m_v2" - // VMSizeTypesStandardA4V2 ... - VMSizeTypesStandardA4V2 VMSizeTypes = "Standard_A4_v2" - // VMSizeTypesStandardA5 ... - VMSizeTypesStandardA5 VMSizeTypes = "Standard_A5" - // VMSizeTypesStandardA6 ... - VMSizeTypesStandardA6 VMSizeTypes = "Standard_A6" - // VMSizeTypesStandardA7 ... - VMSizeTypesStandardA7 VMSizeTypes = "Standard_A7" - // VMSizeTypesStandardA8 ... - VMSizeTypesStandardA8 VMSizeTypes = "Standard_A8" - // VMSizeTypesStandardA8mV2 ... - VMSizeTypesStandardA8mV2 VMSizeTypes = "Standard_A8m_v2" - // VMSizeTypesStandardA8V2 ... - VMSizeTypesStandardA8V2 VMSizeTypes = "Standard_A8_v2" - // VMSizeTypesStandardA9 ... - VMSizeTypesStandardA9 VMSizeTypes = "Standard_A9" - // VMSizeTypesStandardB2ms ... - VMSizeTypesStandardB2ms VMSizeTypes = "Standard_B2ms" - // VMSizeTypesStandardB2s ... - VMSizeTypesStandardB2s VMSizeTypes = "Standard_B2s" - // VMSizeTypesStandardB4ms ... - VMSizeTypesStandardB4ms VMSizeTypes = "Standard_B4ms" - // VMSizeTypesStandardB8ms ... - VMSizeTypesStandardB8ms VMSizeTypes = "Standard_B8ms" - // VMSizeTypesStandardD1 ... - VMSizeTypesStandardD1 VMSizeTypes = "Standard_D1" - // VMSizeTypesStandardD11 ... - VMSizeTypesStandardD11 VMSizeTypes = "Standard_D11" - // VMSizeTypesStandardD11V2 ... - VMSizeTypesStandardD11V2 VMSizeTypes = "Standard_D11_v2" - // VMSizeTypesStandardD11V2Promo ... - VMSizeTypesStandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo" - // VMSizeTypesStandardD12 ... - VMSizeTypesStandardD12 VMSizeTypes = "Standard_D12" - // VMSizeTypesStandardD12V2 ... - VMSizeTypesStandardD12V2 VMSizeTypes = "Standard_D12_v2" - // VMSizeTypesStandardD12V2Promo ... - VMSizeTypesStandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo" - // VMSizeTypesStandardD13 ... - VMSizeTypesStandardD13 VMSizeTypes = "Standard_D13" - // VMSizeTypesStandardD13V2 ... - VMSizeTypesStandardD13V2 VMSizeTypes = "Standard_D13_v2" - // VMSizeTypesStandardD13V2Promo ... - VMSizeTypesStandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo" - // VMSizeTypesStandardD14 ... - VMSizeTypesStandardD14 VMSizeTypes = "Standard_D14" - // VMSizeTypesStandardD14V2 ... - VMSizeTypesStandardD14V2 VMSizeTypes = "Standard_D14_v2" - // VMSizeTypesStandardD14V2Promo ... - VMSizeTypesStandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo" - // VMSizeTypesStandardD15V2 ... - VMSizeTypesStandardD15V2 VMSizeTypes = "Standard_D15_v2" - // VMSizeTypesStandardD16sV3 ... - VMSizeTypesStandardD16sV3 VMSizeTypes = "Standard_D16s_v3" - // VMSizeTypesStandardD16V3 ... - VMSizeTypesStandardD16V3 VMSizeTypes = "Standard_D16_v3" - // VMSizeTypesStandardD1V2 ... - VMSizeTypesStandardD1V2 VMSizeTypes = "Standard_D1_v2" - // VMSizeTypesStandardD2 ... - VMSizeTypesStandardD2 VMSizeTypes = "Standard_D2" - // VMSizeTypesStandardD2sV3 ... - VMSizeTypesStandardD2sV3 VMSizeTypes = "Standard_D2s_v3" - // VMSizeTypesStandardD2V2 ... - VMSizeTypesStandardD2V2 VMSizeTypes = "Standard_D2_v2" - // VMSizeTypesStandardD2V2Promo ... - VMSizeTypesStandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo" - // VMSizeTypesStandardD2V3 ... - VMSizeTypesStandardD2V3 VMSizeTypes = "Standard_D2_v3" - // VMSizeTypesStandardD3 ... - VMSizeTypesStandardD3 VMSizeTypes = "Standard_D3" - // VMSizeTypesStandardD32sV3 ... - VMSizeTypesStandardD32sV3 VMSizeTypes = "Standard_D32s_v3" - // VMSizeTypesStandardD32V3 ... - VMSizeTypesStandardD32V3 VMSizeTypes = "Standard_D32_v3" - // VMSizeTypesStandardD3V2 ... - VMSizeTypesStandardD3V2 VMSizeTypes = "Standard_D3_v2" - // VMSizeTypesStandardD3V2Promo ... - VMSizeTypesStandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo" - // VMSizeTypesStandardD4 ... - VMSizeTypesStandardD4 VMSizeTypes = "Standard_D4" - // VMSizeTypesStandardD4sV3 ... - VMSizeTypesStandardD4sV3 VMSizeTypes = "Standard_D4s_v3" - // VMSizeTypesStandardD4V2 ... - VMSizeTypesStandardD4V2 VMSizeTypes = "Standard_D4_v2" - // VMSizeTypesStandardD4V2Promo ... - VMSizeTypesStandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo" - // VMSizeTypesStandardD4V3 ... - VMSizeTypesStandardD4V3 VMSizeTypes = "Standard_D4_v3" - // VMSizeTypesStandardD5V2 ... - VMSizeTypesStandardD5V2 VMSizeTypes = "Standard_D5_v2" - // VMSizeTypesStandardD5V2Promo ... - VMSizeTypesStandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo" - // VMSizeTypesStandardD64sV3 ... - VMSizeTypesStandardD64sV3 VMSizeTypes = "Standard_D64s_v3" - // VMSizeTypesStandardD64V3 ... - VMSizeTypesStandardD64V3 VMSizeTypes = "Standard_D64_v3" - // VMSizeTypesStandardD8sV3 ... - VMSizeTypesStandardD8sV3 VMSizeTypes = "Standard_D8s_v3" - // VMSizeTypesStandardD8V3 ... - VMSizeTypesStandardD8V3 VMSizeTypes = "Standard_D8_v3" - // VMSizeTypesStandardDS1 ... - VMSizeTypesStandardDS1 VMSizeTypes = "Standard_DS1" - // VMSizeTypesStandardDS11 ... - VMSizeTypesStandardDS11 VMSizeTypes = "Standard_DS11" - // VMSizeTypesStandardDS11V2 ... - VMSizeTypesStandardDS11V2 VMSizeTypes = "Standard_DS11_v2" - // VMSizeTypesStandardDS11V2Promo ... - VMSizeTypesStandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo" - // VMSizeTypesStandardDS12 ... - VMSizeTypesStandardDS12 VMSizeTypes = "Standard_DS12" - // VMSizeTypesStandardDS12V2 ... - VMSizeTypesStandardDS12V2 VMSizeTypes = "Standard_DS12_v2" - // VMSizeTypesStandardDS12V2Promo ... - VMSizeTypesStandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo" - // VMSizeTypesStandardDS13 ... - VMSizeTypesStandardDS13 VMSizeTypes = "Standard_DS13" - // VMSizeTypesStandardDS132V2 ... - VMSizeTypesStandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2" - // VMSizeTypesStandardDS134V2 ... - VMSizeTypesStandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2" - // VMSizeTypesStandardDS13V2 ... - VMSizeTypesStandardDS13V2 VMSizeTypes = "Standard_DS13_v2" - // VMSizeTypesStandardDS13V2Promo ... - VMSizeTypesStandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo" - // VMSizeTypesStandardDS14 ... - VMSizeTypesStandardDS14 VMSizeTypes = "Standard_DS14" - // VMSizeTypesStandardDS144V2 ... - VMSizeTypesStandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2" - // VMSizeTypesStandardDS148V2 ... - VMSizeTypesStandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2" - // VMSizeTypesStandardDS14V2 ... - VMSizeTypesStandardDS14V2 VMSizeTypes = "Standard_DS14_v2" - // VMSizeTypesStandardDS14V2Promo ... - VMSizeTypesStandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo" - // VMSizeTypesStandardDS15V2 ... - VMSizeTypesStandardDS15V2 VMSizeTypes = "Standard_DS15_v2" - // VMSizeTypesStandardDS1V2 ... - VMSizeTypesStandardDS1V2 VMSizeTypes = "Standard_DS1_v2" - // VMSizeTypesStandardDS2 ... - VMSizeTypesStandardDS2 VMSizeTypes = "Standard_DS2" - // VMSizeTypesStandardDS2V2 ... - VMSizeTypesStandardDS2V2 VMSizeTypes = "Standard_DS2_v2" - // VMSizeTypesStandardDS2V2Promo ... - VMSizeTypesStandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo" - // VMSizeTypesStandardDS3 ... - VMSizeTypesStandardDS3 VMSizeTypes = "Standard_DS3" - // VMSizeTypesStandardDS3V2 ... - VMSizeTypesStandardDS3V2 VMSizeTypes = "Standard_DS3_v2" - // VMSizeTypesStandardDS3V2Promo ... - VMSizeTypesStandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo" - // VMSizeTypesStandardDS4 ... - VMSizeTypesStandardDS4 VMSizeTypes = "Standard_DS4" - // VMSizeTypesStandardDS4V2 ... - VMSizeTypesStandardDS4V2 VMSizeTypes = "Standard_DS4_v2" - // VMSizeTypesStandardDS4V2Promo ... - VMSizeTypesStandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo" - // VMSizeTypesStandardDS5V2 ... - VMSizeTypesStandardDS5V2 VMSizeTypes = "Standard_DS5_v2" - // VMSizeTypesStandardDS5V2Promo ... - VMSizeTypesStandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo" - // VMSizeTypesStandardE16sV3 ... - VMSizeTypesStandardE16sV3 VMSizeTypes = "Standard_E16s_v3" - // VMSizeTypesStandardE16V3 ... - VMSizeTypesStandardE16V3 VMSizeTypes = "Standard_E16_v3" - // VMSizeTypesStandardE2sV3 ... - VMSizeTypesStandardE2sV3 VMSizeTypes = "Standard_E2s_v3" - // VMSizeTypesStandardE2V3 ... - VMSizeTypesStandardE2V3 VMSizeTypes = "Standard_E2_v3" - // VMSizeTypesStandardE3216sV3 ... - VMSizeTypesStandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3" - // VMSizeTypesStandardE328sV3 ... - VMSizeTypesStandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3" - // VMSizeTypesStandardE32sV3 ... - VMSizeTypesStandardE32sV3 VMSizeTypes = "Standard_E32s_v3" - // VMSizeTypesStandardE32V3 ... - VMSizeTypesStandardE32V3 VMSizeTypes = "Standard_E32_v3" - // VMSizeTypesStandardE4sV3 ... - VMSizeTypesStandardE4sV3 VMSizeTypes = "Standard_E4s_v3" - // VMSizeTypesStandardE4V3 ... - VMSizeTypesStandardE4V3 VMSizeTypes = "Standard_E4_v3" - // VMSizeTypesStandardE6416sV3 ... - VMSizeTypesStandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3" - // VMSizeTypesStandardE6432sV3 ... - VMSizeTypesStandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3" - // VMSizeTypesStandardE64sV3 ... - VMSizeTypesStandardE64sV3 VMSizeTypes = "Standard_E64s_v3" - // VMSizeTypesStandardE64V3 ... - VMSizeTypesStandardE64V3 VMSizeTypes = "Standard_E64_v3" - // VMSizeTypesStandardE8sV3 ... - VMSizeTypesStandardE8sV3 VMSizeTypes = "Standard_E8s_v3" - // VMSizeTypesStandardE8V3 ... - VMSizeTypesStandardE8V3 VMSizeTypes = "Standard_E8_v3" - // VMSizeTypesStandardF1 ... - VMSizeTypesStandardF1 VMSizeTypes = "Standard_F1" - // VMSizeTypesStandardF16 ... - VMSizeTypesStandardF16 VMSizeTypes = "Standard_F16" - // VMSizeTypesStandardF16s ... - VMSizeTypesStandardF16s VMSizeTypes = "Standard_F16s" - // VMSizeTypesStandardF16sV2 ... - VMSizeTypesStandardF16sV2 VMSizeTypes = "Standard_F16s_v2" - // VMSizeTypesStandardF1s ... - VMSizeTypesStandardF1s VMSizeTypes = "Standard_F1s" - // VMSizeTypesStandardF2 ... - VMSizeTypesStandardF2 VMSizeTypes = "Standard_F2" - // VMSizeTypesStandardF2s ... - VMSizeTypesStandardF2s VMSizeTypes = "Standard_F2s" - // VMSizeTypesStandardF2sV2 ... - VMSizeTypesStandardF2sV2 VMSizeTypes = "Standard_F2s_v2" - // VMSizeTypesStandardF32sV2 ... - VMSizeTypesStandardF32sV2 VMSizeTypes = "Standard_F32s_v2" - // VMSizeTypesStandardF4 ... - VMSizeTypesStandardF4 VMSizeTypes = "Standard_F4" - // VMSizeTypesStandardF4s ... - VMSizeTypesStandardF4s VMSizeTypes = "Standard_F4s" - // VMSizeTypesStandardF4sV2 ... - VMSizeTypesStandardF4sV2 VMSizeTypes = "Standard_F4s_v2" - // VMSizeTypesStandardF64sV2 ... - VMSizeTypesStandardF64sV2 VMSizeTypes = "Standard_F64s_v2" - // VMSizeTypesStandardF72sV2 ... - VMSizeTypesStandardF72sV2 VMSizeTypes = "Standard_F72s_v2" - // VMSizeTypesStandardF8 ... - VMSizeTypesStandardF8 VMSizeTypes = "Standard_F8" - // VMSizeTypesStandardF8s ... - VMSizeTypesStandardF8s VMSizeTypes = "Standard_F8s" - // VMSizeTypesStandardF8sV2 ... - VMSizeTypesStandardF8sV2 VMSizeTypes = "Standard_F8s_v2" - // VMSizeTypesStandardG1 ... - VMSizeTypesStandardG1 VMSizeTypes = "Standard_G1" - // VMSizeTypesStandardG2 ... - VMSizeTypesStandardG2 VMSizeTypes = "Standard_G2" - // VMSizeTypesStandardG3 ... - VMSizeTypesStandardG3 VMSizeTypes = "Standard_G3" - // VMSizeTypesStandardG4 ... - VMSizeTypesStandardG4 VMSizeTypes = "Standard_G4" - // VMSizeTypesStandardG5 ... - VMSizeTypesStandardG5 VMSizeTypes = "Standard_G5" - // VMSizeTypesStandardGS1 ... - VMSizeTypesStandardGS1 VMSizeTypes = "Standard_GS1" - // VMSizeTypesStandardGS2 ... - VMSizeTypesStandardGS2 VMSizeTypes = "Standard_GS2" - // VMSizeTypesStandardGS3 ... - VMSizeTypesStandardGS3 VMSizeTypes = "Standard_GS3" - // VMSizeTypesStandardGS4 ... - VMSizeTypesStandardGS4 VMSizeTypes = "Standard_GS4" - // VMSizeTypesStandardGS44 ... - VMSizeTypesStandardGS44 VMSizeTypes = "Standard_GS4-4" - // VMSizeTypesStandardGS48 ... - VMSizeTypesStandardGS48 VMSizeTypes = "Standard_GS4-8" - // VMSizeTypesStandardGS5 ... - VMSizeTypesStandardGS5 VMSizeTypes = "Standard_GS5" - // VMSizeTypesStandardGS516 ... - VMSizeTypesStandardGS516 VMSizeTypes = "Standard_GS5-16" - // VMSizeTypesStandardGS58 ... - VMSizeTypesStandardGS58 VMSizeTypes = "Standard_GS5-8" - // VMSizeTypesStandardH16 ... - VMSizeTypesStandardH16 VMSizeTypes = "Standard_H16" - // VMSizeTypesStandardH16m ... - VMSizeTypesStandardH16m VMSizeTypes = "Standard_H16m" - // VMSizeTypesStandardH16mr ... - VMSizeTypesStandardH16mr VMSizeTypes = "Standard_H16mr" - // VMSizeTypesStandardH16r ... - VMSizeTypesStandardH16r VMSizeTypes = "Standard_H16r" - // VMSizeTypesStandardH8 ... - VMSizeTypesStandardH8 VMSizeTypes = "Standard_H8" - // VMSizeTypesStandardH8m ... - VMSizeTypesStandardH8m VMSizeTypes = "Standard_H8m" - // VMSizeTypesStandardL16s ... - VMSizeTypesStandardL16s VMSizeTypes = "Standard_L16s" - // VMSizeTypesStandardL32s ... - VMSizeTypesStandardL32s VMSizeTypes = "Standard_L32s" - // VMSizeTypesStandardL4s ... - VMSizeTypesStandardL4s VMSizeTypes = "Standard_L4s" - // VMSizeTypesStandardL8s ... - VMSizeTypesStandardL8s VMSizeTypes = "Standard_L8s" - // VMSizeTypesStandardM12832ms ... - VMSizeTypesStandardM12832ms VMSizeTypes = "Standard_M128-32ms" - // VMSizeTypesStandardM12864ms ... - VMSizeTypesStandardM12864ms VMSizeTypes = "Standard_M128-64ms" - // VMSizeTypesStandardM128ms ... - VMSizeTypesStandardM128ms VMSizeTypes = "Standard_M128ms" - // VMSizeTypesStandardM128s ... - VMSizeTypesStandardM128s VMSizeTypes = "Standard_M128s" - // VMSizeTypesStandardM6416ms ... - VMSizeTypesStandardM6416ms VMSizeTypes = "Standard_M64-16ms" - // VMSizeTypesStandardM6432ms ... - VMSizeTypesStandardM6432ms VMSizeTypes = "Standard_M64-32ms" - // VMSizeTypesStandardM64ms ... - VMSizeTypesStandardM64ms VMSizeTypes = "Standard_M64ms" - // VMSizeTypesStandardM64s ... - VMSizeTypesStandardM64s VMSizeTypes = "Standard_M64s" - // VMSizeTypesStandardNC12 ... - VMSizeTypesStandardNC12 VMSizeTypes = "Standard_NC12" - // VMSizeTypesStandardNC12sV2 ... - VMSizeTypesStandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2" - // VMSizeTypesStandardNC12sV3 ... - VMSizeTypesStandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3" - // VMSizeTypesStandardNC24 ... - VMSizeTypesStandardNC24 VMSizeTypes = "Standard_NC24" - // VMSizeTypesStandardNC24r ... - VMSizeTypesStandardNC24r VMSizeTypes = "Standard_NC24r" - // VMSizeTypesStandardNC24rsV2 ... - VMSizeTypesStandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2" - // VMSizeTypesStandardNC24rsV3 ... - VMSizeTypesStandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3" - // VMSizeTypesStandardNC24sV2 ... - VMSizeTypesStandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2" - // VMSizeTypesStandardNC24sV3 ... - VMSizeTypesStandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3" - // VMSizeTypesStandardNC6 ... - VMSizeTypesStandardNC6 VMSizeTypes = "Standard_NC6" - // VMSizeTypesStandardNC6sV2 ... - VMSizeTypesStandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2" - // VMSizeTypesStandardNC6sV3 ... - VMSizeTypesStandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3" - // VMSizeTypesStandardND12s ... - VMSizeTypesStandardND12s VMSizeTypes = "Standard_ND12s" - // VMSizeTypesStandardND24rs ... - VMSizeTypesStandardND24rs VMSizeTypes = "Standard_ND24rs" - // VMSizeTypesStandardND24s ... - VMSizeTypesStandardND24s VMSizeTypes = "Standard_ND24s" - // VMSizeTypesStandardND6s ... - VMSizeTypesStandardND6s VMSizeTypes = "Standard_ND6s" - // VMSizeTypesStandardNV12 ... - VMSizeTypesStandardNV12 VMSizeTypes = "Standard_NV12" - // VMSizeTypesStandardNV24 ... - VMSizeTypesStandardNV24 VMSizeTypes = "Standard_NV24" - // VMSizeTypesStandardNV6 ... - VMSizeTypesStandardNV6 VMSizeTypes = "Standard_NV6" -) - -// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type. -func PossibleVMSizeTypesValues() []VMSizeTypes { - return []VMSizeTypes{VMSizeTypesStandardA1, VMSizeTypesStandardA10, VMSizeTypesStandardA11, VMSizeTypesStandardA1V2, VMSizeTypesStandardA2, VMSizeTypesStandardA2mV2, VMSizeTypesStandardA2V2, VMSizeTypesStandardA3, VMSizeTypesStandardA4, VMSizeTypesStandardA4mV2, VMSizeTypesStandardA4V2, VMSizeTypesStandardA5, VMSizeTypesStandardA6, VMSizeTypesStandardA7, VMSizeTypesStandardA8, VMSizeTypesStandardA8mV2, VMSizeTypesStandardA8V2, VMSizeTypesStandardA9, VMSizeTypesStandardB2ms, VMSizeTypesStandardB2s, VMSizeTypesStandardB4ms, VMSizeTypesStandardB8ms, VMSizeTypesStandardD1, VMSizeTypesStandardD11, VMSizeTypesStandardD11V2, VMSizeTypesStandardD11V2Promo, VMSizeTypesStandardD12, VMSizeTypesStandardD12V2, VMSizeTypesStandardD12V2Promo, VMSizeTypesStandardD13, VMSizeTypesStandardD13V2, VMSizeTypesStandardD13V2Promo, VMSizeTypesStandardD14, VMSizeTypesStandardD14V2, VMSizeTypesStandardD14V2Promo, VMSizeTypesStandardD15V2, VMSizeTypesStandardD16sV3, VMSizeTypesStandardD16V3, VMSizeTypesStandardD1V2, VMSizeTypesStandardD2, VMSizeTypesStandardD2sV3, VMSizeTypesStandardD2V2, VMSizeTypesStandardD2V2Promo, VMSizeTypesStandardD2V3, VMSizeTypesStandardD3, VMSizeTypesStandardD32sV3, VMSizeTypesStandardD32V3, VMSizeTypesStandardD3V2, VMSizeTypesStandardD3V2Promo, VMSizeTypesStandardD4, VMSizeTypesStandardD4sV3, VMSizeTypesStandardD4V2, VMSizeTypesStandardD4V2Promo, VMSizeTypesStandardD4V3, VMSizeTypesStandardD5V2, VMSizeTypesStandardD5V2Promo, VMSizeTypesStandardD64sV3, VMSizeTypesStandardD64V3, VMSizeTypesStandardD8sV3, VMSizeTypesStandardD8V3, VMSizeTypesStandardDS1, VMSizeTypesStandardDS11, VMSizeTypesStandardDS11V2, VMSizeTypesStandardDS11V2Promo, VMSizeTypesStandardDS12, VMSizeTypesStandardDS12V2, VMSizeTypesStandardDS12V2Promo, VMSizeTypesStandardDS13, VMSizeTypesStandardDS132V2, VMSizeTypesStandardDS134V2, VMSizeTypesStandardDS13V2, VMSizeTypesStandardDS13V2Promo, VMSizeTypesStandardDS14, VMSizeTypesStandardDS144V2, VMSizeTypesStandardDS148V2, VMSizeTypesStandardDS14V2, VMSizeTypesStandardDS14V2Promo, VMSizeTypesStandardDS15V2, VMSizeTypesStandardDS1V2, VMSizeTypesStandardDS2, VMSizeTypesStandardDS2V2, VMSizeTypesStandardDS2V2Promo, VMSizeTypesStandardDS3, VMSizeTypesStandardDS3V2, VMSizeTypesStandardDS3V2Promo, VMSizeTypesStandardDS4, VMSizeTypesStandardDS4V2, VMSizeTypesStandardDS4V2Promo, VMSizeTypesStandardDS5V2, VMSizeTypesStandardDS5V2Promo, VMSizeTypesStandardE16sV3, VMSizeTypesStandardE16V3, VMSizeTypesStandardE2sV3, VMSizeTypesStandardE2V3, VMSizeTypesStandardE3216sV3, VMSizeTypesStandardE328sV3, VMSizeTypesStandardE32sV3, VMSizeTypesStandardE32V3, VMSizeTypesStandardE4sV3, VMSizeTypesStandardE4V3, VMSizeTypesStandardE6416sV3, VMSizeTypesStandardE6432sV3, VMSizeTypesStandardE64sV3, VMSizeTypesStandardE64V3, VMSizeTypesStandardE8sV3, VMSizeTypesStandardE8V3, VMSizeTypesStandardF1, VMSizeTypesStandardF16, VMSizeTypesStandardF16s, VMSizeTypesStandardF16sV2, VMSizeTypesStandardF1s, VMSizeTypesStandardF2, VMSizeTypesStandardF2s, VMSizeTypesStandardF2sV2, VMSizeTypesStandardF32sV2, VMSizeTypesStandardF4, VMSizeTypesStandardF4s, VMSizeTypesStandardF4sV2, VMSizeTypesStandardF64sV2, VMSizeTypesStandardF72sV2, VMSizeTypesStandardF8, VMSizeTypesStandardF8s, VMSizeTypesStandardF8sV2, VMSizeTypesStandardG1, VMSizeTypesStandardG2, VMSizeTypesStandardG3, VMSizeTypesStandardG4, VMSizeTypesStandardG5, VMSizeTypesStandardGS1, VMSizeTypesStandardGS2, VMSizeTypesStandardGS3, VMSizeTypesStandardGS4, VMSizeTypesStandardGS44, VMSizeTypesStandardGS48, VMSizeTypesStandardGS5, VMSizeTypesStandardGS516, VMSizeTypesStandardGS58, VMSizeTypesStandardH16, VMSizeTypesStandardH16m, VMSizeTypesStandardH16mr, VMSizeTypesStandardH16r, VMSizeTypesStandardH8, VMSizeTypesStandardH8m, VMSizeTypesStandardL16s, VMSizeTypesStandardL32s, VMSizeTypesStandardL4s, VMSizeTypesStandardL8s, VMSizeTypesStandardM12832ms, VMSizeTypesStandardM12864ms, VMSizeTypesStandardM128ms, VMSizeTypesStandardM128s, VMSizeTypesStandardM6416ms, VMSizeTypesStandardM6432ms, VMSizeTypesStandardM64ms, VMSizeTypesStandardM64s, VMSizeTypesStandardNC12, VMSizeTypesStandardNC12sV2, VMSizeTypesStandardNC12sV3, VMSizeTypesStandardNC24, VMSizeTypesStandardNC24r, VMSizeTypesStandardNC24rsV2, VMSizeTypesStandardNC24rsV3, VMSizeTypesStandardNC24sV2, VMSizeTypesStandardNC24sV3, VMSizeTypesStandardNC6, VMSizeTypesStandardNC6sV2, VMSizeTypesStandardNC6sV3, VMSizeTypesStandardND12s, VMSizeTypesStandardND24rs, VMSizeTypesStandardND24s, VMSizeTypesStandardND6s, VMSizeTypesStandardNV12, VMSizeTypesStandardNV24, VMSizeTypesStandardNV6} -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go deleted file mode 100644 index 947e7db425f7..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go +++ /dev/null @@ -1,1380 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ManagedClustersClient is the the Container Service Client. -type ManagedClustersClient struct { - BaseClient -} - -// NewManagedClustersClient creates an instance of the ManagedClustersClient client. -func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { - return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient 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 NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { - return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes -// version. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// parameters - parameters supplied to the Create or Update a Managed Cluster operation. -func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.ManagedClusterProperties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}", pathParameters), - autorest.WithJSON(parameters), - 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 ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, 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 deletes the managed cluster with a specified resource group and name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}", 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 ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) 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 the details of the managed cluster with a specified resource group and name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}", 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 ManagedClustersClient) 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 ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource -// group and name. **WARNING**: This API will be deprecated. Instead use -// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) -// or -// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) -// . -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// roleName - the name of the role for managed cluster accessProfile resource. -func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "GetAccessProfile", err.Error()) - } - - req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request") - return - } - - resp, err := client.GetAccessProfileSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request") - return - } - - result, err = client.GetAccessProfileResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request") - return - } - - return -} - -// GetAccessProfilePreparer prepares the GetAccessProfile request. -func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "roleName": autorest.Encode("path", roleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetAccessProfileSender sends the GetAccessProfile request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetUpgradeProfile gets the details of the upgrade profile for a managed cluster with a specified resource group and -// name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "GetUpgradeProfile", err.Error()) - } - - req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request") - return - } - - resp, err := client.GetUpgradeProfileSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request") - return - } - - result, err = client.GetUpgradeProfileResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request") - return - } - - return -} - -// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. -func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed -// cluster. -func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List") - defer func() { - sc := -1 - if result.mclr.Response.Response != nil { - sc = result.mclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.mclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request") - return - } - - result.mclr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request") - return - } - if result.mclr.hasNextLink() && result.mclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", 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 ManagedClustersClient) 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 ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, 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 ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { - req, err := lastResults.managedClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "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, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.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) - return -} - -// ListByResourceGroup lists managed clusters in the specified subscription and resource group. The operation returns -// properties of each managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.mclr.Response.Response != nil { - sc = result.mclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ListByResourceGroup", err.Error()) - } - - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.mclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.mclr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.mclr.hasNextLink() && result.mclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { - req, err := lastResults.managedClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListClusterAdminCredentials gets cluster admin credential of the managed cluster with a specified resource group and -// name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterAdminCredentials", err.Error()) - } - - req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request") - return - } - - resp, err := client.ListClusterAdminCredentialsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure sending request") - return - } - - result, err = client.ListClusterAdminCredentialsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure responding to request") - return - } - - return -} - -// ListClusterAdminCredentialsPreparer prepares the ListClusterAdminCredentials request. -func (client ManagedClustersClient) ListClusterAdminCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListClusterAdminCredentialsSender sends the ListClusterAdminCredentials request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ListClusterAdminCredentialsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListClusterAdminCredentialsResponder handles the response to the ListClusterAdminCredentials request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified -// resource group and name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error()) - } - - req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request") - return - } - - resp, err := client.ListClusterMonitoringUserCredentialsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request") - return - } - - result, err = client.ListClusterMonitoringUserCredentialsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request") - return - } - - return -} - -// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request. -func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and -// name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterUserCredentials", err.Error()) - } - - req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request") - return - } - - resp, err := client.ListClusterUserCredentialsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure sending request") - return - } - - result, err = client.ListClusterUserCredentialsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure responding to request") - return - } - - return -} - -// ListClusterUserCredentialsPreparer prepares the ListClusterUserCredentials request. -func (client ManagedClustersClient) ListClusterUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListClusterUserCredentialsSender sends the ListClusterUserCredentials request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ListClusterUserCredentialsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListClusterUserCredentialsResponder handles the response to the ListClusterUserCredentials request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ResetAADProfile update the AAD Profile for a managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// parameters - parameters supplied to the Reset AAD Profile operation for a Managed Cluster. -func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (result ManagedClustersResetAADProfileFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetAADProfile") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ResetAADProfile", err.Error()) - } - - req, err := client.ResetAADProfilePreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure preparing request") - return - } - - result, err = client.ResetAADProfileSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetAADProfilePreparer prepares the ResetAADProfile request. -func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetAADProfileSender sends the ResetAADProfile request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// ResetServicePrincipalProfile update the service principal Profile for a managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// parameters - parameters supplied to the Reset Service Principal Profile operation for a Managed Cluster. -func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (result ManagedClustersResetServicePrincipalProfileFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetServicePrincipalProfile") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", err.Error()) - } - - req, err := client.ResetServicePrincipalProfilePreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure preparing request") - return - } - - result, err = client.ResetServicePrincipalProfileSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetServicePrincipalProfilePreparer prepares the ResetServicePrincipalProfile request. -func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetServicePrincipalProfileSender sends the ResetServicePrincipalProfile request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// RotateClusterCertificates rotate certificates of a managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersRotateClusterCertificatesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RotateClusterCertificates") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "RotateClusterCertificates", err.Error()) - } - - req, err := client.RotateClusterCertificatesPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure preparing request") - return - } - - result, err = client.RotateClusterCertificatesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request") - return - } - - return -} - -// RotateClusterCertificatesPreparer prepares the RotateClusterCertificates request. -func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RotateClusterCertificatesSender sends the RotateClusterCertificates request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RotateClusterCertificatesResponder handles the response to the RotateClusterCertificates request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) RotateClusterCertificatesResponder(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 -} - -// UpdateTags updates a managed cluster with the specified tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the managed cluster resource. -// parameters - parameters supplied to the Update Managed Cluster Tags operation. -func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: resourceName, - Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.ManagedClustersClient", "UpdateTags", err.Error()) - } - - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-04-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.ContainerService/managedClusters/{resourceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result ManagedCluster, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go deleted file mode 100644 index d530b962f7bb..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go +++ /dev/null @@ -1,3404 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice" - -// AccessProfile profile for enabling a user to access a managed cluster. -type AccessProfile struct { - // KubeConfig - Base64-encoded Kubernetes configuration file. - KubeConfig *[]byte `json:"kubeConfig,omitempty"` -} - -// AgentPool agent Pool. -type AgentPool struct { - autorest.Response `json:"-"` - // ManagedClusterAgentPoolProfileProperties - Properties of an agent pool. - *ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for AgentPool. -func (ap AgentPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ap.ManagedClusterAgentPoolProfileProperties != nil { - objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AgentPool struct. -func (ap *AgentPool) 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 managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties - err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties) - if err != nil { - return err - } - ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ap.Type = &typeVar - } - } - } - - return nil -} - -// AgentPoolAvailableVersions the list of available versions for an agent pool. -type AgentPoolAvailableVersions struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Id of the agent pool available versions. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of the agent pool available versions. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of the agent pool available versions. - Type *string `json:"type,omitempty"` - // AgentPoolAvailableVersionsProperties - Properties of agent pool available versions. - *AgentPoolAvailableVersionsProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions. -func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if apav.AgentPoolAvailableVersionsProperties != nil { - objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct. -func (apav *AgentPoolAvailableVersions) 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 "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - apav.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - apav.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - apav.Type = &typeVar - } - case "properties": - if v != nil { - var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties - err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties) - if err != nil { - return err - } - apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties - } - } - } - - return nil -} - -// AgentPoolAvailableVersionsProperties the list of available agent pool versions. -type AgentPoolAvailableVersionsProperties struct { - // AgentPoolVersions - List of versions available for agent pool. - AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"` -} - -// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ... -type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { - // Default - Whether this version is the default agent pool version. - Default *bool `json:"default,omitempty"` - // KubernetesVersion - Kubernetes version (major, minor, patch). - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // IsPreview - Whether Kubernetes version is currently in preview. - IsPreview *bool `json:"isPreview,omitempty"` -} - -// AgentPoolListResult the response from the List Agent Pools operation. -type AgentPoolListResult struct { - autorest.Response `json:"-"` - // Value - The list of agent pools. - Value *[]AgentPool `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of agent pool results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AgentPoolListResult. -func (aplr AgentPoolListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aplr.Value != nil { - objectMap["value"] = aplr.Value - } - return json.Marshal(objectMap) -} - -// AgentPoolListResultIterator provides access to a complete listing of AgentPool values. -type AgentPoolListResultIterator struct { - i int - page AgentPoolListResultPage -} - -// 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 *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.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 *AgentPoolListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AgentPoolListResultIterator) 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 AgentPoolListResultIterator) Response() AgentPoolListResult { - 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 AgentPoolListResultIterator) Value() AgentPool { - if !iter.page.NotDone() { - return AgentPool{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AgentPoolListResultIterator type. -func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator { - return AgentPoolListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (aplr AgentPoolListResult) IsEmpty() bool { - return aplr.Value == nil || len(*aplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (aplr AgentPoolListResult) hasNextLink() bool { - return aplr.NextLink != nil && len(*aplr.NextLink) != 0 -} - -// agentPoolListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) { - if !aplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aplr.NextLink))) -} - -// AgentPoolListResultPage contains a page of AgentPool values. -type AgentPoolListResultPage struct { - fn func(context.Context, AgentPoolListResult) (AgentPoolListResult, error) - aplr AgentPoolListResult -} - -// 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 *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.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.aplr) - if err != nil { - return err - } - page.aplr = 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 *AgentPoolListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AgentPoolListResultPage) NotDone() bool { - return !page.aplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AgentPoolListResultPage) Response() AgentPoolListResult { - return page.aplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AgentPoolListResultPage) Values() []AgentPool { - if page.aplr.IsEmpty() { - return nil - } - return *page.aplr.Value -} - -// Creates a new instance of the AgentPoolListResultPage type. -func NewAgentPoolListResultPage(cur AgentPoolListResult, getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage { - return AgentPoolListResultPage{ - fn: getNextPage, - aplr: cur, - } -} - -// AgentPoolProfile profile for the container service agent pool. -type AgentPoolProfile 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: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' - VMSize VMSizeTypes `json:"vmSize,omitempty"` - // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OsDiskSizeGB *int32 `json:"osDiskSizeGB,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"` - // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. - Ports *[]int32 `json:"ports,omitempty"` - // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' - StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` - // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AgentPoolProfile. -func (app AgentPoolProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if app.Name != nil { - objectMap["name"] = app.Name - } - if app.Count != nil { - objectMap["count"] = app.Count - } - if app.VMSize != "" { - objectMap["vmSize"] = app.VMSize - } - if app.OsDiskSizeGB != nil { - objectMap["osDiskSizeGB"] = app.OsDiskSizeGB - } - if app.DNSPrefix != nil { - objectMap["dnsPrefix"] = app.DNSPrefix - } - if app.Ports != nil { - objectMap["ports"] = app.Ports - } - if app.StorageProfile != "" { - objectMap["storageProfile"] = app.StorageProfile - } - if app.VnetSubnetID != nil { - objectMap["vnetSubnetID"] = app.VnetSubnetID - } - if app.OsType != "" { - objectMap["osType"] = app.OsType - } - return json.Marshal(objectMap) -} - -// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AgentPoolsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AgentPoolsClient) (AgentPool, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AgentPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AgentPoolsCreateOrUpdateFuture.Result. -func (future *AgentPoolsCreateOrUpdateFuture) result(client AgentPoolsClient) (ap AgentPool, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ap.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent { - ap, err = client.CreateOrUpdateResponder(ap.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request") - } - } - return -} - -// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AgentPoolsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AgentPoolsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AgentPoolsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AgentPoolsDeleteFuture.Result. -func (future *AgentPoolsDeleteFuture) result(client AgentPoolsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// AgentPoolUpgradeProfile the list of available upgrades for an agent pool. -type AgentPoolUpgradeProfile struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Id of the agent pool upgrade profile. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of the agent pool upgrade profile. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of the agent pool upgrade profile. - Type *string `json:"type,omitempty"` - // AgentPoolUpgradeProfileProperties - Properties of agent pool upgrade profile. - *AgentPoolUpgradeProfileProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile. -func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if apup.AgentPoolUpgradeProfileProperties != nil { - objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct. -func (apup *AgentPoolUpgradeProfile) 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 "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - apup.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - apup.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - apup.Type = &typeVar - } - case "properties": - if v != nil { - var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties - err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties) - if err != nil { - return err - } - apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties - } - } - } - - return nil -} - -// AgentPoolUpgradeProfileProperties the list of available upgrade versions. -type AgentPoolUpgradeProfileProperties struct { - // KubernetesVersion - Kubernetes version (major, minor, patch). - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` - // Upgrades - List of orchestrator types and versions available for upgrade. - Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"` - // LatestNodeImageVersion - LatestNodeImageVersion is the latest AKS supported node image version. - LatestNodeImageVersion *string `json:"latestNodeImageVersion,omitempty"` -} - -// AgentPoolUpgradeProfilePropertiesUpgradesItem ... -type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { - // KubernetesVersion - Kubernetes version (major, minor, patch). - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // IsPreview - Whether Kubernetes version is currently in preview. - IsPreview *bool `json:"isPreview,omitempty"` -} - -// AgentPoolUpgradeSettings settings for upgrading an agentpool -type AgentPoolUpgradeSettings struct { - // MaxSurge - Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - MaxSurge *string `json:"maxSurge,omitempty"` -} - -// CloudError an error response from the Container service. -type CloudError struct { - // Error - Details about the error. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody an error response from the Container service. -type CloudErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. - Details *[]CloudErrorBody `json:"details,omitempty"` -} - -// ContainerService container service. -type ContainerService struct { - autorest.Response `json:"-"` - // Properties - Properties of the container service. - *Properties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for ContainerService. -func (cs ContainerService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cs.Properties != nil { - objectMap["properties"] = cs.Properties - } - if cs.Location != nil { - objectMap["location"] = cs.Location - } - if cs.Tags != nil { - objectMap["tags"] = cs.Tags - } - return json.Marshal(objectMap) -} - -// 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 { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - cs.Properties = &properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cs.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cs.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cs.Tags = tags - } - } - } - - return nil -} - -// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ContainerServicesCreateOrUpdateFutureType struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ContainerServicesClient) (ContainerService, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ContainerServicesCreateOrUpdateFutureType) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ContainerServicesCreateOrUpdateFutureType.Result. -func (future *ContainerServicesCreateOrUpdateFutureType) result(client ContainerServicesClient) (cs ContainerService, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") - return - } - if !done { - cs.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") - 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, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request") - } - } - return -} - -// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ContainerServicesDeleteFutureType struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ContainerServicesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ContainerServicesDeleteFutureType) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ContainerServicesDeleteFutureType.Result. -func (future *ContainerServicesDeleteFutureType) 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, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") - return - } - ar.Response = future.Response() - return -} - -// CredentialResult the credential result response. -type CredentialResult struct { - // Name - READ-ONLY; The name of the credential. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; Base64-encoded Kubernetes configuration file. - Value *[]byte `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for CredentialResult. -func (cr CredentialResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CredentialResults the list of credential result response. -type CredentialResults struct { - autorest.Response `json:"-"` - // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file. - Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` -} - -// MarshalJSON is the custom marshaler for CredentialResults. -func (cr CredentialResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CustomProfile properties to configure a custom container service cluster. -type CustomProfile struct { - // Orchestrator - The name of the custom orchestrator to use. - Orchestrator *string `json:"orchestrator,omitempty"` -} - -// DiagnosticsProfile profile for diagnostics on the container service cluster. -type DiagnosticsProfile struct { - // VMDiagnostics - Profile for diagnostics on the container service VMs. - VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"` -} - -// KeyVaultSecretRef reference to a secret stored in Azure Key Vault. -type KeyVaultSecretRef struct { - // VaultID - Key vault identifier. - VaultID *string `json:"vaultID,omitempty"` - // SecretName - The secret name. - SecretName *string `json:"secretName,omitempty"` - // Version - The secret version. - Version *string `json:"version,omitempty"` -} - -// LinuxProfile profile for Linux VMs in the container service cluster. -type LinuxProfile struct { - // AdminUsername - The administrator username to use for Linux VMs. - AdminUsername *string `json:"adminUsername,omitempty"` - // SSH - SSH configuration for Linux-based VMs running on Azure. - SSH *SSHConfiguration `json:"ssh,omitempty"` -} - -// ListResult the response from the List Container Services operation. -type ListResult struct { - autorest.Response `json:"-"` - // Value - The list of container services. - Value *[]ContainerService `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of container service results. - 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 ContainerService values. -type ListResultIterator struct { - i int - page ListResultPage -} - -// 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 *ListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.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 *ListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListResultIterator) 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 ListResultIterator) Response() ListResult { - 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 ListResultIterator) Value() ContainerService { - if !iter.page.NotDone() { - return ContainerService{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListResultIterator type. -func NewListResultIterator(page ListResultPage) ListResultIterator { - return ListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lr.NextLink))) -} - -// ListResultPage contains a page of ContainerService values. -type ListResultPage struct { - fn func(context.Context, ListResult) (ListResult, error) - lr ListResult -} - -// 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 *ListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.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.lr) - if err != nil { - return err - } - page.lr = 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 *ListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListResultPage) NotDone() bool { - return !page.lr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListResultPage) Response() ListResult { - return page.lr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListResultPage) Values() []ContainerService { - if page.lr.IsEmpty() { - return nil - } - return *page.lr.Value -} - -// Creates a new instance of the ListResultPage type. -func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { - return ListResultPage{ - fn: getNextPage, - lr: cur, - } -} - -// ManagedCluster managed cluster. -type ManagedCluster struct { - autorest.Response `json:"-"` - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` - // Identity - The identity of the managed cluster, if configured. - Identity *ManagedClusterIdentity `json:"identity,omitempty"` - // Sku - The managed cluster SKU. - Sku *ManagedClusterSKU `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"` -} - -// MarshalJSON is the custom marshaler for ManagedCluster. -func (mc ManagedCluster) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mc.ManagedClusterProperties != nil { - objectMap["properties"] = mc.ManagedClusterProperties - } - if mc.Identity != nil { - objectMap["identity"] = mc.Identity - } - if mc.Sku != nil { - objectMap["sku"] = mc.Sku - } - if mc.Location != nil { - objectMap["location"] = mc.Location - } - if mc.Tags != nil { - objectMap["tags"] = mc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct. -func (mc *ManagedCluster) 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 managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - mc.ManagedClusterProperties = &managedClusterProperties - } - case "identity": - if v != nil { - var identity ManagedClusterIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - mc.Identity = &identity - } - case "sku": - if v != nil { - var sku ManagedClusterSKU - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - mc.Sku = &sku - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - mc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mc.Tags = tags - } - } - } - - return nil -} - -// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration. -type ManagedClusterAADProfile struct { - // Managed - Whether to enable managed AAD. - Managed *bool `json:"managed,omitempty"` - // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. - AdminGroupObjectIDs *[]string `json:"adminGroupObjectIDs,omitempty"` - // ClientAppID - The client AAD application ID. - ClientAppID *string `json:"clientAppID,omitempty"` - // ServerAppID - The server AAD application ID. - ServerAppID *string `json:"serverAppID,omitempty"` - // ServerAppSecret - The server AAD application secret. - ServerAppSecret *string `json:"serverAppSecret,omitempty"` - // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - TenantID *string `json:"tenantID,omitempty"` -} - -// ManagedClusterAccessProfile managed cluster Access Profile. -type ManagedClusterAccessProfile struct { - autorest.Response `json:"-"` - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. -func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcap.AccessProfile != nil { - objectMap["properties"] = mcap.AccessProfile - } - if mcap.Location != nil { - objectMap["location"] = mcap.Location - } - if mcap.Tags != nil { - objectMap["tags"] = mcap.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct. -func (mcap *ManagedClusterAccessProfile) 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 accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - mcap.AccessProfile = &accessProfile - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mcap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mcap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mcap.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - mcap.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - mcap.Tags = tags - } - } - } - - return nil -} - -// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster. -type ManagedClusterAddonProfile struct { - // Enabled - Whether the add-on is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // Config - Key-value pairs for configuring an add-on. - Config map[string]*string `json:"config"` - // Identity - READ-ONLY; Information of user assigned identity used by this add-on. - Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile. -func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcap.Enabled != nil { - objectMap["enabled"] = mcap.Enabled - } - if mcap.Config != nil { - objectMap["config"] = mcap.Config - } - return json.Marshal(objectMap) -} - -// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on. -type ManagedClusterAddonProfileIdentity struct { - // ResourceID - The resource id of the user assigned identity. - ResourceID *string `json:"resourceId,omitempty"` - // ClientID - The client id of the user assigned identity. - ClientID *string `json:"clientId,omitempty"` - // ObjectID - The object id of the user assigned identity. - ObjectID *string `json:"objectId,omitempty"` -} - -// ManagedClusterAgentPoolProfile profile for the container service agent pool. -type ManagedClusterAgentPoolProfile 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 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - Count *int32 `json:"count,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' - VMSize VMSizeTypes `json:"vmSize,omitempty"` - // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` - // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - // MaxPods - Maximum number of pods that can run on a node. - MaxPods *int32 `json:"maxPods,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` - // MaxCount - Maximum number of nodes for auto-scaling - MaxCount *int32 `json:"maxCount,omitempty"` - // MinCount - Minimum number of nodes for auto-scaling - MinCount *int32 `json:"minCount,omitempty"` - // EnableAutoScaling - Whether to enable auto-scaler - EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` - // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - Type AgentPoolType `json:"type,omitempty"` - // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' - Mode AgentPoolMode `json:"mode,omitempty"` - // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - // NodeImageVersion - Version of node image - NodeImageVersion *string `json:"nodeImageVersion,omitempty"` - // UpgradeSettings - Settings for upgrading the agentpool - UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` - // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - AvailabilityZones *[]string `json:"availabilityZones,omitempty"` - // EnableNodePublicIP - Enable public IP for nodes - EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` - // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular' - ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` - // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' - ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` - // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` - // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. - Tags map[string]*string `json:"tags"` - // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. - NodeLabels map[string]*string `json:"nodeLabels"` - // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - NodeTaints *[]string `json:"nodeTaints,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile. -func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcapp.Name != nil { - objectMap["name"] = mcapp.Name - } - if mcapp.Count != nil { - objectMap["count"] = mcapp.Count - } - if mcapp.VMSize != "" { - objectMap["vmSize"] = mcapp.VMSize - } - if mcapp.OsDiskSizeGB != nil { - objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB - } - if mcapp.VnetSubnetID != nil { - objectMap["vnetSubnetID"] = mcapp.VnetSubnetID - } - if mcapp.MaxPods != nil { - objectMap["maxPods"] = mcapp.MaxPods - } - if mcapp.OsType != "" { - objectMap["osType"] = mcapp.OsType - } - if mcapp.MaxCount != nil { - objectMap["maxCount"] = mcapp.MaxCount - } - if mcapp.MinCount != nil { - objectMap["minCount"] = mcapp.MinCount - } - if mcapp.EnableAutoScaling != nil { - objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling - } - if mcapp.Type != "" { - objectMap["type"] = mcapp.Type - } - if mcapp.Mode != "" { - objectMap["mode"] = mcapp.Mode - } - if mcapp.OrchestratorVersion != nil { - objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion - } - if mcapp.NodeImageVersion != nil { - objectMap["nodeImageVersion"] = mcapp.NodeImageVersion - } - if mcapp.UpgradeSettings != nil { - objectMap["upgradeSettings"] = mcapp.UpgradeSettings - } - if mcapp.AvailabilityZones != nil { - objectMap["availabilityZones"] = mcapp.AvailabilityZones - } - if mcapp.EnableNodePublicIP != nil { - objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP - } - if mcapp.ScaleSetPriority != "" { - objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority - } - if mcapp.ScaleSetEvictionPolicy != "" { - objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy - } - if mcapp.SpotMaxPrice != nil { - objectMap["spotMaxPrice"] = mcapp.SpotMaxPrice - } - if mcapp.Tags != nil { - objectMap["tags"] = mcapp.Tags - } - if mcapp.NodeLabels != nil { - objectMap["nodeLabels"] = mcapp.NodeLabels - } - if mcapp.NodeTaints != nil { - objectMap["nodeTaints"] = mcapp.NodeTaints - } - return json.Marshal(objectMap) -} - -// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile. -type ManagedClusterAgentPoolProfileProperties struct { - // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - Count *int32 `json:"count,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' - VMSize VMSizeTypes `json:"vmSize,omitempty"` - // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` - // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - // MaxPods - Maximum number of pods that can run on a node. - MaxPods *int32 `json:"maxPods,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` - // MaxCount - Maximum number of nodes for auto-scaling - MaxCount *int32 `json:"maxCount,omitempty"` - // MinCount - Minimum number of nodes for auto-scaling - MinCount *int32 `json:"minCount,omitempty"` - // EnableAutoScaling - Whether to enable auto-scaler - EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` - // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - Type AgentPoolType `json:"type,omitempty"` - // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' - Mode AgentPoolMode `json:"mode,omitempty"` - // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - // NodeImageVersion - Version of node image - NodeImageVersion *string `json:"nodeImageVersion,omitempty"` - // UpgradeSettings - Settings for upgrading the agentpool - UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` - // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - AvailabilityZones *[]string `json:"availabilityZones,omitempty"` - // EnableNodePublicIP - Enable public IP for nodes - EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` - // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular' - ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` - // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' - ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` - // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` - // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. - Tags map[string]*string `json:"tags"` - // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. - NodeLabels map[string]*string `json:"nodeLabels"` - // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - NodeTaints *[]string `json:"nodeTaints,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties. -func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcappp.Count != nil { - objectMap["count"] = mcappp.Count - } - if mcappp.VMSize != "" { - objectMap["vmSize"] = mcappp.VMSize - } - if mcappp.OsDiskSizeGB != nil { - objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB - } - if mcappp.VnetSubnetID != nil { - objectMap["vnetSubnetID"] = mcappp.VnetSubnetID - } - if mcappp.MaxPods != nil { - objectMap["maxPods"] = mcappp.MaxPods - } - if mcappp.OsType != "" { - objectMap["osType"] = mcappp.OsType - } - if mcappp.MaxCount != nil { - objectMap["maxCount"] = mcappp.MaxCount - } - if mcappp.MinCount != nil { - objectMap["minCount"] = mcappp.MinCount - } - if mcappp.EnableAutoScaling != nil { - objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling - } - if mcappp.Type != "" { - objectMap["type"] = mcappp.Type - } - if mcappp.Mode != "" { - objectMap["mode"] = mcappp.Mode - } - if mcappp.OrchestratorVersion != nil { - objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion - } - if mcappp.NodeImageVersion != nil { - objectMap["nodeImageVersion"] = mcappp.NodeImageVersion - } - if mcappp.UpgradeSettings != nil { - objectMap["upgradeSettings"] = mcappp.UpgradeSettings - } - if mcappp.AvailabilityZones != nil { - objectMap["availabilityZones"] = mcappp.AvailabilityZones - } - if mcappp.EnableNodePublicIP != nil { - objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP - } - if mcappp.ScaleSetPriority != "" { - objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority - } - if mcappp.ScaleSetEvictionPolicy != "" { - objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy - } - if mcappp.SpotMaxPrice != nil { - objectMap["spotMaxPrice"] = mcappp.SpotMaxPrice - } - if mcappp.Tags != nil { - objectMap["tags"] = mcappp.Tags - } - if mcappp.NodeLabels != nil { - objectMap["nodeLabels"] = mcappp.NodeLabels - } - if mcappp.NodeTaints != nil { - objectMap["nodeTaints"] = mcappp.NodeTaints - } - return json.Marshal(objectMap) -} - -// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server. -type ManagedClusterAPIServerAccessProfile struct { - // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. - AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"` - // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. - EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` -} - -// ManagedClusterIdentity identity for the managed cluster. -type ManagedClusterIdentity struct { - // PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components. - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components. - TenantID *string `json:"tenantId,omitempty"` - // Type - The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. Possible values include: 'SystemAssigned', 'None' - Type ResourceIdentityType `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterIdentity. -func (mci ManagedClusterIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mci.Type != "" { - objectMap["type"] = mci.Type - } - return json.Marshal(objectMap) -} - -// ManagedClusterListResult the response from the List Managed Clusters operation. -type ManagedClusterListResult struct { - autorest.Response `json:"-"` - // Value - The list of managed clusters. - Value *[]ManagedCluster `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of managed cluster results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterListResult. -func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mclr.Value != nil { - objectMap["value"] = mclr.Value - } - return json.Marshal(objectMap) -} - -// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values. -type ManagedClusterListResultIterator struct { - i int - page ManagedClusterListResultPage -} - -// 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 *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.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 *ManagedClusterListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ManagedClusterListResultIterator) 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 ManagedClusterListResultIterator) Response() ManagedClusterListResult { - 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 ManagedClusterListResultIterator) Value() ManagedCluster { - if !iter.page.NotDone() { - return ManagedCluster{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ManagedClusterListResultIterator type. -func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator { - return ManagedClusterListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (mclr ManagedClusterListResult) IsEmpty() bool { - return mclr.Value == nil || len(*mclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (mclr ManagedClusterListResult) hasNextLink() bool { - return mclr.NextLink != nil && len(*mclr.NextLink) != 0 -} - -// managedClusterListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { - if !mclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(mclr.NextLink))) -} - -// ManagedClusterListResultPage contains a page of ManagedCluster values. -type ManagedClusterListResultPage struct { - fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error) - mclr ManagedClusterListResult -} - -// 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 *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.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.mclr) - if err != nil { - return err - } - page.mclr = 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 *ManagedClusterListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ManagedClusterListResultPage) NotDone() bool { - return !page.mclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ManagedClusterListResultPage) Response() ManagedClusterListResult { - return page.mclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ManagedClusterListResultPage) Values() []ManagedCluster { - if page.mclr.IsEmpty() { - return nil - } - return *page.mclr.Value -} - -// Creates a new instance of the ManagedClusterListResultPage type. -func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage { - return ManagedClusterListResultPage{ - fn: getNextPage, - mclr: cur, - } -} - -// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer. -type ManagedClusterLoadBalancerProfile struct { - // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer. - ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"` - // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer. - OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"` - // OutboundIPs - Desired outbound IP resources for the cluster load balancer. - OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"` - // EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer. - EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"` - // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` -} - -// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load -// balancer. -type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct { - // Count - Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. - Count *int32 `json:"count,omitempty"` -} - -// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster -// load balancer. -type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct { - // PublicIPPrefixes - A list of public IP prefix resources. - PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"` -} - -// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load -// balancer. -type ManagedClusterLoadBalancerProfileOutboundIPs struct { - // PublicIPs - A list of public IP resources. - PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"` -} - -// ManagedClusterPoolUpgradeProfile the list of available upgrade versions. -type ManagedClusterPoolUpgradeProfile struct { - // KubernetesVersion - Kubernetes version (major, minor, patch). - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // Name - Pool name. - Name *string `json:"name,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` - // Upgrades - List of orchestrator types and versions available for upgrade. - Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"` -} - -// ManagedClusterPoolUpgradeProfileUpgradesItem ... -type ManagedClusterPoolUpgradeProfileUpgradesItem struct { - // KubernetesVersion - Kubernetes version (major, minor, patch). - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // IsPreview - Whether Kubernetes version is currently in preview. - IsPreview *bool `json:"isPreview,omitempty"` -} - -// ManagedClusterProperties properties of the managed cluster. -type ManagedClusterProperties struct { - // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster. - MaxAgentPools *int32 `json:"maxAgentPools,omitempty"` - // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` - // DNSPrefix - DNS prefix specified when creating the managed cluster. - DNSPrefix *string `json:"dnsPrefix,omitempty"` - // Fqdn - READ-ONLY; FQDN for the master pool. - Fqdn *string `json:"fqdn,omitempty"` - // PrivateFQDN - READ-ONLY; FQDN of private cluster. - PrivateFQDN *string `json:"privateFQDN,omitempty"` - // AgentPoolProfiles - Properties of the agent pool. - AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` - // LinuxProfile - Profile for Linux VMs in the container service cluster. - LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` - // WindowsProfile - Profile for Windows VMs in the container service cluster. - WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` - // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. - ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` - // AddonProfiles - Profile of managed cluster add-on. - AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"` - // NodeResourceGroup - Name of the resource group containing agent pool nodes. - NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` - // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. - EnableRBAC *bool `json:"enableRBAC,omitempty"` - // EnablePodSecurityPolicy - (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` - // NetworkProfile - Profile of network configuration. - NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"` - // AadProfile - Profile of Azure Active Directory configuration. - AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` - // AutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled - AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"` - // APIServerAccessProfile - Access profile for managed cluster API server. - APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` - // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest. - DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` - // IdentityProfile - Identities associated with the cluster. - IdentityProfile map[string]*ManagedClusterPropertiesIdentityProfileValue `json:"identityProfile"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterProperties. -func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcp.KubernetesVersion != nil { - objectMap["kubernetesVersion"] = mcp.KubernetesVersion - } - if mcp.DNSPrefix != nil { - objectMap["dnsPrefix"] = mcp.DNSPrefix - } - if mcp.AgentPoolProfiles != nil { - objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles - } - if mcp.LinuxProfile != nil { - objectMap["linuxProfile"] = mcp.LinuxProfile - } - if mcp.WindowsProfile != nil { - objectMap["windowsProfile"] = mcp.WindowsProfile - } - if mcp.ServicePrincipalProfile != nil { - objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile - } - if mcp.AddonProfiles != nil { - objectMap["addonProfiles"] = mcp.AddonProfiles - } - if mcp.NodeResourceGroup != nil { - objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup - } - if mcp.EnableRBAC != nil { - objectMap["enableRBAC"] = mcp.EnableRBAC - } - if mcp.EnablePodSecurityPolicy != nil { - objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy - } - if mcp.NetworkProfile != nil { - objectMap["networkProfile"] = mcp.NetworkProfile - } - if mcp.AadProfile != nil { - objectMap["aadProfile"] = mcp.AadProfile - } - if mcp.AutoScalerProfile != nil { - objectMap["autoScalerProfile"] = mcp.AutoScalerProfile - } - if mcp.APIServerAccessProfile != nil { - objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile - } - if mcp.DiskEncryptionSetID != nil { - objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID - } - if mcp.IdentityProfile != nil { - objectMap["identityProfile"] = mcp.IdentityProfile - } - return json.Marshal(objectMap) -} - -// ManagedClusterPropertiesAutoScalerProfile parameters to be applied to the cluster-autoscaler when -// enabled -type ManagedClusterPropertiesAutoScalerProfile struct { - BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` - ScanInterval *string `json:"scan-interval,omitempty"` - ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` - ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` - ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` - ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` - ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` - ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` - MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` -} - -// ManagedClusterPropertiesIdentityProfileValue ... -type ManagedClusterPropertiesIdentityProfileValue struct { - // ResourceID - The resource id of the user assigned identity. - ResourceID *string `json:"resourceId,omitempty"` - // ClientID - The client id of the user assigned identity. - ClientID *string `json:"clientId,omitempty"` - // ObjectID - The object id of the user assigned identity. - ObjectID *string `json:"objectId,omitempty"` -} - -// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedClustersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (ManagedCluster, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersCreateOrUpdateFuture.Result. -func (future *ManagedClustersCreateOrUpdateFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.CreateOrUpdateResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ManagedClustersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersDeleteFuture.Result. -func (future *ManagedClustersDeleteFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to -// use for manipulating Azure APIs. -type ManagedClusterServicePrincipalProfile struct { - // ClientID - The ID for the service principal. - ClientID *string `json:"clientId,omitempty"` - // Secret - The secret password associated with the service principal in plain text. - Secret *string `json:"secret,omitempty"` -} - -// ManagedClusterSKU ... -type ManagedClusterSKU struct { - // Name - Name of a managed cluster SKU. Possible values include: 'ManagedClusterSKUNameBasic' - Name ManagedClusterSKUName `json:"name,omitempty"` - // Tier - Tier of a managed cluster SKU. Possible values include: 'Paid', 'Free' - Tier ManagedClusterSKUTier `json:"tier,omitempty"` -} - -// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedClustersResetAADProfileFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersResetAADProfileFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersResetAADProfileFuture.Result. -func (future *ManagedClustersResetAADProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ManagedClustersResetServicePrincipalProfileFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersResetServicePrincipalProfileFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersResetServicePrincipalProfileFuture.Result. -func (future *ManagedClustersResetServicePrincipalProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ManagedClustersRotateClusterCertificatesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersRotateClusterCertificatesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersRotateClusterCertificatesFuture.Result. -func (future *ManagedClustersRotateClusterCertificatesFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture") - return - } - ar.Response = future.Response() - return -} - -// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ManagedClustersUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ManagedClustersClient) (ManagedCluster, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ManagedClustersUpdateTagsFuture.Result. -func (future *ManagedClustersUpdateTagsFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - mc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { - mc, err = client.UpdateTagsResponder(mc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request") - } - } - return -} - -// ManagedClusterUpgradeProfile the list of available upgrades for compute pools. -type ManagedClusterUpgradeProfile struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Id of upgrade profile. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of upgrade profile. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of upgrade profile. - Type *string `json:"type,omitempty"` - // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile. - *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. -func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mcup.ManagedClusterUpgradeProfileProperties != nil { - objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. -func (mcup *ManagedClusterUpgradeProfile) 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 "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mcup.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mcup.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mcup.Type = &typeVar - } - case "properties": - if v != nil { - var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties - err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties) - if err != nil { - return err - } - mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties - } - } - } - - return nil -} - -// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles. -type ManagedClusterUpgradeProfileProperties struct { - // ControlPlaneProfile - The list of available upgrade versions for the control plane. - ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"` - // AgentPoolProfiles - The list of available upgrade versions for agent pools. - AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"` -} - -// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster. -type ManagedClusterWindowsProfile struct { - // AdminUsername - Specifies the name of the administrator account.

    **restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length:** 1 character

    **Max-length:** 20 characters - AdminUsername *string `json:"adminUsername,omitempty"` - // AdminPassword - Specifies the password of the administrator account.

    **Minimum-length:** 8 characters

    **Max-length:** 123 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - AdminPassword *string `json:"adminPassword,omitempty"` -} - -// MasterProfile profile for the container service master. -type MasterProfile 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 the master pool. - DNSPrefix *string `json:"dnsPrefix,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' - VMSize VMSizeTypes `json:"vmSize,omitempty"` - // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` - // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. - VnetSubnetID *string `json:"vnetSubnetID,omitempty"` - // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters. - FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"` - // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' - StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` - // Fqdn - READ-ONLY; FQDN for the master pool. - Fqdn *string `json:"fqdn,omitempty"` -} - -// MarshalJSON is the custom marshaler for MasterProfile. -func (mp MasterProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mp.Count != nil { - objectMap["count"] = mp.Count - } - if mp.DNSPrefix != nil { - objectMap["dnsPrefix"] = mp.DNSPrefix - } - if mp.VMSize != "" { - objectMap["vmSize"] = mp.VMSize - } - if mp.OsDiskSizeGB != nil { - objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB - } - if mp.VnetSubnetID != nil { - objectMap["vnetSubnetID"] = mp.VnetSubnetID - } - if mp.FirstConsecutiveStaticIP != nil { - objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP - } - if mp.StorageProfile != "" { - objectMap["storageProfile"] = mp.StorageProfile - } - return json.Marshal(objectMap) -} - -// NetworkProfile represents the OpenShift networking configuration -type NetworkProfile struct { - // VnetCidr - CIDR for the OpenShift Vnet. - VnetCidr *string `json:"vnetCidr,omitempty"` - // PeerVnetID - CIDR of the Vnet to peer. - PeerVnetID *string `json:"peerVnetId,omitempty"` - // VnetID - ID of the Vnet created for OSA cluster. - VnetID *string `json:"vnetId,omitempty"` -} - -// NetworkProfileType profile of network configuration. -type NetworkProfileType struct { - // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet' - NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"` - // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure' - NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"` - // NetworkMode - Network mode used for building Kubernetes network. Possible values include: 'Transparent', 'Bridge' - NetworkMode NetworkMode `json:"networkMode,omitempty"` - // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. - PodCidr *string `json:"podCidr,omitempty"` - // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - ServiceCidr *string `json:"serviceCidr,omitempty"` - // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. - DNSServiceIP *string `json:"dnsServiceIP,omitempty"` - // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. - DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` - // OutboundType - The outbound (egress) routing method. Possible values include: 'LoadBalancer', 'UserDefinedRouting' - OutboundType OutboundType `json:"outboundType,omitempty"` - // LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'Standard', 'Basic' - LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"` - // LoadBalancerProfile - Profile of the cluster load balancer. - LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` -} - -// OpenShiftManagedCluster openShift Managed cluster. -type OpenShiftManagedCluster struct { - autorest.Response `json:"-"` - // Plan - Define the resource plan as required by ARM for billing purposes - Plan *PurchasePlan `json:"plan,omitempty"` - // OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster. - *OpenShiftManagedClusterProperties `json:"properties,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"` -} - -// MarshalJSON is the custom marshaler for OpenShiftManagedCluster. -func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if osmc.Plan != nil { - objectMap["plan"] = osmc.Plan - } - if osmc.OpenShiftManagedClusterProperties != nil { - objectMap["properties"] = osmc.OpenShiftManagedClusterProperties - } - if osmc.Location != nil { - objectMap["location"] = osmc.Location - } - if osmc.Tags != nil { - objectMap["tags"] = osmc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct. -func (osmc *OpenShiftManagedCluster) 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 "plan": - if v != nil { - var plan PurchasePlan - err = json.Unmarshal(*v, &plan) - if err != nil { - return err - } - osmc.Plan = &plan - } - case "properties": - if v != nil { - var openShiftManagedClusterProperties OpenShiftManagedClusterProperties - err = json.Unmarshal(*v, &openShiftManagedClusterProperties) - if err != nil { - return err - } - osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - osmc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - osmc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - osmc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - osmc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - osmc.Tags = tags - } - } - } - - return nil -} - -// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD. -type OpenShiftManagedClusterAADIdentityProvider struct { - // ClientID - The clientId password associated with the provider. - ClientID *string `json:"clientId,omitempty"` - // Secret - The secret password associated with the provider. - Secret *string `json:"secret,omitempty"` - // TenantID - The tenantId associated with the provider. - TenantID *string `json:"tenantId,omitempty"` - // CustomerAdminGroupID - The groupId to be granted cluster admin role. - CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"` - // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' - Kind Kind `json:"kind,omitempty"` -} - -// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider. -func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) { - osmcaip.Kind = KindAADIdentityProvider - objectMap := make(map[string]interface{}) - if osmcaip.ClientID != nil { - objectMap["clientId"] = osmcaip.ClientID - } - if osmcaip.Secret != nil { - objectMap["secret"] = osmcaip.Secret - } - if osmcaip.TenantID != nil { - objectMap["tenantId"] = osmcaip.TenantID - } - if osmcaip.CustomerAdminGroupID != nil { - objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID - } - if osmcaip.Kind != "" { - objectMap["kind"] = osmcaip.Kind - } - return json.Marshal(objectMap) -} - -// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. -func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { - return &osmcaip, true -} - -// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. -func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { - return nil, false -} - -// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. -func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { - return &osmcaip, true -} - -// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs. -type OpenShiftManagedClusterAgentPoolProfile struct { - // Name - Unique name of the 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. - Count *int32 `json:"count,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' - VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` - // SubnetCidr - Subnet CIDR for the peering. - SubnetCidr *string `json:"subnetCidr,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` - // Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra' - Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"` -} - -// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift -// cluster. -type OpenShiftManagedClusterAuthProfile struct { - // IdentityProviders - Type of authentication profile to use. - IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"` -} - -// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. -type BasicOpenShiftManagedClusterBaseIdentityProvider interface { - AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) - AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) -} - -// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. -type OpenShiftManagedClusterBaseIdentityProvider struct { - // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' - Kind Kind `json:"kind,omitempty"` -} - -func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["kind"] { - case string(KindAADIdentityProvider): - var osmcaip OpenShiftManagedClusterAADIdentityProvider - err := json.Unmarshal(body, &osmcaip) - return osmcaip, err - default: - var osmcbip OpenShiftManagedClusterBaseIdentityProvider - err := json.Unmarshal(body, &osmcbip) - return osmcbip, err - } -} -func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages)) - - for index, rawMessage := range rawMessages { - osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage) - if err != nil { - return nil, err - } - osmcbipArray[index] = osmcbip - } - return osmcbipArray, nil -} - -// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider. -func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) { - osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider - objectMap := make(map[string]interface{}) - if osmcbip.Kind != "" { - objectMap["kind"] = osmcbip.Kind - } - return json.Marshal(objectMap) -} - -// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. -func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { - return nil, false -} - -// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. -func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { - return &osmcbip, true -} - -// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. -func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { - return &osmcbip, true -} - -// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used -// in the OpenShift cluster. -type OpenShiftManagedClusterIdentityProvider struct { - // Name - Name of the provider. - Name *string `json:"name,omitempty"` - // Provider - Configuration of the provider. - Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct. -func (osmcip *OpenShiftManagedClusterIdentityProvider) 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 - } - osmcip.Name = &name - } - case "provider": - if v != nil { - provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v) - if err != nil { - return err - } - osmcip.Provider = provider - } - } - } - - return nil -} - -// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation. -type OpenShiftManagedClusterListResult struct { - autorest.Response `json:"-"` - // Value - The list of OpenShift managed clusters. - Value *[]OpenShiftManagedCluster `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for OpenShiftManagedClusterListResult. -func (osmclr OpenShiftManagedClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if osmclr.Value != nil { - objectMap["value"] = osmclr.Value - } - return json.Marshal(objectMap) -} - -// OpenShiftManagedClusterListResultIterator provides access to a complete listing of -// OpenShiftManagedCluster values. -type OpenShiftManagedClusterListResultIterator struct { - i int - page OpenShiftManagedClusterListResultPage -} - -// 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 *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.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 *OpenShiftManagedClusterListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OpenShiftManagedClusterListResultIterator) 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 OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult { - 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 OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster { - if !iter.page.NotDone() { - return OpenShiftManagedCluster{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OpenShiftManagedClusterListResultIterator type. -func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator { - return OpenShiftManagedClusterListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool { - return osmclr.Value == nil || len(*osmclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (osmclr OpenShiftManagedClusterListResult) hasNextLink() bool { - return osmclr.NextLink != nil && len(*osmclr.NextLink) != 0 -} - -// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { - if !osmclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(osmclr.NextLink))) -} - -// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values. -type OpenShiftManagedClusterListResultPage struct { - fn func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error) - osmclr OpenShiftManagedClusterListResult -} - -// 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 *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.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.osmclr) - if err != nil { - return err - } - page.osmclr = 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 *OpenShiftManagedClusterListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OpenShiftManagedClusterListResultPage) NotDone() bool { - return !page.osmclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult { - return page.osmclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster { - if page.osmclr.IsEmpty() { - return nil - } - return *page.osmclr.Value -} - -// Creates a new instance of the OpenShiftManagedClusterListResultPage type. -func NewOpenShiftManagedClusterListResultPage(cur OpenShiftManagedClusterListResult, getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage { - return OpenShiftManagedClusterListResultPage{ - fn: getNextPage, - osmclr: cur, - } -} - -// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration -// for OpenShift master VMs. -type OpenShiftManagedClusterMasterPoolProfile struct { - // Name - Unique name of the master pool profile in the context of the subscription and resource group. - Name *string `json:"name,omitempty"` - // Count - Number of masters (VMs) to host docker containers. The default value is 3. - Count *int32 `json:"count,omitempty"` - // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' - VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` - // SubnetCidr - Subnet CIDR for the peering. - SubnetCidr *string `json:"subnetCidr,omitempty"` - // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' - OsType OSType `json:"osType,omitempty"` -} - -// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster. -type OpenShiftManagedClusterProperties struct { - // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // OpenShiftVersion - Version of OpenShift specified when creating the cluster. - OpenShiftVersion *string `json:"openShiftVersion,omitempty"` - // ClusterVersion - READ-ONLY; Version of OpenShift specified when creating the cluster. - ClusterVersion *string `json:"clusterVersion,omitempty"` - // PublicHostname - READ-ONLY; Service generated FQDN for OpenShift API server. - PublicHostname *string `json:"publicHostname,omitempty"` - // Fqdn - READ-ONLY; Service generated FQDN for OpenShift API server loadbalancer internal hostname. - Fqdn *string `json:"fqdn,omitempty"` - // NetworkProfile - Configuration for OpenShift networking. - NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` - // RouterProfiles - Configuration for OpenShift router(s). - RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"` - // MasterPoolProfile - Configuration for OpenShift master VMs. - MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"` - // AgentPoolProfiles - Configuration of OpenShift cluster VMs. - AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` - // AuthProfile - Configures OpenShift authentication. - AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"` -} - -// MarshalJSON is the custom marshaler for OpenShiftManagedClusterProperties. -func (osmcp OpenShiftManagedClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if osmcp.OpenShiftVersion != nil { - objectMap["openShiftVersion"] = osmcp.OpenShiftVersion - } - if osmcp.NetworkProfile != nil { - objectMap["networkProfile"] = osmcp.NetworkProfile - } - if osmcp.RouterProfiles != nil { - objectMap["routerProfiles"] = osmcp.RouterProfiles - } - if osmcp.MasterPoolProfile != nil { - objectMap["masterPoolProfile"] = osmcp.MasterPoolProfile - } - if osmcp.AgentPoolProfiles != nil { - objectMap["agentPoolProfiles"] = osmcp.AgentPoolProfiles - } - if osmcp.AuthProfile != nil { - objectMap["authProfile"] = osmcp.AuthProfile - } - return json.Marshal(objectMap) -} - -// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type OpenShiftManagedClustersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *OpenShiftManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for OpenShiftManagedClustersCreateOrUpdateFuture.Result. -func (future *OpenShiftManagedClustersCreateOrUpdateFuture) result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - osmc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { - osmc, err = client.CreateOrUpdateResponder(osmc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", osmc.Response.Response, "Failure responding to request") - } - } - return -} - -// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type OpenShiftManagedClustersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(OpenShiftManagedClustersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *OpenShiftManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for OpenShiftManagedClustersDeleteFuture.Result. -func (future *OpenShiftManagedClustersDeleteFuture) result(client OpenShiftManagedClustersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type OpenShiftManagedClustersUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *OpenShiftManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for OpenShiftManagedClustersUpdateTagsFuture.Result. -func (future *OpenShiftManagedClustersUpdateTagsFuture) result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - osmc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { - osmc, err = client.UpdateTagsResponder(osmc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", osmc.Response.Response, "Failure responding to request") - } - } - return -} - -// OpenShiftRouterProfile represents an OpenShift router -type OpenShiftRouterProfile struct { - // Name - Name of the router profile. - Name *string `json:"name,omitempty"` - // PublicSubdomain - READ-ONLY; DNS subdomain for OpenShift router. - PublicSubdomain *string `json:"publicSubdomain,omitempty"` - // Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router. - Fqdn *string `json:"fqdn,omitempty"` -} - -// MarshalJSON is the custom marshaler for OpenShiftRouterProfile. -func (osrp OpenShiftRouterProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if osrp.Name != nil { - objectMap["name"] = osrp.Name - } - return json.Marshal(objectMap) -} - -// OperationListResult the List Compute Operation operation response. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; The list of compute operations - Value *[]OperationValue `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationListResult. -func (olr OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OperationValue describes the properties of a Compute Operation value. -type OperationValue struct { - // Origin - READ-ONLY; The origin of the compute operation. - Origin *string `json:"origin,omitempty"` - // Name - READ-ONLY; The name of the compute operation. - Name *string `json:"name,omitempty"` - // OperationValueDisplay - Describes the properties of a Compute Operation Value Display. - *OperationValueDisplay `json:"display,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationValue. -func (ov OperationValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ov.OperationValueDisplay != nil { - objectMap["display"] = ov.OperationValueDisplay - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OperationValue struct. -func (ov *OperationValue) 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 "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - ov.Origin = &origin - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ov.Name = &name - } - case "display": - if v != nil { - var operationValueDisplay OperationValueDisplay - err = json.Unmarshal(*v, &operationValueDisplay) - if err != nil { - return err - } - ov.OperationValueDisplay = &operationValueDisplay - } - } - } - - return nil -} - -// OperationValueDisplay describes the properties of a Compute Operation Value Display. -type OperationValueDisplay struct { - // Operation - READ-ONLY; The display name of the compute operation. - Operation *string `json:"operation,omitempty"` - // Resource - READ-ONLY; The display name of the resource the operation applies to. - Resource *string `json:"resource,omitempty"` - // Description - READ-ONLY; The description of the operation. - Description *string `json:"description,omitempty"` - // Provider - READ-ONLY; The resource provider for the operation. - Provider *string `json:"provider,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationValueDisplay. -func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// OrchestratorProfile contains information about orchestrator. -type OrchestratorProfile struct { - // OrchestratorType - Orchestrator type. - OrchestratorType *string `json:"orchestratorType,omitempty"` - // OrchestratorVersion - Orchestrator version (major, minor, patch). - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - // IsPreview - Whether Kubernetes version is currently in preview. - IsPreview *bool `json:"isPreview,omitempty"` -} - -// OrchestratorProfileType profile for the container service orchestrator. -type OrchestratorProfileType struct { - // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' - OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` - // OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` -} - -// OrchestratorVersionProfile the profile of an orchestrator and its available versions. -type OrchestratorVersionProfile struct { - // OrchestratorType - Orchestrator type. - OrchestratorType *string `json:"orchestratorType,omitempty"` - // OrchestratorVersion - Orchestrator version (major, minor, patch). - OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` - // Default - Installed by default if version is not specified. - Default *bool `json:"default,omitempty"` - // IsPreview - Whether Kubernetes version is currently in preview. - IsPreview *bool `json:"isPreview,omitempty"` - // Upgrades - The list of available upgrade versions. - Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"` -} - -// OrchestratorVersionProfileListResult the list of versions for supported orchestrators. -type OrchestratorVersionProfileListResult struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Id of the orchestrator version profile list result. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Name of the orchestrator version profile list result. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of the orchestrator version profile list result. - Type *string `json:"type,omitempty"` - // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile. - *OrchestratorVersionProfileProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. -func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ovplr.OrchestratorVersionProfileProperties != nil { - objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. -func (ovplr *OrchestratorVersionProfileListResult) 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 "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ovplr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ovplr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ovplr.Type = &typeVar - } - case "properties": - if v != nil { - var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties - err = json.Unmarshal(*v, &orchestratorVersionProfileProperties) - if err != nil { - return err - } - ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties - } - } - } - - return nil -} - -// OrchestratorVersionProfileProperties the properties of an orchestrator version profile. -type OrchestratorVersionProfileProperties struct { - // Orchestrators - List of orchestrator version profiles. - Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"` -} - -// Properties properties of the container service. -type Properties struct { - // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty"` - // OrchestratorProfile - Profile for the container service orchestrator. - OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"` - // CustomProfile - Properties to configure a custom container service cluster. - CustomProfile *CustomProfile `json:"customProfile,omitempty"` - // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. - ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` - // MasterProfile - Profile for the container service master. - MasterProfile *MasterProfile `json:"masterProfile,omitempty"` - // AgentPoolProfiles - Properties of the agent pool. - AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"` - // WindowsProfile - Profile for Windows VMs in the container service cluster. - WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"` - // LinuxProfile - Profile for Linux VMs in the container service cluster. - LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` - // DiagnosticsProfile - Profile for diagnostics in the container service cluster. - DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` -} - -// MarshalJSON is the custom marshaler for Properties. -func (p Properties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p.OrchestratorProfile != nil { - objectMap["orchestratorProfile"] = p.OrchestratorProfile - } - if p.CustomProfile != nil { - objectMap["customProfile"] = p.CustomProfile - } - if p.ServicePrincipalProfile != nil { - objectMap["servicePrincipalProfile"] = p.ServicePrincipalProfile - } - if p.MasterProfile != nil { - objectMap["masterProfile"] = p.MasterProfile - } - if p.AgentPoolProfiles != nil { - objectMap["agentPoolProfiles"] = p.AgentPoolProfiles - } - if p.WindowsProfile != nil { - objectMap["windowsProfile"] = p.WindowsProfile - } - if p.LinuxProfile != nil { - objectMap["linuxProfile"] = p.LinuxProfile - } - if p.DiagnosticsProfile != nil { - objectMap["diagnosticsProfile"] = p.DiagnosticsProfile - } - return json.Marshal(objectMap) -} - -// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. -type PurchasePlan struct { - // Name - The plan ID. - Name *string `json:"name,omitempty"` - // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. - Product *string `json:"product,omitempty"` - // PromotionCode - The promotion code. - PromotionCode *string `json:"promotionCode,omitempty"` - // Publisher - The plan ID. - Publisher *string `json:"publisher,omitempty"` -} - -// Resource the Resource model definition. -type Resource struct { - // 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"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// ResourceReference a reference to an Azure resource. -type ResourceReference struct { - // ID - The fully qualified Azure resource id. - ID *string `json:"id,omitempty"` -} - -// ServicePrincipalProfile information about a service principal identity for the cluster to use for -// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. -type ServicePrincipalProfile struct { - // ClientID - The ID for the service principal. - ClientID *string `json:"clientId,omitempty"` - // Secret - The secret password associated with the service principal in plain text. - Secret *string `json:"secret,omitempty"` - // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault. - KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"` -} - -// SSHConfiguration SSH configuration for Linux-based VMs running on Azure. -type SSHConfiguration struct { - // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` -} - -// SSHPublicKey contains information about SSH certificate public key data. -type SSHPublicKey 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"` -} - -// SubResource reference to another subresource. -type SubResource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubResource. -func (sr SubResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// TagsObject tags object for patch operations. -type TagsObject struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for TagsObject. -func (toVar TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if toVar.Tags != nil { - objectMap["tags"] = toVar.Tags - } - return json.Marshal(objectMap) -} - -// UserAssignedIdentity ... -type UserAssignedIdentity struct { - // ResourceID - The resource id of the user assigned identity. - ResourceID *string `json:"resourceId,omitempty"` - // ClientID - The client id of the user assigned identity. - ClientID *string `json:"clientId,omitempty"` - // ObjectID - The object id of the user assigned identity. - ObjectID *string `json:"objectId,omitempty"` -} - -// VMDiagnostics profile for diagnostics on the container service VMs. -type VMDiagnostics 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"` -} - -// MarshalJSON is the custom marshaler for VMDiagnostics. -func (vd VMDiagnostics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vd.Enabled != nil { - objectMap["enabled"] = vd.Enabled - } - return json.Marshal(objectMap) -} - -// WindowsProfile profile for Windows VMs in the container service cluster. -type WindowsProfile 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"` -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go deleted file mode 100644 index aad5edd3ba55..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go +++ /dev/null @@ -1,619 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// OpenShiftManagedClustersClient is the the Container Service Client. -type OpenShiftManagedClustersClient struct { - BaseClient -} - -// NewOpenShiftManagedClustersClient creates an instance of the OpenShiftManagedClustersClient client. -func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedClustersClient { - return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient 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 NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { - return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a OpenShift managed cluster with the specified configuration for agents and -// OpenShift version. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the OpenShift managed cluster resource. -// parameters - parameters supplied to the Create or Update an OpenShift Managed Cluster operation. -func (client OpenShiftManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (result OpenShiftManagedClustersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.OpenShiftVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile.Count", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client OpenShiftManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-30" - 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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), - autorest.WithJSON(parameters), - 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 OpenShiftManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftManagedClustersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client OpenShiftManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result OpenShiftManagedCluster, 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 deletes the OpenShift managed cluster with a specified resource group and name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the OpenShift managed cluster resource. -func (client OpenShiftManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedClustersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client OpenShiftManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-30" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", 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 OpenShiftManagedClustersClient) DeleteSender(req *http.Request) (future OpenShiftManagedClustersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client OpenShiftManagedClustersClient) 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 the details of the managed OpenShift cluster with a specified resource group and name. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the OpenShift managed cluster resource. -func (client OpenShiftManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedCluster, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client OpenShiftManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters/{resourceName}", 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 OpenShiftManagedClustersClient) 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 OpenShiftManagedClustersClient) GetResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of -// each OpenShift managed cluster. -func (client OpenShiftManagedClustersClient) List(ctx context.Context) (result OpenShiftManagedClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.List") - defer func() { - sc := -1 - if result.osmclr.Response.Response != nil { - sc = result.osmclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.osmclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure sending request") - return - } - - result.osmclr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure responding to request") - return - } - if result.osmclr.hasNextLink() && result.osmclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OpenShiftManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-30" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters", 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 OpenShiftManagedClustersClient) 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 OpenShiftManagedClustersClient) ListResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, 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 OpenShiftManagedClustersClient) listNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { - req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "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, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OpenShiftManagedClustersClient) ListComplete(ctx context.Context) (result OpenShiftManagedClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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) - return -} - -// ListByResourceGroup lists OpenShift managed clusters in the specified subscription and resource group. The operation -// returns properties of each OpenShift managed cluster. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client OpenShiftManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.osmclr.Response.Response != nil { - sc = result.osmclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", err.Error()) - } - - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.osmclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.osmclr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.osmclr.hasNextLink() && result.osmclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client OpenShiftManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client OpenShiftManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client OpenShiftManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client OpenShiftManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { - req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client OpenShiftManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates an OpenShift managed cluster with the specified tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// resourceName - the name of the OpenShift managed cluster resource. -// parameters - parameters supplied to the Update OpenShift Managed Cluster Tags operation. -func (client OpenShiftManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result OpenShiftManagedClustersUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "UpdateTags", err.Error()) - } - - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client OpenShiftManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "resourceName": autorest.Encode("path", resourceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-04-30" - 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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client OpenShiftManagedClustersClient) UpdateTagsSender(req *http.Request) (future OpenShiftManagedClustersUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client OpenShiftManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result OpenShiftManagedCluster, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go deleted file mode 100644 index cb4eeb2f27ae..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go +++ /dev/null @@ -1,98 +0,0 @@ -package containerservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the the Container Service Client. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of compute operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.ContainerService/operations"), - 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go deleted file mode 100644 index 1744f6527acd..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package containerservice - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " containerservice/2020-04-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json deleted file mode 100644 index a4996566876b..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md", - "tag": "package-2019-06", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/network/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go deleted file mode 100644 index 453710e76658..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go +++ /dev/null @@ -1,1476 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ApplicationGatewaysClient is the network Client -type ApplicationGatewaysClient struct { - BaseClient -} - -// NewApplicationGatewaysClient creates an instance of the ApplicationGatewaysClient client. -func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClient { - return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient 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 NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient { - return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// BackendHealth gets the backend health of the specified application gateway in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health. -func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (result ApplicationGatewaysBackendHealthFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealth") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.BackendHealthPreparer(ctx, resourceGroupName, applicationGatewayName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure preparing request") - return - } - - result, err = client.BackendHealthSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request") - return - } - - return -} - -// BackendHealthPreparer prepares the BackendHealth request. -func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// BackendHealthSender sends the BackendHealth request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// BackendHealthResponder handles the response to the BackendHealth request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Response) (result ApplicationGatewayBackendHealth, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// BackendHealthOnDemand gets the backend health for given combination of backend pool and http setting of the -// specified application gateway in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -// probeRequest - request body for on-demand test probe operation. -// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health. -func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (result ApplicationGatewaysBackendHealthOnDemandFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealthOnDemand") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.BackendHealthOnDemandPreparer(ctx, resourceGroupName, applicationGatewayName, probeRequest, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure preparing request") - return - } - - result, err = client.BackendHealthOnDemandSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", result.Response(), "Failure sending request") - return - } - - return -} - -// BackendHealthOnDemandPreparer prepares the BackendHealthOnDemand request. -func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand", pathParameters), - autorest.WithJSON(probeRequest), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// BackendHealthOnDemandSender sends the BackendHealthOnDemand request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// BackendHealthOnDemandResponder handles the response to the BackendHealthOnDemand request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) BackendHealthOnDemandResponder(resp *http.Response) (result ApplicationGatewayBackendHealthOnDemand, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates the specified application gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -// parameters - parameters supplied to the create or update application gateway operation. -func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (result ApplicationGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, - }}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, - }}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, - }}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/applicationGateways/{applicationGatewayName}", pathParameters), - autorest.WithJSON(parameters), - 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 ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationGateway, 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 deletes the specified application gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/applicationGateways/{applicationGatewayName}", 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 ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) 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 the specified application gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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, applicationGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/applicationGateways/{applicationGatewayName}", 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 ApplicationGatewaysClient) 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 ApplicationGatewaysClient) GetResponder(resp *http.Response) (result ApplicationGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetSslPredefinedPolicy gets Ssl predefined policy with the specified policy name. -// Parameters: -// predefinedPolicyName - name of Ssl predefined policy. -func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, predefinedPolicyName string) (result ApplicationGatewaySslPredefinedPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.GetSslPredefinedPolicy") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetSslPredefinedPolicyPreparer(ctx, predefinedPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.GetSslPredefinedPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure sending request") - return - } - - result, err = client.GetSslPredefinedPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure responding to request") - return - } - - return -} - -// GetSslPredefinedPolicyPreparer prepares the GetSslPredefinedPolicy request. -func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx context.Context, predefinedPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "predefinedPolicyName": autorest.Encode("path", predefinedPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSslPredefinedPolicySender sends the GetSslPredefinedPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) GetSslPredefinedPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSslPredefinedPolicyResponder handles the response to the GetSslPredefinedPolicy request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) GetSslPredefinedPolicyResponder(resp *http.Response) (result ApplicationGatewaySslPredefinedPolicy, 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 application gateways in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.List") - defer func() { - sc := -1 - if result.aglr.Response.Response != nil { - sc = result.aglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.aglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/applicationGateways", 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 ApplicationGatewaysClient) 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 ApplicationGatewaysClient) ListResponder(resp *http.Response) (result ApplicationGatewayListResult, 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 ApplicationGatewaysClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { - req, err := lastResults.applicationGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "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, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ApplicationGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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) - return -} - -// ListAll gets all the application gateways in a subscription. -func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result ApplicationGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") - defer func() { - sc := -1 - if result.aglr.Response.Response != nil { - sc = result.aglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.aglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAllResponder(resp *http.Response) (result ApplicationGatewayListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client ApplicationGatewaysClient) listAllNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) { - req, err := lastResults.applicationGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (result ApplicationGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListAvailableRequestHeaders lists all available request headers. -func (client ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context) (result ListString, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableRequestHeaders") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableRequestHeadersPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableRequestHeadersSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableRequestHeadersResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableRequestHeadersPreparer prepares the ListAvailableRequestHeaders request. -func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableRequestHeadersSender sends the ListAvailableRequestHeaders request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableRequestHeadersSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableRequestHeadersResponder(resp *http.Response) (result ListString, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAvailableResponseHeaders lists all available response headers. -func (client ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context) (result ListString, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableResponseHeaders") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableResponseHeadersPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableResponseHeadersSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableResponseHeadersResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableResponseHeadersPreparer prepares the ListAvailableResponseHeaders request. -func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableResponseHeadersSender sends the ListAvailableResponseHeaders request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableResponseHeadersSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableResponseHeadersResponder(resp *http.Response) (result ListString, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAvailableServerVariables lists all available server variables. -func (client ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context) (result ListString, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableServerVariables") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableServerVariablesPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableServerVariablesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableServerVariablesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableServerVariablesPreparer prepares the ListAvailableServerVariables request. -func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableServerVariablesSender sends the ListAvailableServerVariables request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableServerVariablesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableServerVariablesResponder(resp *http.Response) (result ListString, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy. -func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslOptions") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableSslOptionsPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableSslOptionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableSslOptionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableSslOptionsPreparer prepares the ListAvailableSslOptions request. -func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableSslOptionsSender sends the ListAvailableSslOptions request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableSslOptionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableSslOptionsResponder handles the response to the ListAvailableSslOptions request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableSslOptionsResponder(resp *http.Response) (result ApplicationGatewayAvailableSslOptions, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAvailableSslPredefinedPolicies lists all SSL predefined policies for configuring Ssl policy. -func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies") - defer func() { - sc := -1 - if result.agaspp.Response.Response != nil { - sc = result.agaspp.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAvailableSslPredefinedPoliciesNextResults - req, err := client.ListAvailableSslPredefinedPoliciesPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) - if err != nil { - result.agaspp.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAvailableSslPredefinedPoliciesPreparer prepares the ListAvailableSslPredefinedPolicies request. -func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableSslPredefinedPoliciesSender sends the ListAvailableSslPredefinedPolicies request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableSslPredefinedPoliciesResponder handles the response to the ListAvailableSslPredefinedPolicies request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesResponder(resp *http.Response) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAvailableSslPredefinedPoliciesNextResults retrieves the next set of results, if any. -func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextResults(ctx context.Context, lastResults ApplicationGatewayAvailableSslPredefinedPolicies) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { - req, err := lastResults.applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAvailableSslPredefinedPoliciesComplete enumerates all values, automatically crossing page boundaries as required. -func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies") - 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.ListAvailableSslPredefinedPolicies(ctx) - return -} - -// ListAvailableWafRuleSets lists all available web application firewall rule sets. -func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableWafRuleSets") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableWafRuleSetsPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", nil, "Failure preparing request") - return - } - - resp, err := client.ListAvailableWafRuleSetsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure sending request") - return - } - - result, err = client.ListAvailableWafRuleSetsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure responding to request") - return - } - - return -} - -// ListAvailableWafRuleSetsPreparer prepares the ListAvailableWafRuleSets request. -func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableWafRuleSetsSender sends the ListAvailableWafRuleSets request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAvailableWafRuleSetsResponder handles the response to the ListAvailableWafRuleSets request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsResponder(resp *http.Response) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Start starts the specified application gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Start") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartPreparer(ctx, resourceGroupName, applicationGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure preparing request") - return - } - - result, err = client.StartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request") - return - } - - return -} - -// StartPreparer prepares the Start request. -func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartSender sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartResponder handles the response to the Start request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Stop stops the specified application gateway in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStopFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Stop") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StopPreparer(ctx, resourceGroupName, applicationGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure preparing request") - return - } - - result, err = client.StopSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request") - return - } - - return -} - -// StopPreparer prepares the Stop request. -func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StopSender sends the Stop request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StopResponder handles the response to the Stop request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// UpdateTags updates the specified application gateway tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationGatewayName - the name of the application gateway. -// parameters - parameters supplied to update application gateway tags. -func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (result ApplicationGatewaysUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationGatewayName": autorest.Encode("path", applicationGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/applicationGateways/{applicationGatewayName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ApplicationGatewaysClient) UpdateTagsResponder(resp *http.Response) (result ApplicationGateway, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go deleted file mode 100644 index bd60a5a9225d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go +++ /dev/null @@ -1,580 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ApplicationSecurityGroupsClient is the network Client -type ApplicationSecurityGroupsClient struct { - BaseClient -} - -// NewApplicationSecurityGroupsClient creates an instance of the ApplicationSecurityGroupsClient client. -func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecurityGroupsClient { - return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient 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 NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient { - return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an application security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationSecurityGroupName - the name of the application security group. -// parameters - parameters supplied to the create or update ApplicationSecurityGroup operation. -func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (result ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ApplicationSecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationSecurityGroup, 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 deletes the specified application security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationSecurityGroupName - the name of the application security group. -func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, applicationSecurityGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ApplicationSecurityGroupsClient) 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 information about the specified application security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationSecurityGroupName - the name of the application security group. -func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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, applicationSecurityGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) 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 ApplicationSecurityGroupsClient) GetResponder(resp *http.Response) (result ApplicationSecurityGroup, 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 the application security groups in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.List") - defer func() { - sc := -1 - if result.asglr.Response.Response != nil { - sc = result.asglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.asglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/applicationSecurityGroups", 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 ApplicationSecurityGroupsClient) 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 ApplicationSecurityGroupsClient) ListResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, 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 ApplicationSecurityGroupsClient) listNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { - req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "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, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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) - return -} - -// ListAll gets all application security groups in a subscription. -func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (result ApplicationSecurityGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll") - defer func() { - sc := -1 - if result.asglr.Response.Response != nil { - sc = result.asglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.asglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client ApplicationSecurityGroupsClient) ListAllResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client ApplicationSecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { - req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context) (result ApplicationSecurityGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates an application security group's tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// applicationSecurityGroupName - the name of the application security group. -// parameters - parameters supplied to update application security group tags. -func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (result ApplicationSecurityGroupsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ApplicationSecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result ApplicationSecurityGroup, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go deleted file mode 100644 index ccbf2ba97b05..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go +++ /dev/null @@ -1,148 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AvailableDelegationsClient is the network Client -type AvailableDelegationsClient struct { - BaseClient -} - -// NewAvailableDelegationsClient creates an instance of the AvailableDelegationsClient client. -func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsClient { - return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient 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 NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient { - return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets all of the available subnet delegations for this subscription in this region. -// Parameters: -// location - the location of the subnet. -func (client AvailableDelegationsClient) List(ctx context.Context, location string) (result AvailableDelegationsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.List") - defer func() { - sc := -1 - if result.adr.Response.Response != nil { - sc = result.adr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.adr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AvailableDelegationsClient) 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations", 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 AvailableDelegationsClient) 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 AvailableDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, 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 AvailableDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) { - req, err := lastResults.availableDelegationsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "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, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailableDelegationsClient) ListComplete(ctx context.Context, location string) (result AvailableDelegationsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go deleted file mode 100644 index 9c193f48bc10..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go +++ /dev/null @@ -1,148 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AvailableEndpointServicesClient is the network Client -type AvailableEndpointServicesClient struct { - BaseClient -} - -// NewAvailableEndpointServicesClient creates an instance of the AvailableEndpointServicesClient client. -func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpointServicesClient { - return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient 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 NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient { - return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List list what values of endpoint services are available for use. -// Parameters: -// location - the location to check available endpoint services. -func (client AvailableEndpointServicesClient) List(ctx context.Context, location string) (result EndpointServicesListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.List") - defer func() { - sc := -1 - if result.eslr.Response.Response != nil { - sc = result.eslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.eslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AvailableEndpointServicesClient) 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices", 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 AvailableEndpointServicesClient) 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 AvailableEndpointServicesClient) ListResponder(resp *http.Response) (result EndpointServicesListResult, 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 AvailableEndpointServicesClient) listNextResults(ctx context.Context, lastResults EndpointServicesListResult) (result EndpointServicesListResult, err error) { - req, err := lastResults.endpointServicesListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "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, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailableEndpointServicesClient) ListComplete(ctx context.Context, location string) (result EndpointServicesListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go deleted file mode 100644 index dc9871acd86c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go +++ /dev/null @@ -1,267 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AvailablePrivateEndpointTypesClient is the network Client -type AvailablePrivateEndpointTypesClient struct { - BaseClient -} - -// NewAvailablePrivateEndpointTypesClient creates an instance of the AvailablePrivateEndpointTypesClient client. -func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePrivateEndpointTypesClient { - return NewAvailablePrivateEndpointTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { - return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. -// Parameters: -// location - the location of the domain name. -func (client AvailablePrivateEndpointTypesClient) List(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.List") - defer func() { - sc := -1 - if result.apetr.Response.Response != nil { - sc = result.apetr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.apetr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AvailablePrivateEndpointTypesClient) 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes", 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 AvailablePrivateEndpointTypesClient) 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 AvailablePrivateEndpointTypesClient) ListResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, 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 AvailablePrivateEndpointTypesClient) listNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { - req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "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, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailablePrivateEndpointTypesClient) ListComplete(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.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 -} - -// ListByResourceGroup returns all of the resource types that can be linked to a Private Endpoint in this subscription -// in this region. -// Parameters: -// location - the location of the domain name. -// resourceGroupName - the name of the resource group. -func (client AvailablePrivateEndpointTypesClient) ListByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.apetr.Response.Response != nil { - sc = result.apetr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, location, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.apetr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/locations/{location}/availablePrivateEndpointTypes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client AvailablePrivateEndpointTypesClient) listByResourceGroupNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { - req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, location, resourceGroupName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go deleted file mode 100644 index 392dcd58ec40..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go +++ /dev/null @@ -1,151 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AvailableResourceGroupDelegationsClient is the network Client -type AvailableResourceGroupDelegationsClient struct { - BaseClient -} - -// NewAvailableResourceGroupDelegationsClient creates an instance of the AvailableResourceGroupDelegationsClient -// client. -func NewAvailableResourceGroupDelegationsClient(subscriptionID string) AvailableResourceGroupDelegationsClient { - return NewAvailableResourceGroupDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient 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 NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient { - return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets all of the available subnet delegations for this resource group in this region. -// Parameters: -// location - the location of the domain name. -// resourceGroupName - the name of the resource group. -func (client AvailableResourceGroupDelegationsClient) List(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.List") - defer func() { - sc := -1 - if result.adr.Response.Response != nil { - sc = result.adr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.adr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/locations/{location}/availableDelegations", 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 AvailableResourceGroupDelegationsClient) 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 AvailableResourceGroupDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, 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 AvailableResourceGroupDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) { - req, err := lastResults.availableDelegationsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "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, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AvailableResourceGroupDelegationsClient) ListComplete(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.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, resourceGroupName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go deleted file mode 100644 index 0fcfac4377ce..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go +++ /dev/null @@ -1,145 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AzureFirewallFqdnTagsClient is the network Client -type AzureFirewallFqdnTagsClient struct { - BaseClient -} - -// NewAzureFirewallFqdnTagsClient creates an instance of the AzureFirewallFqdnTagsClient client. -func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTagsClient { - return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient 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 NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient { - return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListAll gets all the Azure Firewall FQDN Tags in a subscription. -func (client AzureFirewallFqdnTagsClient) ListAll(ctx context.Context) (result AzureFirewallFqdnTagListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll") - defer func() { - sc := -1 - if result.afftlr.Response.Response != nil { - sc = result.afftlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.afftlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client AzureFirewallFqdnTagsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client AzureFirewallFqdnTagsClient) ListAllResponder(resp *http.Response) (result AzureFirewallFqdnTagListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client AzureFirewallFqdnTagsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallFqdnTagListResult) (result AzureFirewallFqdnTagListResult, err error) { - req, err := lastResults.azureFirewallFqdnTagListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client AzureFirewallFqdnTagsClient) ListAllComplete(ctx context.Context) (result AzureFirewallFqdnTagListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll") - 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.ListAll(ctx) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go deleted file mode 100644 index db5f80e9b7e7..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go +++ /dev/null @@ -1,577 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// AzureFirewallsClient is the network Client -type AzureFirewallsClient struct { - BaseClient -} - -// NewAzureFirewallsClient creates an instance of the AzureFirewallsClient client. -func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { - return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient 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 NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { - return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the specified Azure Firewall. -// Parameters: -// resourceGroupName - the name of the resource group. -// azureFirewallName - the name of the Azure Firewall. -// parameters - parameters supplied to the create or update Azure Firewall operation. -func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewallsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, azureFirewallName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "azureFirewallName": autorest.Encode("path", azureFirewallName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", pathParameters), - autorest.WithJSON(parameters), - 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 AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response) (result AzureFirewall, 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 deletes the specified Azure Firewall. -// Parameters: -// resourceGroupName - the name of the resource group. -// azureFirewallName - the name of the Azure Firewall. -func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewallsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, azureFirewallName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "azureFirewallName": autorest.Encode("path", azureFirewallName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client AzureFirewallsClient) 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 the specified Azure Firewall. -// Parameters: -// resourceGroupName - the name of the resource group. -// azureFirewallName - the name of the Azure Firewall. -func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewall, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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, azureFirewallName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "azureFirewallName": autorest.Encode("path", azureFirewallName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) 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 AzureFirewallsClient) GetResponder(resp *http.Response) (result AzureFirewall, 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 Azure Firewalls in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.List") - defer func() { - sc := -1 - if result.aflr.Response.Response != nil { - sc = result.aflr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.aflr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/azureFirewalls", 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 AzureFirewallsClient) 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 AzureFirewallsClient) ListResponder(resp *http.Response) (result AzureFirewallListResult, 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 AzureFirewallsClient) listNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { - req, err := lastResults.azureFirewallListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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, "network.AzureFirewallsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AzureFirewallsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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) - return -} - -// ListAll gets all the Azure Firewalls in a subscription. -func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFirewallListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll") - defer func() { - sc := -1 - if result.aflr.Response.Response != nil { - sc = result.aflr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.aflr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client AzureFirewallsClient) ListAllResponder(resp *http.Response) (result AzureFirewallListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client AzureFirewallsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) { - req, err := lastResults.azureFirewallListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result AzureFirewallListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates tags for an Azure Firewall resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// azureFirewallName - the name of the Azure Firewall. -// parameters - parameters supplied to the create or update Azure Firewall operation. -func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewall, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, azureFirewallName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "azureFirewallName": autorest.Encode("path", azureFirewallName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client AzureFirewallsClient) UpdateTagsResponder(resp *http.Response) (result AzureFirewall, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go deleted file mode 100644 index e265ef25b986..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go +++ /dev/null @@ -1,579 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// BastionHostsClient is the network Client -type BastionHostsClient struct { - BaseClient -} - -// NewBastionHostsClient creates an instance of the BastionHostsClient client. -func NewBastionHostsClient(subscriptionID string) BastionHostsClient { - return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient 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 NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { - return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the specified Bastion Host. -// Parameters: -// resourceGroupName - the name of the resource group. -// bastionHostName - the name of the Bastion Host. -// parameters - parameters supplied to the create or update Bastion Host operation. -func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (result BastionHostsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, bastionHostName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bastionHostName": autorest.Encode("path", bastionHostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", pathParameters), - autorest.WithJSON(parameters), - 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 BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client BastionHostsClient) CreateOrUpdateResponder(resp *http.Response) (result BastionHost, 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 deletes the specified Bastion Host. -// Parameters: -// resourceGroupName - the name of the resource group. -// bastionHostName - the name of the Bastion Host. -func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHostsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, bastionHostName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bastionHostName": autorest.Encode("path", bastionHostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/bastionHosts/{bastionHostName}", 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 BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client BastionHostsClient) 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 the specified Bastion Host. -// Parameters: -// resourceGroupName - the name of the resource group. -// bastionHostName - the name of the Bastion Host. -func (client BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHost, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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, bastionHostName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bastionHostName": autorest.Encode("path", bastionHostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/bastionHosts/{bastionHostName}", 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 BastionHostsClient) 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 BastionHostsClient) GetResponder(resp *http.Response) (result BastionHost, 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 Bastion Hosts in a subscription. -func (client BastionHostsClient) List(ctx context.Context) (result BastionHostListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.List") - defer func() { - sc := -1 - if result.bhlr.Response.Response != nil { - sc = result.bhlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.bhlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts", 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 BastionHostsClient) 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 BastionHostsClient) ListResponder(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 -} - -// listNextResults retrieves the next set of results, if any. -func (client BastionHostsClient) listNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { - req, err := lastResults.bastionHostListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "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, "network.BastionHostsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BastionHostsClient) ListComplete(ctx context.Context) (result BastionHostListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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) - return -} - -// ListByResourceGroup lists all Bastion Hosts in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client BastionHostsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result BastionHostListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.bhlr.Response.Response != nil { - sc = result.bhlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.bhlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/bastionHosts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client BastionHostsClient) ListByResourceGroupResponder(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 -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client BastionHostsClient) listByResourceGroupNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { - req, err := lastResults.bastionHostListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result BastionHostListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates bastion host tags. -// Parameters: -// resourceGroupName - the resource group name of the BastionHost. -// bastionHostName - the name of the bastionHost. -// bastionHostParameters - parameters supplied to update a bastion host tags. -func (client BastionHostsClient) UpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, bastionHostParameters TagsObject) (result BastionHostsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, bastionHostName, bastionHostParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, bastionHostParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "bastionHostName": autorest.Encode("path", bastionHostName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/bastionHosts/{bastionHostName}", pathParameters), - autorest.WithJSON(bastionHostParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client BastionHostsClient) UpdateTagsResponder(resp *http.Response) (result BastionHost, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go deleted file mode 100644 index 2dd6880c4cc2..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go +++ /dev/null @@ -1,145 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// BgpServiceCommunitiesClient is the network Client -type BgpServiceCommunitiesClient struct { - BaseClient -} - -// NewBgpServiceCommunitiesClient creates an instance of the BgpServiceCommunitiesClient client. -func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient { - return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient 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 NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient { - return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets all the available bgp service communities. -func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpServiceCommunityListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.List") - defer func() { - sc := -1 - if result.bsclr.Response.Response != nil { - sc = result.bsclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.bsclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities", 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 BgpServiceCommunitiesClient) 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 BgpServiceCommunitiesClient) ListResponder(resp *http.Response) (result BgpServiceCommunityListResult, 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 BgpServiceCommunitiesClient) listNextResults(ctx context.Context, lastResults BgpServiceCommunityListResult) (result BgpServiceCommunityListResult, err error) { - req, err := lastResults.bgpServiceCommunityListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "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, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BgpServiceCommunitiesClient) ListComplete(ctx context.Context) (result BgpServiceCommunityListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.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) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go deleted file mode 100644 index a9bf2394a295..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go +++ /dev/null @@ -1,200 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package network implements the Azure ARM Network service API version . -// -// Network Client -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -const ( - // DefaultBaseURI is the default URI used for the service Network - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Network. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient 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 NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} - -// CheckDNSNameAvailability checks whether a domain name in the cloudapp.azure.com zone is available for use. -// Parameters: -// location - the location of the domain name. -// domainNameLabel - the domain name to be verified. It must conform to the following regular expression: -// ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. -func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckDNSNameAvailability") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckDNSNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckDNSNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckDNSNameAvailabilityPreparer prepares the CheckDNSNameAvailability request. -func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, location string, domainNameLabel string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "domainNameLabel": autorest.Encode("query", domainNameLabel), - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always -// closes the http.Response Body. -func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response) (result DNSNameAvailabilityResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SupportedSecurityProviders gives the supported security providers for the virtual wan. -// Parameters: -// resourceGroupName - the resource group name. -// virtualWANName - the name of the VirtualWAN for which supported security providers are needed. -func (client BaseClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWanSecurityProviders, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SupportedSecurityProviders") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.SupportedSecurityProvidersPreparer(ctx, resourceGroupName, virtualWANName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", nil, "Failure preparing request") - return - } - - resp, err := client.SupportedSecurityProvidersSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure sending request") - return - } - - result, err = client.SupportedSecurityProvidersResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure responding to request") - return - } - - return -} - -// SupportedSecurityProvidersPreparer prepares the SupportedSecurityProviders request. -func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-06-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/virtualWans/{virtualWANName}/supportedSecurityProviders", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the -// http.Response Body if it receives an error. -func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always -// closes the http.Response Body. -func (client BaseClient) SupportedSecurityProvidersResponder(resp *http.Response) (result VirtualWanSecurityProviders, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go deleted file mode 100644 index 50abbc6dc6a4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go +++ /dev/null @@ -1,683 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ConnectionMonitorsClient is the network Client -type ConnectionMonitorsClient struct { - BaseClient -} - -// NewConnectionMonitorsClient creates an instance of the ConnectionMonitorsClient client. -func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient { - return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient 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 NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient { - return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a connection monitor. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name of the connection monitor. -// parameters - parameters that define the operation to create a connection monitor. -func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (result ConnectionMonitorsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ConnectionMonitorParameters.Destination", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.ConnectionMonitorsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters), - autorest.WithJSON(parameters), - 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 ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) CreateOrUpdateResponder(resp *http.Response) (result ConnectionMonitorResult, 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 deletes the specified connection monitor. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name of the connection monitor. -func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", 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 ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) 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 a connection monitor by name. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name of the connection monitor. -func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.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, networkWatcherName, connectionMonitorName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", 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 ConnectionMonitorsClient) 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 ConnectionMonitorsClient) GetResponder(resp *http.Response) (result ConnectionMonitorResult, 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 connection monitors for the specified Network Watcher. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result ConnectionMonitorListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers/{networkWatcherName}/connectionMonitors", 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 ConnectionMonitorsClient) 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 ConnectionMonitorsClient) ListResponder(resp *http.Response) (result ConnectionMonitorListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Query query a snapshot of the most recent connection states. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name given to the connection monitor. -func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsQueryFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Query") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.QueryPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure preparing request") - return - } - - result, err = client.QuerySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request") - return - } - - return -} - -// QueryPreparer prepares the Query request. -func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// QuerySender sends the Query request. The method will close the -// http.Response Body if it receives an error. -func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// QueryResponder handles the response to the Query request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) QueryResponder(resp *http.Response) (result ConnectionMonitorQueryResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Start starts the specified connection monitor. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name of the connection monitor. -func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStartFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Start") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StartPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure preparing request") - return - } - - result, err = client.StartSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request") - return - } - - return -} - -// StartPreparer prepares the Start request. -func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StartSender sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StartResponder handles the response to the Start request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// Stop stops the specified connection monitor. -// Parameters: -// resourceGroupName - the name of the resource group containing Network Watcher. -// networkWatcherName - the name of the Network Watcher resource. -// connectionMonitorName - the name of the connection monitor. -func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStopFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Stop") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure preparing request") - return - } - - result, err = client.StopSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request") - return - } - - return -} - -// StopPreparer prepares the Stop request. -func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StopSender sends the Stop request. The method will close the -// http.Response Body if it receives an error. -func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StopResponder handles the response to the Stop request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// UpdateTags update tags of the specified connection monitor. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// connectionMonitorName - the name of the connection monitor. -// parameters - parameters supplied to update connection monitor tags. -func (client ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject) (result ConnectionMonitorResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionMonitorName": autorest.Encode("path", connectionMonitorName), - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ConnectionMonitorsClient) UpdateTagsResponder(resp *http.Response) (result ConnectionMonitorResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go deleted file mode 100644 index 9273b4c785c0..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go +++ /dev/null @@ -1,351 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DdosCustomPoliciesClient is the network Client -type DdosCustomPoliciesClient struct { - BaseClient -} - -// NewDdosCustomPoliciesClient creates an instance of the DdosCustomPoliciesClient client. -func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient { - return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient 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 NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient { - return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a DDoS custom policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosCustomPolicyName - the name of the DDoS custom policy. -// parameters - parameters supplied to the create or update operation. -func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (result DdosCustomPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), - autorest.WithJSON(parameters), - 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 DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DdosCustomPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DdosCustomPolicy, 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 deletes the specified DDoS custom policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosCustomPolicyName - the name of the DDoS custom policy. -func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPoliciesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, ddosCustomPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DdosCustomPoliciesClient) 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 information about the specified DDoS custom policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosCustomPolicyName - the name of the DDoS custom policy. -func (client DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.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, ddosCustomPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) 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 DdosCustomPoliciesClient) GetResponder(resp *http.Response) (result DdosCustomPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags update a DDoS custom policy tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosCustomPolicyName - the name of the DDoS custom policy. -// parameters - parameters supplied to the update DDoS custom policy resource tags. -func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (result DdosCustomPoliciesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client DdosCustomPoliciesClient) UpdateTagsResponder(resp *http.Response) (result DdosCustomPolicy, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go deleted file mode 100644 index 0db4e0df31f8..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go +++ /dev/null @@ -1,583 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DdosProtectionPlansClient is the network Client -type DdosProtectionPlansClient struct { - BaseClient -} - -// NewDdosProtectionPlansClient creates an instance of the DdosProtectionPlansClient client. -func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClient { - return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient 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 NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient { - return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a DDoS protection plan. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosProtectionPlanName - the name of the DDoS protection plan. -// parameters - parameters supplied to the create or update operation. -func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (result DdosProtectionPlansCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters), - autorest.WithJSON(parameters), - 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 DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Response) (result DdosProtectionPlan, 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 deletes the specified DDoS protection plan. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosProtectionPlanName - the name of the DDoS protection plan. -func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlansDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, ddosProtectionPlanName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DdosProtectionPlansClient) 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 information about the specified DDoS protection plan. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosProtectionPlanName - the name of the DDoS protection plan. -func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlan, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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, ddosProtectionPlanName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) 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 DdosProtectionPlansClient) GetResponder(resp *http.Response) (result DdosProtectionPlan, 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 DDoS protection plans in a subscription. -func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosProtectionPlanListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.List") - defer func() { - sc := -1 - if result.dpplr.Response.Response != nil { - sc = result.dpplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.dpplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans", 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 DdosProtectionPlansClient) 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 DdosProtectionPlansClient) ListResponder(resp *http.Response) (result DdosProtectionPlanListResult, 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 DdosProtectionPlansClient) listNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) { - req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (result DdosProtectionPlanListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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) - return -} - -// ListByResourceGroup gets all the DDoS protection plans in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.dpplr.Response.Response != nil { - sc = result.dpplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.dpplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ddosProtectionPlans", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.Response) (result DdosProtectionPlanListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client DdosProtectionPlansClient) listByResourceGroupNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) { - req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags update a DDoS protection plan tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// ddosProtectionPlanName - the name of the DDoS protection plan. -// parameters - parameters supplied to the update DDoS protection plan resource tags. -func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (result DdosProtectionPlansUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client DdosProtectionPlansClient) UpdateTagsResponder(resp *http.Response) (result DdosProtectionPlan, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go deleted file mode 100644 index 1a4d1519e48d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DefaultSecurityRulesClient is the network Client -type DefaultSecurityRulesClient struct { - BaseClient -} - -// NewDefaultSecurityRulesClient creates an instance of the DefaultSecurityRulesClient client. -func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesClient { - return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient 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 NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient { - return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get get the specified default network security rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// defaultSecurityRuleName - the name of the default security rule. -func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result SecurityRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.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, networkSecurityGroupName, defaultSecurityRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "defaultSecurityRuleName": autorest.Encode("path", defaultSecurityRuleName), - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}", 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 DefaultSecurityRulesClient) 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 DefaultSecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, 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 default security rules in a network security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.List") - defer func() { - sc := -1 - if result.srlr.Response.Response != nil { - sc = result.srlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.srlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules", 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 DefaultSecurityRulesClient) 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 DefaultSecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, 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 DefaultSecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { - req, err := lastResults.securityRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "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, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client DefaultSecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.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, networkSecurityGroupName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/enums.go deleted file mode 100644 index 20f33f9e4bf1..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/enums.go +++ /dev/null @@ -1,2076 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// 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" -) - -// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type. -func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { - return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// FirewallPolicyFilterRuleActionType enumerates the values for firewall policy filter rule action type. -type FirewallPolicyFilterRuleActionType string - -const ( - // FirewallPolicyFilterRuleActionTypeAlert ... - FirewallPolicyFilterRuleActionTypeAlert FirewallPolicyFilterRuleActionType = "Alert " - // FirewallPolicyFilterRuleActionTypeAllow ... - FirewallPolicyFilterRuleActionTypeAllow FirewallPolicyFilterRuleActionType = "Allow" - // FirewallPolicyFilterRuleActionTypeDeny ... - FirewallPolicyFilterRuleActionTypeDeny FirewallPolicyFilterRuleActionType = "Deny" -) - -// PossibleFirewallPolicyFilterRuleActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleActionType const type. -func PossibleFirewallPolicyFilterRuleActionTypeValues() []FirewallPolicyFilterRuleActionType { - return []FirewallPolicyFilterRuleActionType{FirewallPolicyFilterRuleActionTypeAlert, FirewallPolicyFilterRuleActionTypeAllow, FirewallPolicyFilterRuleActionTypeDeny} -} - -// FirewallPolicyNatRuleActionType enumerates the values for firewall policy nat rule action type. -type FirewallPolicyNatRuleActionType string - -const ( - // DNAT ... - DNAT FirewallPolicyNatRuleActionType = "DNAT" - // SNAT ... - SNAT FirewallPolicyNatRuleActionType = "SNAT" -) - -// PossibleFirewallPolicyNatRuleActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleActionType const type. -func PossibleFirewallPolicyNatRuleActionTypeValues() []FirewallPolicyNatRuleActionType { - return []FirewallPolicyNatRuleActionType{DNAT, SNAT} -} - -// FirewallPolicyRuleConditionApplicationProtocolType enumerates the values for firewall policy rule condition -// application protocol type. -type FirewallPolicyRuleConditionApplicationProtocolType string - -const ( - // FirewallPolicyRuleConditionApplicationProtocolTypeHTTP ... - FirewallPolicyRuleConditionApplicationProtocolTypeHTTP FirewallPolicyRuleConditionApplicationProtocolType = "Http" - // FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS ... - FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS FirewallPolicyRuleConditionApplicationProtocolType = "Https" -) - -// PossibleFirewallPolicyRuleConditionApplicationProtocolTypeValues returns an array of possible values for the FirewallPolicyRuleConditionApplicationProtocolType const type. -func PossibleFirewallPolicyRuleConditionApplicationProtocolTypeValues() []FirewallPolicyRuleConditionApplicationProtocolType { - return []FirewallPolicyRuleConditionApplicationProtocolType{FirewallPolicyRuleConditionApplicationProtocolTypeHTTP, FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS} -} - -// FirewallPolicyRuleConditionNetworkProtocol enumerates the values for firewall policy rule condition network -// protocol. -type FirewallPolicyRuleConditionNetworkProtocol string - -const ( - // FirewallPolicyRuleConditionNetworkProtocolAny ... - FirewallPolicyRuleConditionNetworkProtocolAny FirewallPolicyRuleConditionNetworkProtocol = "Any" - // FirewallPolicyRuleConditionNetworkProtocolICMP ... - FirewallPolicyRuleConditionNetworkProtocolICMP FirewallPolicyRuleConditionNetworkProtocol = "ICMP" - // FirewallPolicyRuleConditionNetworkProtocolTCP ... - FirewallPolicyRuleConditionNetworkProtocolTCP FirewallPolicyRuleConditionNetworkProtocol = "TCP" - // FirewallPolicyRuleConditionNetworkProtocolUDP ... - FirewallPolicyRuleConditionNetworkProtocolUDP FirewallPolicyRuleConditionNetworkProtocol = "UDP" -) - -// PossibleFirewallPolicyRuleConditionNetworkProtocolValues returns an array of possible values for the FirewallPolicyRuleConditionNetworkProtocol const type. -func PossibleFirewallPolicyRuleConditionNetworkProtocolValues() []FirewallPolicyRuleConditionNetworkProtocol { - return []FirewallPolicyRuleConditionNetworkProtocol{FirewallPolicyRuleConditionNetworkProtocolAny, FirewallPolicyRuleConditionNetworkProtocolICMP, FirewallPolicyRuleConditionNetworkProtocolTCP, FirewallPolicyRuleConditionNetworkProtocolUDP} -} - -// 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} -} - -// HTTPMethod enumerates the values for http method. -type HTTPMethod string - -const ( - // Get ... - Get HTTPMethod = "Get" -) - -// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type. -func PossibleHTTPMethodValues() []HTTPMethod { - return []HTTPMethod{Get} -} - -// 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} -} - -// 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} -} - -// NatGatewaySkuName enumerates the values for nat gateway sku name. -type NatGatewaySkuName string - -const ( - // Standard ... - Standard NatGatewaySkuName = "Standard" -) - -// PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. -func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { - return []NatGatewaySkuName{Standard} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// RuleConditionType enumerates the values for rule condition type. -type RuleConditionType string - -const ( - // RuleConditionTypeApplicationRuleCondition ... - RuleConditionTypeApplicationRuleCondition RuleConditionType = "ApplicationRuleCondition" - // RuleConditionTypeFirewallPolicyRuleCondition ... - RuleConditionTypeFirewallPolicyRuleCondition RuleConditionType = "FirewallPolicyRuleCondition" - // RuleConditionTypeNetworkRuleCondition ... - RuleConditionTypeNetworkRuleCondition RuleConditionType = "NetworkRuleCondition" -) - -// PossibleRuleConditionTypeValues returns an array of possible values for the RuleConditionType const type. -func PossibleRuleConditionTypeValues() []RuleConditionType { - return []RuleConditionType{RuleConditionTypeApplicationRuleCondition, RuleConditionTypeFirewallPolicyRuleCondition, RuleConditionTypeNetworkRuleCondition} -} - -// RuleType enumerates the values for rule type. -type RuleType string - -const ( - // RuleTypeFirewallPolicyFilterRule ... - RuleTypeFirewallPolicyFilterRule RuleType = "FirewallPolicyFilterRule" - // RuleTypeFirewallPolicyNatRule ... - RuleTypeFirewallPolicyNatRule RuleType = "FirewallPolicyNatRule" - // RuleTypeFirewallPolicyRule ... - RuleTypeFirewallPolicyRule RuleType = "FirewallPolicyRule" -) - -// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. -func PossibleRuleTypeValues() []RuleType { - return []RuleType{RuleTypeFirewallPolicyFilterRule, RuleTypeFirewallPolicyNatRule, RuleTypeFirewallPolicyRule} -} - -// 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 ( - // 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{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" -) - -// 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} -} - -// 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" -) - -// 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} -} - -// 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} -} - -// 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} -} - -// 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" - // 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, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go deleted file mode 100644 index 4c5a781af4ad..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go +++ /dev/null @@ -1,396 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteCircuitAuthorizationsClient is the network Client -type ExpressRouteCircuitAuthorizationsClient struct { - BaseClient -} - -// NewExpressRouteCircuitAuthorizationsClient creates an instance of the ExpressRouteCircuitAuthorizationsClient -// client. -func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRouteCircuitAuthorizationsClient { - return NewExpressRouteCircuitAuthorizationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient 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 NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient { - return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an authorization in the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// authorizationName - the name of the authorization. -// authorizationParameters - parameters supplied to the create or update express route circuit authorization -// operation. -func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (result ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "authorizationName": autorest.Encode("path", authorizationName), - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - authorizationParameters.Etag = nil - authorizationParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", pathParameters), - autorest.WithJSON(authorizationParameters), - 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 ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, 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 deletes the specified authorization from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// authorizationName - the name of the authorization. -func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, authorizationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "authorizationName": autorest.Encode("path", authorizationName), - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", 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 ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitAuthorizationsClient) 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 the specified authorization from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// authorizationName - the name of the authorization. -func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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, circuitName, authorizationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "authorizationName": autorest.Encode("path", authorizationName), - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}", 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 ExpressRouteCircuitAuthorizationsClient) 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 ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, 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 authorizations in an express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the circuit. -func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.List") - defer func() { - sc := -1 - if result.alr.Response.Response != nil { - sc = result.alr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.alr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/authorizations", 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 ExpressRouteCircuitAuthorizationsClient) 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 ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.Response) (result AuthorizationListResult, 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 ExpressRouteCircuitAuthorizationsClient) listNextResults(ctx context.Context, lastResults AuthorizationListResult) (result AuthorizationListResult, err error) { - req, err := lastResults.authorizationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "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, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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, circuitName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go deleted file mode 100644 index 332c19378b64..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go +++ /dev/null @@ -1,403 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteCircuitConnectionsClient is the network Client -type ExpressRouteCircuitConnectionsClient struct { - BaseClient -} - -// NewExpressRouteCircuitConnectionsClient creates an instance of the ExpressRouteCircuitConnectionsClient client. -func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRouteCircuitConnectionsClient { - return NewExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { - return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a Express Route Circuit Connection in the specified express route circuits. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// connectionName - the name of the express route circuit connection. -// expressRouteCircuitConnectionParameters - parameters supplied to the create or update express route circuit -// connection operation. -func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (result ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "connectionName": autorest.Encode("path", connectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - expressRouteCircuitConnectionParameters.Etag = nil - expressRouteCircuitConnectionParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters), - autorest.WithJSON(expressRouteCircuitConnectionParameters), - 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 ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitConnection, 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 deletes the specified Express Route Circuit Connection from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// connectionName - the name of the express route circuit connection. -func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "connectionName": autorest.Encode("path", connectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitConnectionsClient) 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 the specified Express Route Circuit Connection from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// connectionName - the name of the express route circuit connection. -func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "connectionName": autorest.Encode("path", connectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) 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 ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitConnection, 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 global reach connections associated with a private peering in an express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the circuit. -// peeringName - the name of the peering. -func (client ExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.List") - defer func() { - sc := -1 - if result.ercclr.Response.Response != nil { - sc = result.ercclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ercclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections", 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 ExpressRouteCircuitConnectionsClient) 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 ExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitConnectionListResult, 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 ExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitConnectionListResult) (result ExpressRouteCircuitConnectionListResult, err error) { - req, err := lastResults.expressRouteCircuitConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "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, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go deleted file mode 100644 index d7cca0ab5511..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go +++ /dev/null @@ -1,406 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ExpressRouteCircuitPeeringsClient is the network Client -type ExpressRouteCircuitPeeringsClient struct { - BaseClient -} - -// NewExpressRouteCircuitPeeringsClient creates an instance of the ExpressRouteCircuitPeeringsClient client. -func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCircuitPeeringsClient { - return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient 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 NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient { - return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a peering in the specified express route circuits. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// peeringParameters - parameters supplied to the create or update express route circuit peering operation. -func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (result ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: peeringParameters, - Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, peeringParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - peeringParameters.Etag = nil - peeringParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", pathParameters), - autorest.WithJSON(peeringParameters), - 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 ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitPeering, 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 deletes the specified peering from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeeringsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}", 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 ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitPeeringsClient) 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 the specified peering for the express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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, circuitName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}", 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 ExpressRouteCircuitPeeringsClient) 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 ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitPeering, 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 peerings in a specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.List") - defer func() { - sc := -1 - if result.ercplr.Response.Response != nil { - sc = result.ercplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, circuitName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ercplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings", 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 ExpressRouteCircuitPeeringsClient) 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 ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitPeeringListResult, 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 ExpressRouteCircuitPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) { - req, err := lastResults.expressRouteCircuitPeeringListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "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, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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, circuitName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go deleted file mode 100644 index 84ab9257df68..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go +++ /dev/null @@ -1,985 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteCircuitsClient is the network Client -type ExpressRouteCircuitsClient struct { - BaseClient -} - -// NewExpressRouteCircuitsClient creates an instance of the ExpressRouteCircuitsClient client. -func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsClient { - return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient 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 NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient { - return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the circuit. -// parameters - parameters supplied to the create or update express route circuit operation. -func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (result ExpressRouteCircuitsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}", pathParameters), - autorest.WithJSON(parameters), - 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 ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuit, 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 deletes the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCircuits/{circuitName}", 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 ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) 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 information about the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of express route circuit. -func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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, circuitName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}", 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 ExpressRouteCircuitsClient) 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 ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetPeeringStats gets all stats from an express route circuit in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetPeeringStats") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPeeringStatsPreparer(ctx, resourceGroupName, circuitName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", nil, "Failure preparing request") - return - } - - resp, err := client.GetPeeringStatsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure sending request") - return - } - - result, err = client.GetPeeringStatsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure responding to request") - return - } - - return -} - -// GetPeeringStatsPreparer prepares the GetPeeringStats request. -func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetPeeringStatsSender sends the GetPeeringStats request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetStats gets all the stats from an express route circuit in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetStats") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetStatsPreparer(ctx, resourceGroupName, circuitName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", nil, "Failure preparing request") - return - } - - resp, err := client.GetStatsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure sending request") - return - } - - result, err = client.GetStatsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure responding to request") - return - } - - return -} - -// GetStatsPreparer prepares the GetStats request. -func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, resourceGroupName string, circuitName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/stats", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetStatsSender sends the GetStats request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetStatsResponder handles the response to the GetStats request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) GetStatsResponder(resp *http.Response) (result ExpressRouteCircuitStats, 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 the express route circuits in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.List") - defer func() { - sc := -1 - if result.erclr.Response.Response != nil { - sc = result.erclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.erclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits", 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 ExpressRouteCircuitsClient) 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 ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitListResult, 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 ExpressRouteCircuitsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { - req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "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, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCircuitsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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) - return -} - -// ListAll gets all the express route circuits in a subscription. -func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result ExpressRouteCircuitListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") - defer func() { - sc := -1 - if result.erclr.Response.Response != nil { - sc = result.erclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.erclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) ListAllResponder(resp *http.Response) (result ExpressRouteCircuitListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client ExpressRouteCircuitsClient) listAllNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) { - req, err := lastResults.expressRouteCircuitListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (result ExpressRouteCircuitListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListArpTable gets the currently advertised ARP table associated with the express route circuit in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListArpTableFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListArpTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure preparing request") - return - } - - result, err = client.ListArpTableSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request") - return - } - - return -} - -// ListArpTablePreparer prepares the ListArpTable request. -func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListArpTableSender sends the ListArpTable request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListArpTableResponder handles the response to the ListArpTable request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListRoutesTable gets the currently advertised routes table associated with the express route circuit in a resource -// group. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure preparing request") - return - } - - result, err = client.ListRoutesTableSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request") - return - } - - return -} - -// ListRoutesTablePreparer prepares the ListRoutesTable request. -func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRoutesTableSender sends the ListRoutesTable request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListRoutesTableSummary gets the currently advertised routes table summary associated with the express route circuit -// in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTableSummary") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure preparing request") - return - } - - result, err = client.ListRoutesTableSummarySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request") - return - } - - return -} - -// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request. -func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates an express route circuit tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the circuit. -// parameters - parameters supplied to update express route circuit tags. -func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (result ExpressRouteCircuitsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, circuitName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCircuits/{circuitName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ExpressRouteCircuitsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCircuit, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go deleted file mode 100644 index 23f4bce4148d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go +++ /dev/null @@ -1,359 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ExpressRouteConnectionsClient is the network Client -type ExpressRouteConnectionsClient struct { - BaseClient -} - -// NewExpressRouteConnectionsClient creates an instance of the ExpressRouteConnectionsClient client. -func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnectionsClient { - return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient 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 NewExpressRouteConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteConnectionsClient { - return ExpressRouteConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -// connectionName - the name of the connection subresource. -// putExpressRouteConnectionParameters - parameters required in an ExpressRouteConnection PUT operation. -func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (result ExpressRouteConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: putExpressRouteConnectionParameters, - Constraints: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties.ExpressRouteCircuitPeering", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "putExpressRouteConnectionParameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.ExpressRouteConnectionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", pathParameters), - autorest.WithJSON(putExpressRouteConnectionParameters), - 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 ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteConnection, 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 deletes a connection to a ExpressRoute circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -// connectionName - the name of the connection subresource. -func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteConnectionsClient) 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 the specified ExpressRouteConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -// connectionName - the name of the ExpressRoute connection. -func (client ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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, expressRouteGatewayName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) 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 ExpressRouteConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists ExpressRouteConnections. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -func (client ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteConnectionList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, expressRouteGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections", 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 ExpressRouteConnectionsClient) 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 ExpressRouteConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteConnectionList, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go deleted file mode 100644 index 6b2206e1c925..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go +++ /dev/null @@ -1,407 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ExpressRouteCrossConnectionPeeringsClient is the network Client -type ExpressRouteCrossConnectionPeeringsClient struct { - BaseClient -} - -// NewExpressRouteCrossConnectionPeeringsClient creates an instance of the ExpressRouteCrossConnectionPeeringsClient -// client. -func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) ExpressRouteCrossConnectionPeeringsClient { - return NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient 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 NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionPeeringsClient { - return ExpressRouteCrossConnectionPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a peering in the specified ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -// peeringParameters - parameters supplied to the create or update ExpressRouteCrossConnection peering -// operation. -func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (result ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: peeringParameters, - Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - peeringParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters), - autorest.WithJSON(peeringParameters), - 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 ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, 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 deletes the specified peering from the ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, crossConnectionName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionPeeringsClient) 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 the specified peering for the ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeering, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) 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 ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, 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 peerings in a specified ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.List") - defer func() { - sc := -1 - if result.erccpl.Response.Response != nil { - sc = result.erccpl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, crossConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.erccpl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCrossConnections/{crossConnectionName}/peerings", 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 ExpressRouteCrossConnectionPeeringsClient) 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 ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeeringList, 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 ExpressRouteCrossConnectionPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) { - req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "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, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go deleted file mode 100644 index 8919b2b019dc..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go +++ /dev/null @@ -1,754 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteCrossConnectionsClient is the network Client -type ExpressRouteCrossConnectionsClient struct { - BaseClient -} - -// NewExpressRouteCrossConnectionsClient creates an instance of the ExpressRouteCrossConnectionsClient client. -func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCrossConnectionsClient { - return NewExpressRouteCrossConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { - return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate update the specified ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// parameters - parameters supplied to the update express route crossConnection operation. -func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (result ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters), - autorest.WithJSON(parameters), - 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 ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets details about the specified ExpressRouteCrossConnection. -// Parameters: -// resourceGroupName - the name of the resource group (peering location of the circuit). -// crossConnectionName - the name of the ExpressRouteCrossConnection (service key of the circuit). -func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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, crossConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCrossConnections/{crossConnectionName}", 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 ExpressRouteCrossConnectionsClient) 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 ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List retrieves all the ExpressRouteCrossConnections in a subscription. -func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (result ExpressRouteCrossConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.List") - defer func() { - sc := -1 - if result.ercclr.Response.Response != nil { - sc = result.ercclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ercclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections", 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 ExpressRouteCrossConnectionsClient) 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 ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, 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 ExpressRouteCrossConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) { - req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context) (result ExpressRouteCrossConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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) - return -} - -// ListArpTable gets the currently advertised ARP table associated with the express route cross connection in a -// resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListArpTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure preparing request") - return - } - - result, err = client.ListArpTableSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request") - return - } - - return -} - -// ListArpTablePreparer prepares the ListArpTable request. -func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListArpTableSender sends the ListArpTable request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListArpTableResponder handles the response to the ListArpTable request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup retrieves all the ExpressRouteCrossConnections in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.ercclr.Response.Response != nil { - sc = result.ercclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.ercclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCrossConnections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) { - req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// ListRoutesTable gets the currently advertised routes table associated with the express route cross connection in a -// resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTable") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure preparing request") - return - } - - result, err = client.ListRoutesTableSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request") - return - } - - return -} - -// ListRoutesTablePreparer prepares the ListRoutesTable request. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRoutesTableSender sends the ListRoutesTable request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListRoutesTableSummary gets the route table summary associated with the express route cross connection in a resource -// group. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the ExpressRouteCrossConnection. -// peeringName - the name of the peering. -// devicePath - the path of the device. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTableSummary") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure preparing request") - return - } - - result, err = client.ListRoutesTableSummarySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request") - return - } - - return -} - -// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "devicePath": autorest.Encode("path", devicePath), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates an express route cross connection tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// crossConnectionName - the name of the cross connection. -// crossConnectionParameters - parameters supplied to update express route cross connection tags. -func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (result ExpressRouteCrossConnectionsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "crossConnectionName": autorest.Encode("path", crossConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters), - autorest.WithJSON(crossConnectionParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ExpressRouteCrossConnectionsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCrossConnection, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go deleted file mode 100644 index 437ac66c23e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go +++ /dev/null @@ -1,423 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ExpressRouteGatewaysClient is the network Client -type ExpressRouteGatewaysClient struct { - BaseClient -} - -// NewExpressRouteGatewaysClient creates an instance of the ExpressRouteGatewaysClient client. -func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysClient { - return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient 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 NewExpressRouteGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteGatewaysClient { - return ExpressRouteGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a ExpressRoute gateway in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -// putExpressRouteGatewayParameters - parameters required in an ExpressRoute gateway PUT operation. -func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (result ExpressRouteGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: putExpressRouteGatewayParameters, - Constraints: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties.VirtualHub", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("network.ExpressRouteGatewaysClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - putExpressRouteGatewayParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}", pathParameters), - autorest.WithJSON(putExpressRouteGatewayParameters), - 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 ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRouteGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteGateway, 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 deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be -// deleted when there are no connection subresources. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRouteGatewaysClient) 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 fetches the details of a ExpressRoute gateway in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRouteGatewayName - the name of the ExpressRoute gateway. -func (client ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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, expressRouteGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) 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 ExpressRouteGatewaysClient) GetResponder(resp *http.Response) (result ExpressRouteGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup lists ExpressRoute gateways in a given resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteGatewayList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ExpressRouteGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ExpressRouteGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListBySubscription lists ExpressRoute gateways under a given subscription. -func (client ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context) (result ExpressRouteGatewayList, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListBySubscription") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure responding to request") - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRouteGatewaysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client ExpressRouteGatewaysClient) ListBySubscriptionResponder(resp *http.Response) (result ExpressRouteGatewayList, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go deleted file mode 100644 index 2908eb3e1471..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteLinksClient is the network Client -type ExpressRouteLinksClient struct { - BaseClient -} - -// NewExpressRouteLinksClient creates an instance of the ExpressRouteLinksClient client. -func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { - return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient 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 NewExpressRouteLinksClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteLinksClient { - return ExpressRouteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves the specified ExpressRouteLink resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of the ExpressRoutePort resource. -// linkName - the name of the ExpressRouteLink resource. -func (client ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (result ExpressRouteLink, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName, linkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "linkName": autorest.Encode("path", linkName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}", 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 ExpressRouteLinksClient) 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 ExpressRouteLinksClient) GetResponder(resp *http.Response) (result ExpressRouteLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of the ExpressRoutePort resource. -func (client ExpressRouteLinksClient) List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.List") - defer func() { - sc := -1 - if result.erllr.Response.Response != nil { - sc = result.erllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, expressRoutePortName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.erllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ExpressRoutePorts/{expressRoutePortName}/links", 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 ExpressRouteLinksClient) 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 ExpressRouteLinksClient) ListResponder(resp *http.Response) (result ExpressRouteLinkListResult, 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 ExpressRouteLinksClient) listNextResults(ctx context.Context, lastResults ExpressRouteLinkListResult) (result ExpressRouteLinkListResult, err error) { - req, err := lastResults.expressRouteLinkListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "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, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteLinksClient) ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go deleted file mode 100644 index c26246c17b9a..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go +++ /dev/null @@ -1,580 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRoutePortsClient is the network Client -type ExpressRoutePortsClient struct { - BaseClient -} - -// NewExpressRoutePortsClient creates an instance of the ExpressRoutePortsClient client. -func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { - return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient 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 NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient { - return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the specified ExpressRoutePort resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of the ExpressRoutePort resource. -// parameters - parameters supplied to the create ExpressRoutePort operation. -func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (result ExpressRoutePortsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), - autorest.WithJSON(parameters), - 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 ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, 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 deletes the specified ExpressRoutePort resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of the ExpressRoutePort resource. -func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ExpressRoutePortsClient) 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 retrieves the requested ExpressRoutePort resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of ExpressRoutePort. -func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePort, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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, expressRoutePortName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) 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 ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all the ExpressRoutePort resources in the specified subscription. -func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List") - defer func() { - sc := -1 - if result.erplr.Response.Response != nil { - sc = result.erplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.erplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) 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 ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, 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 ExpressRoutePortsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { - req, err := lastResults.expressRoutePortListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRoutePortsClient) ListComplete(ctx context.Context) (result ExpressRoutePortListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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) - return -} - -// ListByResourceGroup list all the ExpressRoutePort resources in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.erplr.Response.Response != nil { - sc = result.erplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.erplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ExpressRoutePorts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRoutePortsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { - req, err := lastResults.expressRoutePortListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags update ExpressRoutePort tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// expressRoutePortName - the name of the ExpressRoutePort resource. -// parameters - parameters supplied to update ExpressRoutePort resource tags. -func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (result ExpressRoutePortsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRoutePortName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "expressRoutePortName": autorest.Encode("path", expressRoutePortName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (future ExpressRoutePortsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ExpressRoutePortsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRoutePort, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go deleted file mode 100644 index d4e6f5d1a731..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go +++ /dev/null @@ -1,221 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRoutePortsLocationsClient is the network Client -type ExpressRoutePortsLocationsClient struct { - BaseClient -} - -// NewExpressRoutePortsLocationsClient creates an instance of the ExpressRoutePortsLocationsClient client. -func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePortsLocationsClient { - return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient 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 NewExpressRoutePortsLocationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsLocationsClient { - return ExpressRoutePortsLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at -// said peering location. -// Parameters: -// locationName - name of the requested ExpressRoutePort peering location. -func (client ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string) (result ExpressRoutePortsLocation, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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, locationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, locationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "locationName": autorest.Encode("path", locationName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}", 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 ExpressRoutePortsLocationsClient) 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 ExpressRoutePortsLocationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortsLocation, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. -// Available bandwidths can only be obtained when retrieving a specific peering location. -func (client ExpressRoutePortsLocationsClient) List(ctx context.Context) (result ExpressRoutePortsLocationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.List") - defer func() { - sc := -1 - if result.erpllr.Response.Response != nil { - sc = result.erpllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.erpllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations", 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 ExpressRoutePortsLocationsClient) 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 ExpressRoutePortsLocationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortsLocationListResult, 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 ExpressRoutePortsLocationsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortsLocationListResult) (result ExpressRoutePortsLocationListResult, err error) { - req, err := lastResults.expressRoutePortsLocationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "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, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context) (result ExpressRoutePortsLocationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go deleted file mode 100644 index d77a93f8898f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go +++ /dev/null @@ -1,145 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ExpressRouteServiceProvidersClient is the network Client -type ExpressRouteServiceProvidersClient struct { - BaseClient -} - -// NewExpressRouteServiceProvidersClient creates an instance of the ExpressRouteServiceProvidersClient client. -func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteServiceProvidersClient { - return NewExpressRouteServiceProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { - return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets all the available express route service providers. -func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (result ExpressRouteServiceProviderListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.List") - defer func() { - sc := -1 - if result.ersplr.Response.Response != nil { - sc = result.ersplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ersplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders", 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 ExpressRouteServiceProvidersClient) 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 ExpressRouteServiceProvidersClient) ListResponder(resp *http.Response) (result ExpressRouteServiceProviderListResult, 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 ExpressRouteServiceProvidersClient) listNextResults(ctx context.Context, lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) { - req, err := lastResults.expressRouteServiceProviderListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "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, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context) (result ExpressRouteServiceProviderListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.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) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go deleted file mode 100644 index 7882d96a38dd..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go +++ /dev/null @@ -1,581 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// FirewallPoliciesClient is the network Client -type FirewallPoliciesClient struct { - BaseClient -} - -// NewFirewallPoliciesClient creates an instance of the FirewallPoliciesClient client. -func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { - return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient 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 NewFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPoliciesClient { - return FirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the specified Firewall Policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -// parameters - parameters supplied to the create or update Firewall Policy operation. -func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (result FirewallPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters), - autorest.WithJSON(parameters), - 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 FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client FirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicy, 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 deletes the specified Firewall Policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPoliciesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/firewallPolicies/{firewallPolicyName}", 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 FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FirewallPoliciesClient) 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 the specified Firewall Policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -// expand - expands referenced resources. -func (client FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (result FirewallPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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, firewallPolicyName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/firewallPolicies/{firewallPolicyName}", 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 FirewallPoliciesClient) 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 FirewallPoliciesClient) GetResponder(resp *http.Response) (result FirewallPolicy, 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 Firewall Policies in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client FirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.List") - defer func() { - sc := -1 - if result.fplr.Response.Response != nil { - sc = result.fplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.fplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client FirewallPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/firewallPolicies", 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 FirewallPoliciesClient) 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 FirewallPoliciesClient) ListResponder(resp *http.Response) (result FirewallPolicyListResult, 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 FirewallPoliciesClient) listNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) { - req, err := lastResults.firewallPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "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, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result FirewallPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.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) - return -} - -// ListAll gets all the Firewall Policies in a subscription. -func (client FirewallPoliciesClient) ListAll(ctx context.Context) (result FirewallPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll") - defer func() { - sc := -1 - if result.fplr.Response.Response != nil { - sc = result.fplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.fplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client FirewallPoliciesClient) ListAllResponder(resp *http.Response) (result FirewallPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client FirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults FirewallPolicyListResult) (result FirewallPolicyListResult, err error) { - req, err := lastResults.firewallPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client FirewallPoliciesClient) ListAllComplete(ctx context.Context) (result FirewallPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates a Firewall Policy Tags. -// Parameters: -// resourceGroupName - the resource group name of the Firewall Policy. -// firewallPolicyName - the name of the Firewall Policy being updated. -// firewallPolicyParameters - parameters supplied to Update Firewall Policy tags. -func (client FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters TagsObject) (result FirewallPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, firewallPolicyName, firewallPolicyParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client FirewallPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/firewallPolicies/{firewallPolicyName}", pathParameters), - autorest.WithJSON(firewallPolicyParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client FirewallPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client FirewallPoliciesClient) UpdateTagsResponder(resp *http.Response) (result FirewallPolicy, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go deleted file mode 100644 index aaff9901b7e5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go +++ /dev/null @@ -1,406 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// FirewallPolicyRuleGroupsClient is the network Client -type FirewallPolicyRuleGroupsClient struct { - BaseClient -} - -// NewFirewallPolicyRuleGroupsClient creates an instance of the FirewallPolicyRuleGroupsClient client. -func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRuleGroupsClient { - return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient 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 NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { - return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates the specified FirewallPolicyRuleGroup. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -// ruleGroupName - the name of the FirewallPolicyRuleGroup. -// parameters - parameters supplied to the create or update FirewallPolicyRuleGroup operation. -func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string, parameters FirewallPolicyRuleGroup) (result FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, ruleGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string, parameters FirewallPolicyRuleGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleGroupName": autorest.Encode("path", ruleGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - parameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicyRuleGroup, 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 deletes the specified FirewallPolicyRuleGroup. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -// ruleGroupName - the name of the FirewallPolicyRuleGroup. -func (client FirewallPolicyRuleGroupsClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result FirewallPolicyRuleGroupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName, ruleGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleGroupName": autorest.Encode("path", ruleGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}", 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 FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FirewallPolicyRuleGroupsClient) 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 the specified FirewallPolicyRuleGroup. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -// ruleGroupName - the name of the FirewallPolicyRuleGroup. -func (client FirewallPolicyRuleGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result FirewallPolicyRuleGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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, firewallPolicyName, ruleGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FirewallPolicyRuleGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "ruleGroupName": autorest.Encode("path", ruleGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/firewallPolicies/{firewallPolicyName}/ruleGroups/{ruleGroupName}", 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 FirewallPolicyRuleGroupsClient) 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 FirewallPolicyRuleGroupsClient) GetResponder(resp *http.Response) (result FirewallPolicyRuleGroup, 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 FirewallPolicyRuleGroups in a FirewallPolicy resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// firewallPolicyName - the name of the Firewall Policy. -func (client FirewallPolicyRuleGroupsClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.List") - defer func() { - sc := -1 - if result.fprglr.Response.Response != nil { - sc = result.fprglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, firewallPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.fprglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "List", resp, "Failure sending request") - return - } - - result.fprglr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "List", resp, "Failure responding to request") - return - } - if result.fprglr.hasNextLink() && result.fprglr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client FirewallPolicyRuleGroupsClient) ListPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "firewallPolicyName": autorest.Encode("path", firewallPolicyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/firewallPolicies/{firewallPolicyName}/ruleGroups", 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 FirewallPolicyRuleGroupsClient) 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 FirewallPolicyRuleGroupsClient) ListResponder(resp *http.Response) (result FirewallPolicyRuleGroupListResult, 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 FirewallPolicyRuleGroupsClient) listNextResults(ctx context.Context, lastResults FirewallPolicyRuleGroupListResult) (result FirewallPolicyRuleGroupListResult, err error) { - req, err := lastResults.firewallPolicyRuleGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "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, "network.FirewallPolicyRuleGroupsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FirewallPolicyRuleGroupsClient) ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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, firewallPolicyName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go deleted file mode 100644 index 89acce8dd5ad..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// HubVirtualNetworkConnectionsClient is the network Client -type HubVirtualNetworkConnectionsClient struct { - BaseClient -} - -// NewHubVirtualNetworkConnectionsClient creates an instance of the HubVirtualNetworkConnectionsClient client. -func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient { - return NewHubVirtualNetworkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { - return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves the details of a HubVirtualNetworkConnection. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -// connectionName - the name of the vpn connection. -func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-06-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/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", 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 HubVirtualNetworkConnectionsClient) 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 HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List retrieves the details of all HubVirtualNetworkConnections. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.List") - defer func() { - sc := -1 - if result.lhvncr.Response.Response != nil { - sc = result.lhvncr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lhvncr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-06-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/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections", 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 HubVirtualNetworkConnectionsClient) 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 HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Response) (result ListHubVirtualNetworkConnectionsResult, 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 HubVirtualNetworkConnectionsClient) listNextResults(ctx context.Context, lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) { - req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "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, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client HubVirtualNetworkConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go deleted file mode 100644 index 2bab55601f34..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go +++ /dev/null @@ -1,416 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// InboundNatRulesClient is the network Client -type InboundNatRulesClient struct { - BaseClient -} - -// NewInboundNatRulesClient creates an instance of the InboundNatRulesClient client. -func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { - return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient 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 NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient { - return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a load balancer inbound nat rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. -// inboundNatRuleParameters - parameters supplied to the create or update inbound nat rule operation. -func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (result InboundNatRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: inboundNatRuleParameters, - Constraints: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.InboundNatRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - inboundNatRuleParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", pathParameters), - autorest.WithJSON(inboundNatRuleParameters), - 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 InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result InboundNatRule, 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 deletes the specified load balancer inbound nat rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. -func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result InboundNatRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", 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 InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client InboundNatRulesClient) 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 the specified load balancer inbound nat rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. -// expand - expands referenced resources. -func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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, loadBalancerName, inboundNatRuleName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", 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 InboundNatRulesClient) 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 InboundNatRulesClient) GetResponder(resp *http.Response) (result InboundNatRule, 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 the inbound nat rules in a load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.List") - defer func() { - sc := -1 - if result.inrlr.Response.Response != nil { - sc = result.inrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.inrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/inboundNatRules", 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 InboundNatRulesClient) 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 InboundNatRulesClient) ListResponder(resp *http.Response) (result InboundNatRuleListResult, 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 InboundNatRulesClient) listNextResults(ctx context.Context, lastResults InboundNatRuleListResult) (result InboundNatRuleListResult, err error) { - req, err := lastResults.inboundNatRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "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, "network.InboundNatRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InboundNatRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go deleted file mode 100644 index b421812bba44..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// InterfaceIPConfigurationsClient is the network Client -type InterfaceIPConfigurationsClient struct { - BaseClient -} - -// NewInterfaceIPConfigurationsClient creates an instance of the InterfaceIPConfigurationsClient client. -func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfigurationsClient { - return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient 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 NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient { - return InterfaceIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the specified network interface ip configuration. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// IPConfigurationName - the name of the ip configuration name. -func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result InterfaceIPConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.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, networkInterfaceName, IPConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ipConfigurationName": autorest.Encode("path", IPConfigurationName), - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", 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 InterfaceIPConfigurationsClient) 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 InterfaceIPConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List get all ip configurations in a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.List") - defer func() { - sc := -1 - if result.iiclr.Response.Response != nil { - sc = result.iiclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iiclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkInterfaces/{networkInterfaceName}/ipConfigurations", 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 InterfaceIPConfigurationsClient) 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 InterfaceIPConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, 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 InterfaceIPConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) { - req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "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, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfaceIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.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, networkInterfaceName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go deleted file mode 100644 index e488f6c75785..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go +++ /dev/null @@ -1,150 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// InterfaceLoadBalancersClient is the network Client -type InterfaceLoadBalancersClient struct { - BaseClient -} - -// NewInterfaceLoadBalancersClient creates an instance of the InterfaceLoadBalancersClient client. -func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalancersClient { - return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient 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 NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { - return InterfaceLoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List list all load balancers in a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.List") - defer func() { - sc := -1 - if result.ilblr.Response.Response != nil { - sc = result.ilblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ilblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkInterfaces/{networkInterfaceName}/loadBalancers", 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 InterfaceLoadBalancersClient) 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 InterfaceLoadBalancersClient) ListResponder(resp *http.Response) (result InterfaceLoadBalancerListResult, 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 InterfaceLoadBalancersClient) listNextResults(ctx context.Context, lastResults InterfaceLoadBalancerListResult) (result InterfaceLoadBalancerListResult, err error) { - req, err := lastResults.interfaceLoadBalancerListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "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, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfaceLoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.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, networkInterfaceName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go deleted file mode 100644 index ed9d30d6a5d1..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go +++ /dev/null @@ -1,1277 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// InterfacesClient is the network Client -type InterfacesClient struct { - BaseClient -} - -// NewInterfacesClient creates an instance of the InterfacesClient client. -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient 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 NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// parameters - parameters supplied to the create or update network interface operation. -func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (result InterfacesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkInterfaces/{networkInterfaceName}", pathParameters), - autorest.WithJSON(parameters), - 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 InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (result Interface, 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 deletes the specified network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkInterfaces/{networkInterfaceName}", 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 InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client InterfacesClient) 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 information about the specified network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// expand - expands referenced resources. -func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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, networkInterfaceName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkInterfaces/{networkInterfaceName}", 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 InterfacesClient) 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 InterfacesClient) GetResponder(resp *http.Response) (result Interface, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetEffectiveRouteTable gets all route tables applied to a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesGetEffectiveRouteTableFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetEffectiveRouteTable") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetEffectiveRouteTablePreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure preparing request") - return - } - - result, err = client.GetEffectiveRouteTableSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request") - return - } - - return -} - -// GetEffectiveRouteTablePreparer prepares the GetEffectiveRouteTable request. -func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetEffectiveRouteTableResponder handles the response to the GetEffectiveRouteTable request. The method always -// closes the http.Response Body. -func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Response) (result EffectiveRouteListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVirtualMachineScaleSetIPConfiguration get the specified network interface ip configuration in a virtual machine -// scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -// networkInterfaceName - the name of the network interface. -// IPConfigurationName - the name of the ip configuration. -// expand - expands referenced resources. -func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (result InterfaceIPConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetIPConfiguration") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVirtualMachineScaleSetIPConfigurationPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", nil, "Failure preparing request") - return - } - - resp, err := client.GetVirtualMachineScaleSetIPConfigurationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure sending request") - return - } - - result, err = client.GetVirtualMachineScaleSetIPConfigurationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure responding to request") - return - } - - return -} - -// GetVirtualMachineScaleSetIPConfigurationPreparer prepares the GetVirtualMachineScaleSetIPConfiguration request. -func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ipConfigurationName": autorest.Encode("path", IPConfigurationName), - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-30" - 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/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVirtualMachineScaleSetIPConfigurationSender sends the GetVirtualMachineScaleSetIPConfiguration request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetVirtualMachineScaleSetIPConfigurationResponder handles the response to the GetVirtualMachineScaleSetIPConfiguration request. The method always -// closes the http.Response Body. -func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVirtualMachineScaleSetNetworkInterface get the specified network interface in a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -// networkInterfaceName - the name of the network interface. -// expand - expands referenced resources. -func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetNetworkInterface") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", nil, "Failure preparing request") - return - } - - resp, err := client.GetVirtualMachineScaleSetNetworkInterfaceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure sending request") - return - } - - result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure responding to request") - return - } - - return -} - -// GetVirtualMachineScaleSetNetworkInterfacePreparer prepares the GetVirtualMachineScaleSetNetworkInterface request. -func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-30" - 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/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always -// closes the http.Response Body. -func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponder(resp *http.Response) (result Interface, 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 network interfaces in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client InterfacesClient) List(ctx context.Context, resourceGroupName string) (result InterfaceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.List") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkInterfaces", 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 InterfacesClient) 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 InterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, 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 InterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "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, "network.InterfacesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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) - return -} - -// ListAll gets all network interfaces in a subscription. -func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client InterfacesClient) ListAllResponder(resp *http.Response) (result InterfaceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listAllNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfacesClient) ListAllComplete(ctx context.Context) (result InterfaceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListEffectiveNetworkSecurityGroups gets all network security groups applied to a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListEffectiveNetworkSecurityGroups") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListEffectiveNetworkSecurityGroupsPreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure preparing request") - return - } - - result, err = client.ListEffectiveNetworkSecurityGroupsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request") - return - } - - return -} - -// ListEffectiveNetworkSecurityGroupsPreparer prepares the ListEffectiveNetworkSecurityGroups request. -func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListEffectiveNetworkSecurityGroupsResponder handles the response to the ListEffectiveNetworkSecurityGroups request. The method always -// closes the http.Response Body. -func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp *http.Response) (result EffectiveNetworkSecurityGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListVirtualMachineScaleSetIPConfigurations get the specified network interface ip configuration in a virtual machine -// scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -// networkInterfaceName - the name of the network interface. -// expand - expands referenced resources. -func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations") - defer func() { - sc := -1 - if result.iiclr.Response.Response != nil { - sc = result.iiclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listVirtualMachineScaleSetIPConfigurationsNextResults - req, err := client.ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", nil, "Failure preparing request") - return - } - - resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req) - if err != nil { - result.iiclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListVirtualMachineScaleSetIPConfigurationsPreparer prepares the ListVirtualMachineScaleSetIPConfigurations request. -func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-30" - 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/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVirtualMachineScaleSetIPConfigurationsSender sends the ListVirtualMachineScaleSetIPConfigurations request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVirtualMachineScaleSetIPConfigurationsResponder handles the response to the ListVirtualMachineScaleSetIPConfigurations request. The method always -// closes the http.Response Body. -func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listVirtualMachineScaleSetIPConfigurationsNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) { - req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListVirtualMachineScaleSetIPConfigurationsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListVirtualMachineScaleSetIPConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations") - 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.ListVirtualMachineScaleSetIPConfigurations(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) - return -} - -// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listVirtualMachineScaleSetNetworkInterfacesNextResults - req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", nil, "Failure preparing request") - return - } - - resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListVirtualMachineScaleSetNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetNetworkInterfaces request. -func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-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/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always -// closes the http.Response Body. -func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListVirtualMachineScaleSetNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces") - 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.ListVirtualMachineScaleSetNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName) - return -} - -// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all network interfaces in a virtual machine in -// a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listVirtualMachineScaleSetVMNetworkInterfacesNextResults - req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", nil, "Failure preparing request") - return - } - - resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetVMNetworkInterfaces request. -func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-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/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always -// closes the http.Response Body. -func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any. -func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces") - 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.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) - return -} - -// UpdateTags updates a network interface tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// parameters - parameters supplied to update network interface tags. -func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (result InterfacesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkInterfaceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkInterfaces/{networkInterfaceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client InterfacesClient) UpdateTagsResponder(resp *http.Response) (result Interface, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go deleted file mode 100644 index aaae85a89427..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go +++ /dev/null @@ -1,429 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// InterfaceTapConfigurationsClient is the network Client -type InterfaceTapConfigurationsClient struct { - BaseClient -} - -// NewInterfaceTapConfigurationsClient creates an instance of the InterfaceTapConfigurationsClient client. -func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConfigurationsClient { - return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient 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 NewInterfaceTapConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceTapConfigurationsClient { - return InterfaceTapConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a Tap configuration in the specified NetworkInterface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// tapConfigurationName - the name of the tap configuration. -// tapConfigurationParameters - parameters supplied to the create or update tap configuration operation. -func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (result InterfaceTapConfigurationsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: tapConfigurationParameters, - Constraints: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.InterfaceTapConfigurationsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapConfigurationName": autorest.Encode("path", tapConfigurationName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - tapConfigurationParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", pathParameters), - autorest.WithJSON(tapConfigurationParameters), - 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 InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client InterfaceTapConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceTapConfiguration, 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 deletes the specified tap configuration from the NetworkInterface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// tapConfigurationName - the name of the tap configuration. -func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfigurationsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapConfigurationName": autorest.Encode("path", tapConfigurationName), - } - - const APIVersion = "2019-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client InterfaceTapConfigurationsClient) 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 get the specified tap configuration on a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -// tapConfigurationName - the name of the tap configuration. -func (client InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName, tapConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapConfigurationName": autorest.Encode("path", tapConfigurationName), - } - - const APIVersion = "2019-06-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/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) 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 InterfaceTapConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List get all Tap configurations in a network interface. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkInterfaceName - the name of the network interface. -func (client InterfaceTapConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.List") - defer func() { - sc := -1 - if result.itclr.Response.Response != nil { - sc = result.itclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.itclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkInterfaces/{networkInterfaceName}/tapConfigurations", 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 InterfaceTapConfigurationsClient) 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 InterfaceTapConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceTapConfigurationListResult, 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 InterfaceTapConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceTapConfigurationListResult) (result InterfaceTapConfigurationListResult, err error) { - req, err := lastResults.interfaceTapConfigurationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "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, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfaceTapConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go deleted file mode 100644 index 045e7e964800..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerBackendAddressPoolsClient is the network Client -type LoadBalancerBackendAddressPoolsClient struct { - BaseClient -} - -// NewLoadBalancerBackendAddressPoolsClient creates an instance of the LoadBalancerBackendAddressPoolsClient client. -func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient { - return NewLoadBalancerBackendAddressPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { - return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets load balancer backend address pool. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// backendAddressPoolName - the name of the backend address pool. -func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result BackendAddressPool, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.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, loadBalancerName, backendAddressPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backendAddressPoolName": autorest.Encode("path", backendAddressPoolName), - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", 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 LoadBalancerBackendAddressPoolsClient) 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 LoadBalancerBackendAddressPoolsClient) GetResponder(resp *http.Response) (result BackendAddressPool, 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 the load balancer backed address pools. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.List") - defer func() { - sc := -1 - if result.lbbaplr.Response.Response != nil { - sc = result.lbbaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lbbaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/backendAddressPools", 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 LoadBalancerBackendAddressPoolsClient) 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 LoadBalancerBackendAddressPoolsClient) ListResponder(resp *http.Response) (result LoadBalancerBackendAddressPoolListResult, 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 LoadBalancerBackendAddressPoolsClient) listNextResults(ctx context.Context, lastResults LoadBalancerBackendAddressPoolListResult) (result LoadBalancerBackendAddressPoolListResult, err error) { - req, err := lastResults.loadBalancerBackendAddressPoolListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "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, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerBackendAddressPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go deleted file mode 100644 index fcf76e647e12..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go +++ /dev/null @@ -1,229 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerFrontendIPConfigurationsClient is the network Client -type LoadBalancerFrontendIPConfigurationsClient struct { - BaseClient -} - -// NewLoadBalancerFrontendIPConfigurationsClient creates an instance of the LoadBalancerFrontendIPConfigurationsClient -// client. -func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { - return NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient 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 NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { - return LoadBalancerFrontendIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets load balancer frontend IP configuration. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// frontendIPConfigurationName - the name of the frontend IP configuration. -func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result FrontendIPConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.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, loadBalancerName, frontendIPConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "frontendIPConfigurationName": autorest.Encode("path", frontendIPConfigurationName), - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}", 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 LoadBalancerFrontendIPConfigurationsClient) 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 LoadBalancerFrontendIPConfigurationsClient) GetResponder(resp *http.Response) (result FrontendIPConfiguration, 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 the load balancer frontend IP configurations. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.List") - defer func() { - sc := -1 - if result.lbficlr.Response.Response != nil { - sc = result.lbficlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lbficlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/frontendIPConfigurations", 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 LoadBalancerFrontendIPConfigurationsClient) 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 LoadBalancerFrontendIPConfigurationsClient) ListResponder(resp *http.Response) (result LoadBalancerFrontendIPConfigurationListResult, 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 LoadBalancerFrontendIPConfigurationsClient) listNextResults(ctx context.Context, lastResults LoadBalancerFrontendIPConfigurationListResult) (result LoadBalancerFrontendIPConfigurationListResult, err error) { - req, err := lastResults.loadBalancerFrontendIPConfigurationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "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, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerFrontendIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go deleted file mode 100644 index e4509bec7559..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerLoadBalancingRulesClient is the network Client -type LoadBalancerLoadBalancingRulesClient struct { - BaseClient -} - -// NewLoadBalancerLoadBalancingRulesClient creates an instance of the LoadBalancerLoadBalancingRulesClient client. -func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancerLoadBalancingRulesClient { - return NewLoadBalancerLoadBalancingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { - return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the specified load balancer load balancing rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// loadBalancingRuleName - the name of the load balancing rule. -func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result LoadBalancingRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.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, loadBalancerName, loadBalancingRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "loadBalancingRuleName": autorest.Encode("path", loadBalancingRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}", 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 LoadBalancerLoadBalancingRulesClient) 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 LoadBalancerLoadBalancingRulesClient) GetResponder(resp *http.Response) (result LoadBalancingRule, 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 the load balancing rules in a load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.List") - defer func() { - sc := -1 - if result.lblbrlr.Response.Response != nil { - sc = result.lblbrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lblbrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/loadBalancingRules", 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 LoadBalancerLoadBalancingRulesClient) 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 LoadBalancerLoadBalancingRulesClient) ListResponder(resp *http.Response) (result LoadBalancerLoadBalancingRuleListResult, 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 LoadBalancerLoadBalancingRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerLoadBalancingRuleListResult) (result LoadBalancerLoadBalancingRuleListResult, err error) { - req, err := lastResults.loadBalancerLoadBalancingRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "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, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerLoadBalancingRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go deleted file mode 100644 index 8330a7da3c88..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go +++ /dev/null @@ -1,150 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerNetworkInterfacesClient is the network Client -type LoadBalancerNetworkInterfacesClient struct { - BaseClient -} - -// NewLoadBalancerNetworkInterfacesClient creates an instance of the LoadBalancerNetworkInterfacesClient client. -func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerNetworkInterfacesClient { - return NewLoadBalancerNetworkInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { - return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets associated load balancer network interfaces. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.List") - defer func() { - sc := -1 - if result.ilr.Response.Response != nil { - sc = result.ilr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ilr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/networkInterfaces", 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 LoadBalancerNetworkInterfacesClient) 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 LoadBalancerNetworkInterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, 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 LoadBalancerNetworkInterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) { - req, err := lastResults.interfaceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "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, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerNetworkInterfacesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go deleted file mode 100644 index cfe7af7416d4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerOutboundRulesClient is the network Client -type LoadBalancerOutboundRulesClient struct { - BaseClient -} - -// NewLoadBalancerOutboundRulesClient creates an instance of the LoadBalancerOutboundRulesClient client. -func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutboundRulesClient { - return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient 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 NewLoadBalancerOutboundRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerOutboundRulesClient { - return LoadBalancerOutboundRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the specified load balancer outbound rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// outboundRuleName - the name of the outbound rule. -func (client LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (result OutboundRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName, outboundRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "outboundRuleName": autorest.Encode("path", outboundRuleName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}", 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 LoadBalancerOutboundRulesClient) 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 LoadBalancerOutboundRulesClient) GetResponder(resp *http.Response) (result OutboundRule, 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 the outbound rules in a load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerOutboundRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.List") - defer func() { - sc := -1 - if result.lborlr.Response.Response != nil { - sc = result.lborlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lborlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/outboundRules", 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 LoadBalancerOutboundRulesClient) 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 LoadBalancerOutboundRulesClient) ListResponder(resp *http.Response) (result LoadBalancerOutboundRuleListResult, 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 LoadBalancerOutboundRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerOutboundRuleListResult) (result LoadBalancerOutboundRuleListResult, err error) { - req, err := lastResults.loadBalancerOutboundRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "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, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerOutboundRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go deleted file mode 100644 index 37f885d3f459..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go +++ /dev/null @@ -1,228 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancerProbesClient is the network Client -type LoadBalancerProbesClient struct { - BaseClient -} - -// NewLoadBalancerProbesClient creates an instance of the LoadBalancerProbesClient client. -func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient { - return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient 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 NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient { - return LoadBalancerProbesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets load balancer probe. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// probeName - the name of the probe. -func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (result Probe, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.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, loadBalancerName, probeName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "probeName": autorest.Encode("path", probeName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/probes/{probeName}", 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 LoadBalancerProbesClient) 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 LoadBalancerProbesClient) GetResponder(resp *http.Response) (result Probe, 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 the load balancer probes. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.List") - defer func() { - sc := -1 - if result.lbplr.Response.Response != nil { - sc = result.lbplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lbplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers/{loadBalancerName}/probes", 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 LoadBalancerProbesClient) 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 LoadBalancerProbesClient) ListResponder(resp *http.Response) (result LoadBalancerProbeListResult, 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 LoadBalancerProbesClient) listNextResults(ctx context.Context, lastResults LoadBalancerProbeListResult) (result LoadBalancerProbeListResult, err error) { - req, err := lastResults.loadBalancerProbeListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "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, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancerProbesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.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, loadBalancerName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go deleted file mode 100644 index d2b371402105..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go +++ /dev/null @@ -1,582 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// LoadBalancersClient is the network Client -type LoadBalancersClient struct { - BaseClient -} - -// NewLoadBalancersClient creates an instance of the LoadBalancersClient client. -func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { - return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient 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 NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient { - return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// parameters - parameters supplied to the create or update load balancer operation. -func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (result LoadBalancersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}", pathParameters), - autorest.WithJSON(parameters), - 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 LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) (result LoadBalancer, 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 deletes the specified load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}", 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 LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client LoadBalancersClient) 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 the specified load balancer. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// expand - expands referenced resources. -func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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, loadBalancerName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}", 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 LoadBalancersClient) 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 LoadBalancersClient) GetResponder(resp *http.Response) (result LoadBalancer, 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 the load balancers in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.List") - defer func() { - sc := -1 - if result.lblr.Response.Response != nil { - sc = result.lblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/loadBalancers", 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 LoadBalancersClient) 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 LoadBalancersClient) ListResponder(resp *http.Response) (result LoadBalancerListResult, 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 LoadBalancersClient) listNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { - req, err := lastResults.loadBalancerListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "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, "network.LoadBalancersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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) - return -} - -// ListAll gets all the load balancers in a subscription. -func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalancerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") - defer func() { - sc := -1 - if result.lblr.Response.Response != nil { - sc = result.lblr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.lblr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client LoadBalancersClient) ListAllResponder(resp *http.Response) (result LoadBalancerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client LoadBalancersClient) listAllNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) { - req, err := lastResults.loadBalancerListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result LoadBalancerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates a load balancer tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// loadBalancerName - the name of the load balancer. -// parameters - parameters supplied to update load balancer tags. -func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancersUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, loadBalancerName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "loadBalancerName": autorest.Encode("path", loadBalancerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/loadBalancers/{loadBalancerName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client LoadBalancersClient) UpdateTagsResponder(resp *http.Response) (result LoadBalancer, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go deleted file mode 100644 index 19ea2a301354..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go +++ /dev/null @@ -1,493 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// LocalNetworkGatewaysClient is the network Client -type LocalNetworkGatewaysClient struct { - BaseClient -} - -// NewLocalNetworkGatewaysClient creates an instance of the LocalNetworkGatewaysClient client. -func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysClient { - return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient 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 NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient { - return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a local network gateway in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// localNetworkGatewayName - the name of the local network gateway. -// parameters - parameters supplied to the create or update local network gateway operation. -func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (result LocalNetworkGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: localNetworkGatewayName, - Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.LocalNetworkGatewaysClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/localNetworkGateways/{localNetworkGatewayName}", pathParameters), - autorest.WithJSON(parameters), - 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 LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result LocalNetworkGateway, 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 deletes the specified local network gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// localNetworkGatewayName - the name of the local network gateway. -func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: localNetworkGatewayName, - Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.LocalNetworkGatewaysClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, localNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/localNetworkGateways/{localNetworkGatewayName}", 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 LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client LocalNetworkGatewaysClient) 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 the specified local network gateway in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// localNetworkGatewayName - the name of the local network gateway. -func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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: localNetworkGatewayName, - Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.LocalNetworkGatewaysClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, localNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/localNetworkGateways/{localNetworkGatewayName}", 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 LocalNetworkGatewaysClient) 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 LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (result LocalNetworkGateway, 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 the local network gateways in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.List") - defer func() { - sc := -1 - if result.lnglr.Response.Response != nil { - sc = result.lnglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lnglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/localNetworkGateways", 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 LocalNetworkGatewaysClient) 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 LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (result LocalNetworkGatewayListResult, 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 LocalNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) { - req, err := lastResults.localNetworkGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "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, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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) - return -} - -// UpdateTags updates a local network gateway tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// localNetworkGatewayName - the name of the local network gateway. -// parameters - parameters supplied to update local network gateway tags. -func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGatewaysUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: localNetworkGatewayName, - Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.LocalNetworkGatewaysClient", "UpdateTags", err.Error()) - } - - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, localNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "localNetworkGatewayName": autorest.Encode("path", localNetworkGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/localNetworkGateways/{localNetworkGatewayName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client LocalNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result LocalNetworkGateway, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go deleted file mode 100644 index 03d784918fb2..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go +++ /dev/null @@ -1,37163 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" - -// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the -// virtual network. -type AddressSpace struct { - // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation. - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} - -// ApplicationGateway application gateway resource. -type ApplicationGateway struct { - autorest.Response `json:"-"` - // ApplicationGatewayPropertiesFormat - Properties of the application gateway. - *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting where the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // Identity - The identity of the application gateway, if configured. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ApplicationGateway. -func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ag.ApplicationGatewayPropertiesFormat != nil { - objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat - } - if ag.Etag != nil { - objectMap["etag"] = ag.Etag - } - if ag.Zones != nil { - objectMap["zones"] = ag.Zones - } - if ag.Identity != nil { - objectMap["identity"] = ag.Identity - } - if ag.ID != nil { - objectMap["id"] = ag.ID - } - if ag.Location != nil { - objectMap["location"] = ag.Location - } - if ag.Tags != nil { - objectMap["tags"] = ag.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct. -func (ag *ApplicationGateway) 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 applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat) - if err != nil { - return err - } - ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ag.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - ag.Zones = &zones - } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - ag.Identity = &identity - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ag.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ag.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ag.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ag.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ag.Tags = tags - } - } - } - - return nil -} - -// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway. -type ApplicationGatewayAuthenticationCertificate struct { - // ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate. - *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the authentication certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate. -func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil { - objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat - } - if agac.Name != nil { - objectMap["name"] = agac.Name - } - if agac.Etag != nil { - objectMap["etag"] = agac.Etag - } - if agac.Type != nil { - objectMap["type"] = agac.Type - } - if agac.ID != nil { - objectMap["id"] = agac.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct. -func (agac *ApplicationGatewayAuthenticationCertificate) 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 applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat) - if err != nil { - return err - } - agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agac.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agac.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agac.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agac.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an -// application gateway. -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - // Data - Certificate public data. - Data *string `json:"data,omitempty"` - // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration. -type ApplicationGatewayAutoscaleConfiguration struct { - // MinCapacity - Lower bound on number of Application Gateway capacity. - MinCapacity *int32 `json:"minCapacity,omitempty"` - // MaxCapacity - Upper bound on number of Application Gateway capacity. - MaxCapacity *int32 `json:"maxCapacity,omitempty"` -} - -// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service -// call. -type ApplicationGatewayAvailableSslOptions struct { - autorest.Response `json:"-"` - // ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options. - *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions. -func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil { - objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat - } - if agaso.ID != nil { - objectMap["id"] = agaso.ID - } - if agaso.Location != nil { - objectMap["location"] = agaso.Location - } - if agaso.Tags != nil { - objectMap["tags"] = agaso.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct. -func (agaso *ApplicationGatewayAvailableSslOptions) 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 applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat) - if err != nil { - return err - } - agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agaso.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agaso.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agaso.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - agaso.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - agaso.Tags = tags - } - } - } - - return nil -} - -// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of -// ApplicationGatewayAvailableSslOptions. -type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { - // PredefinedPolicies - List of available Ssl predefined policy. - PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` - // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' - DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` - // AvailableCipherSuites - List of available Ssl cipher suites. - AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` - // AvailableProtocols - List of available Ssl protocols. - AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` -} - -// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API -// service call. -type ApplicationGatewayAvailableSslPredefinedPolicies struct { - autorest.Response `json:"-"` - // Value - List of available Ssl predefined policy. - Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of -// ApplicationGatewaySslPredefinedPolicy values. -type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct { - i int - page ApplicationGatewayAvailableSslPredefinedPoliciesPage -} - -// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies { - 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy { - if !iter.page.NotDone() { - return ApplicationGatewaySslPredefinedPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type. -func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator { - return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(agaspp.NextLink))) -} - -// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of -// ApplicationGatewaySslPredefinedPolicy values. -type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct { - fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error) - agaspp ApplicationGatewayAvailableSslPredefinedPolicies -} - -// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.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.agaspp) - if err != nil { - return err - } - page.agaspp = 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool { - return !page.agaspp.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies { - return page.agaspp -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy { - if page.agaspp.IsEmpty() { - return nil - } - return *page.agaspp.Value -} - -// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type. -func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { - return ApplicationGatewayAvailableSslPredefinedPoliciesPage{ - fn: getNextPage, - agaspp: cur, - } -} - -// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API -// service call. -type ApplicationGatewayAvailableWafRuleSetsResult struct { - autorest.Response `json:"-"` - // Value - The list of application gateway rule sets. - Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` -} - -// ApplicationGatewayBackendAddress backend address of an application gateway. -type ApplicationGatewayBackendAddress struct { - // Fqdn - Fully qualified domain name (FQDN). - Fqdn *string `json:"fqdn,omitempty"` - // IPAddress - IP address. - IPAddress *string `json:"ipAddress,omitempty"` -} - -// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway. -type ApplicationGatewayBackendAddressPool struct { - // ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool. - *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the backend address pool that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool. -func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil { - objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat - } - if agbap.Name != nil { - objectMap["name"] = agbap.Name - } - if agbap.Etag != nil { - objectMap["etag"] = agbap.Etag - } - if agbap.Type != nil { - objectMap["type"] = agbap.Type - } - if agbap.ID != nil { - objectMap["id"] = agbap.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct. -func (agbap *ApplicationGatewayBackendAddressPool) 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 applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat) - if err != nil { - return err - } - agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agbap.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agbap.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agbap.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agbap.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an -// application gateway. -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. - BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - // BackendAddresses - Backend addresses. - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call. -type ApplicationGatewayBackendHealth struct { - autorest.Response `json:"-"` - // BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources. - BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` -} - -// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings. -type ApplicationGatewayBackendHealthHTTPSettings struct { - // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource. - BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` - // Servers - List of ApplicationGatewayBackendHealthServer resources. - Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` -} - -// ApplicationGatewayBackendHealthOnDemand result of on demand test probe. -type ApplicationGatewayBackendHealthOnDemand struct { - autorest.Response `json:"-"` - // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - // BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. - BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` -} - -// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool. -type ApplicationGatewayBackendHealthPool struct { - // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources. - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` -} - -// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings. -type ApplicationGatewayBackendHealthServer struct { - // Address - IP address or FQDN of backend server. - Address *string `json:"address,omitempty"` - // IPConfiguration - Reference of IP configuration of backend server. - IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` - // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining' - Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` - // HealthProbeLog - Health Probe Log. - HealthProbeLog *string `json:"healthProbeLog,omitempty"` -} - -// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway. -type ApplicationGatewayBackendHTTPSettings struct { - // ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings. - *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the backend http settings that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings. -func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil { - objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat - } - if agbhs.Name != nil { - objectMap["name"] = agbhs.Name - } - if agbhs.Etag != nil { - objectMap["etag"] = agbhs.Etag - } - if agbhs.Type != nil { - objectMap["type"] = agbhs.Type - } - if agbhs.ID != nil { - objectMap["id"] = agbhs.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct. -func (agbhs *ApplicationGatewayBackendHTTPSettings) 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 applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat) - if err != nil { - return err - } - agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agbhs.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agbhs.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agbhs.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agbhs.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an -// application gateway. -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - // Port - The destination port on the backend. - Port *int32 `json:"port,omitempty"` - // Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS' - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled' - CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. - RequestTimeout *int32 `json:"requestTimeout,omitempty"` - // Probe - Probe resource of an application gateway. - Probe *SubResource `json:"probe,omitempty"` - // AuthenticationCertificates - Array of references to application gateway authentication certificates. - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - // TrustedRootCertificates - Array of references to application gateway trusted root certificates. - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` - // ConnectionDraining - Connection draining of the backend http settings resource. - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - // HostName - Host header to be sent to the backend servers. - HostName *string `json:"hostName,omitempty"` - // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false. - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - // AffinityCookieName - Cookie name to use for the affinity cookie. - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - // ProbeEnabled - Whether the probe is enabled. Default value is false. - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. - Path *string `json:"path,omitempty"` - // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// 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 { - // Enabled - Whether connection draining is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. - DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` -} - -// ApplicationGatewayCustomError customer error of an application gateway. -type ApplicationGatewayCustomError struct { - // StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502' - StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` - // CustomErrorPageURL - Error page URL of the application gateway customer error. - CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"` -} - -// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire -// rule group. -type ApplicationGatewayFirewallDisabledRuleGroup struct { - // RuleGroupName - The name of the rule group that will be disabled. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled. - Rules *[]int32 `json:"rules,omitempty"` -} - -// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF -// check. -type ApplicationGatewayFirewallExclusion struct { - // MatchVariable - The variable to be excluded. - MatchVariable *string `json:"matchVariable,omitempty"` - // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. - SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"` - // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. - Selector *string `json:"selector,omitempty"` -} - -// ApplicationGatewayFirewallRule a web application firewall rule. -type ApplicationGatewayFirewallRule struct { - // RuleID - The identifier of the web application firewall rule. - RuleID *int32 `json:"ruleId,omitempty"` - // Description - The description of the web application firewall rule. - Description *string `json:"description,omitempty"` -} - -// ApplicationGatewayFirewallRuleGroup a web application firewall rule group. -type ApplicationGatewayFirewallRuleGroup struct { - // RuleGroupName - The name of the web application firewall rule group. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - // Description - The description of the web application firewall rule group. - Description *string `json:"description,omitempty"` - // Rules - The rules of the web application firewall rule group. - Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"` -} - -// ApplicationGatewayFirewallRuleSet a web application firewall rule set. -type ApplicationGatewayFirewallRuleSet struct { - // ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set. - *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet. -func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil { - objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat - } - if agfrs.ID != nil { - objectMap["id"] = agfrs.ID - } - if agfrs.Location != nil { - objectMap["location"] = agfrs.Location - } - if agfrs.Tags != nil { - objectMap["tags"] = agfrs.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct. -func (agfrs *ApplicationGatewayFirewallRuleSet) 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 applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat) - if err != nil { - return err - } - agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agfrs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agfrs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agfrs.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - agfrs.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - agfrs.Tags = tags - } - } - } - - return nil -} - -// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set. -type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - // ProvisioningState - The provisioning state of the web application firewall rule set. - ProvisioningState *string `json:"provisioningState,omitempty"` - // RuleSetType - The type of the web application firewall rule set. - RuleSetType *string `json:"ruleSetType,omitempty"` - // RuleSetVersion - The version of the web application firewall rule set type. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - // RuleGroups - The rule groups of the web application firewall rule set. - RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` -} - -// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. -type ApplicationGatewayFrontendIPConfiguration struct { - // ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration. - *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the frontend IP configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration. -func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat - } - if agfic.Name != nil { - objectMap["name"] = agfic.Name - } - if agfic.Etag != nil { - objectMap["etag"] = agfic.Etag - } - if agfic.Type != nil { - objectMap["type"] = agfic.Type - } - if agfic.ID != nil { - objectMap["id"] = agfic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct. -func (agfic *ApplicationGatewayFrontendIPConfiguration) 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 applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat) - if err != nil { - return err - } - agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agfic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agfic.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agfic.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agfic.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an -// application gateway. -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - Reference of the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - // PublicIPAddress - Reference of the PublicIP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayFrontendPort frontend port of an application gateway. -type ApplicationGatewayFrontendPort struct { - // ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port. - *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the frontend port that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort. -func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil { - objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat - } - if agfp.Name != nil { - objectMap["name"] = agfp.Name - } - if agfp.Etag != nil { - objectMap["etag"] = agfp.Etag - } - if agfp.Type != nil { - objectMap["type"] = agfp.Type - } - if agfp.ID != nil { - objectMap["id"] = agfp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct. -func (agfp *ApplicationGatewayFrontendPort) 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 applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat) - if err != nil { - return err - } - agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agfp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agfp.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agfp.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agfp.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway. -type ApplicationGatewayFrontendPortPropertiesFormat struct { - // Port - Frontend port. - Port *int32 `json:"port,omitempty"` - // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway. -type ApplicationGatewayHeaderConfiguration struct { - // HeaderName - Header name of the header configuration. - HeaderName *string `json:"headerName,omitempty"` - // HeaderValue - Header value of the header configuration. - HeaderValue *string `json:"headerValue,omitempty"` -} - -// ApplicationGatewayHTTPListener http listener of an application gateway. -type ApplicationGatewayHTTPListener struct { - // ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener. - *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the HTTP listener that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener. -func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil { - objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat - } - if aghl.Name != nil { - objectMap["name"] = aghl.Name - } - if aghl.Etag != nil { - objectMap["etag"] = aghl.Etag - } - if aghl.Type != nil { - objectMap["type"] = aghl.Type - } - if aghl.ID != nil { - objectMap["id"] = aghl.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct. -func (aghl *ApplicationGatewayHTTPListener) 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 applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat) - if err != nil { - return err - } - aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - aghl.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - aghl.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - aghl.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - aghl.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway. -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // FrontendPort - Frontend port resource of an application gateway. - FrontendPort *SubResource `json:"frontendPort,omitempty"` - // Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS' - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - // HostName - Host name of HTTP listener. - HostName *string `json:"hostName,omitempty"` - // SslCertificate - SSL certificate resource of an application gateway. - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting. - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // CustomErrorConfigurations - Custom error configurations of the HTTP listener. - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` -} - -// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 -// private IP configuration is allowed. -type ApplicationGatewayIPConfiguration struct { - // ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration. - *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the IP configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration. -func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat - } - if agic.Name != nil { - objectMap["name"] = agic.Name - } - if agic.Etag != nil { - objectMap["etag"] = agic.Etag - } - if agic.Type != nil { - objectMap["type"] = agic.Type - } - if agic.ID != nil { - objectMap["id"] = agic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct. -func (agic *ApplicationGatewayIPConfiguration) 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 applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat) - if err != nil { - return err - } - agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agic.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agic.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agic.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application -// gateway. -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address. - Subnet *SubResource `json:"subnet,omitempty"` - // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayListResult response for ListApplicationGateways API service call. -type ApplicationGatewayListResult struct { - autorest.Response `json:"-"` - // Value - List of an application gateways in a resource group. - Value *[]ApplicationGateway `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values. -type ApplicationGatewayListResultIterator struct { - i int - page ApplicationGatewayListResultPage -} - -// 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 *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.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 *ApplicationGatewayListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ApplicationGatewayListResultIterator) 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 ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult { - 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 ApplicationGatewayListResultIterator) Value() ApplicationGateway { - if !iter.page.NotDone() { - return ApplicationGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ApplicationGatewayListResultIterator type. -func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator { - return ApplicationGatewayListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aglr.NextLink))) -} - -// ApplicationGatewayListResultPage contains a page of ApplicationGateway values. -type ApplicationGatewayListResultPage struct { - fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error) - aglr ApplicationGatewayListResult -} - -// 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 *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.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.aglr) - if err != nil { - return err - } - page.aglr = 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 *ApplicationGatewayListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ApplicationGatewayListResultPage) NotDone() bool { - return !page.aglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult { - return page.aglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { - if page.aglr.IsEmpty() { - return nil - } - return *page.aglr.Value -} - -// Creates a new instance of the ApplicationGatewayListResultPage type. -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. -type ApplicationGatewayOnDemandProbe struct { - // Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS' - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - // Host - Host name to send the probe to. - Host *string `json:"host,omitempty"` - // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. - Path *string `json:"path,omitempty"` - // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - Timeout *int32 `json:"timeout,omitempty"` - // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - // Match - Criterion for classifying a healthy probe response. - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - // BackendAddressPool - Reference of backend pool of application gateway to which probe request will be sent. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // BackendHTTPSettings - Reference of backend http setting of application gateway to be used for test probe. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` -} - -// ApplicationGatewayPathRule path rule of URL path map of an application gateway. -type ApplicationGatewayPathRule struct { - // ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule. - *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the path rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule. -func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agpr.ApplicationGatewayPathRulePropertiesFormat != nil { - objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat - } - if agpr.Name != nil { - objectMap["name"] = agpr.Name - } - if agpr.Etag != nil { - objectMap["etag"] = agpr.Etag - } - if agpr.Type != nil { - objectMap["type"] = agpr.Type - } - if agpr.ID != nil { - objectMap["id"] = agpr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct. -func (agpr *ApplicationGatewayPathRule) 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 applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat) - if err != nil { - return err - } - agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agpr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agpr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agpr.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agpr.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway. -type ApplicationGatewayPathRulePropertiesFormat struct { - // Paths - Path rules of URL path map. - Paths *[]string `json:"paths,omitempty"` - // BackendAddressPool - Backend address pool resource of URL path map path rule. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // BackendHTTPSettings - Backend http settings resource of URL path map path rule. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - // RedirectConfiguration - Redirect configuration resource of URL path map path rule. - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - // RewriteRuleSet - Rewrite rule set resource of URL path map path rule. - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayProbe probe of the application gateway. -type ApplicationGatewayProbe struct { - // ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe. - *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the probe that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayProbe. -func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agp.ApplicationGatewayProbePropertiesFormat != nil { - objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat - } - if agp.Name != nil { - objectMap["name"] = agp.Name - } - if agp.Etag != nil { - objectMap["etag"] = agp.Etag - } - if agp.Type != nil { - objectMap["type"] = agp.Type - } - if agp.ID != nil { - objectMap["id"] = agp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct. -func (agp *ApplicationGatewayProbe) 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 applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat) - if err != nil { - return err - } - agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agp.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agp.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agp.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match. -type ApplicationGatewayProbeHealthResponseMatch struct { - // Body - Body that must be contained in the health response. Default value is empty. - Body *string `json:"body,omitempty"` - // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. - StatusCodes *[]string `json:"statusCodes,omitempty"` -} - -// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. -type ApplicationGatewayProbePropertiesFormat struct { - // Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS' - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - // Host - Host name to send the probe to. - Host *string `json:"host,omitempty"` - // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. - Path *string `json:"path,omitempty"` - // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. - Interval *int32 `json:"interval,omitempty"` - // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - Timeout *int32 `json:"timeout,omitempty"` - // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. - UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` - // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - // MinServers - Minimum number of servers that are always marked healthy. Default value is 0. - MinServers *int32 `json:"minServers,omitempty"` - // Match - Criterion for classifying a healthy probe response. - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. - Port *int32 `json:"port,omitempty"` -} - -// ApplicationGatewayPropertiesFormat properties of the application gateway. -type ApplicationGatewayPropertiesFormat struct { - // Sku - SKU of the application gateway resource. - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - // SslPolicy - SSL policy of the application gateway resource. - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' - OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - // GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - // AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - // TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - // SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - // FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - // Probes - Probes of the application gateway resource. - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - // BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - // HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - // URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` - // RequestRoutingRules - Request routing rules of the application gateway resource. - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - // RewriteRuleSets - Rewrite rules for the application gateway resource. - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - // RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - // WebApplicationFirewallConfiguration - Web application firewall configuration. - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` - // FirewallPolicy - Reference of the FirewallPolicy resource. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - // EnableFips - Whether FIPS is enabled on the application gateway resource. - EnableFips *bool `json:"enableFips,omitempty"` - // AutoscaleConfiguration - Autoscale Configuration. - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - // ResourceGUID - Resource GUID property of the application gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // CustomErrorConfigurations - Custom error configurations of the application gateway resource. - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,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.ResourceGUID != nil { - objectMap["resourceGuid"] = agpf.ResourceGUID - } - if agpf.ProvisioningState != nil { - objectMap["provisioningState"] = agpf.ProvisioningState - } - if agpf.CustomErrorConfigurations != nil { - objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations - } - return json.Marshal(objectMap) -} - -// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. -type ApplicationGatewayRedirectConfiguration struct { - // ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration. - *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the redirect configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration. -func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil { - objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat - } - if agrc.Name != nil { - objectMap["name"] = agrc.Name - } - if agrc.Etag != nil { - objectMap["etag"] = agrc.Etag - } - if agrc.Type != nil { - objectMap["type"] = agrc.Type - } - if agrc.ID != nil { - objectMap["id"] = agrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct. -func (agrc *ApplicationGatewayRedirectConfiguration) 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 applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat) - if err != nil { - return err - } - agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agrc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agrc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agrc.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the -// application gateway. -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - // RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary' - RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - // TargetListener - Reference to a listener to redirect the request to. - TargetListener *SubResource `json:"targetListener,omitempty"` - // TargetURL - Url to redirect the request to. - TargetURL *string `json:"targetUrl,omitempty"` - // IncludePath - Include path in the redirected url. - IncludePath *bool `json:"includePath,omitempty"` - // IncludeQueryString - Include query string in the redirected url. - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - // RequestRoutingRules - Request routing specifying redirect configuration. - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - // URLPathMaps - Url path maps specifying default redirect configuration. - URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` - // PathRules - Path rules specifying redirect configuration. - PathRules *[]SubResource `json:"pathRules,omitempty"` -} - -// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway. -type ApplicationGatewayRequestRoutingRule struct { - // ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule. - *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the request routing rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule. -func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil { - objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat - } - if agrrr.Name != nil { - objectMap["name"] = agrrr.Name - } - if agrrr.Etag != nil { - objectMap["etag"] = agrrr.Etag - } - if agrrr.Type != nil { - objectMap["type"] = agrrr.Type - } - if agrrr.ID != nil { - objectMap["id"] = agrrr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct. -func (agrrr *ApplicationGatewayRequestRoutingRule) 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 applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat) - if err != nil { - return err - } - agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agrrr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agrrr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agrrr.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agrrr.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the -// application gateway. -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting' - RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - // BackendAddressPool - Backend address pool resource of the application gateway. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // BackendHTTPSettings - Backend http settings resource of the application gateway. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - // HTTPListener - Http listener resource of the application gateway. - HTTPListener *SubResource `json:"httpListener,omitempty"` - // URLPathMap - URL path map resource of the application gateway. - URLPathMap *SubResource `json:"urlPathMap,omitempty"` - // RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway. - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - // RedirectConfiguration - Redirect configuration resource of the application gateway. - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayRewriteRule rewrite rule of an application gateway. -type ApplicationGatewayRewriteRule struct { - // Name - Name of the rewrite rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. - RuleSequence *int32 `json:"ruleSequence,omitempty"` - // Conditions - Conditions based on which the action set execution will be evaluated. - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - // ActionSet - Set of actions to be done as part of the rewrite Rule. - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` -} - -// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway. -type ApplicationGatewayRewriteRuleActionSet struct { - // RequestHeaderConfigurations - Request Header Actions in the Action Set. - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - // ResponseHeaderConfigurations - Response Header Actions in the Action Set. - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` -} - -// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway. -type ApplicationGatewayRewriteRuleCondition struct { - // Variable - The condition parameter of the RewriteRuleCondition. - Variable *string `json:"variable,omitempty"` - // Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. - Pattern *string `json:"pattern,omitempty"` - // IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison. - IgnoreCase *bool `json:"ignoreCase,omitempty"` - // Negate - Setting this value as truth will force to check the negation of the condition given by the user. - Negate *bool `json:"negate,omitempty"` -} - -// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway. -type ApplicationGatewayRewriteRuleSet struct { - // ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set. - *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the rewrite rule set that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet. -func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil { - objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat - } - if agrrs.Name != nil { - objectMap["name"] = agrrs.Name - } - if agrrs.ID != nil { - objectMap["id"] = agrrs.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct. -func (agrrs *ApplicationGatewayRewriteRuleSet) 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 applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat) - if err != nil { - return err - } - agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agrrs.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agrrs.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agrrs.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application -// gateway. -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - // RewriteRules - Rewrite rules in the rewrite rule set. - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result. -func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - agbh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent { - agbh, err = client.BackendHealthResponder(agbh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request") - } - } - return -} - -// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ApplicationGatewaysBackendHealthOnDemandFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result. -func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - agbhod.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent { - agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request") - } - } - return -} - -// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (ApplicationGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result. -func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ag.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { - ag, err = client.CreateOrUpdateResponder(ag.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request") - } - } - return -} - -// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysDeleteFuture.Result. -func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ApplicationGatewaySku SKU of an application gateway. -type ApplicationGatewaySku struct { - // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2' - Name ApplicationGatewaySkuName `json:"name,omitempty"` - // Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2' - Tier ApplicationGatewayTier `json:"tier,omitempty"` - // Capacity - Capacity (instance count) of an application gateway. - Capacity *int32 `json:"capacity,omitempty"` -} - -// ApplicationGatewaySslCertificate SSL certificates of an application gateway. -type ApplicationGatewaySslCertificate struct { - // ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate. - *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the SSL certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate. -func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil { - objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat - } - if agsc.Name != nil { - objectMap["name"] = agsc.Name - } - if agsc.Etag != nil { - objectMap["etag"] = agsc.Etag - } - if agsc.Type != nil { - objectMap["type"] = agsc.Type - } - if agsc.ID != nil { - objectMap["id"] = agsc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct. -func (agsc *ApplicationGatewaySslCertificate) 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 applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat) - if err != nil { - return err - } - agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agsc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agsc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agsc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agsc.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application -// gateway. -type ApplicationGatewaySslCertificatePropertiesFormat struct { - // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request. - Data *string `json:"data,omitempty"` - // Password - Password for the pfx file specified in data. Only applicable in PUT request. - Password *string `json:"password,omitempty"` - // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. - PublicCertData *string `json:"publicCertData,omitempty"` - // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewaySslPolicy application Gateway Ssl policy. -type ApplicationGatewaySslPolicy struct { - // DisabledSslProtocols - Ssl protocols to be disabled on application gateway. - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom' - PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` - // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' - PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway. - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' - MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` -} - -// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy. -type ApplicationGatewaySslPredefinedPolicy struct { - autorest.Response `json:"-"` - // Name - Name of the Ssl predefined policy. - Name *string `json:"name,omitempty"` - // ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy. - *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy. -func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agspp.Name != nil { - objectMap["name"] = agspp.Name - } - if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil { - objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat - } - if agspp.ID != nil { - objectMap["id"] = agspp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct. -func (agspp *ApplicationGatewaySslPredefinedPolicy) 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 - } - agspp.Name = &name - } - case "properties": - if v != nil { - var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat) - if err != nil { - return err - } - agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agspp.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of -// ApplicationGatewaySslPredefinedPolicy. -type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { - // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway. - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' - MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` -} - -// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationGatewaysStartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysStartFuture.Result. -func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") - return - } - ar.Response = future.Response() - return -} - -// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ApplicationGatewaysStopFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysStopFuture.Result. -func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") - return - } - ar.Response = future.Response() - return -} - -// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationGatewaysUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationGatewaysClient) (ApplicationGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result. -func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ag.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { - ag, err = client.UpdateTagsResponder(ag.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request") - } - } - return -} - -// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway. -type ApplicationGatewayTrustedRootCertificate struct { - // ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate. - *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - Name of the trusted root certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate. -func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil { - objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat - } - if agtrc.Name != nil { - objectMap["name"] = agtrc.Name - } - if agtrc.Etag != nil { - objectMap["etag"] = agtrc.Etag - } - if agtrc.Type != nil { - objectMap["type"] = agtrc.Type - } - if agtrc.ID != nil { - objectMap["id"] = agtrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct. -func (agtrc *ApplicationGatewayTrustedRootCertificate) 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 applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat) - if err != nil { - return err - } - agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agtrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agtrc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agtrc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agtrc.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an -// application gateway. -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - // Data - Certificate public data. - Data *string `json:"data,omitempty"` - // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - // ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for -// PathBasedRouting. -type ApplicationGatewayURLPathMap struct { - // ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map. - *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the URL path map that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap. -func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil { - objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat - } - if agupm.Name != nil { - objectMap["name"] = agupm.Name - } - if agupm.Etag != nil { - objectMap["etag"] = agupm.Etag - } - if agupm.Type != nil { - objectMap["type"] = agupm.Type - } - if agupm.ID != nil { - objectMap["id"] = agupm.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct. -func (agupm *ApplicationGatewayURLPathMap) 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 applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat - err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat) - if err != nil { - return err - } - agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - agupm.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - agupm.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - agupm.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - agupm.ID = &ID - } - } - } - - return nil -} - -// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway. -type ApplicationGatewayURLPathMapPropertiesFormat struct { - // DefaultBackendAddressPool - Default backend address pool resource of URL path map. - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map. - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - // DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map. - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - // PathRules - Path rule of URL path map resource. - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall -// configuration. -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - // Enabled - Whether the web application firewall is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention' - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` - // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'. - RuleSetType *string `json:"ruleSetType,omitempty"` - // RuleSetVersion - The version of the rule set type. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - // DisabledRuleGroups - The disabled rule groups. - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - // RequestBodyCheck - Whether allow WAF to check request Body. - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - // MaxRequestBodySize - Maximum request body size for WAF. - MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"` - // MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF. - MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` - // FileUploadLimitInMb - Maximum file upload size in Mb for WAF. - FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` - // Exclusions - The exclusion list. - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` -} - -// ApplicationRuleCondition rule condition of type application. -type ApplicationRuleCondition struct { - // SourceAddresses - List of source IP addresses for this rule. - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // DestinationAddresses - List of destination IP addresses or Service Tags. - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - // Protocols - Array of Application Protocols. - Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"` - // TargetFqdns - List of FQDNs for this rule condition. - TargetFqdns *[]string `json:"targetFqdns,omitempty"` - // FqdnTags - List of FQDN Tags for this rule condition. - FqdnTags *[]string `json:"fqdnTags,omitempty"` - // Name - Name of the rule condition. - Name *string `json:"name,omitempty"` - // Description - Description of the rule condition. - Description *string `json:"description,omitempty"` - // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' - RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationRuleCondition. -func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) { - arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition - objectMap := make(map[string]interface{}) - if arc.SourceAddresses != nil { - objectMap["sourceAddresses"] = arc.SourceAddresses - } - if arc.DestinationAddresses != nil { - objectMap["destinationAddresses"] = arc.DestinationAddresses - } - if arc.Protocols != nil { - objectMap["protocols"] = arc.Protocols - } - if arc.TargetFqdns != nil { - objectMap["targetFqdns"] = arc.TargetFqdns - } - if arc.FqdnTags != nil { - objectMap["fqdnTags"] = arc.FqdnTags - } - if arc.Name != nil { - objectMap["name"] = arc.Name - } - if arc.Description != nil { - objectMap["description"] = arc.Description - } - if arc.RuleConditionType != "" { - objectMap["ruleConditionType"] = arc.RuleConditionType - } - return json.Marshal(objectMap) -} - -// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. -func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { - return &arc, true -} - -// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. -func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) { - return nil, false -} - -// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. -func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { - return nil, false -} - -// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. -func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { - return &arc, true -} - -// ApplicationSecurityGroup an application security group in a resource group. -type ApplicationSecurityGroup struct { - autorest.Response `json:"-"` - // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group. - *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ApplicationSecurityGroup. -func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asg.ApplicationSecurityGroupPropertiesFormat != nil { - objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat - } - if asg.ID != nil { - objectMap["id"] = asg.ID - } - if asg.Location != nil { - objectMap["location"] = asg.Location - } - if asg.Tags != nil { - objectMap["tags"] = asg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct. -func (asg *ApplicationSecurityGroup) 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 applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat - err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat) - if err != nil { - return err - } - asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - asg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - asg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - asg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - asg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - asg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - asg.Tags = tags - } - } - } - - return nil -} - -// ApplicationSecurityGroupListResult a list of application security groups. -type ApplicationSecurityGroupListResult struct { - autorest.Response `json:"-"` - // Value - A list of application security groups. - Value *[]ApplicationSecurityGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page ApplicationSecurityGroupListResultPage -} - -// 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 *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.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 *ApplicationSecurityGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ApplicationSecurityGroupListResultIterator) 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 ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult { - 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 ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup { - if !iter.page.NotDone() { - return ApplicationSecurityGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ApplicationSecurityGroupListResultIterator type. -func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator { - return ApplicationSecurityGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(asglr.NextLink))) -} - -// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values. -type ApplicationSecurityGroupListResultPage struct { - fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error) - asglr ApplicationSecurityGroupListResult -} - -// 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 *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.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.asglr) - if err != nil { - return err - } - page.asglr = 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 *ApplicationSecurityGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ApplicationSecurityGroupListResultPage) NotDone() bool { - return !page.asglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult { - return page.asglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup { - if page.asglr.IsEmpty() { - return nil - } - return *page.asglr.Value -} - -// Creates a new instance of the ApplicationSecurityGroupListResultPage type. -func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { - return ApplicationSecurityGroupListResultPage{ - fn: getNextPage, - asglr: cur, - } -} - -// ApplicationSecurityGroupPropertiesFormat application security group properties. -type ApplicationSecurityGroupPropertiesFormat struct { - // ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat. -func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ApplicationSecurityGroupsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result. -func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - asg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { - asg, err = client.CreateOrUpdateResponder(asg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request") - } - } - return -} - -// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationSecurityGroupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationSecurityGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result. -func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationSecurityGroupsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result. -func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - asg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { - asg, err = client.UpdateTagsResponder(asg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request") - } - } - return -} - -// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations -// that belongs to an ExpressRouteCircuit. -type AuthorizationListResult struct { - autorest.Response `json:"-"` - // Value - The authorizations in an ExpressRoute Circuit. - Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// AuthorizationListResultIterator provides access to a complete listing of -// ExpressRouteCircuitAuthorization values. -type AuthorizationListResultIterator struct { - i int - page AuthorizationListResultPage -} - -// 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 *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.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 *AuthorizationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AuthorizationListResultIterator) 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 AuthorizationListResultIterator) Response() AuthorizationListResult { - 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 AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization { - if !iter.page.NotDone() { - return ExpressRouteCircuitAuthorization{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AuthorizationListResultIterator type. -func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator { - return AuthorizationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(alr.NextLink))) -} - -// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. -type AuthorizationListResultPage struct { - fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error) - alr AuthorizationListResult -} - -// 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 *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.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.alr) - if err != nil { - return err - } - page.alr = 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 *AuthorizationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AuthorizationListResultPage) NotDone() bool { - return !page.alr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AuthorizationListResultPage) Response() AuthorizationListResult { - return page.alr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization { - if page.alr.IsEmpty() { - return nil - } - return *page.alr.Value -} - -// Creates a new instance of the AuthorizationListResultPage type. -func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { - return AuthorizationListResultPage{ - fn: getNextPage, - alr: cur, - } -} - -// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. -type AuthorizationPropertiesFormat struct { - // AuthorizationKey - The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse' - AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService. -type AutoApprovedPrivateLinkService struct { - // PrivateLinkService - The id of the private link service resource. - PrivateLinkService *string `json:"privateLinkService,omitempty"` -} - -// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a -// private end point with auto approved. -type AutoApprovedPrivateLinkServicesResult struct { - autorest.Response `json:"-"` - // Value - An array of auto approved private link service. - Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page AutoApprovedPrivateLinkServicesResultPage -} - -// 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 *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.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 *AutoApprovedPrivateLinkServicesResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AutoApprovedPrivateLinkServicesResultIterator) 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 AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult { - 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 AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService { - if !iter.page.NotDone() { - return AutoApprovedPrivateLinkService{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type. -func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator { - return AutoApprovedPrivateLinkServicesResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aaplsr.NextLink))) -} - -// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values. -type AutoApprovedPrivateLinkServicesResultPage struct { - fn func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error) - aaplsr AutoApprovedPrivateLinkServicesResult -} - -// 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 *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.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.aaplsr) - if err != nil { - return err - } - page.aaplsr = 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 *AutoApprovedPrivateLinkServicesResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool { - return !page.aaplsr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult { - return page.aaplsr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService { - if page.aaplsr.IsEmpty() { - return nil - } - return *page.aaplsr.Value -} - -// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type. -func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { - return AutoApprovedPrivateLinkServicesResultPage{ - fn: getNextPage, - aaplsr: cur, - } -} - -// Availability availability of the metric. -type Availability struct { - // TimeGrain - The time grain of the availability. - TimeGrain *string `json:"timeGrain,omitempty"` - // Retention - The retention of the availability. - Retention *string `json:"retention,omitempty"` - // BlobDuration - Duration of the availability blob. - BlobDuration *string `json:"blobDuration,omitempty"` -} - -// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a -// subnet. -type AvailableDelegation struct { - // Name - The name of the AvailableDelegation resource. - Name *string `json:"name,omitempty"` - // ID - A unique identifier of the AvailableDelegation resource. - ID *string `json:"id,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // ServiceName - The name of the service and resource. - ServiceName *string `json:"serviceName,omitempty"` - // Actions - Describes the actions permitted to the service upon delegation. - Actions *[]string `json:"actions,omitempty"` -} - -// AvailableDelegationsResult an array of available delegations. -type AvailableDelegationsResult struct { - autorest.Response `json:"-"` - // Value - An array of available delegations. - Value *[]AvailableDelegation `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page AvailableDelegationsResultPage -} - -// 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 *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.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 *AvailableDelegationsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AvailableDelegationsResultIterator) 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 AvailableDelegationsResultIterator) Response() AvailableDelegationsResult { - 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 AvailableDelegationsResultIterator) Value() AvailableDelegation { - if !iter.page.NotDone() { - return AvailableDelegation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AvailableDelegationsResultIterator type. -func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator { - return AvailableDelegationsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(adr.NextLink))) -} - -// AvailableDelegationsResultPage contains a page of AvailableDelegation values. -type AvailableDelegationsResultPage struct { - fn func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error) - adr AvailableDelegationsResult -} - -// 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 *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.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.adr) - if err != nil { - return err - } - page.adr = 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 *AvailableDelegationsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AvailableDelegationsResultPage) NotDone() bool { - return !page.adr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult { - return page.adr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AvailableDelegationsResultPage) Values() []AvailableDelegation { - if page.adr.IsEmpty() { - return nil - } - return *page.adr.Value -} - -// Creates a new instance of the AvailableDelegationsResultPage type. -func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage { - return AvailableDelegationsResultPage{ - fn: getNextPage, - adr: cur, - } -} - -// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType. -type AvailablePrivateEndpointType struct { - // Name - The name of the service and resource. - Name *string `json:"name,omitempty"` - // ID - A unique identifier of the AvailablePrivateEndpoint Type resource. - ID *string `json:"id,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // ResourceName - The name of the service and resource. - ResourceName *string `json:"resourceName,omitempty"` -} - -// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types. -type AvailablePrivateEndpointTypesResult struct { - autorest.Response `json:"-"` - // Value - An array of available privateEndpoint type. - Value *[]AvailablePrivateEndpointType `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page AvailablePrivateEndpointTypesResultPage -} - -// 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 *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.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 *AvailablePrivateEndpointTypesResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AvailablePrivateEndpointTypesResultIterator) 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 AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult { - 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 AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType { - if !iter.page.NotDone() { - return AvailablePrivateEndpointType{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type. -func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator { - return AvailablePrivateEndpointTypesResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(apetr.NextLink))) -} - -// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values. -type AvailablePrivateEndpointTypesResultPage struct { - fn func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error) - apetr AvailablePrivateEndpointTypesResult -} - -// 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 *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.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.apetr) - if err != nil { - return err - } - page.apetr = 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 *AvailablePrivateEndpointTypesResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool { - return !page.apetr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult { - return page.apetr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType { - if page.apetr.IsEmpty() { - return nil - } - return *page.apetr.Value -} - -// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type. -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. -type AvailableProvidersList struct { - autorest.Response `json:"-"` - // Countries - List of available countries. - Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"` -} - -// AvailableProvidersListCity city or town details. -type AvailableProvidersListCity struct { - // CityName - The city or town name. - CityName *string `json:"cityName,omitempty"` - // Providers - A list of Internet service providers. - Providers *[]string `json:"providers,omitempty"` -} - -// AvailableProvidersListCountry country details. -type AvailableProvidersListCountry struct { - // CountryName - The country name. - CountryName *string `json:"countryName,omitempty"` - // Providers - A list of Internet service providers. - Providers *[]string `json:"providers,omitempty"` - // States - List of available states in the country. - States *[]AvailableProvidersListState `json:"states,omitempty"` -} - -// AvailableProvidersListParameters constraints that determine the list of available Internet service -// providers. -type AvailableProvidersListParameters struct { - // AzureLocations - A list of Azure regions. - AzureLocations *[]string `json:"azureLocations,omitempty"` - // Country - The country for available providers list. - Country *string `json:"country,omitempty"` - // State - The state for available providers list. - State *string `json:"state,omitempty"` - // City - The city or town for available providers list. - City *string `json:"city,omitempty"` -} - -// AvailableProvidersListState state details. -type AvailableProvidersListState struct { - // StateName - The state name. - StateName *string `json:"stateName,omitempty"` - // Providers - A list of Internet service providers. - Providers *[]string `json:"providers,omitempty"` - // Cities - List of available cities or towns in the state. - Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` -} - -// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, -// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct -// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous -// operation succeeded, the response body includes the HTTP status code for the successful request. If the -// asynchronous operation failed, the response body includes the HTTP status code for the failed request -// and error information regarding the failure. -type AzureAsyncOperationResult struct { - // Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' - Status OperationStatus `json:"status,omitempty"` - // Error - Details of the error occurred during specified asynchronous operation. - Error *Error `json:"error,omitempty"` -} - -// AzureFirewall azure Firewall resource. -type AzureFirewall struct { - autorest.Response `json:"-"` - // AzureFirewallPropertiesFormat - Properties of the azure firewall. - *AzureFirewallPropertiesFormat `json:"properties,omitempty"` - // Zones - A list of availability zones denoting where the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for AzureFirewall. -func (af AzureFirewall) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if af.AzureFirewallPropertiesFormat != nil { - objectMap["properties"] = af.AzureFirewallPropertiesFormat - } - if af.Zones != nil { - objectMap["zones"] = af.Zones - } - if af.ID != nil { - objectMap["id"] = af.ID - } - if af.Location != nil { - objectMap["location"] = af.Location - } - if af.Tags != nil { - objectMap["tags"] = af.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct. -func (af *AzureFirewall) 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 azureFirewallPropertiesFormat AzureFirewallPropertiesFormat - err = json.Unmarshal(*v, &azureFirewallPropertiesFormat) - if err != nil { - return err - } - af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - af.Zones = &zones - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - af.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - af.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - af.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - af.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - af.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - af.Tags = tags - } - } - } - - return nil -} - -// AzureFirewallApplicationRule properties of an application rule. -type AzureFirewallApplicationRule struct { - // Name - Name of the application rule. - Name *string `json:"name,omitempty"` - // Description - Description of the rule. - Description *string `json:"description,omitempty"` - // SourceAddresses - List of source IP addresses for this rule. - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // Protocols - Array of ApplicationRuleProtocols. - Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,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"` -} - -// AzureFirewallApplicationRuleCollection application rule collection resource. -type AzureFirewallApplicationRuleCollection struct { - // AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection. - *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection. -func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil { - objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat - } - if afarc.Name != nil { - objectMap["name"] = afarc.Name - } - if afarc.ID != nil { - objectMap["id"] = afarc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct. -func (afarc *AzureFirewallApplicationRuleCollection) 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 azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat - err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat) - if err != nil { - return err - } - afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - afarc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - afarc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - afarc.ID = &ID - } - } - } - - return nil -} - -// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection. -type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { - // Priority - Priority of the application rule collection resource. - Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a rule collection. - Action *AzureFirewallRCAction `json:"action,omitempty"` - // Rules - Collection of rules used by a application rule collection. - Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// AzureFirewallApplicationRuleProtocol properties of the application rule protocol. -type AzureFirewallApplicationRuleProtocol struct { - // ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS' - ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` - // Port - Port number for the protocol, cannot be greater than 64000. This field is optional. - Port *int32 `json:"port,omitempty"` -} - -// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource. -type AzureFirewallFqdnTag struct { - // AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag. - *AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag. -func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afft.AzureFirewallFqdnTagPropertiesFormat != nil { - objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat - } - if afft.ID != nil { - objectMap["id"] = afft.ID - } - if afft.Location != nil { - objectMap["location"] = afft.Location - } - if afft.Tags != nil { - objectMap["tags"] = afft.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct. -func (afft *AzureFirewallFqdnTag) 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 azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat - err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat) - if err != nil { - return err - } - afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - afft.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - afft.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - afft.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - afft.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - afft.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - afft.Tags = tags - } - } - } - - return nil -} - -// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call. -type AzureFirewallFqdnTagListResult struct { - autorest.Response `json:"-"` - // Value - List of Azure Firewall FQDN Tags in a resource group. - Value *[]AzureFirewallFqdnTag `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag -// values. -type AzureFirewallFqdnTagListResultIterator struct { - i int - page AzureFirewallFqdnTagListResultPage -} - -// 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 *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.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 *AzureFirewallFqdnTagListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AzureFirewallFqdnTagListResultIterator) 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 AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult { - 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 AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag { - if !iter.page.NotDone() { - return AzureFirewallFqdnTag{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type. -func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator { - return AzureFirewallFqdnTagListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(afftlr.NextLink))) -} - -// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values. -type AzureFirewallFqdnTagListResultPage struct { - fn func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error) - afftlr AzureFirewallFqdnTagListResult -} - -// 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 *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.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.afftlr) - if err != nil { - return err - } - page.afftlr = 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 *AzureFirewallFqdnTagListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AzureFirewallFqdnTagListResultPage) NotDone() bool { - return !page.afftlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult { - return page.afftlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag { - if page.afftlr.IsEmpty() { - return nil - } - return *page.afftlr.Value -} - -// Creates a new instance of the AzureFirewallFqdnTagListResultPage type. -func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage { - return AzureFirewallFqdnTagListResultPage{ - fn: getNextPage, - afftlr: cur, - } -} - -// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties. -type AzureFirewallFqdnTagPropertiesFormat struct { - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` - // FqdnTagName - READ-ONLY; The name of this FQDN Tag. - FqdnTagName *string `json:"fqdnTagName,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat. -func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AzureFirewallIPConfiguration IP configuration of an Azure Firewall. -type AzureFirewallIPConfiguration struct { - // AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration. - *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration. -func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afic.AzureFirewallIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat - } - if afic.Name != nil { - objectMap["name"] = afic.Name - } - if afic.ID != nil { - objectMap["id"] = afic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct. -func (afic *AzureFirewallIPConfiguration) 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 azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat) - if err != nil { - return err - } - afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - afic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - afic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - afic.ID = &ID - } - } - } - - return nil -} - -// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall. -type AzureFirewallIPConfigurationPropertiesFormat struct { - // PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. - Subnet *SubResource `json:"subnet,omitempty"` - // PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - 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 - } - if aficpf.ProvisioningState != "" { - objectMap["provisioningState"] = aficpf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// AzureFirewallListResult response for ListAzureFirewalls API service call. -type AzureFirewallListResult struct { - autorest.Response `json:"-"` - // Value - List of Azure Firewalls in a resource group. - Value *[]AzureFirewall `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values. -type AzureFirewallListResultIterator struct { - i int - page AzureFirewallListResultPage -} - -// 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 *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.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 *AzureFirewallListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AzureFirewallListResultIterator) 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 AzureFirewallListResultIterator) Response() AzureFirewallListResult { - 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 AzureFirewallListResultIterator) Value() AzureFirewall { - if !iter.page.NotDone() { - return AzureFirewall{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AzureFirewallListResultIterator type. -func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator { - return AzureFirewallListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aflr.NextLink))) -} - -// AzureFirewallListResultPage contains a page of AzureFirewall values. -type AzureFirewallListResultPage struct { - fn func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error) - aflr AzureFirewallListResult -} - -// 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 *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.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.aflr) - if err != nil { - return err - } - page.aflr = 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 *AzureFirewallListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AzureFirewallListResultPage) NotDone() bool { - return !page.aflr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AzureFirewallListResultPage) Response() AzureFirewallListResult { - return page.aflr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AzureFirewallListResultPage) Values() []AzureFirewall { - if page.aflr.IsEmpty() { - return nil - } - return *page.aflr.Value -} - -// Creates a new instance of the AzureFirewallListResultPage type. -func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage { - return AzureFirewallListResultPage{ - fn: getNextPage, - aflr: cur, - } -} - -// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action. -type AzureFirewallNatRCAction struct { - // Type - The type of action. Possible values include: 'Snat', 'Dnat' - Type AzureFirewallNatRCActionType `json:"type,omitempty"` -} - -// AzureFirewallNatRule properties of a NAT rule. -type AzureFirewallNatRule struct { - // Name - Name of the NAT rule. - Name *string `json:"name,omitempty"` - // Description - Description of the rule. - Description *string `json:"description,omitempty"` - // SourceAddresses - List of source IP addresses for this rule. - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - // DestinationPorts - List of destination ports. - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - // Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - // TranslatedAddress - The translated address for this NAT rule. - TranslatedAddress *string `json:"translatedAddress,omitempty"` - // TranslatedPort - The translated port for this NAT rule. - TranslatedPort *string `json:"translatedPort,omitempty"` -} - -// AzureFirewallNatRuleCollection NAT rule collection resource. -type AzureFirewallNatRuleCollection struct { - // AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection. - *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection. -func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afnrc.AzureFirewallNatRuleCollectionProperties != nil { - objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties - } - if afnrc.Name != nil { - objectMap["name"] = afnrc.Name - } - if afnrc.ID != nil { - objectMap["id"] = afnrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct. -func (afnrc *AzureFirewallNatRuleCollection) 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 azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties - err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties) - if err != nil { - return err - } - afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - afnrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - afnrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - afnrc.ID = &ID - } - } - } - - return nil -} - -// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection. -type AzureFirewallNatRuleCollectionProperties struct { - // Priority - Priority of the NAT rule collection resource. - Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a NAT rule collection. - Action *AzureFirewallNatRCAction `json:"action,omitempty"` - // Rules - Collection of rules used by a NAT rule collection. - Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// AzureFirewallNetworkRule properties of the network rule. -type AzureFirewallNetworkRule struct { - // Name - Name of the network rule. - Name *string `json:"name,omitempty"` - // Description - Description of the rule. - Description *string `json:"description,omitempty"` - // Protocols - Array of AzureFirewallNetworkRuleProtocols. - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - // SourceAddresses - List of source IP addresses for this rule. - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // DestinationAddresses - List of destination IP addresses. - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - // DestinationPorts - List of destination ports. - DestinationPorts *[]string `json:"destinationPorts,omitempty"` -} - -// AzureFirewallNetworkRuleCollection network rule collection resource. -type AzureFirewallNetworkRuleCollection struct { - // AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection. - *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection. -func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil { - objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat - } - if afnrc.Name != nil { - objectMap["name"] = afnrc.Name - } - if afnrc.ID != nil { - objectMap["id"] = afnrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct. -func (afnrc *AzureFirewallNetworkRuleCollection) 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 azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat - err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat) - if err != nil { - return err - } - afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - afnrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - afnrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - afnrc.ID = &ID - } - } - } - - return nil -} - -// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection. -type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { - // Priority - Priority of the network rule collection resource. - Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a rule collection. - Action *AzureFirewallRCAction `json:"action,omitempty"` - // Rules - Collection of rules used by a network rule collection. - Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// AzureFirewallPropertiesFormat properties of the Azure Firewall. -type AzureFirewallPropertiesFormat struct { - // ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall. - ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` - // NatRuleCollections - Collection of NAT rule collections used by Azure Firewall. - NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"` - // NetworkRuleCollections - Collection of network rule collections used by Azure Firewall. - NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` - // IPConfigurations - IP configuration of the Azure Firewall resource. - IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' - ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - // VirtualHub - The virtualHub to which the firewall belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - // FirewallPolicy - The firewallPolicy associated with this azure firewall. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - // HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall. - HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat. -func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if afpf.ApplicationRuleCollections != nil { - objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections - } - if afpf.NatRuleCollections != nil { - objectMap["natRuleCollections"] = afpf.NatRuleCollections - } - if afpf.NetworkRuleCollections != nil { - objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections - } - if afpf.IPConfigurations != nil { - objectMap["ipConfigurations"] = afpf.IPConfigurations - } - if afpf.ProvisioningState != "" { - objectMap["provisioningState"] = afpf.ProvisioningState - } - if afpf.ThreatIntelMode != "" { - objectMap["threatIntelMode"] = afpf.ThreatIntelMode - } - if afpf.VirtualHub != nil { - objectMap["virtualHub"] = afpf.VirtualHub - } - if afpf.FirewallPolicy != nil { - objectMap["firewallPolicy"] = afpf.FirewallPolicy - } - return json.Marshal(objectMap) -} - -// AzureFirewallPublicIPAddress public IP Address associated with azure firewall. -type AzureFirewallPublicIPAddress struct { - // Address - Public IP Address value. - Address *string `json:"address,omitempty"` -} - -// AzureFirewallRCAction properties of the AzureFirewallRCAction. -type AzureFirewallRCAction struct { - // Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny' - Type AzureFirewallRCActionType `json:"type,omitempty"` -} - -// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AzureFirewallsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AzureFirewallsClient) (AzureFirewall, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result. -func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - af.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent { - af, err = client.CreateOrUpdateResponder(af.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request") - } - } - return -} - -// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AzureFirewallsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AzureFirewallsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AzureFirewallsDeleteFuture.Result. -func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// AzureReachabilityReport azure reachability report details. -type AzureReachabilityReport struct { - autorest.Response `json:"-"` - // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. - AggregationLevel *string `json:"aggregationLevel,omitempty"` - // ProviderLocation - Parameters that define a geographic location. - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - // ReachabilityReport - List of Azure reachability report items. - ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` -} - -// AzureReachabilityReportItem azure reachability report details for a given provider location. -type AzureReachabilityReportItem struct { - // Provider - The Internet service provider. - Provider *string `json:"provider,omitempty"` - // AzureLocation - The Azure region. - AzureLocation *string `json:"azureLocation,omitempty"` - // Latencies - List of latency details for each of the time series. - Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` -} - -// AzureReachabilityReportLatencyInfo details on latency for a time series. -type AzureReachabilityReportLatencyInfo struct { - // TimeStamp - The time stamp. - TimeStamp *date.Time `json:"timeStamp,omitempty"` - // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. - Score *int32 `json:"score,omitempty"` -} - -// AzureReachabilityReportLocation parameters that define a geographic location. -type AzureReachabilityReportLocation struct { - // Country - The name of the country. - Country *string `json:"country,omitempty"` - // State - The name of the state. - State *string `json:"state,omitempty"` - // City - The name of the city or town. - City *string `json:"city,omitempty"` -} - -// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. -type AzureReachabilityReportParameters struct { - // ProviderLocation - Parameters that define a geographic location. - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - // Providers - List of Internet service providers. - Providers *[]string `json:"providers,omitempty"` - // AzureLocations - Optional Azure regions to scope the query to. - AzureLocations *[]string `json:"azureLocations,omitempty"` - // StartTime - The start time for the Azure reachability report. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time for the Azure reachability report. - EndTime *date.Time `json:"endTime,omitempty"` -} - -// BackendAddressPool pool of backend IP addresses. -type BackendAddressPool struct { - autorest.Response `json:"-"` - // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. - *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for BackendAddressPool. -func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bap.BackendAddressPoolPropertiesFormat != nil { - objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat - } - if bap.Name != nil { - objectMap["name"] = bap.Name - } - if bap.Etag != nil { - objectMap["etag"] = bap.Etag - } - if bap.ID != nil { - objectMap["id"] = bap.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. -func (bap *BackendAddressPool) 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 backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat - err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) - if err != nil { - return err - } - bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bap.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - bap.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bap.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bap.ID = &ID - } - } - } - - return nil -} - -// BackendAddressPoolPropertiesFormat properties of the backend address pool. -type BackendAddressPoolPropertiesFormat struct { - // BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces. - BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - // LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool. - OutboundRule *SubResource `json:"outboundRule,omitempty"` - // OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool. - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat. -func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bappf.ProvisioningState != nil { - objectMap["provisioningState"] = bappf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// BastionHost bastion Host resource. -type BastionHost struct { - autorest.Response `json:"-"` - // BastionHostPropertiesFormat - Represents the bastion host resource. - *BastionHostPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for BastionHost. -func (bh BastionHost) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bh.BastionHostPropertiesFormat != nil { - objectMap["properties"] = bh.BastionHostPropertiesFormat - } - if bh.ID != nil { - objectMap["id"] = bh.ID - } - if bh.Location != nil { - objectMap["location"] = bh.Location - } - if bh.Tags != nil { - objectMap["tags"] = bh.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BastionHost struct. -func (bh *BastionHost) 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 bastionHostPropertiesFormat BastionHostPropertiesFormat - err = json.Unmarshal(*v, &bastionHostPropertiesFormat) - if err != nil { - return err - } - bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - bh.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bh.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bh.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bh.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - bh.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - bh.Tags = tags - } - } - } - - return nil -} - -// BastionHostIPConfiguration IP configuration of an Bastion Host. -type BastionHostIPConfiguration struct { - // BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource. - *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Ip configuration type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for BastionHostIPConfiguration. -func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bhic.BastionHostIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat - } - if bhic.Name != nil { - objectMap["name"] = bhic.Name - } - if bhic.ID != nil { - objectMap["id"] = bhic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct. -func (bhic *BastionHostIPConfiguration) 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 bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat) - if err != nil { - return err - } - bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bhic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - bhic.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bhic.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bhic.ID = &ID - } - } - } - - return nil -} - -// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host. -type BastionHostIPConfigurationPropertiesFormat struct { - // Subnet - Reference of the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - // PublicIPAddress - Reference of the PublicIP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` -} - -// BastionHostListResult response for ListBastionHosts API service call. -type BastionHostListResult struct { - autorest.Response `json:"-"` - // Value - List of Bastion Hosts in a resource group. - Value *[]BastionHost `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// BastionHostListResultIterator provides access to a complete listing of BastionHost values. -type BastionHostListResultIterator struct { - i int - page BastionHostListResultPage -} - -// 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 *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.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 *BastionHostListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter BastionHostListResultIterator) 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 BastionHostListResultIterator) Response() BastionHostListResult { - 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 BastionHostListResultIterator) Value() BastionHost { - if !iter.page.NotDone() { - return BastionHost{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the BastionHostListResultIterator type. -func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator { - return BastionHostListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(bhlr.NextLink))) -} - -// BastionHostListResultPage contains a page of BastionHost values. -type BastionHostListResultPage struct { - fn func(context.Context, BastionHostListResult) (BastionHostListResult, error) - bhlr BastionHostListResult -} - -// 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 *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.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.bhlr) - if err != nil { - return err - } - page.bhlr = 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 *BastionHostListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page BastionHostListResultPage) NotDone() bool { - return !page.bhlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page BastionHostListResultPage) Response() BastionHostListResult { - return page.bhlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page BastionHostListResultPage) Values() []BastionHost { - if page.bhlr.IsEmpty() { - return nil - } - return *page.bhlr.Value -} - -// Creates a new instance of the BastionHostListResultPage type. -func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { - return BastionHostListResultPage{ - fn: getNextPage, - bhlr: cur, - } -} - -// BastionHostPropertiesFormat properties of the Bastion Host. -type BastionHostPropertiesFormat struct { - // IPConfigurations - IP configuration of the Bastion Host resource. - IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` - // DNSName - FQDN for the endpoint on which bastion host is accessible. - DNSName *string `json:"dnsName,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type BastionHostsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(BastionHostsClient) (BastionHost, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result. -func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - bh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { - bh, err = client.CreateOrUpdateResponder(bh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request") - } - } - return -} - -// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type BastionHostsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(BastionHostsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for BastionHostsDeleteFuture.Result. -func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// BastionHostsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type BastionHostsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(BastionHostsClient) (BastionHost, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *BastionHostsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for BastionHostsUpdateTagsFuture.Result. -func (future *BastionHostsUpdateTagsFuture) result(client BastionHostsClient) (bh BastionHost, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - bh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.BastionHostsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { - bh, err = client.UpdateTagsResponder(bh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", bh.Response.Response, "Failure responding to request") - } - } - return -} - -// BGPCommunity contains bgp community information offered in Service Community resources. -type BGPCommunity struct { - // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` - // CommunityName - The name of the bgp community. e.g. Skype. - CommunityName *string `json:"communityName,omitempty"` - // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - CommunityValue *string `json:"communityValue,omitempty"` - // CommunityPrefixes - The prefixes that the bgp community contains. - CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` - // IsAuthorizedToUse - Customer is authorized to use bgp community or not. - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - // ServiceGroup - The service group of the bgp community contains. - ServiceGroup *string `json:"serviceGroup,omitempty"` -} - -// BgpPeerStatus BGP peer status details. -type BgpPeerStatus struct { - // LocalAddress - READ-ONLY; The virtual network gateway's local address. - LocalAddress *string `json:"localAddress,omitempty"` - // Neighbor - READ-ONLY; The remote BGP peer. - Neighbor *string `json:"neighbor,omitempty"` - // Asn - READ-ONLY; The autonomous system number of the remote BGP peer. - Asn *int32 `json:"asn,omitempty"` - // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' - State BgpPeerState `json:"state,omitempty"` - // ConnectedDuration - READ-ONLY; For how long the peering has been up. - ConnectedDuration *string `json:"connectedDuration,omitempty"` - // RoutesReceived - READ-ONLY; The number of routes learned from this peer. - RoutesReceived *int64 `json:"routesReceived,omitempty"` - // MessagesSent - READ-ONLY; The number of BGP messages sent. - MessagesSent *int64 `json:"messagesSent,omitempty"` - // MessagesReceived - READ-ONLY; The number of BGP messages received. - MessagesReceived *int64 `json:"messagesReceived,omitempty"` -} - -// MarshalJSON is the custom marshaler for BgpPeerStatus. -func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// BgpPeerStatusListResult response for list BGP peer status API service call. -type BgpPeerStatusListResult struct { - autorest.Response `json:"-"` - // Value - List of BGP peers. - Value *[]BgpPeerStatus `json:"value,omitempty"` -} - -// BgpServiceCommunity service Community Properties. -type BgpServiceCommunity struct { - // BgpServiceCommunityPropertiesFormat - Properties of the BGP service community. - *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for BgpServiceCommunity. -func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bsc.BgpServiceCommunityPropertiesFormat != nil { - objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat - } - if bsc.ID != nil { - objectMap["id"] = bsc.ID - } - if bsc.Location != nil { - objectMap["location"] = bsc.Location - } - if bsc.Tags != nil { - objectMap["tags"] = bsc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. -func (bsc *BgpServiceCommunity) 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 bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat - err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) - if err != nil { - return err - } - bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bsc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bsc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bsc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - bsc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - bsc.Tags = tags - } - } - } - - return nil -} - -// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. -type BgpServiceCommunityListResult struct { - autorest.Response `json:"-"` - // Value - A list of service community resources. - Value *[]BgpServiceCommunity `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity -// values. -type BgpServiceCommunityListResultIterator struct { - i int - page BgpServiceCommunityListResultPage -} - -// 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 *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.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 *BgpServiceCommunityListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter BgpServiceCommunityListResultIterator) 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 BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { - 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 BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { - if !iter.page.NotDone() { - return BgpServiceCommunity{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the BgpServiceCommunityListResultIterator type. -func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator { - return BgpServiceCommunityListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(bsclr.NextLink))) -} - -// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. -type BgpServiceCommunityListResultPage struct { - fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) - bsclr BgpServiceCommunityListResult -} - -// 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 *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.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.bsclr) - if err != nil { - return err - } - page.bsclr = 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 *BgpServiceCommunityListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page BgpServiceCommunityListResultPage) NotDone() bool { - return !page.bsclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { - return page.bsclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { - if page.bsclr.IsEmpty() { - return nil - } - return *page.bsclr.Value -} - -// Creates a new instance of the BgpServiceCommunityListResultPage type. -func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { - return BgpServiceCommunityListResultPage{ - fn: getNextPage, - bsclr: cur, - } -} - -// BgpServiceCommunityPropertiesFormat properties of Service Community. -type BgpServiceCommunityPropertiesFormat struct { - // ServiceName - The name of the bgp community. e.g. Skype. - ServiceName *string `json:"serviceName,omitempty"` - // BgpCommunities - Get a list of bgp communities. - BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` -} - -// BgpSettings BGP settings details. -type BgpSettings struct { - // Asn - The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - // PeerWeight - The weight added to routes learned from this BGP speaker. - PeerWeight *int32 `json:"peerWeight,omitempty"` -} - -// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API -// service call. -type CheckPrivateLinkServiceVisibilityRequest struct { - // PrivateLinkServiceAlias - The alias of the private link service. - PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` -} - -// CloudError an error response from the Batch service. -type CloudError struct { - // Error - Cloud error body. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody an error response from the Batch service. -type CloudErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. - Details *[]CloudErrorBody `json:"details,omitempty"` -} - -// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic. -type ConfigurationDiagnosticParameters struct { - // TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full' - VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"` - // Profiles - List of network configuration diagnostic profiles. - Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"` -} - -// ConfigurationDiagnosticProfile parameters to compare with network configuration. -type ConfigurationDiagnosticProfile struct { - // Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound' - Direction Direction `json:"direction,omitempty"` - // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP. - Protocol *string `json:"protocol,omitempty"` - // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. - Source *string `json:"source,omitempty"` - // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. - Destination *string `json:"destination,omitempty"` - // DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). - DestinationPort *string `json:"destinationPort,omitempty"` -} - -// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource. -type ConfigurationDiagnosticResponse struct { - autorest.Response `json:"-"` - // Results - READ-ONLY; List of network configuration diagnostic results. - Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse. -func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic -// query. -type ConfigurationDiagnosticResult struct { - // Profile - Network configuration diagnostic profile. - Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"` - // NetworkSecurityGroupResult - Network security group result. - NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` -} - -// ConnectionMonitor parameters that define the operation to create a connection monitor. -type ConnectionMonitor struct { - // Location - Connection monitor location. - Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - // ConnectionMonitorParameters - Properties of the connection monitor. - *ConnectionMonitorParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectionMonitor. -func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cm.Location != nil { - objectMap["location"] = cm.Location - } - if cm.Tags != nil { - objectMap["tags"] = cm.Tags - } - if cm.ConnectionMonitorParameters != nil { - objectMap["properties"] = cm.ConnectionMonitorParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. -func (cm *ConnectionMonitor) 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 "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cm.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cm.Tags = tags - } - case "properties": - if v != nil { - var connectionMonitorParameters ConnectionMonitorParameters - err = json.Unmarshal(*v, &connectionMonitorParameters) - if err != nil { - return err - } - cm.ConnectionMonitorParameters = &connectionMonitorParameters - } - } - } - - return nil -} - -// ConnectionMonitorDestination describes the destination of connection monitor. -type ConnectionMonitorDestination struct { - // ResourceID - The ID of the resource used as the destination by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Address - Address of the connection monitor destination (IP or domain name). - Address *string `json:"address,omitempty"` - // Port - The destination port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorListResult list of connection monitors. -type ConnectionMonitorListResult struct { - autorest.Response `json:"-"` - // Value - Information about connection monitors. - Value *[]ConnectionMonitorResult `json:"value,omitempty"` -} - -// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. -type ConnectionMonitorParameters struct { - // Source - Describes the source of connection monitor. - Source *ConnectionMonitorSource `json:"source,omitempty"` - // Destination - Describes the destination of connection monitor. - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` -} - -// ConnectionMonitorQueryResult list of connection states snapshots. -type ConnectionMonitorQueryResult struct { - autorest.Response `json:"-"` - // SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive' - SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - // States - Information about connection states. - States *[]ConnectionStateSnapshot `json:"states,omitempty"` -} - -// ConnectionMonitorResult information about the connection monitor. -type ConnectionMonitorResult struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; Name of the connection monitor. - Name *string `json:"name,omitempty"` - // ID - READ-ONLY; ID of the connection monitor. - ID *string `json:"id,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Connection monitor type. - Type *string `json:"type,omitempty"` - // Location - Connection monitor location. - Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - // ConnectionMonitorResultProperties - Properties of the connection monitor result. - *ConnectionMonitorResultProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectionMonitorResult. -func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cmr.Etag != nil { - objectMap["etag"] = cmr.Etag - } - if cmr.Location != nil { - objectMap["location"] = cmr.Location - } - if cmr.Tags != nil { - objectMap["tags"] = cmr.Tags - } - if cmr.ConnectionMonitorResultProperties != nil { - objectMap["properties"] = cmr.ConnectionMonitorResultProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. -func (cmr *ConnectionMonitorResult) 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 - } - cmr.Name = &name - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cmr.ID = &ID - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - cmr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cmr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cmr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cmr.Tags = tags - } - case "properties": - if v != nil { - var connectionMonitorResultProperties ConnectionMonitorResultProperties - err = json.Unmarshal(*v, &connectionMonitorResultProperties) - if err != nil { - return err - } - cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties - } - } - } - - return nil -} - -// ConnectionMonitorResultProperties describes the properties of a connection monitor. -type ConnectionMonitorResultProperties struct { - // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // StartTime - The date and time when the connection monitor was started. - StartTime *date.Time `json:"startTime,omitempty"` - // MonitoringStatus - The monitoring status of the connection monitor. - MonitoringStatus *string `json:"monitoringStatus,omitempty"` - // Source - Describes the source of connection monitor. - Source *ConnectionMonitorSource `json:"source,omitempty"` - // Destination - Describes the destination of connection monitor. - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` -} - -// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConnectionMonitorsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result. -func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - cmr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { - cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") - } - } - return -} - -// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConnectionMonitorsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConnectionMonitorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConnectionMonitorsDeleteFuture.Result. -func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionMonitorSource describes the source of connection monitor. -type ConnectionMonitorSource struct { - // ResourceID - The ID of the resource used as the source by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsQueryFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConnectionMonitorsQueryFuture.Result. -func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - cmqr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { - cmqr, err = client.QueryResponder(cmqr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") - } - } - return -} - -// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStartFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConnectionMonitorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConnectionMonitorsStartFuture.Result. -func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStopFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ConnectionMonitorsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ConnectionMonitorsStopFuture.Result. -func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") - return - } - ar.Response = future.Response() - return -} - -// ConnectionResetSharedKey the virtual network connection reset shared key. -type ConnectionResetSharedKey struct { - autorest.Response `json:"-"` - // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. - KeyLength *int32 `json:"keyLength,omitempty"` -} - -// ConnectionSharedKey response for GetConnectionSharedKey API service call. -type ConnectionSharedKey struct { - autorest.Response `json:"-"` - // Value - The virtual network connection shared key value. - Value *string `json:"value,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// ConnectionStateSnapshot connection state snapshot. -type ConnectionStateSnapshot struct { - // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' - ConnectionState ConnectionState `json:"connectionState,omitempty"` - // StartTime - The start time of the connection snapshot. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the connection snapshot. - EndTime *date.Time `json:"endTime,omitempty"` - // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' - EvaluationState EvaluationState `json:"evaluationState,omitempty"` - // AvgLatencyInMs - Average latency in ms. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` - // MinLatencyInMs - Minimum latency in ms. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` - // MaxLatencyInMs - Maximum latency in ms. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` - // ProbesSent - The number of sent probes. - ProbesSent *int32 `json:"probesSent,omitempty"` - // ProbesFailed - The number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty"` - // Hops - READ-ONLY; List of hops between the source and the destination. - 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. - ResourceID *string `json:"resourceId,omitempty"` - // Address - The IP address or URI the resource to which a connection attempt will be made. - Address *string `json:"address,omitempty"` - // Port - Port on which check connectivity will be performed. - Port *int32 `json:"port,omitempty"` -} - -// ConnectivityHop information about a hop between the source and the destination. -type ConnectivityHop struct { - // Type - READ-ONLY; The type of the hop. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The ID of the hop. - ID *string `json:"id,omitempty"` - // Address - READ-ONLY; The IP address of the hop. - Address *string `json:"address,omitempty"` - // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop. - ResourceID *string `json:"resourceId,omitempty"` - // NextHopIds - READ-ONLY; List of next hop identifiers. - NextHopIds *[]string `json:"nextHopIds,omitempty"` - // Issues - READ-ONLY; List of issues. - Issues *[]ConnectivityIssue `json:"issues,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectivityHop. -func (ch ConnectivityHop) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ConnectivityInformation information on the connectivity status. -type ConnectivityInformation struct { - autorest.Response `json:"-"` - // Hops - READ-ONLY; List of hops between the source and the destination. - Hops *[]ConnectivityHop `json:"hops,omitempty"` - // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' - ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` - // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` - // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` - // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` - // ProbesSent - READ-ONLY; Total number of probes sent. - ProbesSent *int32 `json:"probesSent,omitempty"` - // ProbesFailed - READ-ONLY; Number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectivityInformation. -func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. -type ConnectivityIssue struct { - // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' - Origin Origin `json:"origin,omitempty"` - // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' - Severity Severity `json:"severity,omitempty"` - // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' - Type IssueType `json:"type,omitempty"` - // Context - READ-ONLY; Provides additional context on the issue. - Context *[]map[string]*string `json:"context,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectivityIssue. -func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ConnectivityParameters parameters that determine how the connectivity check will be performed. -type ConnectivityParameters struct { - // Source - Describes the source of the connection. - Source *ConnectivitySource `json:"source,omitempty"` - // Destination - Describes the destination of connection. - Destination *ConnectivityDestination `json:"destination,omitempty"` - // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' - Protocol Protocol `json:"protocol,omitempty"` - // ProtocolConfiguration - Configuration of the protocol. - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` -} - -// ConnectivitySource parameters that define the source of the connection. -type ConnectivitySource struct { - // ResourceID - The ID of the resource from which a connectivity check will be initiated. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port from which a connectivity check will be performed. - Port *int32 `json:"port,omitempty"` -} - -// Container reference to container resource in remote resource provider. -type Container struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// ContainerNetworkInterface container network interface child resource. -type ContainerNetworkInterface struct { - // ContainerNetworkInterfacePropertiesFormat - Container network interface properties. - *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterface. -func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cni.ContainerNetworkInterfacePropertiesFormat != nil { - objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat - } - if cni.Name != nil { - objectMap["name"] = cni.Name - } - if cni.Etag != nil { - objectMap["etag"] = cni.Etag - } - if cni.ID != nil { - objectMap["id"] = cni.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct. -func (cni *ContainerNetworkInterface) 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 containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat) - if err != nil { - return err - } - cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cni.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cni.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - cni.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cni.ID = &ID - } - } - } - - return nil -} - -// ContainerNetworkInterfaceConfiguration container network interface configuration child resource. -type ContainerNetworkInterfaceConfiguration struct { - // ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. - *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration. -func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil { - objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat - } - if cnic.Name != nil { - objectMap["name"] = cnic.Name - } - if cnic.Etag != nil { - objectMap["etag"] = cnic.Etag - } - if cnic.ID != nil { - objectMap["id"] = cnic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct. -func (cnic *ContainerNetworkInterfaceConfiguration) 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 containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat) - if err != nil { - return err - } - cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cnic.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cnic.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - cnic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - cnic.ID = &ID - } - } - } - - return nil -} - -// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration -// properties. -type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { - // IPConfigurations - A list of ip configurations of the container network interface configuration. - IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` - // ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration. - ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `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. - *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration. -func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat - } - if cniic.Name != nil { - objectMap["name"] = cniic.Name - } - if cniic.Etag != nil { - objectMap["etag"] = cniic.Etag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct. -func (cniic *ContainerNetworkInterfaceIPConfiguration) 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 containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat) - if err != nil { - return err - } - cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cniic.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - cniic.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - cniic.Etag = &etag - } - } - } - - return nil -} - -// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface -// IP configuration. -type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat. -func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ContainerNetworkInterfacePropertiesFormat properties of container network interface. -type ContainerNetworkInterfacePropertiesFormat struct { - // ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created. - ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` - // Container - Reference to the container to which this container network interface is attached. - Container *Container `json:"container,omitempty"` - // IPConfigurations - Reference to the ip configuration on this container nic. - IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat. -func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cnipf.ContainerNetworkInterfaceConfiguration != nil { - objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration - } - if cnipf.Container != nil { - objectMap["container"] = cnipf.Container - } - if cnipf.IPConfigurations != nil { - objectMap["ipConfigurations"] = cnipf.IPConfigurations - } - return json.Marshal(objectMap) -} - -// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosCustomPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result. -func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dcp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { - dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request") - } - } - return -} - -// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosCustomPoliciesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosCustomPoliciesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result. -func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosCustomPoliciesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result. -func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dcp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { - dcp, err = client.UpdateTagsResponder(dcp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request") - } - } - return -} - -// DdosCustomPolicy a DDoS custom policy in a resource group. -type DdosCustomPolicy struct { - autorest.Response `json:"-"` - // DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy. - *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for DdosCustomPolicy. -func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dcp.DdosCustomPolicyPropertiesFormat != nil { - objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat - } - if dcp.ID != nil { - objectMap["id"] = dcp.ID - } - if dcp.Location != nil { - objectMap["location"] = dcp.Location - } - if dcp.Tags != nil { - objectMap["tags"] = dcp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct. -func (dcp *DdosCustomPolicy) 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 ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat - err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat) - if err != nil { - return err - } - dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - dcp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dcp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dcp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dcp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dcp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dcp.Tags = tags - } - } - } - - return nil -} - -// DdosCustomPolicyPropertiesFormat dDoS custom policy properties. -type DdosCustomPolicyPropertiesFormat struct { - // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only. - PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"` - // ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters. - 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:"-"` - // 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"` - // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. - *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for DdosProtectionPlan. -func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dpp.Location != nil { - objectMap["location"] = dpp.Location - } - if dpp.Tags != nil { - objectMap["tags"] = dpp.Tags - } - if dpp.DdosProtectionPlanPropertiesFormat != nil { - objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. -func (dpp *DdosProtectionPlan) 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 "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dpp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dpp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dpp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dpp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dpp.Tags = tags - } - case "properties": - if v != nil { - var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat - err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) - if err != nil { - return err - } - dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - dpp.Etag = &etag - } - } - } - - return nil -} - -// DdosProtectionPlanListResult a list of DDoS protection plans. -type DdosProtectionPlanListResult struct { - autorest.Response `json:"-"` - // Value - A list of DDoS protection plans. - Value *[]DdosProtectionPlan `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page DdosProtectionPlanListResultPage -} - -// 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 *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.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 *DdosProtectionPlanListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DdosProtectionPlanListResultIterator) 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 DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { - 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 DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { - if !iter.page.NotDone() { - return DdosProtectionPlan{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DdosProtectionPlanListResultIterator type. -func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator { - return DdosProtectionPlanListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dpplr.NextLink))) -} - -// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. -type DdosProtectionPlanListResultPage struct { - fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) - dpplr DdosProtectionPlanListResult -} - -// 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 *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.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.dpplr) - if err != nil { - return err - } - page.dpplr = 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 *DdosProtectionPlanListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DdosProtectionPlanListResultPage) NotDone() bool { - return !page.dpplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { - return page.dpplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { - if page.dpplr.IsEmpty() { - return nil - } - return *page.dpplr.Value -} - -// Creates a new instance of the DdosProtectionPlanListResultPage type. -func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { - return DdosProtectionPlanListResultPage{ - fn: getNextPage, - dpplr: cur, - } -} - -// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. -type DdosProtectionPlanPropertiesFormat struct { - // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. - VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` -} - -// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat. -func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result. -func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dpp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { - dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") - } - } - return -} - -// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosProtectionPlansClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosProtectionPlansDeleteFuture.Result. -func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result. -func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - dpp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { - dpp, err = client.UpdateTagsResponder(dpp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request") - } - } - return -} - -// DdosSettings contains the DDoS protection settings of the public IP. -type DdosSettings struct { - // DdosCustomPolicy - The DDoS custom policy associated with the public IP. - DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"` - // ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard' - ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"` -} - -// Delegation details the service to which the subnet is delegated. -type Delegation struct { - // ServiceDelegationPropertiesFormat - Properties of the subnet. - *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for Delegation. -func (d Delegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.ServiceDelegationPropertiesFormat != nil { - objectMap["properties"] = d.ServiceDelegationPropertiesFormat - } - if d.Name != nil { - objectMap["name"] = d.Name - } - if d.Etag != nil { - objectMap["etag"] = d.Etag - } - if d.ID != nil { - objectMap["id"] = d.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Delegation struct. -func (d *Delegation) 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 serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat - err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat) - if err != nil { - return err - } - d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - d.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - d.ID = &ID - } - } - } - - return nil -} - -// DeviceProperties list of properties of the device. -type DeviceProperties struct { - // DeviceVendor - Name of the device Vendor. - DeviceVendor *string `json:"deviceVendor,omitempty"` - // DeviceModel - Model of the device. - DeviceModel *string `json:"deviceModel,omitempty"` - // LinkSpeedInMbps - Link speed. - LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` -} - -// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual -// network. Standard DHCP option for a subnet overrides VNET DHCP options. -type DhcpOptions struct { - // DNSServers - The list of DNS servers IP addresses. - DNSServers *[]string `json:"dnsServers,omitempty"` -} - -// Dimension dimension of the metric. -type Dimension struct { - // Name - The name of the dimension. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the dimension. - DisplayName *string `json:"displayName,omitempty"` - // InternalName - The internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` -} - -// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. -type DNSNameAvailabilityResult struct { - autorest.Response `json:"-"` - // Available - Domain availability (True/False). - Available *bool `json:"available,omitempty"` -} - -// EffectiveNetworkSecurityGroup effective network security group. -type EffectiveNetworkSecurityGroup struct { - // NetworkSecurityGroup - The ID of network security group that is applied. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - // Association - Associated resources. - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - // EffectiveSecurityRules - A collection of effective security rules. - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - // TagMap - Mapping of tags to list of IP Addresses included within the tag. - TagMap map[string][]string `json:"tagMap"` -} - -// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. -func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ensg.NetworkSecurityGroup != nil { - objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup - } - if ensg.Association != nil { - objectMap["association"] = ensg.Association - } - if ensg.EffectiveSecurityRules != nil { - objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules - } - if ensg.TagMap != nil { - objectMap["tagMap"] = ensg.TagMap - } - return json.Marshal(objectMap) -} - -// EffectiveNetworkSecurityGroupAssociation the effective network security group association. -type EffectiveNetworkSecurityGroupAssociation struct { - // Subnet - The ID of the subnet if assigned. - Subnet *SubResource `json:"subnet,omitempty"` - // NetworkInterface - The ID of the network interface if assigned. - NetworkInterface *SubResource `json:"networkInterface,omitempty"` -} - -// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service -// call. -type EffectiveNetworkSecurityGroupListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective network security groups. - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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). - Name *string `json:"name,omitempty"` - // Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll' - Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // SourceAddressPrefix - The source address prefix. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // DestinationAddressPrefix - The destination address prefix. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - // ExpandedSourceAddressPrefix - The expanded source address prefix. - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - // ExpandedDestinationAddressPrefix - Expanded destination address prefix. - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - // Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' - Access SecurityRuleAccess `json:"access,omitempty"` - // Priority - The priority of the rule. - Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' - Direction SecurityRuleDirection `json:"direction,omitempty"` -} - -// EffectiveRoute effective Route. -type EffectiveRoute struct { - // Name - The name of the user defined route. This is optional. - Name *string `json:"name,omitempty"` - // DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet. - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - // Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' - Source EffectiveRouteSource `json:"source,omitempty"` - // State - The value of effective route. Possible values include: 'Active', 'Invalid' - State EffectiveRouteState `json:"state,omitempty"` - // AddressPrefix - The address prefixes of the effective routes in CIDR notation. - AddressPrefix *[]string `json:"addressPrefix,omitempty"` - // NextHopIPAddress - The IP address of the next hop of the effective route. - NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' - NextHopType RouteNextHopType `json:"nextHopType,omitempty"` -} - -// EffectiveRouteListResult response for list effective route API service call. -type EffectiveRouteListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective routes. - Value *[]EffectiveRoute `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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) -} - -// EndpointServiceResult endpoint service. -type EndpointServiceResult struct { - // Name - READ-ONLY; Name of the endpoint service. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of the endpoint service. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - 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:"-"` - // Value - List of available endpoint services in a region. - Value *[]EndpointServiceResult `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult -// values. -type EndpointServicesListResultIterator struct { - i int - page EndpointServicesListResultPage -} - -// 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 *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.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 *EndpointServicesListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EndpointServicesListResultIterator) 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 EndpointServicesListResultIterator) Response() EndpointServicesListResult { - 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 EndpointServicesListResultIterator) Value() EndpointServiceResult { - if !iter.page.NotDone() { - return EndpointServiceResult{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EndpointServicesListResultIterator type. -func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator { - return EndpointServicesListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(eslr.NextLink))) -} - -// EndpointServicesListResultPage contains a page of EndpointServiceResult values. -type EndpointServicesListResultPage struct { - fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error) - eslr EndpointServicesListResult -} - -// 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 *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.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.eslr) - if err != nil { - return err - } - page.eslr = 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 *EndpointServicesListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EndpointServicesListResultPage) NotDone() bool { - return !page.eslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { - return page.eslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { - if page.eslr.IsEmpty() { - return nil - } - return *page.eslr.Value -} - -// Creates a new instance of the EndpointServicesListResultPage type. -func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { - return EndpointServicesListResultPage{ - fn: getNextPage, - eslr: cur, - } -} - -// Error common error representation. -type Error struct { - // Code - Error code. - Code *string `json:"code,omitempty"` - // Message - Error message. - Message *string `json:"message,omitempty"` - // Target - Error target. - Target *string `json:"target,omitempty"` - // Details - Error details. - Details *[]ErrorDetails `json:"details,omitempty"` - // InnerError - Inner error message. - InnerError *string `json:"innerError,omitempty"` -} - -// ErrorDetails common error details representation. -type ErrorDetails struct { - // Code - Error code. - Code *string `json:"code,omitempty"` - // Target - Error target. - Target *string `json:"target,omitempty"` - // Message - Error message. - Message *string `json:"message,omitempty"` -} - -// ErrorResponse the error object. -type ErrorResponse struct { - // Error - The error details object. - Error *ErrorDetails `json:"error,omitempty"` -} - -// EvaluatedNetworkSecurityGroup results of network security group evaluation. -type EvaluatedNetworkSecurityGroup struct { - // NetworkSecurityGroupID - Network security group ID. - NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"` - // AppliedTo - Resource ID of nic or subnet to which network security group is applied. - AppliedTo *string `json:"appliedTo,omitempty"` - // MatchedRule - Matched network security rule. - MatchedRule *MatchedRule `json:"matchedRule,omitempty"` - // RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results. - 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:"-"` - // Sku - The SKU. - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - // ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit. - *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuit. -func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erc.Sku != nil { - objectMap["sku"] = erc.Sku - } - if erc.ExpressRouteCircuitPropertiesFormat != nil { - objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat - } - if erc.ID != nil { - objectMap["id"] = erc.ID - } - if erc.Location != nil { - objectMap["location"] = erc.Location - } - if erc.Tags != nil { - objectMap["tags"] = erc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. -func (erc *ExpressRouteCircuit) 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 "sku": - if v != nil { - var sku ExpressRouteCircuitSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - erc.Sku = &sku - } - case "properties": - if v != nil { - var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) - if err != nil { - return err - } - erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - erc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - erc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - erc.Tags = tags - } - } - } - - return nil -} - -// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitArpTable struct { - // Age - Entry age in minutes. - Age *int32 `json:"age,omitempty"` - // Interface - Interface address. - Interface *string `json:"interface,omitempty"` - // IPAddress - The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - // MacAddress - The MAC address. - MacAddress *string `json:"macAddress,omitempty"` -} - -// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. -type ExpressRouteCircuitAuthorization struct { - autorest.Response `json:"-"` - // AuthorizationPropertiesFormat - Properties of the express route circuit authorization. - *AuthorizationPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. -func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erca.AuthorizationPropertiesFormat != nil { - objectMap["properties"] = erca.AuthorizationPropertiesFormat - } - if erca.Name != nil { - objectMap["name"] = erca.Name - } - if erca.ID != nil { - objectMap["id"] = erca.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. -func (erca *ExpressRouteCircuitAuthorization) 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 authorizationPropertiesFormat AuthorizationPropertiesFormat - err = json.Unmarshal(*v, &authorizationPropertiesFormat) - if err != nil { - return err - } - erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erca.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erca.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - erca.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erca.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erca.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { - erca, err = client.CreateOrUpdateResponder(erca.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCircuitAuthorizationsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result. -func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering -// resource. -type ExpressRouteCircuitConnection struct { - autorest.Response `json:"-"` - // ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. - *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. -func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { - objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat - } - if ercc.Name != nil { - objectMap["name"] = ercc.Name - } - if ercc.ID != nil { - objectMap["id"] = ercc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. -func (ercc *ExpressRouteCircuitConnection) 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 expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) - if err != nil { - return err - } - ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ercc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercc.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all -// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. -type ExpressRouteCircuitConnectionListResult struct { - autorest.Response `json:"-"` - // Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit. - Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of -// ExpressRouteCircuitConnection values. -type ExpressRouteCircuitConnectionListResultIterator struct { - i int - page ExpressRouteCircuitConnectionListResultPage -} - -// 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 *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.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 *ExpressRouteCircuitConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitConnectionListResultIterator) 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 ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult { - 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 ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection { - if !iter.page.NotDone() { - return ExpressRouteCircuitConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type. -func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator { - return ExpressRouteCircuitConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ercclr.NextLink))) -} - -// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values. -type ExpressRouteCircuitConnectionListResultPage struct { - fn func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error) - ercclr ExpressRouteCircuitConnectionListResult -} - -// 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 *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.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.ercclr) - if err != nil { - return err - } - page.ercclr = 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 *ExpressRouteCircuitConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool { - return !page.ercclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult { - return page.ercclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection { - if page.ercclr.IsEmpty() { - return nil - } - return *page.ercclr.Value -} - -// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type. -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. -type ExpressRouteCircuitConnectionPropertiesFormat struct { - // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // AuthorizationKey - The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' - CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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.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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result. -func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. -type ExpressRouteCircuitListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteCircuits in a resource group. - Value *[]ExpressRouteCircuit `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit -// values. -type ExpressRouteCircuitListResultIterator struct { - i int - page ExpressRouteCircuitListResultPage -} - -// 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 *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.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 *ExpressRouteCircuitListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitListResultIterator) 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 ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { - 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 ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { - if !iter.page.NotDone() { - return ExpressRouteCircuit{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteCircuitListResultIterator type. -func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { - return ExpressRouteCircuitListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erclr.NextLink))) -} - -// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. -type ExpressRouteCircuitListResultPage struct { - fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) - erclr ExpressRouteCircuitListResult -} - -// 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 *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.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.erclr) - if err != nil { - return err - } - page.erclr = 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 *ExpressRouteCircuitListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitListResultPage) NotDone() bool { - return !page.erclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { - return page.erclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { - if page.erclr.IsEmpty() { - return nil - } - return *page.erclr.Value -} - -// Creates a new instance of the ExpressRouteCircuitListResultPage type. -func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { - return ExpressRouteCircuitListResultPage{ - fn: getNextPage, - erclr: cur, - } -} - -// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. -type ExpressRouteCircuitPeering struct { - autorest.Response `json:"-"` - // ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. - *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. -func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { - objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat - } - if ercp.Name != nil { - objectMap["name"] = ercp.Name - } - if ercp.ID != nil { - objectMap["id"] = ercp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. -func (ercp *ExpressRouteCircuitPeering) 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 expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) - if err != nil { - return err - } - ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercp.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ercp.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercp.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCircuitPeeringConfig specifies the peering configuration. -type ExpressRouteCircuitPeeringConfig struct { - // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering. - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - // AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' - AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - // LegacyMode - The legacy mode of the peering. - LegacyMode *int32 `json:"legacyMode,omitempty"` - // CustomerASN - The CustomerASN of the peering. - CustomerASN *int32 `json:"customerASN,omitempty"` - // RoutingRegistryName - The RoutingRegistryName of the configuration. - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} - -// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier. -type ExpressRouteCircuitPeeringID struct { - // ID - The ID of the ExpressRoute circuit peering. - ID *string `json:"id,omitempty"` -} - -// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings -// that belong to an ExpressRouteCircuit. -type ExpressRouteCircuitPeeringListResult struct { - autorest.Response `json:"-"` - // Value - The peerings in an express route circuit. - Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of -// ExpressRouteCircuitPeering values. -type ExpressRouteCircuitPeeringListResultIterator struct { - i int - page ExpressRouteCircuitPeeringListResultPage -} - -// 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 *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.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 *ExpressRouteCircuitPeeringListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitPeeringListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { - 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { - if !iter.page.NotDone() { - return ExpressRouteCircuitPeering{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. -func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { - return ExpressRouteCircuitPeeringListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ercplr.NextLink))) -} - -// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. -type ExpressRouteCircuitPeeringListResultPage struct { - fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) - ercplr ExpressRouteCircuitPeeringListResult -} - -// 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 *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.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.ercplr) - if err != nil { - return err - } - page.ercplr = 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 *ExpressRouteCircuitPeeringListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { - return !page.ercplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { - return page.ercplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { - if page.ercplr.IsEmpty() { - return nil - } - return *page.ercplr.Value -} - -// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. -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. -type ExpressRouteCircuitPeeringPropertiesFormat struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // Stats - Gets peering stats. - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *SubResource `json:"routeFilter,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - // ExpressRouteConnection - The ExpressRoute connection. - ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` - // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - // PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. - 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.ProvisioningState != nil { - objectMap["provisioningState"] = ercppf.ProvisioningState - } - if ercppf.GatewayManagerEtag != nil { - objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag - } - if ercppf.LastModifiedBy != nil { - objectMap["lastModifiedBy"] = ercppf.LastModifiedBy - } - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { - ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitPeeringsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result. -func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. -type ExpressRouteCircuitPropertiesFormat struct { - // AllowClassicOperations - Allow classic operations. - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - // CircuitProvisioningState - The CircuitProvisioningState state of the resource. - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // Authorizations - The list of authorizations. - Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - // Peerings - The list of peerings. - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // ServiceKey - The ServiceKey. - ServiceKey *string `json:"serviceKey,omitempty"` - // ServiceProviderNotes - The ServiceProviderNotes. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ServiceProviderProperties - The ServiceProviderProperties. - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. - ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` - // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. - BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` - // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. - Stag *int32 `json:"stag,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // GlobalReachEnabled - Flag denoting Global reach status. - 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.ProvisioningState != nil { - objectMap["provisioningState"] = ercpf.ProvisioningState - } - 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. - ID *string `json:"id,omitempty"` -} - -// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTable struct { - // NetworkProperty - IP address of a network entity. - NetworkProperty *string `json:"network,omitempty"` - // NextHop - NextHop address. - NextHop *string `json:"nextHop,omitempty"` - // LocPrf - Local preference value as set with the set local-preference route-map configuration command. - LocPrf *string `json:"locPrf,omitempty"` - // Weight - Route Weight. - Weight *int32 `json:"weight,omitempty"` - // Path - Autonomous system paths to the destination network. - Path *string `json:"path,omitempty"` -} - -// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTableSummary struct { - // Neighbor - IP address of the neighbor. - Neighbor *string `json:"neighbor,omitempty"` - // V - BGP version number spoken to the neighbor. - V *int32 `json:"v,omitempty"` - // As - Autonomous system number. - As *int32 `json:"as,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StatePfxRcd *string `json:"statePfxRcd,omitempty"` -} - -// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsArpTableListResult struct { - autorest.Response `json:"-"` - // Value - Gets list of the ARP table. - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.CreateOrUpdateResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result. -func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an -// ExpressRouteCircuit. -type ExpressRouteCircuitServiceProviderProperties struct { - // ServiceProviderName - The serviceProviderName. - ServiceProviderName *string `json:"serviceProviderName,omitempty"` - // PeeringLocation - The peering location. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The BandwidthInMbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` -} - -// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. -type ExpressRouteCircuitSku struct { - // Name - The name of the SKU. - Name *string `json:"name,omitempty"` - // Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal' - Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` - // Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData' - Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` -} - -// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListArpTableFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result. -func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercatlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListRoutesTableFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result. -func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercrtlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result. -func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercrtslr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { - ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsRoutesTableListResult struct { - autorest.Response `json:"-"` - // Value - The list of routes table. - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the -// Express Route Circuits API. -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitStats contains stats associated with the peering. -type ExpressRouteCircuitStats struct { - autorest.Response `json:"-"` - // PrimarybytesIn - Gets BytesIn of the peering. - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - // PrimarybytesOut - Gets BytesOut of the peering. - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - // SecondarybytesIn - Gets BytesIn of the peering. - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - // SecondarybytesOut - Gets BytesOut of the peering. - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} - -// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result. -func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.UpdateTagsResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteConnection expressRouteConnection resource. -type ExpressRouteConnection struct { - autorest.Response `json:"-"` - // ExpressRouteConnectionProperties - Properties of the express route connection. - *ExpressRouteConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource. - Name *string `json:"name,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteConnection. -func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erc.ExpressRouteConnectionProperties != nil { - objectMap["properties"] = erc.ExpressRouteConnectionProperties - } - if erc.Name != nil { - objectMap["name"] = erc.Name - } - if erc.ID != nil { - objectMap["id"] = erc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct. -func (erc *ExpressRouteConnection) 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 expressRouteConnectionProperties ExpressRouteConnectionProperties - err = json.Unmarshal(*v, &expressRouteConnectionProperties) - if err != nil { - return err - } - erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erc.Name = &name - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erc.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteConnectionID the ID of the ExpressRouteConnection. -type ExpressRouteConnectionID struct { - // ID - READ-ONLY; The ID of the ExpressRouteConnection. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteConnectionID. -func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExpressRouteConnectionList expressRouteConnection list. -type ExpressRouteConnectionList struct { - autorest.Response `json:"-"` - // Value - The list of ExpressRoute connections. - Value *[]ExpressRouteConnection `json:"value,omitempty"` -} - -// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource. -type ExpressRouteConnectionProperties struct { - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ExpressRouteCircuitPeering - The ExpressRoute circuit peering. - ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` - // AuthorizationKey - Authorization key to establish the connection. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // RoutingWeight - The routing weight associated to the connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` -} - -// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ExpressRouteConnectionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result. -func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.CreateOrUpdateResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result. -func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCrossConnection expressRouteCrossConnection resource. -type ExpressRouteCrossConnection struct { - autorest.Response `json:"-"` - // ExpressRouteCrossConnectionProperties - Properties of the express route cross connection. - *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. -func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCrossConnectionProperties != nil { - objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties - } - if ercc.ID != nil { - objectMap["id"] = ercc.ID - } - if ercc.Location != nil { - objectMap["location"] = ercc.Location - } - if ercc.Tags != nil { - objectMap["tags"] = ercc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. -func (ercc *ExpressRouteCrossConnection) 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 expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) - if err != nil { - return err - } - ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ercc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ercc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ercc.Tags = tags - } - } - } - - return nil -} - -// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. -type ExpressRouteCrossConnectionListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteCrossConnection resources. - Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page ExpressRouteCrossConnectionListResultPage -} - -// 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 *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.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 *ExpressRouteCrossConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionListResultIterator) 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 ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { - 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 ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { - if !iter.page.NotDone() { - return ExpressRouteCrossConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type. -func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator { - return ExpressRouteCrossConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ercclr.NextLink))) -} - -// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. -type ExpressRouteCrossConnectionListResultPage struct { - fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) - ercclr ExpressRouteCrossConnectionListResult -} - -// 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 *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.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.ercclr) - if err != nil { - return err - } - page.ercclr = 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 *ExpressRouteCrossConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { - return !page.ercclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { - return page.ercclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { - if page.ercclr.IsEmpty() { - return nil - } - return *page.ercclr.Value -} - -// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type. -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. -type ExpressRouteCrossConnectionPeering struct { - autorest.Response `json:"-"` - // ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering. - *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. -func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { - objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties - } - if erccp.Name != nil { - objectMap["name"] = erccp.Name - } - if erccp.ID != nil { - objectMap["id"] = erccp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. -func (erccp *ExpressRouteCrossConnectionPeering) 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 expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) - if err != nil { - return err - } - erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erccp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erccp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erccp.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings -// that belong to an ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionPeeringList struct { - autorest.Response `json:"-"` - // Value - The peerings in an express route cross connection. - Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page ExpressRouteCrossConnectionPeeringListPage -} - -// 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 *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.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 *ExpressRouteCrossConnectionPeeringListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionPeeringListIterator) 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 ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { - 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 ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { - if !iter.page.NotDone() { - return ExpressRouteCrossConnectionPeering{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type. -func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator { - return ExpressRouteCrossConnectionPeeringListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erccpl.NextLink))) -} - -// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. -type ExpressRouteCrossConnectionPeeringListPage struct { - fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) - erccpl ExpressRouteCrossConnectionPeeringList -} - -// 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 *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.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.erccpl) - if err != nil { - return err - } - page.erccpl = 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 *ExpressRouteCrossConnectionPeeringListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { - return !page.erccpl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { - return page.erccpl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { - if page.erccpl.IsEmpty() { - return nil - } - return *page.erccpl.Value -} - -// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type. -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. -type ExpressRouteCrossConnectionPeeringProperties struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - READ-ONLY; The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - READ-ONLY; The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - READ-ONLY; The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - 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.LastModifiedBy != nil { - objectMap["lastModifiedBy"] = erccpp.LastModifiedBy - } - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erccp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { - erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result. -func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionProperties struct { - // PrimaryAzurePort - READ-ONLY; The name of the primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - READ-ONLY; The name of the secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // STag - READ-ONLY; The identifier of the circuit traffic. - STag *int32 `json:"sTag,omitempty"` - // PeeringLocation - The peering location of the ExpressRoute circuit. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The circuit bandwidth In Mbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` - // ExpressRouteCircuit - The ExpressRouteCircuit. - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // ServiceProviderNotes - Additional read only notes set by the connectivity provider. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Peerings - The list of peerings. - 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. - Neighbor *string `json:"neighbor,omitempty"` - // Asn - Autonomous system number. - Asn *int32 `json:"asn,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` -} - -// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result. -func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCrossConnectionsListArpTableFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result. -func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercatlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result. -func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercrtlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result. -func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erccrtslr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { - erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with -// the Express Route Cross Connections. -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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) -} - -// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ExpressRouteCrossConnectionsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result. -func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ercc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.UpdateTagsResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteGateway expressRoute gateway resource. -type ExpressRouteGateway struct { - autorest.Response `json:"-"` - // ExpressRouteGatewayProperties - Properties of the express route gateway. - *ExpressRouteGatewayProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteGateway. -func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erg.ExpressRouteGatewayProperties != nil { - objectMap["properties"] = erg.ExpressRouteGatewayProperties - } - if erg.ID != nil { - objectMap["id"] = erg.ID - } - if erg.Location != nil { - objectMap["location"] = erg.Location - } - if erg.Tags != nil { - objectMap["tags"] = erg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct. -func (erg *ExpressRouteGateway) 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 expressRouteGatewayProperties ExpressRouteGatewayProperties - err = json.Unmarshal(*v, &expressRouteGatewayProperties) - if err != nil { - return err - } - erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - erg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - erg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - erg.Tags = tags - } - } - } - - return nil -} - -// ExpressRouteGatewayList list of ExpressRoute gateways. -type ExpressRouteGatewayList struct { - autorest.Response `json:"-"` - // Value - List of ExpressRoute gateways. - Value *[]ExpressRouteGateway `json:"value,omitempty"` -} - -// ExpressRouteGatewayProperties expressRoute gateway resource properties. -type ExpressRouteGatewayProperties struct { - // AutoScaleConfiguration - Configuration for auto scaling. - AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. - ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. - 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.ProvisioningState != "" { - objectMap["provisioningState"] = ergp.ProvisioningState - } - 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. - Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` -} - -// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to -// deploy. -type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { - // Min - Minimum number of scale units deployed for ExpressRoute gateway. - Min *int32 `json:"min,omitempty"` - // Max - Maximum number of scale units deployed for ExpressRoute gateway. - Max *int32 `json:"max,omitempty"` -} - -// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result. -func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent { - erg, err = client.CreateOrUpdateResponder(erg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRouteGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result. -func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteLink expressRouteLink child resource definition. -type ExpressRouteLink struct { - autorest.Response `json:"-"` - // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties. - *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` - // Name - Name of child port resource that is unique among child port resources of the parent. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteLink. -func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erl.ExpressRouteLinkPropertiesFormat != nil { - objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat - } - if erl.Name != nil { - objectMap["name"] = erl.Name - } - if erl.ID != nil { - objectMap["id"] = erl.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct. -func (erl *ExpressRouteLink) 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 expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat - err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat) - if err != nil { - return err - } - erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erl.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erl.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erl.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call. -type ExpressRouteLinkListResult struct { - autorest.Response `json:"-"` - // Value - The list of ExpressRouteLink sub-resources. - Value *[]ExpressRouteLink `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values. -type ExpressRouteLinkListResultIterator struct { - i int - page ExpressRouteLinkListResultPage -} - -// 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 *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.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 *ExpressRouteLinkListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteLinkListResultIterator) 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 ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult { - 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 ExpressRouteLinkListResultIterator) Value() ExpressRouteLink { - if !iter.page.NotDone() { - return ExpressRouteLink{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteLinkListResultIterator type. -func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator { - return ExpressRouteLinkListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erllr.NextLink))) -} - -// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values. -type ExpressRouteLinkListResultPage struct { - fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error) - erllr ExpressRouteLinkListResult -} - -// 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 *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.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.erllr) - if err != nil { - return err - } - page.erllr = 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 *ExpressRouteLinkListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteLinkListResultPage) NotDone() bool { - return !page.erllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult { - return page.erllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink { - if page.erllr.IsEmpty() { - return nil - } - return *page.erllr.Value -} - -// Creates a new instance of the ExpressRouteLinkListResultPage type. -func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { - return ExpressRouteLinkListResultPage{ - fn: getNextPage, - erllr: cur, - } -} - -// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources. -type ExpressRouteLinkPropertiesFormat struct { - // RouterName - READ-ONLY; Name of Azure router associated with physical port. - RouterName *string `json:"routerName,omitempty"` - // InterfaceName - READ-ONLY; Name of Azure router interface. - InterfaceName *string `json:"interfaceName,omitempty"` - // PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port. - PatchPanelID *string `json:"patchPanelId,omitempty"` - // RackID - READ-ONLY; Mapping of physical patch panel to rack. - RackID *string `json:"rackId,omitempty"` - // ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC' - ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled' - AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,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 - } - return json.Marshal(objectMap) -} - -// ExpressRoutePort expressRoutePort resource definition. -type ExpressRoutePort struct { - autorest.Response `json:"-"` - // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties. - *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRoutePort. -func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erp.ExpressRoutePortPropertiesFormat != nil { - objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat - } - if erp.ID != nil { - objectMap["id"] = erp.ID - } - if erp.Location != nil { - objectMap["location"] = erp.Location - } - if erp.Tags != nil { - objectMap["tags"] = erp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct. -func (erp *ExpressRoutePort) 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 expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat - err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat) - if err != nil { - return err - } - erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - erp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - erp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - erp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - erp.Tags = tags - } - } - } - - return nil -} - -// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. -type ExpressRoutePortListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRoutePort resources. - Value *[]ExpressRoutePort `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. -type ExpressRoutePortListResultIterator struct { - i int - page ExpressRoutePortListResultPage -} - -// 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 *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.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 *ExpressRoutePortListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRoutePortListResultIterator) 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 ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult { - 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 ExpressRoutePortListResultIterator) Value() ExpressRoutePort { - if !iter.page.NotDone() { - return ExpressRoutePort{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRoutePortListResultIterator type. -func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator { - return ExpressRoutePortListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erplr.NextLink))) -} - -// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values. -type ExpressRoutePortListResultPage struct { - fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error) - erplr ExpressRoutePortListResult -} - -// 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 *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.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.erplr) - if err != nil { - return err - } - page.erplr = 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 *ExpressRoutePortListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRoutePortListResultPage) NotDone() bool { - return !page.erplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult { - return page.erplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort { - if page.erplr.IsEmpty() { - return nil - } - return *page.erplr.Value -} - -// Creates a new instance of the ExpressRoutePortListResultPage type. -func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { - return ExpressRoutePortListResultPage{ - fn: getNextPage, - erplr: cur, - } -} - -// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources. -type ExpressRoutePortPropertiesFormat struct { - // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInGbps - Bandwidth of procured ports in Gbps. - BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"` - // ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths. - ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` - // Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s). - Mtu *string `json:"mtu,omitempty"` - // Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ' - Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` - // EtherType - READ-ONLY; Ether type of the physical port. - EtherType *string `json:"etherType,omitempty"` - // AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. - AllocationDate *string `json:"allocationDate,omitempty"` - // Links - The set of physical links of the ExpressRoutePort resource. - Links *[]ExpressRouteLink `json:"links,omitempty"` - // Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. - Circuits *[]SubResource `json:"circuits,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ResourceGUID - The resource GUID property of the ExpressRoutePort resource. - 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 - } - if erppf.ResourceGUID != nil { - objectMap["resourceGuid"] = erppf.ResourceGUID - } - return json.Marshal(objectMap) -} - -// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRoutePortsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRoutePortsClient) (ExpressRoutePort, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result. -func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { - erp, err = client.CreateOrUpdateResponder(erp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ExpressRoutePortsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRoutePortsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRoutePortsDeleteFuture.Result. -func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource. -type ExpressRoutePortsLocation struct { - autorest.Response `json:"-"` - // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties. - *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation. -func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if erpl.ExpressRoutePortsLocationPropertiesFormat != nil { - objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat - } - if erpl.ID != nil { - objectMap["id"] = erpl.ID - } - if erpl.Location != nil { - objectMap["location"] = erpl.Location - } - if erpl.Tags != nil { - objectMap["tags"] = erpl.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct. -func (erpl *ExpressRoutePortsLocation) 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 expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat - err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat) - if err != nil { - return err - } - erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - erpl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - erpl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - erpl.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - erpl.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - erpl.Tags = tags - } - } - } - - return nil -} - -// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths. -type ExpressRoutePortsLocationBandwidths struct { - // OfferName - READ-ONLY; Bandwidth descriptive name. - OfferName *string `json:"offerName,omitempty"` - // ValueInGbps - READ-ONLY; Bandwidth value in Gbps. - ValueInGbps *int32 `json:"valueInGbps,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths. -func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call. -type ExpressRoutePortsLocationListResult struct { - autorest.Response `json:"-"` - // Value - The list of all ExpressRoutePort peering locations. - Value *[]ExpressRoutePortsLocation `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of -// ExpressRoutePortsLocation values. -type ExpressRoutePortsLocationListResultIterator struct { - i int - page ExpressRoutePortsLocationListResultPage -} - -// 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 *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.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 *ExpressRoutePortsLocationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRoutePortsLocationListResultIterator) 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 ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult { - 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 ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation { - if !iter.page.NotDone() { - return ExpressRoutePortsLocation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type. -func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator { - return ExpressRoutePortsLocationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erpllr.NextLink))) -} - -// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values. -type ExpressRoutePortsLocationListResultPage struct { - fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error) - erpllr ExpressRoutePortsLocationListResult -} - -// 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 *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.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.erpllr) - if err != nil { - return err - } - page.erpllr = 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 *ExpressRoutePortsLocationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRoutePortsLocationListResultPage) NotDone() bool { - return !page.erpllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult { - return page.erpllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation { - if page.erpllr.IsEmpty() { - return nil - } - return *page.erpllr.Value -} - -// Creates a new instance of the ExpressRoutePortsLocationListResultPage type. -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 -// resources. -type ExpressRoutePortsLocationPropertiesFormat struct { - // Address - READ-ONLY; Address of peering location. - Address *string `json:"address,omitempty"` - // Contact - READ-ONLY; Contact details of peering locations. - Contact *string `json:"contact,omitempty"` - // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths. - AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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) -} - -// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRoutePortsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ExpressRoutePortsClient) (ExpressRoutePort, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result. -func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { - erp, err = client.UpdateTagsResponder(erp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. -type ExpressRouteServiceProvider struct { - // ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider. - *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. -func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { - objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat - } - if ersp.ID != nil { - objectMap["id"] = ersp.ID - } - if ersp.Location != nil { - objectMap["location"] = ersp.Location - } - if ersp.Tags != nil { - objectMap["tags"] = ersp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. -func (ersp *ExpressRouteServiceProvider) 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 expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat - err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) - if err != nil { - return err - } - ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ersp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ersp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ersp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ersp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ersp.Tags = tags - } - } - } - - return nil -} - -// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider -// resources. -type ExpressRouteServiceProviderBandwidthsOffered struct { - // OfferName - The OfferName. - OfferName *string `json:"offerName,omitempty"` - // ValueInMbps - The ValueInMbps. - ValueInMbps *int32 `json:"valueInMbps,omitempty"` -} - -// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. -type ExpressRouteServiceProviderListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteResourceProvider resources. - Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of -// ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultIterator struct { - i int - page ExpressRouteServiceProviderListResultPage -} - -// 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 *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.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 *ExpressRouteServiceProviderListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteServiceProviderListResultIterator) 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 ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { - 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 ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { - if !iter.page.NotDone() { - return ExpressRouteServiceProvider{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. -func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { - return ExpressRouteServiceProviderListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ersplr.NextLink))) -} - -// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultPage struct { - fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) - ersplr ExpressRouteServiceProviderListResult -} - -// 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 *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.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.ersplr) - if err != nil { - return err - } - page.ersplr = 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 *ExpressRouteServiceProviderListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { - return !page.ersplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { - return page.ersplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { - if page.ersplr.IsEmpty() { - return nil - } - return *page.ersplr.Value -} - -// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. -func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { - return ExpressRouteServiceProviderListResultPage{ - fn: getNextPage, - ersplr: cur, - } -} - -// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. -type ExpressRouteServiceProviderPropertiesFormat struct { - // PeeringLocations - Get a list of peering locations. - PeeringLocations *[]string `json:"peeringLocations,omitempty"` - // BandwidthsOffered - Gets bandwidths offered. - BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - // ProvisioningState - Gets the provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type FirewallPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallPoliciesClient) (FirewallPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result. -func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent { - fp, err = client.CreateOrUpdateResponder(fp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request") - } - } - return -} - -// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type FirewallPoliciesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallPoliciesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallPoliciesDeleteFuture.Result. -func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// FirewallPolicy firewallPolicy Resource. -type FirewallPolicy struct { - autorest.Response `json:"-"` - // FirewallPolicyPropertiesFormat - Properties of the firewall policy. - *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicy. -func (fp FirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fp.FirewallPolicyPropertiesFormat != nil { - objectMap["properties"] = fp.FirewallPolicyPropertiesFormat - } - if fp.ID != nil { - objectMap["id"] = fp.ID - } - if fp.Location != nil { - objectMap["location"] = fp.Location - } - if fp.Tags != nil { - objectMap["tags"] = fp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct. -func (fp *FirewallPolicy) 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 firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat - err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat) - if err != nil { - return err - } - fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - fp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - fp.Tags = tags - } - } - } - - return nil -} - -// FirewallPolicyFilterRule firewall Policy Filter Rule -type FirewallPolicyFilterRule struct { - // Action - The action type of a Filter rule - Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"` - // RuleConditions - Collection of rule conditions used by a rule. - RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"` - // Name - Name of the Rule - Name *string `json:"name,omitempty"` - // Priority - Priority of the Firewall Policy Rule resource. - Priority *int32 `json:"priority,omitempty"` - // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' - RuleType RuleType `json:"ruleType,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule. -func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) { - fpfr.RuleType = RuleTypeFirewallPolicyFilterRule - objectMap := make(map[string]interface{}) - if fpfr.Action != nil { - objectMap["action"] = fpfr.Action - } - if fpfr.RuleConditions != nil { - objectMap["ruleConditions"] = fpfr.RuleConditions - } - if fpfr.Name != nil { - objectMap["name"] = fpfr.Name - } - if fpfr.Priority != nil { - objectMap["priority"] = fpfr.Priority - } - if fpfr.RuleType != "" { - objectMap["ruleType"] = fpfr.RuleType - } - return json.Marshal(objectMap) -} - -// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. -func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { - return nil, false -} - -// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. -func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) { - return &fpfr, true -} - -// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. -func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { - return nil, false -} - -// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. -func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { - return &fpfr, true -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct. -func (fpfr *FirewallPolicyFilterRule) 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 "action": - if v != nil { - var action FirewallPolicyFilterRuleAction - err = json.Unmarshal(*v, &action) - if err != nil { - return err - } - fpfr.Action = &action - } - case "ruleConditions": - if v != nil { - ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v) - if err != nil { - return err - } - fpfr.RuleConditions = &ruleConditions - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fpfr.Name = &name - } - case "priority": - if v != nil { - var priority int32 - err = json.Unmarshal(*v, &priority) - if err != nil { - return err - } - fpfr.Priority = &priority - } - case "ruleType": - if v != nil { - var ruleType RuleType - err = json.Unmarshal(*v, &ruleType) - if err != nil { - return err - } - fpfr.RuleType = ruleType - } - } - } - - return nil -} - -// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction. -type FirewallPolicyFilterRuleAction struct { - // Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny', 'FirewallPolicyFilterRuleActionTypeAlert' - Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"` -} - -// FirewallPolicyListResult response for ListFirewallPolicies API service call. -type FirewallPolicyListResult struct { - autorest.Response `json:"-"` - // Value - List of Firewall Policies in a resource group. - Value *[]FirewallPolicy `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values. -type FirewallPolicyListResultIterator struct { - i int - page FirewallPolicyListResultPage -} - -// 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 *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.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 *FirewallPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter FirewallPolicyListResultIterator) 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 FirewallPolicyListResultIterator) Response() FirewallPolicyListResult { - 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 FirewallPolicyListResultIterator) Value() FirewallPolicy { - if !iter.page.NotDone() { - return FirewallPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the FirewallPolicyListResultIterator type. -func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator { - return FirewallPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(fplr.NextLink))) -} - -// FirewallPolicyListResultPage contains a page of FirewallPolicy values. -type FirewallPolicyListResultPage struct { - fn func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error) - fplr FirewallPolicyListResult -} - -// 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 *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.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.fplr) - if err != nil { - return err - } - page.fplr = 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 *FirewallPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page FirewallPolicyListResultPage) NotDone() bool { - return !page.fplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult { - return page.fplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page FirewallPolicyListResultPage) Values() []FirewallPolicy { - if page.fplr.IsEmpty() { - return nil - } - return *page.fplr.Value -} - -// Creates a new instance of the FirewallPolicyListResultPage type. -func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage { - return FirewallPolicyListResultPage{ - fn: getNextPage, - fplr: cur, - } -} - -// FirewallPolicyNatRule firewall Policy NAT Rule -type FirewallPolicyNatRule struct { - // Action - The action type of a Nat rule, SNAT or DNAT - Action *FirewallPolicyNatRuleAction `json:"action,omitempty"` - // TranslatedAddress - The translated address for this NAT rule. - TranslatedAddress *string `json:"translatedAddress,omitempty"` - // TranslatedPort - The translated port for this NAT rule. - TranslatedPort *string `json:"translatedPort,omitempty"` - // RuleCondition - The match conditions for incoming traffic - RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"` - // Name - Name of the Rule - Name *string `json:"name,omitempty"` - // Priority - Priority of the Firewall Policy Rule resource. - Priority *int32 `json:"priority,omitempty"` - // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' - RuleType RuleType `json:"ruleType,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyNatRule. -func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) { - fpnr.RuleType = RuleTypeFirewallPolicyNatRule - objectMap := make(map[string]interface{}) - if fpnr.Action != nil { - objectMap["action"] = fpnr.Action - } - if fpnr.TranslatedAddress != nil { - objectMap["translatedAddress"] = fpnr.TranslatedAddress - } - if fpnr.TranslatedPort != nil { - objectMap["translatedPort"] = fpnr.TranslatedPort - } - objectMap["ruleCondition"] = fpnr.RuleCondition - if fpnr.Name != nil { - objectMap["name"] = fpnr.Name - } - if fpnr.Priority != nil { - objectMap["priority"] = fpnr.Priority - } - if fpnr.RuleType != "" { - objectMap["ruleType"] = fpnr.RuleType - } - return json.Marshal(objectMap) -} - -// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. -func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { - return &fpnr, true -} - -// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. -func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) { - return nil, false -} - -// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. -func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { - return nil, false -} - -// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. -func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { - return &fpnr, true -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct. -func (fpnr *FirewallPolicyNatRule) 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 "action": - if v != nil { - var action FirewallPolicyNatRuleAction - err = json.Unmarshal(*v, &action) - if err != nil { - return err - } - fpnr.Action = &action - } - case "translatedAddress": - if v != nil { - var translatedAddress string - err = json.Unmarshal(*v, &translatedAddress) - if err != nil { - return err - } - fpnr.TranslatedAddress = &translatedAddress - } - case "translatedPort": - if v != nil { - var translatedPort string - err = json.Unmarshal(*v, &translatedPort) - if err != nil { - return err - } - fpnr.TranslatedPort = &translatedPort - } - case "ruleCondition": - if v != nil { - ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v) - if err != nil { - return err - } - fpnr.RuleCondition = ruleCondition - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fpnr.Name = &name - } - case "priority": - if v != nil { - var priority int32 - err = json.Unmarshal(*v, &priority) - if err != nil { - return err - } - fpnr.Priority = &priority - } - case "ruleType": - if v != nil { - var ruleType RuleType - err = json.Unmarshal(*v, &ruleType) - if err != nil { - return err - } - fpnr.RuleType = ruleType - } - } - } - - return nil -} - -// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction. -type FirewallPolicyNatRuleAction struct { - // Type - The type of action. Possible values include: 'DNAT', 'SNAT' - Type FirewallPolicyNatRuleActionType `json:"type,omitempty"` -} - -// FirewallPolicyPropertiesFormat firewall Policy definition -type FirewallPolicyPropertiesFormat struct { - // RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups - RuleGroups *[]SubResource `json:"ruleGroups,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // BasePolicy - The parent firewall policy from which rules are inherited. - BasePolicy *SubResource `json:"basePolicy,omitempty"` - // Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with - Firewalls *[]SubResource `json:"firewalls,omitempty"` - // ChildPolicies - READ-ONLY; List of references to Child Firewall Policies - ChildPolicies *[]SubResource `json:"childPolicies,omitempty"` - // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' - ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat. -func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fppf.ProvisioningState != "" { - objectMap["provisioningState"] = fppf.ProvisioningState - } - if fppf.BasePolicy != nil { - objectMap["basePolicy"] = fppf.BasePolicy - } - if fppf.ThreatIntelMode != "" { - objectMap["threatIntelMode"] = fppf.ThreatIntelMode - } - return json.Marshal(objectMap) -} - -// BasicFirewallPolicyRule properties of the rule. -type BasicFirewallPolicyRule interface { - AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) - AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) - AsFirewallPolicyRule() (*FirewallPolicyRule, bool) -} - -// FirewallPolicyRule properties of the rule. -type FirewallPolicyRule struct { - // Name - Name of the Rule - Name *string `json:"name,omitempty"` - // Priority - Priority of the Firewall Policy Rule resource. - Priority *int32 `json:"priority,omitempty"` - // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' - RuleType RuleType `json:"ruleType,omitempty"` -} - -func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["ruleType"] { - case string(RuleTypeFirewallPolicyNatRule): - var fpnr FirewallPolicyNatRule - err := json.Unmarshal(body, &fpnr) - return fpnr, err - case string(RuleTypeFirewallPolicyFilterRule): - var fpfr FirewallPolicyFilterRule - err := json.Unmarshal(body, &fpfr) - return fpfr, err - default: - var fpr FirewallPolicyRule - err := json.Unmarshal(body, &fpr) - return fpr, err - } -} -func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - fprArray := make([]BasicFirewallPolicyRule, len(rawMessages)) - - for index, rawMessage := range rawMessages { - fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage) - if err != nil { - return nil, err - } - fprArray[index] = fpr - } - return fprArray, nil -} - -// MarshalJSON is the custom marshaler for FirewallPolicyRule. -func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) { - fpr.RuleType = RuleTypeFirewallPolicyRule - objectMap := make(map[string]interface{}) - if fpr.Name != nil { - objectMap["name"] = fpr.Name - } - if fpr.Priority != nil { - objectMap["priority"] = fpr.Priority - } - if fpr.RuleType != "" { - objectMap["ruleType"] = fpr.RuleType - } - return json.Marshal(objectMap) -} - -// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. -func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { - return nil, false -} - -// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. -func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) { - return nil, false -} - -// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. -func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { - return &fpr, true -} - -// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. -func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { - return &fpr, true -} - -// BasicFirewallPolicyRuleCondition properties of a rule. -type BasicFirewallPolicyRuleCondition interface { - AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) - AsRuleCondition() (*RuleCondition, bool) - AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) -} - -// FirewallPolicyRuleCondition properties of a rule. -type FirewallPolicyRuleCondition struct { - // Name - Name of the rule condition. - Name *string `json:"name,omitempty"` - // Description - Description of the rule condition. - Description *string `json:"description,omitempty"` - // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' - RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` -} - -func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["ruleConditionType"] { - case string(RuleConditionTypeApplicationRuleCondition): - var arc ApplicationRuleCondition - err := json.Unmarshal(body, &arc) - return arc, err - case string(RuleConditionTypeNetworkRuleCondition): - var rc RuleCondition - err := json.Unmarshal(body, &rc) - return rc, err - default: - var fprc FirewallPolicyRuleCondition - err := json.Unmarshal(body, &fprc) - return fprc, err - } -} -func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages)) - - for index, rawMessage := range rawMessages { - fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage) - if err != nil { - return nil, err - } - fprcArray[index] = fprc - } - return fprcArray, nil -} - -// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition. -func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) { - fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition - objectMap := make(map[string]interface{}) - if fprc.Name != nil { - objectMap["name"] = fprc.Name - } - if fprc.Description != nil { - objectMap["description"] = fprc.Description - } - if fprc.RuleConditionType != "" { - objectMap["ruleConditionType"] = fprc.RuleConditionType - } - return json.Marshal(objectMap) -} - -// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. -func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { - return nil, false -} - -// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. -func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) { - return nil, false -} - -// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. -func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { - return &fprc, true -} - -// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. -func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { - return &fprc, true -} - -// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol. -type FirewallPolicyRuleConditionApplicationProtocol struct { - // ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS' - ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"` - // Port - Port number for the protocol, cannot be greater than 64000. - Port *int32 `json:"port,omitempty"` -} - -// FirewallPolicyRuleGroup rule Group resource -type FirewallPolicyRuleGroup struct { - autorest.Response `json:"-"` - // FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group. - *FirewallPolicyRuleGroupProperties `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Rule Group type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup. -func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fprg.FirewallPolicyRuleGroupProperties != nil { - objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties - } - if fprg.Name != nil { - objectMap["name"] = fprg.Name - } - if fprg.ID != nil { - objectMap["id"] = fprg.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct. -func (fprg *FirewallPolicyRuleGroup) 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 firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties - err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties) - if err != nil { - return err - } - fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fprg.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fprg.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fprg.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fprg.ID = &ID - } - } - } - - return nil -} - -// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call. -type FirewallPolicyRuleGroupListResult struct { - autorest.Response `json:"-"` - // Value - List of FirewallPolicyRuleGroups in a FirewallPolicy. - Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of -// FirewallPolicyRuleGroup values. -type FirewallPolicyRuleGroupListResultIterator struct { - i int - page FirewallPolicyRuleGroupListResultPage -} - -// 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 *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.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 *FirewallPolicyRuleGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter FirewallPolicyRuleGroupListResultIterator) 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 FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult { - 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 FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup { - if !iter.page.NotDone() { - return FirewallPolicyRuleGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type. -func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator { - return FirewallPolicyRuleGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool { - return fprglr.Value == nil || len(*fprglr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool { - return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0 -} - -// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if !fprglr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(fprglr.NextLink))) -} - -// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values. -type FirewallPolicyRuleGroupListResultPage struct { - fn func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error) - fprglr FirewallPolicyRuleGroupListResult -} - -// 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 *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.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.fprglr) - if err != nil { - return err - } - page.fprglr = 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 *FirewallPolicyRuleGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool { - return !page.fprglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult { - return page.fprglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup { - if page.fprglr.IsEmpty() { - return nil - } - return *page.fprglr.Value -} - -// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type. -func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage { - return FirewallPolicyRuleGroupListResultPage{ - fn: getNextPage, - fprglr: cur, - } -} - -// FirewallPolicyRuleGroupProperties properties of the rule group. -type FirewallPolicyRuleGroupProperties struct { - // Priority - Priority of the Firewall Policy Rule Group resource. - Priority *int32 `json:"priority,omitempty"` - // Rules - Group of Firewall Policy rules. - Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct. -func (fprgp *FirewallPolicyRuleGroupProperties) 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 "priority": - if v != nil { - var priority int32 - err = json.Unmarshal(*v, &priority) - if err != nil { - return err - } - fprgp.Priority = &priority - } - case "rules": - if v != nil { - rules, err := unmarshalBasicFirewallPolicyRuleArray(*v) - if err != nil { - return err - } - fprgp.Rules = &rules - } - case "provisioningState": - if v != nil { - var provisioningState ProvisioningState - err = json.Unmarshal(*v, &provisioningState) - if err != nil { - return err - } - fprgp.ProvisioningState = provisioningState - } - } - } - - return nil -} - -// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result. -func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fprg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent { - fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request") - } - } - return -} - -// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type FirewallPolicyRuleGroupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *FirewallPolicyRuleGroupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for FirewallPolicyRuleGroupsDeleteFuture.Result. -func (future *FirewallPolicyRuleGroupsDeleteFuture) result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// FlowLogFormatParameters parameters that define the flow log format. -type FlowLogFormatParameters struct { - // Type - The file type of flow log. Possible values include: 'JSON' - Type FlowLogFormatType `json:"type,omitempty"` - // Version - The version (revision) of the flow log. - Version *int32 `json:"version,omitempty"` -} - -// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . -type FlowLogInformation struct { - autorest.Response `json:"-"` - // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . - TargetResourceID *string `json:"targetResourceId,omitempty"` - // FlowLogProperties - Properties of the flow log. - *FlowLogProperties `json:"properties,omitempty"` - // FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` -} - -// MarshalJSON is the custom marshaler for FlowLogInformation. -func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fli.TargetResourceID != nil { - objectMap["targetResourceId"] = fli.TargetResourceID - } - if fli.FlowLogProperties != nil { - objectMap["properties"] = fli.FlowLogProperties - } - if fli.FlowAnalyticsConfiguration != nil { - objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. -func (fli *FlowLogInformation) 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 "targetResourceId": - if v != nil { - var targetResourceID string - err = json.Unmarshal(*v, &targetResourceID) - if err != nil { - return err - } - fli.TargetResourceID = &targetResourceID - } - case "properties": - if v != nil { - var flowLogProperties FlowLogProperties - err = json.Unmarshal(*v, &flowLogProperties) - if err != nil { - return err - } - fli.FlowLogProperties = &flowLogProperties - } - case "flowAnalyticsConfiguration": - if v != nil { - var flowAnalyticsConfiguration TrafficAnalyticsProperties - err = json.Unmarshal(*v, &flowAnalyticsConfiguration) - if err != nil { - return err - } - fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration - } - } - } - - return nil -} - -// FlowLogProperties parameters that define the configuration of flow log. -type FlowLogProperties struct { - // StorageID - ID of the storage account which is used to store the flow log. - StorageID *string `json:"storageId,omitempty"` - // Enabled - Flag to enable/disable flow logging. - Enabled *bool `json:"enabled,omitempty"` - // RetentionPolicy - Parameters that define the retention policy for flow log. - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - // Format - Parameters that define the flow log format. - Format *FlowLogFormatParameters `json:"format,omitempty"` -} - -// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics -// (optional) status. -type FlowLogStatusParameters struct { - // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// FrontendIPConfiguration frontend IP address of the load balancer. -type FrontendIPConfiguration struct { - autorest.Response `json:"-"` - // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. - *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for FrontendIPConfiguration. -func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fic.FrontendIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat - } - if fic.Name != nil { - objectMap["name"] = fic.Name - } - if fic.Etag != nil { - objectMap["etag"] = fic.Etag - } - if fic.Zones != nil { - objectMap["zones"] = fic.Zones - } - if fic.ID != nil { - objectMap["id"] = fic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. -func (fic *FrontendIPConfiguration) 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 frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) - if err != nil { - return err - } - fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fic.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fic.Type = &typeVar - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - fic.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fic.ID = &ID - } - } - } - - return nil -} - -// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. -type FrontendIPConfigurationPropertiesFormat struct { - // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP. - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP. - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - // OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP. - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // PrivateIPAddressVersion - It represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the Public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // PublicIPPrefix - The reference of the Public IP Prefix resource. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if ficpf.ProvisioningState != nil { - objectMap["provisioningState"] = ficpf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// GatewayRoute gateway routing details. -type GatewayRoute struct { - // LocalAddress - READ-ONLY; The gateway's local address. - LocalAddress *string `json:"localAddress,omitempty"` - // NetworkProperty - READ-ONLY; The route's network prefix. - NetworkProperty *string `json:"network,omitempty"` - // NextHop - READ-ONLY; The route's next hop. - NextHop *string `json:"nextHop,omitempty"` - // SourcePeer - READ-ONLY; The peer this route was learned from. - SourcePeer *string `json:"sourcePeer,omitempty"` - // Origin - READ-ONLY; The source this route was learned from. - Origin *string `json:"origin,omitempty"` - // AsPath - READ-ONLY; The route's AS path sequence. - AsPath *string `json:"asPath,omitempty"` - // Weight - READ-ONLY; The route's weight. - Weight *int32 `json:"weight,omitempty"` -} - -// MarshalJSON is the custom marshaler for GatewayRoute. -func (gr GatewayRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// GatewayRouteListResult list of virtual network gateway routes. -type GatewayRouteListResult struct { - autorest.Response `json:"-"` - // Value - List of gateway routes. - Value *[]GatewayRoute `json:"value,omitempty"` -} - -// GetVpnSitesConfigurationRequest list of Vpn-Sites. -type GetVpnSitesConfigurationRequest struct { - // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. - VpnSites *[]string `json:"vpnSites,omitempty"` - // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites. - OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` -} - -// HTTPConfiguration HTTP configuration of the connectivity check. -type HTTPConfiguration struct { - // Method - HTTP method. Possible values include: 'Get' - Method HTTPMethod `json:"method,omitempty"` - // Headers - List of HTTP headers. - Headers *[]HTTPHeader `json:"headers,omitempty"` - // ValidStatusCodes - Valid status codes. - ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` -} - -// HTTPHeader describes the HTTP header. -type HTTPHeader struct { - // Name - The name in HTTP header. - Name *string `json:"name,omitempty"` - // Value - The value in HTTP header. - Value *string `json:"value,omitempty"` -} - -// HubIPAddresses IP addresses associated with azure firewall. -type HubIPAddresses struct { - // PublicIPAddresses - List of Public IP addresses associated with azure firewall. - PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"` - // PrivateIPAddress - Private IP Address associated with azure firewall. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} - -// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource. -type HubVirtualNetworkConnection struct { - autorest.Response `json:"-"` - // HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection. - *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection. -func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hvnc.HubVirtualNetworkConnectionProperties != nil { - objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties - } - if hvnc.Name != nil { - objectMap["name"] = hvnc.Name - } - if hvnc.ID != nil { - objectMap["id"] = hvnc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct. -func (hvnc *HubVirtualNetworkConnection) 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 hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties - err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties) - if err != nil { - return err - } - hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - hvnc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - hvnc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - hvnc.ID = &ID - } - } - } - - return nil -} - -// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection. -type HubVirtualNetworkConnectionProperties struct { - // RemoteVirtualNetwork - Reference to the remote virtual network. - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - // AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not. - AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` - // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways. - AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` - // EnableInternetSecurity - Enable internet security. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// InboundNatPool inbound NAT pool of the load balancer. -type InboundNatPool struct { - // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. - *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for InboundNatPool. -func (inp InboundNatPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if inp.InboundNatPoolPropertiesFormat != nil { - objectMap["properties"] = inp.InboundNatPoolPropertiesFormat - } - if inp.Name != nil { - objectMap["name"] = inp.Name - } - if inp.Etag != nil { - objectMap["etag"] = inp.Etag - } - if inp.ID != nil { - objectMap["id"] = inp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. -func (inp *InboundNatPool) 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 inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat - err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) - if err != nil { - return err - } - inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - inp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - inp.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - inp.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - inp.ID = &ID - } - } - } - - return nil -} - -// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. -type InboundNatPoolPropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. - FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` - // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. - FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// InboundNatRule inbound NAT rule of the load balancer. -type InboundNatRule struct { - autorest.Response `json:"-"` - // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. - *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for InboundNatRule. -func (inr InboundNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if inr.InboundNatRulePropertiesFormat != nil { - objectMap["properties"] = inr.InboundNatRulePropertiesFormat - } - if inr.Name != nil { - objectMap["name"] = inr.Name - } - if inr.Etag != nil { - objectMap["etag"] = inr.Etag - } - if inr.ID != nil { - objectMap["id"] = inr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. -func (inr *InboundNatRule) 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 inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat - err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) - if err != nil { - return err - } - inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - inr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - inr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - inr.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - inr.ID = &ID - } - } - } - - return nil -} - -// InboundNatRuleListResult response for ListInboundNatRule API service call. -type InboundNatRuleListResult struct { - autorest.Response `json:"-"` - // Value - A list of inbound nat rules in a load balancer. - Value *[]InboundNatRule `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page InboundNatRuleListResultPage -} - -// 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 *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.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 *InboundNatRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InboundNatRuleListResultIterator) 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 InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { - 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 InboundNatRuleListResultIterator) Value() InboundNatRule { - if !iter.page.NotDone() { - return InboundNatRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InboundNatRuleListResultIterator type. -func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator { - return InboundNatRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(inrlr.NextLink))) -} - -// InboundNatRuleListResultPage contains a page of InboundNatRule values. -type InboundNatRuleListResultPage struct { - fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error) - inrlr InboundNatRuleListResult -} - -// 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 *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.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.inrlr) - if err != nil { - return err - } - page.inrlr = 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 *InboundNatRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InboundNatRuleListResultPage) NotDone() bool { - return !page.inrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { - return page.inrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InboundNatRuleListResultPage) Values() []InboundNatRule { - if page.inrlr.IsEmpty() { - return nil - } - return *page.inrlr.Value -} - -// Creates a new instance of the InboundNatRuleListResultPage type. -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. -type InboundNatRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. - BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if inrpf.ProvisioningState != nil { - objectMap["provisioningState"] = inrpf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InboundNatRulesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InboundNatRulesClient) (InboundNatRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result. -func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - inr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { - inr, err = client.CreateOrUpdateResponder(inr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") - } - } - return -} - -// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InboundNatRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InboundNatRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InboundNatRulesDeleteFuture.Result. -func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// IntentPolicy network Intent Policy resource. -type IntentPolicy struct { - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for IntentPolicy. -func (IP IntentPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if IP.Etag != nil { - objectMap["etag"] = IP.Etag - } - if IP.ID != nil { - objectMap["id"] = IP.ID - } - if IP.Location != nil { - objectMap["location"] = IP.Location - } - if IP.Tags != nil { - objectMap["tags"] = IP.Tags - } - return json.Marshal(objectMap) -} - -// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. -type IntentPolicyConfiguration struct { - // NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription. - NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` - // SourceNetworkIntentPolicy - Source network intent policy. - SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` -} - -// Interface a network interface in a resource group. -type Interface struct { - autorest.Response `json:"-"` - // InterfacePropertiesFormat - Properties of the network interface. - *InterfacePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for Interface. -func (i Interface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if i.InterfacePropertiesFormat != nil { - objectMap["properties"] = i.InterfacePropertiesFormat - } - if i.Etag != nil { - objectMap["etag"] = i.Etag - } - if i.ID != nil { - objectMap["id"] = i.ID - } - if i.Location != nil { - objectMap["location"] = i.Location - } - if i.Tags != nil { - objectMap["tags"] = i.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Interface struct. -func (i *Interface) 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 interfacePropertiesFormat InterfacePropertiesFormat - err = json.Unmarshal(*v, &interfacePropertiesFormat) - if err != nil { - return err - } - i.InterfacePropertiesFormat = &interfacePropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - i.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - i.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - i.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - i.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - i.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - i.Tags = tags - } - } - } - - return nil -} - -// InterfaceAssociation network interface and its custom security rules. -type InterfaceAssociation struct { - // ID - READ-ONLY; Network interface ID. - ID *string `json:"id,omitempty"` - // SecurityRules - Collection of custom security rules. - 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. - DNSServers *[]string `json:"dnsServers,omitempty"` - // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. - AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` - // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. - InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` - // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. - InternalFqdn *string `json:"internalFqdn,omitempty"` - // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` -} - -// InterfaceIPConfiguration iPConfiguration in a network interface. -type InterfaceIPConfiguration struct { - autorest.Response `json:"-"` - // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. - *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. -func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iic.InterfaceIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat - } - if iic.Name != nil { - objectMap["name"] = iic.Name - } - if iic.Etag != nil { - objectMap["etag"] = iic.Etag - } - if iic.ID != nil { - objectMap["id"] = iic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. -func (iic *InterfaceIPConfiguration) 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 interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) - if err != nil { - return err - } - iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - iic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iic.ID = &ID - } - } - } - - return nil -} - -// InterfaceIPConfigurationListResult response for list ip configurations API service call. -type InterfaceIPConfigurationListResult struct { - autorest.Response `json:"-"` - // Value - A list of ip configurations. - Value *[]InterfaceIPConfiguration `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page InterfaceIPConfigurationListResultPage -} - -// 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 *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.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 *InterfaceIPConfigurationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceIPConfigurationListResultIterator) 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 InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { - 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 InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { - if !iter.page.NotDone() { - return InterfaceIPConfiguration{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InterfaceIPConfigurationListResultIterator type. -func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator { - return InterfaceIPConfigurationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iiclr.NextLink))) -} - -// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. -type InterfaceIPConfigurationListResultPage struct { - fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) - iiclr InterfaceIPConfigurationListResult -} - -// 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 *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.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.iiclr) - if err != nil { - return err - } - page.iiclr = 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 *InterfaceIPConfigurationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceIPConfigurationListResultPage) NotDone() bool { - return !page.iiclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { - return page.iiclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { - if page.iiclr.IsEmpty() { - return nil - } - return *page.iiclr.Value -} - -// Creates a new instance of the InterfaceIPConfigurationListResultPage type. -func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { - return InterfaceIPConfigurationListResultPage{ - fn: getNextPage, - iiclr: cur, - } -} - -// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. -type InterfaceIPConfigurationPropertiesFormat struct { - // VirtualNetworkTaps - The reference to Virtual Network Taps. - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` - // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - // PrivateIPAddress - Private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // Subnet - Subnet bound to the IP configuration. - Subnet *Subnet `json:"subnet,omitempty"` - // Primary - Gets whether this is a primary customer address on the network interface. - Primary *bool `json:"primary,omitempty"` - // PublicIPAddress - Public IP address bound to the IP configuration. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// InterfaceListResult response for the ListNetworkInterface API service call. -type InterfaceListResult struct { - autorest.Response `json:"-"` - // Value - A list of network interfaces in a resource group. - Value *[]Interface `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page InterfaceListResultPage -} - -// 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 *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.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 *InterfaceListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceListResultIterator) 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 InterfaceListResultIterator) Response() InterfaceListResult { - 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 InterfaceListResultIterator) Value() Interface { - if !iter.page.NotDone() { - return Interface{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InterfaceListResultIterator type. -func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { - return InterfaceListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ilr.NextLink))) -} - -// InterfaceListResultPage contains a page of Interface values. -type InterfaceListResultPage struct { - fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) - ilr InterfaceListResult -} - -// 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 *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.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.ilr) - if err != nil { - return err - } - page.ilr = 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 *InterfaceListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceListResultPage) NotDone() bool { - return !page.ilr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InterfaceListResultPage) Response() InterfaceListResult { - return page.ilr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceListResultPage) Values() []Interface { - if page.ilr.IsEmpty() { - return nil - } - return *page.ilr.Value -} - -// Creates a new instance of the InterfaceListResultPage type. -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. -type InterfaceLoadBalancerListResult struct { - autorest.Response `json:"-"` - // Value - A list of load balancers. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page InterfaceLoadBalancerListResultPage -} - -// 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 *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.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 *InterfaceLoadBalancerListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceLoadBalancerListResultIterator) 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 InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { - 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 InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { - if !iter.page.NotDone() { - return LoadBalancer{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InterfaceLoadBalancerListResultIterator type. -func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator { - return InterfaceLoadBalancerListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ilblr.NextLink))) -} - -// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. -type InterfaceLoadBalancerListResultPage struct { - fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) - ilblr InterfaceLoadBalancerListResult -} - -// 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 *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.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.ilblr) - if err != nil { - return err - } - page.ilblr = 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 *InterfaceLoadBalancerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceLoadBalancerListResultPage) NotDone() bool { - return !page.ilblr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { - return page.ilblr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { - if page.ilblr.IsEmpty() { - return nil - } - return *page.ilblr.Value -} - -// Creates a new instance of the InterfaceLoadBalancerListResultPage type. -func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { - return InterfaceLoadBalancerListResultPage{ - fn: getNextPage, - ilblr: cur, - } -} - -// InterfacePropertiesFormat networkInterface properties. -type InterfacePropertiesFormat struct { - // VirtualMachine - READ-ONLY; The reference of a virtual machine. - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - // PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - // IPConfigurations - A list of IPConfigurations of the network interface. - IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // TapConfigurations - A list of TapConfigurations of the network interface. - TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - // DNSSettings - The DNS settings in network interface. - DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` - // MacAddress - The MAC address of the network interface. - MacAddress *string `json:"macAddress,omitempty"` - // Primary - Gets whether this is a primary network interface on a virtual machine. - Primary *bool `json:"primary,omitempty"` - // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources. - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - // ResourceGUID - The resource GUID property of the network interface resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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.TapConfigurations != nil { - objectMap["tapConfigurations"] = ipf.TapConfigurations - } - if ipf.DNSSettings != nil { - objectMap["dnsSettings"] = ipf.DNSSettings - } - if ipf.MacAddress != nil { - objectMap["macAddress"] = ipf.MacAddress - } - if ipf.Primary != nil { - objectMap["primary"] = ipf.Primary - } - if ipf.EnableAcceleratedNetworking != nil { - objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking - } - if ipf.EnableIPForwarding != nil { - objectMap["enableIPForwarding"] = ipf.EnableIPForwarding - } - if ipf.ResourceGUID != nil { - objectMap["resourceGuid"] = ipf.ResourceGUID - } - if ipf.ProvisioningState != nil { - objectMap["provisioningState"] = ipf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfacesClient) (Interface, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfacesCreateOrUpdateFuture.Result. -func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - i.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.CreateOrUpdateResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfacesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfacesDeleteFuture.Result. -func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesGetEffectiveRouteTableFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfacesClient) (EffectiveRouteListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result. -func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - erlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { - erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result. -func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ensglr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { - ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfacesClient) (Interface, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfacesUpdateTagsFuture.Result. -func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - i.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.UpdateTagsResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfaceTapConfiguration tap configuration in a Network Interface. -type InterfaceTapConfiguration struct { - autorest.Response `json:"-"` - // InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration. - *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for InterfaceTapConfiguration. -func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if itc.InterfaceTapConfigurationPropertiesFormat != nil { - objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat - } - if itc.Name != nil { - objectMap["name"] = itc.Name - } - if itc.Etag != nil { - objectMap["etag"] = itc.Etag - } - if itc.ID != nil { - objectMap["id"] = itc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct. -func (itc *InterfaceTapConfiguration) 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 interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat - err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat) - if err != nil { - return err - } - itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - itc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - itc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - itc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - itc.ID = &ID - } - } - } - - return nil -} - -// InterfaceTapConfigurationListResult response for list tap configurations API service call. -type InterfaceTapConfigurationListResult struct { - autorest.Response `json:"-"` - // Value - A list of tap configurations. - Value *[]InterfaceTapConfiguration `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page InterfaceTapConfigurationListResultPage -} - -// 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 *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.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 *InterfaceTapConfigurationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceTapConfigurationListResultIterator) 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 InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult { - 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 InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration { - if !iter.page.NotDone() { - return InterfaceTapConfiguration{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the InterfaceTapConfigurationListResultIterator type. -func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator { - return InterfaceTapConfigurationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(itclr.NextLink))) -} - -// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values. -type InterfaceTapConfigurationListResultPage struct { - fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error) - itclr InterfaceTapConfigurationListResult -} - -// 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 *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.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.itclr) - if err != nil { - return err - } - page.itclr = 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 *InterfaceTapConfigurationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceTapConfigurationListResultPage) NotDone() bool { - return !page.itclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult { - return page.itclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration { - if page.itclr.IsEmpty() { - return nil - } - return *page.itclr.Value -} - -// Creates a new instance of the InterfaceTapConfigurationListResultPage type. -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. -type InterfaceTapConfigurationPropertiesFormat struct { - // VirtualNetworkTap - The reference of the Virtual Network Tap resource. - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result. -func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - itc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent { - itc, err = client.CreateOrUpdateResponder(itc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfaceTapConfigurationsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(InterfaceTapConfigurationsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result. -func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call. -type IPAddressAvailabilityResult struct { - autorest.Response `json:"-"` - // Available - Private IP address availability. - Available *bool `json:"available,omitempty"` - // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. - AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` -} - -// IPConfiguration IP configuration. -type IPConfiguration struct { - // IPConfigurationPropertiesFormat - Properties of the IP configuration. - *IPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for IPConfiguration. -func (ic IPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ic.IPConfigurationPropertiesFormat != nil { - objectMap["properties"] = ic.IPConfigurationPropertiesFormat - } - if ic.Name != nil { - objectMap["name"] = ic.Name - } - if ic.Etag != nil { - objectMap["etag"] = ic.Etag - } - if ic.ID != nil { - objectMap["id"] = ic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. -func (ic *IPConfiguration) 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 IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) - if err != nil { - return err - } - ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ic.ID = &ID - } - } - } - - return nil -} - -// IPConfigurationProfile IP configuration profile child resource. -type IPConfigurationProfile struct { - // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile. - *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for IPConfigurationProfile. -func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if icp.IPConfigurationProfilePropertiesFormat != nil { - objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat - } - if icp.Name != nil { - objectMap["name"] = icp.Name - } - if icp.Etag != nil { - objectMap["etag"] = icp.Etag - } - if icp.ID != nil { - objectMap["id"] = icp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct. -func (icp *IPConfigurationProfile) 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 IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat - err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat) - if err != nil { - return err - } - icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - icp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - icp.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - icp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - icp.ID = &ID - } - } - } - - return nil -} - -// IPConfigurationProfilePropertiesFormat IP configuration profile properties. -type IPConfigurationProfilePropertiesFormat struct { - // Subnet - The reference of the subnet resource to create a container network interface ip configuration. - Subnet *Subnet `json:"subnet,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `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. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection. -type IpsecPolicy struct { - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` -} - -// IPTag contains the IpTag associated with the object. -type IPTag struct { - // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc. - Tag *string `json:"tag,omitempty"` -} - -// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. -type Ipv6ExpressRouteCircuitPeeringConfig struct { - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *SubResource `json:"routeFilter,omitempty"` - // State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' - State ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} - -// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get -// the next set of results. -type ListHubVirtualNetworkConnectionsResult struct { - autorest.Response `json:"-"` - // Value - List of HubVirtualNetworkConnections. - Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of -// HubVirtualNetworkConnection values. -type ListHubVirtualNetworkConnectionsResultIterator struct { - i int - page ListHubVirtualNetworkConnectionsResultPage -} - -// 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 *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.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 *ListHubVirtualNetworkConnectionsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListHubVirtualNetworkConnectionsResultIterator) 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 ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult { - 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 ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection { - if !iter.page.NotDone() { - return HubVirtualNetworkConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type. -func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator { - return ListHubVirtualNetworkConnectionsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lhvncr.NextLink))) -} - -// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values. -type ListHubVirtualNetworkConnectionsResultPage struct { - fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error) - lhvncr ListHubVirtualNetworkConnectionsResult -} - -// 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 *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.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.lhvncr) - if err != nil { - return err - } - page.lhvncr = 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 *ListHubVirtualNetworkConnectionsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool { - return !page.lhvncr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult { - return page.lhvncr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection { - if page.lhvncr.IsEmpty() { - return nil - } - return *page.lhvncr.Value -} - -// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type. -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 -// P2SVpnGateways and a URL nextLink to get the next set of results. -type ListP2SVpnGatewaysResult struct { - autorest.Response `json:"-"` - // Value - List of P2SVpnGateways. - Value *[]P2SVpnGateway `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values. -type ListP2SVpnGatewaysResultIterator struct { - i int - page ListP2SVpnGatewaysResultPage -} - -// 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 *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.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 *ListP2SVpnGatewaysResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListP2SVpnGatewaysResultIterator) 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 ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult { - 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 ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway { - if !iter.page.NotDone() { - return P2SVpnGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListP2SVpnGatewaysResultIterator type. -func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator { - return ListP2SVpnGatewaysResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lpvgr.NextLink))) -} - -// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values. -type ListP2SVpnGatewaysResultPage struct { - fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error) - lpvgr ListP2SVpnGatewaysResult -} - -// 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 *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.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.lpvgr) - if err != nil { - return err - } - page.lpvgr = 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 *ListP2SVpnGatewaysResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListP2SVpnGatewaysResultPage) NotDone() bool { - return !page.lpvgr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult { - return page.lpvgr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway { - if page.lpvgr.IsEmpty() { - return nil - } - return *page.lpvgr.Value -} - -// Creates a new instance of the ListP2SVpnGatewaysResultPage type. -func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { - return ListP2SVpnGatewaysResultPage{ - fn: getNextPage, - lpvgr: cur, - } -} - -// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations -// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get -// the next set of results. -type ListP2SVpnServerConfigurationsResult struct { - autorest.Response `json:"-"` - // Value - List of P2SVpnServerConfigurations. - Value *[]P2SVpnServerConfiguration `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of -// P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultIterator struct { - i int - page ListP2SVpnServerConfigurationsResultPage -} - -// 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 *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.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 *ListP2SVpnServerConfigurationsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListP2SVpnServerConfigurationsResultIterator) 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 ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult { - 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 ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration { - if !iter.page.NotDone() { - return P2SVpnServerConfiguration{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type. -func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator { - return ListP2SVpnServerConfigurationsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool { - return lpvscr.Value == nil || len(*lpvscr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool { - return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0 -} - -// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { - if !lpvscr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lpvscr.NextLink))) -} - -// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultPage struct { - fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error) - lpvscr ListP2SVpnServerConfigurationsResult -} - -// 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 *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.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.lpvscr) - if err != nil { - return err - } - page.lpvscr = 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 *ListP2SVpnServerConfigurationsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool { - return !page.lpvscr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult { - return page.lpvscr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration { - if page.lpvscr.IsEmpty() { - return nil - } - return *page.lpvscr.Value -} - -// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type. -func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage { - return ListP2SVpnServerConfigurationsResultPage{ - fn: getNextPage, - lpvscr: cur, - } -} - -// ListString ... -type ListString struct { - autorest.Response `json:"-"` - Value *[]string `json:"value,omitempty"` -} - -// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a -// URL nextLink to get the next set of results. -type ListVirtualHubsResult struct { - autorest.Response `json:"-"` - // Value - List of VirtualHubs. - Value *[]VirtualHub `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values. -type ListVirtualHubsResultIterator struct { - i int - page ListVirtualHubsResultPage -} - -// 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 *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.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 *ListVirtualHubsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVirtualHubsResultIterator) 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 ListVirtualHubsResultIterator) Response() ListVirtualHubsResult { - 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 ListVirtualHubsResultIterator) Value() VirtualHub { - if !iter.page.NotDone() { - return VirtualHub{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVirtualHubsResultIterator type. -func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator { - return ListVirtualHubsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvhr.NextLink))) -} - -// ListVirtualHubsResultPage contains a page of VirtualHub values. -type ListVirtualHubsResultPage struct { - fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error) - lvhr ListVirtualHubsResult -} - -// 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 *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.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.lvhr) - if err != nil { - return err - } - page.lvhr = 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 *ListVirtualHubsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVirtualHubsResultPage) NotDone() bool { - return !page.lvhr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult { - return page.lvhr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVirtualHubsResultPage) Values() []VirtualHub { - if page.lvhr.IsEmpty() { - return nil - } - return *page.lvhr.Value -} - -// Creates a new instance of the ListVirtualHubsResultPage type. -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 -// URL nextLink to get the next set of results. -type ListVirtualWANsResult struct { - autorest.Response `json:"-"` - // Value - List of VirtualWANs. - Value *[]VirtualWAN `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values. -type ListVirtualWANsResultIterator struct { - i int - page ListVirtualWANsResultPage -} - -// 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 *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.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 *ListVirtualWANsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVirtualWANsResultIterator) 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 ListVirtualWANsResultIterator) Response() ListVirtualWANsResult { - 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 ListVirtualWANsResultIterator) Value() VirtualWAN { - if !iter.page.NotDone() { - return VirtualWAN{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVirtualWANsResultIterator type. -func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator { - return ListVirtualWANsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvwnr.NextLink))) -} - -// ListVirtualWANsResultPage contains a page of VirtualWAN values. -type ListVirtualWANsResultPage struct { - fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error) - lvwnr ListVirtualWANsResult -} - -// 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 *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.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.lvwnr) - if err != nil { - return err - } - page.lvwnr = 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 *ListVirtualWANsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVirtualWANsResultPage) NotDone() bool { - return !page.lvwnr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult { - return page.lvwnr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVirtualWANsResultPage) Values() []VirtualWAN { - if page.lvwnr.IsEmpty() { - return nil - } - return *page.lvwnr.Value -} - -// Creates a new instance of the ListVirtualWANsResultPage type. -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. -// It contains a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVpnConnectionsResult struct { - autorest.Response `json:"-"` - // Value - List of Vpn Connections. - Value *[]VpnConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values. -type ListVpnConnectionsResultIterator struct { - i int - page ListVpnConnectionsResultPage -} - -// 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 *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.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 *ListVpnConnectionsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnConnectionsResultIterator) 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 ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult { - 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 ListVpnConnectionsResultIterator) Value() VpnConnection { - if !iter.page.NotDone() { - return VpnConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVpnConnectionsResultIterator type. -func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator { - return ListVpnConnectionsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvcr.NextLink))) -} - -// ListVpnConnectionsResultPage contains a page of VpnConnection values. -type ListVpnConnectionsResultPage struct { - fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error) - lvcr ListVpnConnectionsResult -} - -// 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 *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.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.lvcr) - if err != nil { - return err - } - page.lvcr = 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 *ListVpnConnectionsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnConnectionsResultPage) NotDone() bool { - return !page.lvcr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult { - return page.lvcr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnConnectionsResultPage) Values() []VpnConnection { - if page.lvcr.IsEmpty() { - return nil - } - return *page.lvcr.Value -} - -// Creates a new instance of the ListVpnConnectionsResultPage type. -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 -// URL nextLink to get the next set of results. -type ListVpnGatewaysResult struct { - autorest.Response `json:"-"` - // Value - List of VpnGateways. - Value *[]VpnGateway `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values. -type ListVpnGatewaysResultIterator struct { - i int - page ListVpnGatewaysResultPage -} - -// 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 *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.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 *ListVpnGatewaysResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnGatewaysResultIterator) 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 ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult { - 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 ListVpnGatewaysResultIterator) Value() VpnGateway { - if !iter.page.NotDone() { - return VpnGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVpnGatewaysResultIterator type. -func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator { - return ListVpnGatewaysResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvgr.NextLink))) -} - -// ListVpnGatewaysResultPage contains a page of VpnGateway values. -type ListVpnGatewaysResultPage struct { - fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error) - lvgr ListVpnGatewaysResult -} - -// 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 *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.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.lvgr) - if err != nil { - return err - } - page.lvgr = 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 *ListVpnGatewaysResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnGatewaysResultPage) NotDone() bool { - return !page.lvgr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult { - return page.lvgr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnGatewaysResultPage) Values() []VpnGateway { - if page.lvgr.IsEmpty() { - return nil - } - return *page.lvgr.Value -} - -// Creates a new instance of the ListVpnGatewaysResultPage type. -func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { - return ListVpnGatewaysResultPage{ - fn: getNextPage, - lvgr: cur, - } -} - -// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn -// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVpnSiteLinkConnectionsResult struct { - autorest.Response `json:"-"` - // Value - List of VpnSiteLinkConnections. - Value *[]VpnSiteLinkConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection -// values. -type ListVpnSiteLinkConnectionsResultIterator struct { - i int - page ListVpnSiteLinkConnectionsResultPage -} - -// 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 *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.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 *ListVpnSiteLinkConnectionsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnSiteLinkConnectionsResultIterator) 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 ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult { - 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 ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection { - if !iter.page.NotDone() { - return VpnSiteLinkConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type. -func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator { - return ListVpnSiteLinkConnectionsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvslcr.NextLink))) -} - -// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values. -type ListVpnSiteLinkConnectionsResultPage struct { - fn func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error) - lvslcr ListVpnSiteLinkConnectionsResult -} - -// 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 *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.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.lvslcr) - if err != nil { - return err - } - page.lvslcr = 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 *ListVpnSiteLinkConnectionsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool { - return !page.lvslcr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult { - return page.lvslcr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection { - if page.lvslcr.IsEmpty() { - return nil - } - return *page.lvslcr.Value -} - -// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. -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 -// and a URL nextLink to get the next set of results. -type ListVpnSiteLinksResult struct { - autorest.Response `json:"-"` - // Value - List of VpnSitesLinks. - Value *[]VpnSiteLink `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values. -type ListVpnSiteLinksResultIterator struct { - i int - page ListVpnSiteLinksResultPage -} - -// 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 *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.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 *ListVpnSiteLinksResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnSiteLinksResultIterator) 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 ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult { - 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 ListVpnSiteLinksResultIterator) Value() VpnSiteLink { - if !iter.page.NotDone() { - return VpnSiteLink{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVpnSiteLinksResultIterator type. -func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator { - return ListVpnSiteLinksResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvslr.NextLink))) -} - -// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values. -type ListVpnSiteLinksResultPage struct { - fn func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error) - lvslr ListVpnSiteLinksResult -} - -// 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 *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.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.lvslr) - if err != nil { - return err - } - page.lvslr = 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 *ListVpnSiteLinksResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnSiteLinksResultPage) NotDone() bool { - return !page.lvslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult { - return page.lvslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink { - if page.lvslr.IsEmpty() { - return nil - } - return *page.lvslr.Value -} - -// Creates a new instance of the ListVpnSiteLinksResultPage type. -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 -// nextLink to get the next set of results. -type ListVpnSitesResult struct { - autorest.Response `json:"-"` - // Value - List of VpnSites. - Value *[]VpnSite `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values. -type ListVpnSitesResultIterator struct { - i int - page ListVpnSitesResultPage -} - -// 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 *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.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 *ListVpnSitesResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnSitesResultIterator) 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 ListVpnSitesResultIterator) Response() ListVpnSitesResult { - 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 ListVpnSitesResultIterator) Value() VpnSite { - if !iter.page.NotDone() { - return VpnSite{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListVpnSitesResultIterator type. -func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator { - return ListVpnSitesResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lvsr.NextLink))) -} - -// ListVpnSitesResultPage contains a page of VpnSite values. -type ListVpnSitesResultPage struct { - fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error) - lvsr ListVpnSitesResult -} - -// 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 *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.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.lvsr) - if err != nil { - return err - } - page.lvsr = 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 *ListVpnSitesResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnSitesResultPage) NotDone() bool { - return !page.lvsr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListVpnSitesResultPage) Response() ListVpnSitesResult { - return page.lvsr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnSitesResultPage) Values() []VpnSite { - if page.lvsr.IsEmpty() { - return nil - } - return *page.lvsr.Value -} - -// Creates a new instance of the ListVpnSitesResultPage type. -func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { - return ListVpnSitesResultPage{ - fn: getNextPage, - lvsr: cur, - } -} - -// LoadBalancer loadBalancer resource. -type LoadBalancer struct { - autorest.Response `json:"-"` - // Sku - The load balancer SKU. - Sku *LoadBalancerSku `json:"sku,omitempty"` - // LoadBalancerPropertiesFormat - Properties of load balancer. - *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for LoadBalancer. -func (lb LoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lb.Sku != nil { - objectMap["sku"] = lb.Sku - } - if lb.LoadBalancerPropertiesFormat != nil { - objectMap["properties"] = lb.LoadBalancerPropertiesFormat - } - if lb.Etag != nil { - objectMap["etag"] = lb.Etag - } - if lb.ID != nil { - objectMap["id"] = lb.ID - } - if lb.Location != nil { - objectMap["location"] = lb.Location - } - if lb.Tags != nil { - objectMap["tags"] = lb.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. -func (lb *LoadBalancer) 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 "sku": - if v != nil { - var sku LoadBalancerSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - lb.Sku = &sku - } - case "properties": - if v != nil { - var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat - err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) - if err != nil { - return err - } - lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lb.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lb.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lb.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lb.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - lb.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - lb.Tags = tags - } - } - } - - return nil -} - -// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. -type LoadBalancerBackendAddressPoolListResult struct { - autorest.Response `json:"-"` - // Value - A list of backend address pools in a load balancer. - Value *[]BackendAddressPool `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page LoadBalancerBackendAddressPoolListResultPage -} - -// 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 *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { - 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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { - if !iter.page.NotDone() { - return BackendAddressPool{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type. -func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator { - return LoadBalancerBackendAddressPoolListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbbaplr.NextLink))) -} - -// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. -type LoadBalancerBackendAddressPoolListResultPage struct { - fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) - lbbaplr LoadBalancerBackendAddressPoolListResult -} - -// 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 *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.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.lbbaplr) - if err != nil { - return err - } - page.lbbaplr = 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 *LoadBalancerBackendAddressPoolListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { - return !page.lbbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { - return page.lbbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { - if page.lbbaplr.IsEmpty() { - return nil - } - return *page.lbbaplr.Value -} - -// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. -func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { - return LoadBalancerBackendAddressPoolListResultPage{ - fn: getNextPage, - lbbaplr: cur, - } -} - -// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. -type LoadBalancerFrontendIPConfigurationListResult struct { - autorest.Response `json:"-"` - // Value - A list of frontend IP configurations in a load balancer. - Value *[]FrontendIPConfiguration `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page LoadBalancerFrontendIPConfigurationListResultPage -} - -// 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 *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.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 *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { - 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 LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { - if !iter.page.NotDone() { - return FrontendIPConfiguration{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type. -func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator { - return LoadBalancerFrontendIPConfigurationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbficlr.NextLink))) -} - -// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. -type LoadBalancerFrontendIPConfigurationListResultPage struct { - fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) - lbficlr LoadBalancerFrontendIPConfigurationListResult -} - -// 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 *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.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.lbficlr) - if err != nil { - return err - } - page.lbficlr = 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 *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { - return !page.lbficlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { - return page.lbficlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { - if page.lbficlr.IsEmpty() { - return nil - } - return *page.lbficlr.Value -} - -// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. -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. -type LoadBalancerListResult struct { - autorest.Response `json:"-"` - // Value - A list of load balancers in a resource group. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page LoadBalancerListResultPage -} - -// 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 *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.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 *LoadBalancerListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerListResultIterator) 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 LoadBalancerListResultIterator) Response() LoadBalancerListResult { - 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 LoadBalancerListResultIterator) Value() LoadBalancer { - if !iter.page.NotDone() { - return LoadBalancer{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerListResultIterator type. -func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { - return LoadBalancerListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lblr.NextLink))) -} - -// LoadBalancerListResultPage contains a page of LoadBalancer values. -type LoadBalancerListResultPage struct { - fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) - lblr LoadBalancerListResult -} - -// 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 *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.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.lblr) - if err != nil { - return err - } - page.lblr = 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 *LoadBalancerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerListResultPage) NotDone() bool { - return !page.lblr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { - return page.lblr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerListResultPage) Values() []LoadBalancer { - if page.lblr.IsEmpty() { - return nil - } - return *page.lblr.Value -} - -// Creates a new instance of the LoadBalancerListResultPage type. -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. -type LoadBalancerLoadBalancingRuleListResult struct { - autorest.Response `json:"-"` - // Value - A list of load balancing rules in a load balancer. - Value *[]LoadBalancingRule `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page LoadBalancerLoadBalancingRuleListResultPage -} - -// 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 *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.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 *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerLoadBalancingRuleListResultIterator) 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 LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { - 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 LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { - if !iter.page.NotDone() { - return LoadBalancingRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type. -func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator { - return LoadBalancerLoadBalancingRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lblbrlr.NextLink))) -} - -// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. -type LoadBalancerLoadBalancingRuleListResultPage struct { - fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) - lblbrlr LoadBalancerLoadBalancingRuleListResult -} - -// 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 *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.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.lblbrlr) - if err != nil { - return err - } - page.lblbrlr = 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 *LoadBalancerLoadBalancingRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { - return !page.lblbrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { - return page.lblbrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { - if page.lblbrlr.IsEmpty() { - return nil - } - return *page.lblbrlr.Value -} - -// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. -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. -type LoadBalancerOutboundRuleListResult struct { - autorest.Response `json:"-"` - // Value - A list of outbound rules in a load balancer. - Value *[]OutboundRule `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page LoadBalancerOutboundRuleListResultPage -} - -// 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 *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.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 *LoadBalancerOutboundRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerOutboundRuleListResultIterator) 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 LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult { - 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 LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule { - if !iter.page.NotDone() { - return OutboundRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type. -func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator { - return LoadBalancerOutboundRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lborlr.NextLink))) -} - -// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values. -type LoadBalancerOutboundRuleListResultPage struct { - fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error) - lborlr LoadBalancerOutboundRuleListResult -} - -// 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 *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.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.lborlr) - if err != nil { - return err - } - page.lborlr = 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 *LoadBalancerOutboundRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool { - return !page.lborlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult { - return page.lborlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule { - if page.lborlr.IsEmpty() { - return nil - } - return *page.lborlr.Value -} - -// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type. -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. -type LoadBalancerProbeListResult struct { - autorest.Response `json:"-"` - // Value - A list of probes in a load balancer. - Value *[]Probe `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page LoadBalancerProbeListResultPage -} - -// 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 *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.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 *LoadBalancerProbeListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerProbeListResultIterator) 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 LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { - 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 LoadBalancerProbeListResultIterator) Value() Probe { - if !iter.page.NotDone() { - return Probe{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerProbeListResultIterator type. -func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator { - return LoadBalancerProbeListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbplr.NextLink))) -} - -// LoadBalancerProbeListResultPage contains a page of Probe values. -type LoadBalancerProbeListResultPage struct { - fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) - lbplr LoadBalancerProbeListResult -} - -// 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 *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.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.lbplr) - if err != nil { - return err - } - page.lbplr = 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 *LoadBalancerProbeListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerProbeListResultPage) NotDone() bool { - return !page.lbplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { - return page.lbplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerProbeListResultPage) Values() []Probe { - if page.lbplr.IsEmpty() { - return nil - } - return *page.lbplr.Value -} - -// Creates a new instance of the LoadBalancerProbeListResultPage type. -func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { - return LoadBalancerProbeListResultPage{ - fn: getNextPage, - lbplr: cur, - } -} - -// LoadBalancerPropertiesFormat properties of the load balancer. -type LoadBalancerPropertiesFormat struct { - // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer. - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPools - Collection of backend address pools used by a load balancer. - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning. - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - // Probes - Collection of probe objects used in the load balancer. - Probes *[]Probe `json:"probes,omitempty"` - // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - // OutboundRules - The outbound rules. - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - // ResourceGUID - The resource GUID property of the load balancer resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LoadBalancersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LoadBalancersClient) (LoadBalancer, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result. -func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - lb.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.CreateOrUpdateResponder(lb.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") - } - } - return -} - -// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LoadBalancersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LoadBalancersDeleteFuture.Result. -func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// LoadBalancerSku SKU of a load balancer. -type LoadBalancerSku struct { - // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' - Name LoadBalancerSkuName `json:"name,omitempty"` -} - -// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LoadBalancersClient) (LoadBalancer, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LoadBalancersUpdateTagsFuture.Result. -func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - lb.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.UpdateTagsResponder(lb.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") - } - } - return -} - -// LoadBalancingRule a load balancing rule for a load balancer. -type LoadBalancingRule struct { - autorest.Response `json:"-"` - // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. - *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for LoadBalancingRule. -func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lbr.LoadBalancingRulePropertiesFormat != nil { - objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat - } - if lbr.Name != nil { - objectMap["name"] = lbr.Name - } - if lbr.Etag != nil { - objectMap["etag"] = lbr.Etag - } - if lbr.ID != nil { - objectMap["id"] = lbr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. -func (lbr *LoadBalancingRule) 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 loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat - err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) - if err != nil { - return err - } - lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lbr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lbr.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lbr.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lbr.ID = &ID - } - } - } - - return nil -} - -// LoadBalancingRulePropertiesFormat properties of the load balancer. -type LoadBalancingRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // Probe - The reference of the load balancer probe used by the load balancing rule. - Probe *SubResource `json:"probe,omitempty"` - // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol' - LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// LocalNetworkGateway a common class for general resource information. -type LocalNetworkGateway struct { - autorest.Response `json:"-"` - // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. - *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for LocalNetworkGateway. -func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lng.LocalNetworkGatewayPropertiesFormat != nil { - objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat - } - if lng.Etag != nil { - objectMap["etag"] = lng.Etag - } - if lng.ID != nil { - objectMap["id"] = lng.ID - } - if lng.Location != nil { - objectMap["location"] = lng.Location - } - if lng.Tags != nil { - objectMap["tags"] = lng.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. -func (lng *LocalNetworkGateway) 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 localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) - if err != nil { - return err - } - lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lng.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lng.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - lng.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - lng.Tags = tags - } - } - } - - return nil -} - -// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. -type LocalNetworkGatewayListResult struct { - autorest.Response `json:"-"` - // Value - A list of local network gateways that exists in a resource group. - Value *[]LocalNetworkGateway `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page LocalNetworkGatewayListResultPage -} - -// 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 *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.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 *LocalNetworkGatewayListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LocalNetworkGatewayListResultIterator) 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 LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { - 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 LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { - if !iter.page.NotDone() { - return LocalNetworkGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LocalNetworkGatewayListResultIterator type. -func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { - return LocalNetworkGatewayListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lnglr.NextLink))) -} - -// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. -type LocalNetworkGatewayListResultPage struct { - fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) - lnglr LocalNetworkGatewayListResult -} - -// 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 *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.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.lnglr) - if err != nil { - return err - } - page.lnglr = 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 *LocalNetworkGatewayListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LocalNetworkGatewayListResultPage) NotDone() bool { - return !page.lnglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { - return page.lnglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { - if page.lnglr.IsEmpty() { - return nil - } - return *page.lnglr.Value -} - -// Creates a new instance of the LocalNetworkGatewayListResultPage type. -func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { - return LocalNetworkGatewayListResultPage{ - fn: getNextPage, - lnglr: cur, - } -} - -// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties. -type LocalNetworkGatewayPropertiesFormat struct { - // LocalNetworkAddressSpace - Local network site address space. - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - // GatewayIPAddress - IP address of local network gateway. - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - // BgpSettings - Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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.BgpSettings != nil { - objectMap["bgpSettings"] = lngpf.BgpSettings - } - if lngpf.ResourceGUID != nil { - objectMap["resourceGuid"] = lngpf.ResourceGUID - } - return json.Marshal(objectMap) -} - -// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result. -func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - lng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.CreateOrUpdateResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") - } - } - return -} - -// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LocalNetworkGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result. -func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result. -func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - lng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.UpdateTagsResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") - } - } - return -} - -// LogSpecification description of logging specification. -type LogSpecification struct { - // Name - The name of the specification. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the specification. - DisplayName *string `json:"displayName,omitempty"` - // BlobDuration - Duration of the blob. - BlobDuration *string `json:"blobDuration,omitempty"` -} - -// ManagedServiceIdentity identity for the resource. -type ManagedServiceIdentity struct { - // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity. - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty"` - // Type - The type of identity used for the resource. 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 resource. 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]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` -} - -// MarshalJSON is the custom marshaler for ManagedServiceIdentity. -func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msi.Type != "" { - objectMap["type"] = msi.Type - } - if msi.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities - } - return json.Marshal(objectMap) -} - -// ManagedServiceIdentityUserAssignedIdentitiesValue ... -type ManagedServiceIdentityUserAssignedIdentitiesValue 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"` -} - -// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue. -func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// MatchCondition define match conditions. -type MatchCondition struct { - // MatchVariables - List of match variables. - MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"` - // Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex' - Operator WebApplicationFirewallOperator `json:"operator,omitempty"` - // NegationConditon - Describes if this is negate condition or not. - NegationConditon *bool `json:"negationConditon,omitempty"` - // MatchValues - Match value. - MatchValues *[]string `json:"matchValues,omitempty"` - // Transforms - List of transforms. - Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"` -} - -// MatchedRule matched rule. -type MatchedRule struct { - // RuleName - Name of the matched network security rule. - RuleName *string `json:"ruleName,omitempty"` - // Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. - Action *string `json:"action,omitempty"` -} - -// MatchVariable define match variables. -type MatchVariable struct { - // VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies' - VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"` - // Selector - Describes field of the matchVariable collection. - Selector *string `json:"selector,omitempty"` -} - -// MetricSpecification description of metrics specification. -type MetricSpecification struct { - // Name - The name of the metric. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the metric. - DisplayName *string `json:"displayName,omitempty"` - // DisplayDescription - The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - // Unit - Units the metric to be displayed in. - Unit *string `json:"unit,omitempty"` - // AggregationType - The aggregation type. - AggregationType *string `json:"aggregationType,omitempty"` - // Availabilities - List of availability. - Availabilities *[]Availability `json:"availabilities,omitempty"` - // EnableRegionalMdmAccount - Whether regional MDM account enabled. - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - // FillGapWithZero - Whether gaps would be filled with zeros. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - // MetricFilterPattern - Pattern for the filter of the metric. - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - // Dimensions - List of dimensions. - Dimensions *[]Dimension `json:"dimensions,omitempty"` - // IsInternal - Whether the metric is internal. - IsInternal *bool `json:"isInternal,omitempty"` - // SourceMdmAccount - The source MDM account. - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - // SourceMdmNamespace - The source MDM namespace. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - // ResourceIDDimensionNameOverride - The resource Id dimension name override. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` -} - -// NatGateway nat Gateway resource. -type NatGateway struct { - autorest.Response `json:"-"` - // Sku - The nat gateway SKU. - Sku *NatGatewaySku `json:"sku,omitempty"` - // NatGatewayPropertiesFormat - Nat Gateway properties. - *NatGatewayPropertiesFormat `json:"properties,omitempty"` - // Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed. - Zones *[]string `json:"zones,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for NatGateway. -func (ng NatGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ng.Sku != nil { - objectMap["sku"] = ng.Sku - } - if ng.NatGatewayPropertiesFormat != nil { - objectMap["properties"] = ng.NatGatewayPropertiesFormat - } - if ng.Zones != nil { - objectMap["zones"] = ng.Zones - } - if ng.Etag != nil { - objectMap["etag"] = ng.Etag - } - if ng.ID != nil { - objectMap["id"] = ng.ID - } - if ng.Location != nil { - objectMap["location"] = ng.Location - } - if ng.Tags != nil { - objectMap["tags"] = ng.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for NatGateway struct. -func (ng *NatGateway) 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 "sku": - if v != nil { - var sku NatGatewaySku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - ng.Sku = &sku - } - case "properties": - if v != nil { - var natGatewayPropertiesFormat NatGatewayPropertiesFormat - err = json.Unmarshal(*v, &natGatewayPropertiesFormat) - if err != nil { - return err - } - ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - ng.Zones = &zones - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ng.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ng.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ng.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ng.Tags = tags - } - } - } - - return nil -} - -// NatGatewayListResult response for ListNatGateways API service call. -type NatGatewayListResult struct { - autorest.Response `json:"-"` - // Value - A list of Nat Gateways that exists in a resource group. - Value *[]NatGateway `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// NatGatewayListResultIterator provides access to a complete listing of NatGateway values. -type NatGatewayListResultIterator struct { - i int - page NatGatewayListResultPage -} - -// 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 *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.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 *NatGatewayListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter NatGatewayListResultIterator) 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 NatGatewayListResultIterator) Response() NatGatewayListResult { - 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 NatGatewayListResultIterator) Value() NatGateway { - if !iter.page.NotDone() { - return NatGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the NatGatewayListResultIterator type. -func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator { - return NatGatewayListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(nglr.NextLink))) -} - -// NatGatewayListResultPage contains a page of NatGateway values. -type NatGatewayListResultPage struct { - fn func(context.Context, NatGatewayListResult) (NatGatewayListResult, error) - nglr NatGatewayListResult -} - -// 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 *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.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.nglr) - if err != nil { - return err - } - page.nglr = 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 *NatGatewayListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page NatGatewayListResultPage) NotDone() bool { - return !page.nglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page NatGatewayListResultPage) Response() NatGatewayListResult { - return page.nglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page NatGatewayListResultPage) Values() []NatGateway { - if page.nglr.IsEmpty() { - return nil - } - return *page.nglr.Value -} - -// Creates a new instance of the NatGatewayListResultPage type. -func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { - return NatGatewayListResultPage{ - fn: getNextPage, - nglr: cur, - } -} - -// NatGatewayPropertiesFormat nat Gateway properties. -type NatGatewayPropertiesFormat struct { - // IdleTimeoutInMinutes - The idle timeout of the nat gateway. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource. - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - // PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource. - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - // Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource. - Subnets *[]SubResource `json:"subnets,omitempty"` - // ResourceGUID - The resource GUID property of the nat gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if ngpf.ResourceGUID != nil { - objectMap["resourceGuid"] = ngpf.ResourceGUID - } - if ngpf.ProvisioningState != nil { - objectMap["provisioningState"] = ngpf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type NatGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(NatGatewaysClient) (NatGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result. -func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent { - ng, err = client.CreateOrUpdateResponder(ng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request") - } - } - return -} - -// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type NatGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(NatGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for NatGatewaysDeleteFuture.Result. -func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// NatGatewaySku SKU of nat gateway. -type NatGatewaySku struct { - // Name - Name of Nat Gateway SKU. Possible values include: 'Standard' - Name NatGatewaySkuName `json:"name,omitempty"` -} - -// NextHopParameters parameters that define the source and destination endpoint. -type NextHopParameters struct { - // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // SourceIPAddress - The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty"` - // DestinationIPAddress - The destination IP address. - DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` - // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` -} - -// NextHopResult the information about next hop from the specified VM. -type NextHopResult struct { - autorest.Response `json:"-"` - // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' - NextHopType NextHopType `json:"nextHopType,omitempty"` - // NextHopIPAddress - Next hop IP Address. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. - RouteTableID *string `json:"routeTableId,omitempty"` -} - -// Operation network REST API operation definition. -type Operation struct { - // Name - Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` - // Display - Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - Origin of the operation. - Origin *string `json:"origin,omitempty"` - // OperationPropertiesFormat - Operation properties format. - *OperationPropertiesFormat `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if o.Name != nil { - objectMap["name"] = o.Name - } - if o.Display != nil { - objectMap["display"] = o.Display - } - if o.Origin != nil { - objectMap["origin"] = o.Origin - } - if o.OperationPropertiesFormat != nil { - objectMap["properties"] = o.OperationPropertiesFormat - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Operation struct. -func (o *Operation) 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 - } - o.Name = &name - } - case "display": - if v != nil { - var display OperationDisplay - err = json.Unmarshal(*v, &display) - if err != nil { - return err - } - o.Display = &display - } - case "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - o.Origin = &origin - } - case "properties": - if v != nil { - var operationPropertiesFormat OperationPropertiesFormat - err = json.Unmarshal(*v, &operationPropertiesFormat) - if err != nil { - return err - } - o.OperationPropertiesFormat = &operationPropertiesFormat - } - } - } - - return nil -} - -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - Service provider: Microsoft Network. - Provider *string `json:"provider,omitempty"` - // Resource - Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - Type of the operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - // Description - Description of the operation. - Description *string `json:"description,omitempty"` -} - -// OperationListResult result of the request to list Network operations. It contains a list of operations -// and a URL link to get the next set of results. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - List of Network operations supported by the Network resource provider. - Value *[]Operation `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// 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 *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.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 *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) 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 OperationListResultIterator) Response() OperationListResult { - 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 OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// 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 *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.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.olr) - if err != nil { - return err - } - page.olr = 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 *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// OperationPropertiesFormat description of operation properties format. -type OperationPropertiesFormat struct { - // ServiceSpecification - Specification of the service. - ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationPropertiesFormatServiceSpecification specification of the service. -type OperationPropertiesFormatServiceSpecification struct { - // MetricSpecifications - Operation service specification. - MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` - // LogSpecifications - Operation log specification. - LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` -} - -// OutboundRule outbound rule of the load balancer. -type OutboundRule struct { - autorest.Response `json:"-"` - // OutboundRulePropertiesFormat - Properties of load balancer outbound rule. - *OutboundRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for OutboundRule. -func (or OutboundRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if or.OutboundRulePropertiesFormat != nil { - objectMap["properties"] = or.OutboundRulePropertiesFormat - } - if or.Name != nil { - objectMap["name"] = or.Name - } - if or.Etag != nil { - objectMap["etag"] = or.Etag - } - if or.ID != nil { - objectMap["id"] = or.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OutboundRule struct. -func (or *OutboundRule) 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 outboundRulePropertiesFormat OutboundRulePropertiesFormat - err = json.Unmarshal(*v, &outboundRulePropertiesFormat) - if err != nil { - return err - } - or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - or.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - or.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - or.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - or.ID = &ID - } - } - } - - return nil -} - -// OutboundRulePropertiesFormat outbound rule of the load balancer. -type OutboundRulePropertiesFormat struct { - // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. - FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll' - Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` -} - -// P2SVpnGateway p2SVpnGateway Resource. -type P2SVpnGateway struct { - autorest.Response `json:"-"` - // P2SVpnGatewayProperties - Properties of the P2SVpnGateway. - *P2SVpnGatewayProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for P2SVpnGateway. -func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvg.P2SVpnGatewayProperties != nil { - objectMap["properties"] = pvg.P2SVpnGatewayProperties - } - if pvg.ID != nil { - objectMap["id"] = pvg.ID - } - if pvg.Location != nil { - objectMap["location"] = pvg.Location - } - if pvg.Tags != nil { - objectMap["tags"] = pvg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct. -func (pvg *P2SVpnGateway) 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 p2SVpnGatewayProperties P2SVpnGatewayProperties - err = json.Unmarshal(*v, &p2SVpnGatewayProperties) - if err != nil { - return err - } - pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pvg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pvg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pvg.Tags = tags - } - } - } - - return nil -} - -// P2SVpnGatewayProperties parameters for P2SVpnGateway. -type P2SVpnGatewayProperties struct { - // VirtualHub - The VirtualHub to which the gateway belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. - VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` - // P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. - P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"` - // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - // CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient. - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,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.ProvisioningState != "" { - objectMap["provisioningState"] = pvgp.ProvisioningState - } - if pvgp.VpnGatewayScaleUnit != nil { - objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit - } - if pvgp.P2SVpnServerConfiguration != nil { - objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration - } - if pvgp.VpnClientAddressPool != nil { - objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool - } - if pvgp.CustomRoutes != nil { - objectMap["customRoutes"] = pvgp.CustomRoutes - } - return json.Marshal(objectMap) -} - -// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result. -func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pvg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request") - } - } - return -} - -// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type P2sVpnGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result. -func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysGenerateVpnProfileFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result. -func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vpr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { - vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request") - } - } - return -} - -// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result. -func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pvg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request") - } - } - return -} - -// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result. -func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pvg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.UpdateTagsResponder(pvg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request") - } - } - return -} - -// P2SVpnProfileParameters vpn Client Parameters for package generation. -type P2SVpnProfileParameters struct { - // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' - AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` -} - -// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificate struct { - // P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate. - *P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate. -func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - } - if pvscrcrc.Name != nil { - objectMap["name"] = pvscrcrc.Name - } - if pvscrcrc.Etag != nil { - objectMap["etag"] = pvscrcrc.Etag - } - if pvscrcrc.ID != nil { - objectMap["id"] = pvscrcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct. -func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) 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 p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscrcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscrcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscrcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct { - // Thumbprint - The Radius client root certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat. -func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrcrcpf.Thumbprint != nil { - objectMap["thumbprint"] = pvscrcrcpf.Thumbprint - } - return json.Marshal(objectMap) -} - -// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificate struct { - // P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate. - *P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate. -func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - } - if pvscrsrc.Name != nil { - objectMap["name"] = pvscrsrc.Name - } - if pvscrsrc.Etag != nil { - objectMap["etag"] = pvscrsrc.Etag - } - if pvscrsrc.ID != nil { - objectMap["id"] = pvscrsrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct. -func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) 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 p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscrsrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscrsrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscrsrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat. -func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrsrcpf.PublicCertData != nil { - objectMap["publicCertData"] = pvscrsrcpf.PublicCertData - } - return json.Marshal(objectMap) -} - -// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource. -type P2SVpnServerConfiguration struct { - autorest.Response `json:"-"` - // P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration. - *P2SVpnServerConfigurationProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration. -func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvsc.P2SVpnServerConfigurationProperties != nil { - objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties - } - if pvsc.Name != nil { - objectMap["name"] = pvsc.Name - } - if pvsc.ID != nil { - objectMap["id"] = pvsc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct. -func (pvsc *P2SVpnServerConfiguration) 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 p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties - err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties) - if err != nil { - return err - } - pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvsc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvsc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvsc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration. -type P2SVpnServerConfigurationProperties struct { - // Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name. - Name *string `json:"name,omitempty"` - // VpnProtocols - VPN protocols for the P2SVpnServerConfiguration. - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` - // P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"` - // P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"` - // P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"` - // P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"` - // VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration. - VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - // RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - // RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. - P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties. -func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscp.Name != nil { - objectMap["name"] = pvscp.Name - } - if pvscp.VpnProtocols != nil { - objectMap["vpnProtocols"] = pvscp.VpnProtocols - } - if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil { - objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates - } - if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil { - objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates - } - if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil { - objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates - } - if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil { - objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates - } - if pvscp.VpnClientIpsecPolicies != nil { - objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies - } - if pvscp.RadiusServerAddress != nil { - objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress - } - if pvscp.RadiusServerSecret != nil { - objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret - } - if pvscp.Etag != nil { - objectMap["etag"] = pvscp.Etag - } - return json.Marshal(objectMap) -} - -// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type P2sVpnServerConfigurationsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result. -func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pvsc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent { - pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request") - } - } - return -} - -// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnServerConfigurationsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result. -func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificate struct { - // P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. - *P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name - } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag - } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) 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 p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscvcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscvcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscvcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct { - // Thumbprint - The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat. -func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrcpf.Thumbprint != nil { - objectMap["thumbprint"] = pvscvcrcpf.Thumbprint - } - return json.Marshal(objectMap) -} - -// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificate struct { - // P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate. - *P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name - } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag - } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) 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 p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscvcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscvcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscvcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat. -func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrcpf.PublicCertData != nil { - objectMap["publicCertData"] = pvscvcrcpf.PublicCertData - } - return json.Marshal(objectMap) -} - -// PacketCapture parameters that define the create packet capture operation. -type PacketCapture struct { - // PacketCaptureParameters - Properties of the packet capture. - *PacketCaptureParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for PacketCapture. -func (pc PacketCapture) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pc.PacketCaptureParameters != nil { - objectMap["properties"] = pc.PacketCaptureParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. -func (pc *PacketCapture) 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 packetCaptureParameters PacketCaptureParameters - err = json.Unmarshal(*v, &packetCaptureParameters) - if err != nil { - return err - } - pc.PacketCaptureParameters = &packetCaptureParameters - } - } - } - - return nil -} - -// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. -type PacketCaptureFilter struct { - // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' - Protocol PcProtocol `json:"protocol,omitempty"` - // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalPort *string `json:"localPort,omitempty"` - // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemotePort *string `json:"remotePort,omitempty"` -} - -// PacketCaptureListResult list of packet capture sessions. -type PacketCaptureListResult struct { - autorest.Response `json:"-"` - // Value - Information about packet capture sessions. - Value *[]PacketCaptureResult `json:"value,omitempty"` -} - -// PacketCaptureParameters parameters that define the create packet capture operation. -type PacketCaptureParameters struct { - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - // StorageLocation - Describes the storage location for a packet capture session. - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - // Filters - A list of packet capture filters. - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` -} - -// PacketCaptureQueryStatusResult status of packet capture session. -type PacketCaptureQueryStatusResult struct { - autorest.Response `json:"-"` - // Name - The name of the packet capture resource. - Name *string `json:"name,omitempty"` - // ID - The ID of the packet capture resource. - ID *string `json:"id,omitempty"` - // CaptureStartTime - The start time of the packet capture session. - CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` - // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' - PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` - // StopReason - The reason the current packet capture session was stopped. - StopReason *string `json:"stopReason,omitempty"` - // PacketCaptureError - List of errors of packet capture session. - PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` -} - -// PacketCaptureResult information about packet capture session. -type PacketCaptureResult struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; Name of the packet capture session. - Name *string `json:"name,omitempty"` - // ID - READ-ONLY; ID of the packet capture operation. - ID *string `json:"id,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // PacketCaptureResultProperties - Properties of the packet capture result. - *PacketCaptureResultProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for PacketCaptureResult. -func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pcr.Etag != nil { - objectMap["etag"] = pcr.Etag - } - if pcr.PacketCaptureResultProperties != nil { - objectMap["properties"] = pcr.PacketCaptureResultProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. -func (pcr *PacketCaptureResult) 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 - } - pcr.Name = &name - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pcr.ID = &ID - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pcr.Etag = &etag - } - case "properties": - if v != nil { - var packetCaptureResultProperties PacketCaptureResultProperties - err = json.Unmarshal(*v, &packetCaptureResultProperties) - if err != nil { - return err - } - pcr.PacketCaptureResultProperties = &packetCaptureResultProperties - } - } - } - - return nil -} - -// PacketCaptureResultProperties describes the properties of a packet capture session. -type PacketCaptureResultProperties struct { - // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - // StorageLocation - Describes the storage location for a packet capture session. - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - // Filters - A list of packet capture filters. - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` -} - -// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PacketCapturesClient) (PacketCaptureResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PacketCapturesCreateFuture.Result. -func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pcr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { - pcr, err = client.CreateResponder(pcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") - } - } - return -} - -// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PacketCapturesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PacketCapturesDeleteFuture.Result. -func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesGetStatusFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PacketCapturesGetStatusFuture.Result. -func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pcqsr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { - pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") - } - } - return -} - -// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesStopFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PacketCapturesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PacketCapturesStopFuture.Result. -func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") - return - } - ar.Response = future.Response() - return -} - -// PacketCaptureStorageLocation describes the storage location for a packet capture session. -type PacketCaptureStorageLocation struct { - // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. - StorageID *string `json:"storageId,omitempty"` - // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. - StoragePath *string `json:"storagePath,omitempty"` - // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. - FilePath *string `json:"filePath,omitempty"` -} - -// PatchRouteFilter route Filter Resource. -type PatchRouteFilter struct { - // RouteFilterPropertiesFormat - Properties of the route filter. - *RouteFilterPropertiesFormat `json:"properties,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PatchRouteFilter. -func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if prf.RouteFilterPropertiesFormat != nil { - objectMap["properties"] = prf.RouteFilterPropertiesFormat - } - if prf.Tags != nil { - objectMap["tags"] = prf.Tags - } - if prf.ID != nil { - objectMap["id"] = prf.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. -func (prf *PatchRouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat - err = json.Unmarshal(*v, &routeFilterPropertiesFormat) - if err != nil { - return err - } - prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - prf.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - prf.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - prf.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - prf.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - prf.ID = &ID - } - } - } - - return nil -} - -// PatchRouteFilterRule route Filter Rule Resource. -type PatchRouteFilterRule struct { - // RouteFilterRulePropertiesFormat - Properties of the route filter rule. - *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PatchRouteFilterRule. -func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if prfr.RouteFilterRulePropertiesFormat != nil { - objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat - } - if prfr.ID != nil { - objectMap["id"] = prfr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. -func (prfr *PatchRouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat - err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) - if err != nil { - return err - } - prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - prfr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - prfr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - prfr.ID = &ID - } - } - } - - return nil -} - -// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering -// resource. -type PeerExpressRouteCircuitConnection struct { - autorest.Response `json:"-"` - // PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. - *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection. -func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil { - objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat - } - if percc.Name != nil { - objectMap["name"] = percc.Name - } - if percc.ID != nil { - objectMap["id"] = percc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct. -func (percc *PeerExpressRouteCircuitConnection) 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 peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat - err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat) - if err != nil { - return err - } - percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - percc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - percc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - percc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - percc.ID = &ID - } - } - } - - return nil -} - -// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call -// retrieves all global reach peer circuit connections that belongs to a Private Peering for an -// ExpressRouteCircuit. -type PeerExpressRouteCircuitConnectionListResult struct { - autorest.Response `json:"-"` - // Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. - Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of -// PeerExpressRouteCircuitConnection values. -type PeerExpressRouteCircuitConnectionListResultIterator struct { - i int - page PeerExpressRouteCircuitConnectionListResultPage -} - -// 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 *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.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 *PeerExpressRouteCircuitConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PeerExpressRouteCircuitConnectionListResultIterator) 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 PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult { - 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 PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection { - if !iter.page.NotDone() { - return PeerExpressRouteCircuitConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type. -func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator { - return PeerExpressRouteCircuitConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(percclr.NextLink))) -} - -// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection -// values. -type PeerExpressRouteCircuitConnectionListResultPage struct { - fn func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error) - percclr PeerExpressRouteCircuitConnectionListResult -} - -// 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 *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.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.percclr) - if err != nil { - return err - } - page.percclr = 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 *PeerExpressRouteCircuitConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool { - return !page.percclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult { - return page.percclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection { - if page.percclr.IsEmpty() { - return nil - } - return *page.percclr.Value -} - -// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type. -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 -// connection. -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' - CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - // ConnectionName - The name of the express route circuit connection resource. - ConnectionName *string `json:"connectionName,omitempty"` - // AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection. - AuthResourceGUID *string `json:"authResourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 { - // EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' - EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"` - // Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection' - Mode WebApplicationFirewallMode `json:"mode,omitempty"` -} - -// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet. -type PrepareNetworkPoliciesRequest struct { - // ServiceName - The name of the service for which subnet is being prepared for. - ServiceName *string `json:"serviceName,omitempty"` - // NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration. - NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` -} - -// PrivateEndpoint private endpoint resource. -type PrivateEndpoint struct { - autorest.Response `json:"-"` - // PrivateEndpointProperties - Properties of the private endpoint. - *PrivateEndpointProperties `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpoint. -func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if peVar.PrivateEndpointProperties != nil { - objectMap["properties"] = peVar.PrivateEndpointProperties - } - if peVar.Etag != nil { - objectMap["etag"] = peVar.Etag - } - if peVar.ID != nil { - objectMap["id"] = peVar.ID - } - if peVar.Location != nil { - objectMap["location"] = peVar.Location - } - if peVar.Tags != nil { - objectMap["tags"] = peVar.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct. -func (peVar *PrivateEndpoint) 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 privateEndpointProperties PrivateEndpointProperties - err = json.Unmarshal(*v, &privateEndpointProperties) - if err != nil { - return err - } - peVar.PrivateEndpointProperties = &privateEndpointProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - peVar.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - peVar.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - peVar.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - peVar.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - peVar.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - peVar.Tags = tags - } - } - } - - return nil -} - -// PrivateEndpointConnection privateEndpointConnection resource. -type PrivateEndpointConnection struct { - autorest.Response `json:"-"` - // PrivateEndpointConnectionProperties - Properties of the private end point connection. - *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type. - Type *string `json:"type,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnection. -func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pec.PrivateEndpointConnectionProperties != nil { - objectMap["properties"] = pec.PrivateEndpointConnectionProperties - } - if pec.Name != nil { - objectMap["name"] = pec.Name - } - if pec.ID != nil { - objectMap["id"] = pec.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. -func (pec *PrivateEndpointConnection) 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 privateEndpointConnectionProperties PrivateEndpointConnectionProperties - err = json.Unmarshal(*v, &privateEndpointConnectionProperties) - if err != nil { - return err - } - pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pec.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pec.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pec.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pec.ID = &ID - } - } - } - - return nil -} - -// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // PrivateEndpoint - The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// PrivateEndpointListResult response for the ListPrivateEndpoints API service call. -type PrivateEndpointListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of private endpoint resources in a resource group. - Value *[]PrivateEndpoint `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page PrivateEndpointListResultPage -} - -// 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 *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.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 *PrivateEndpointListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateEndpointListResultIterator) 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 PrivateEndpointListResultIterator) Response() PrivateEndpointListResult { - 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 PrivateEndpointListResultIterator) Value() PrivateEndpoint { - if !iter.page.NotDone() { - return PrivateEndpoint{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateEndpointListResultIterator type. -func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator { - return PrivateEndpointListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pelr.NextLink))) -} - -// PrivateEndpointListResultPage contains a page of PrivateEndpoint values. -type PrivateEndpointListResultPage struct { - fn func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error) - pelr PrivateEndpointListResult -} - -// 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 *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.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.pelr) - if err != nil { - return err - } - page.pelr = 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 *PrivateEndpointListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateEndpointListResultPage) NotDone() bool { - return !page.pelr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult { - return page.pelr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint { - if page.pelr.IsEmpty() { - return nil - } - return *page.pelr.Value -} - -// Creates a new instance of the PrivateEndpointListResultPage type. -func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { - return PrivateEndpointListResultPage{ - fn: getNextPage, - pelr: cur, - } -} - -// PrivateEndpointProperties properties of the private endpoint. -type PrivateEndpointProperties struct { - // Subnet - The ID of the subnet from which the private IP will be allocated. - Subnet *Subnet `json:"subnet,omitempty"` - // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private endpoint. - NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - // ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,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.ProvisioningState != "" { - objectMap["provisioningState"] = pep.ProvisioningState - } - if pep.PrivateLinkServiceConnections != nil { - objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections - } - if pep.ManualPrivateLinkServiceConnections != nil { - objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections - } - return json.Marshal(objectMap) -} - -// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateEndpointsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointsClient) (PrivateEndpoint, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result. -func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - peVar.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent { - peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PrivateEndpointsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateEndpointsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateEndpointsDeleteFuture.Result. -func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateLinkService private link service resource. -type PrivateLinkService struct { - autorest.Response `json:"-"` - // PrivateLinkServiceProperties - Properties of the private link service. - *PrivateLinkServiceProperties `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkService. -func (pls PrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pls.PrivateLinkServiceProperties != nil { - objectMap["properties"] = pls.PrivateLinkServiceProperties - } - if pls.Etag != nil { - objectMap["etag"] = pls.Etag - } - if pls.ID != nil { - objectMap["id"] = pls.ID - } - if pls.Location != nil { - objectMap["location"] = pls.Location - } - if pls.Tags != nil { - objectMap["tags"] = pls.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct. -func (pls *PrivateLinkService) 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 privateLinkServiceProperties PrivateLinkServiceProperties - err = json.Unmarshal(*v, &privateLinkServiceProperties) - if err != nil { - return err - } - pls.PrivateLinkServiceProperties = &privateLinkServiceProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pls.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pls.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pls.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pls.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pls.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pls.Tags = tags - } - } - } - - return nil -} - -// PrivateLinkServiceConnection privateLinkServiceConnection resource. -type PrivateLinkServiceConnection struct { - // PrivateLinkServiceConnectionProperties - Properties of the private link service connection. - *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type. - Type *string `json:"type,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection. -func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if plsc.PrivateLinkServiceConnectionProperties != nil { - objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties - } - if plsc.Name != nil { - objectMap["name"] = plsc.Name - } - if plsc.ID != nil { - objectMap["id"] = plsc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct. -func (plsc *PrivateLinkServiceConnection) 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 privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties - err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties) - if err != nil { - return err - } - plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - plsc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - plsc.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - plsc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - plsc.ID = &ID - } - } - } - - return nil -} - -// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection. -type PrivateLinkServiceConnectionProperties struct { - // ProvisioningState - The provisioning state of the private link service connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateLinkServiceID - The resource id of private link service. - PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"` - // GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. - GroupIds *[]string `json:"groupIds,omitempty"` - // RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. - RequestMessage *string `json:"requestMessage,omitempty"` - // PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` -} - -// PrivateLinkServiceConnectionState a collection of information about the state of the connection between -// service consumer and provider. -type PrivateLinkServiceConnectionState struct { - // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *string `json:"status,omitempty"` - // Description - The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` - // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *string `json:"actionsRequired,omitempty"` -} - -// PrivateLinkServiceIPConfiguration the private link service ip configuration. -type PrivateLinkServiceIPConfiguration struct { - // PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration. - *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - // Name - The name of private link service ip configuration. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; The resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration. -func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if plsic.PrivateLinkServiceIPConfigurationProperties != nil { - objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties - } - if plsic.Name != nil { - objectMap["name"] = plsic.Name - } - if plsic.ID != nil { - objectMap["id"] = plsic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct. -func (plsic *PrivateLinkServiceIPConfiguration) 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 privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties - err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties) - if err != nil { - return err - } - plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - plsic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - plsic.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - plsic.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - plsic.ID = &ID - } - } - } - - return nil -} - -// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration. -type PrivateLinkServiceIPConfigurationProperties struct { - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // Primary - Whether the ip configuration is primary or not. - Primary *bool `json:"primary,omitempty"` - // ProvisioningState - The provisioning state of the private link service ip configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` -} - -// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call. -type PrivateLinkServiceListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of PrivateLinkService resources in a resource group. - Value *[]PrivateLinkService `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 - page PrivateLinkServiceListResultPage -} - -// 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 *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.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 *PrivateLinkServiceListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateLinkServiceListResultIterator) 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 PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult { - 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 PrivateLinkServiceListResultIterator) Value() PrivateLinkService { - if !iter.page.NotDone() { - return PrivateLinkService{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateLinkServiceListResultIterator type. -func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator { - return PrivateLinkServiceListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(plslr.NextLink))) -} - -// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values. -type PrivateLinkServiceListResultPage struct { - fn func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error) - plslr PrivateLinkServiceListResult -} - -// 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 *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.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.plslr) - if err != nil { - return err - } - page.plslr = 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 *PrivateLinkServiceListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateLinkServiceListResultPage) NotDone() bool { - return !page.plslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult { - return page.plslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService { - if page.plslr.IsEmpty() { - return nil - } - return *page.plslr.Value -} - -// Creates a new instance of the PrivateLinkServiceListResultPage type. -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. -type PrivateLinkServiceProperties struct { - // LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations. - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - // IPConfigurations - An array of references to the private link service IP configuration. - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private link service. - NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // ProvisioningState - The provisioning state of the private link service. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateEndpointConnections - An array of list about connections to the private endpoint. - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - // Visibility - The visibility list of the private link service. - Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"` - // AutoApproval - The auto-approval list of the private link service. - AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"` - // Fqdns - The list of Fqdn. - Fqdns *[]string `json:"fqdns,omitempty"` - // Alias - READ-ONLY; The alias of the private link service. - Alias *string `json:"alias,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.ProvisioningState != "" { - objectMap["provisioningState"] = plsp.ProvisioningState - } - if plsp.PrivateEndpointConnections != nil { - objectMap["privateEndpointConnections"] = plsp.PrivateEndpointConnections - } - if plsp.Visibility != nil { - objectMap["visibility"] = plsp.Visibility - } - if plsp.AutoApproval != nil { - objectMap["autoApproval"] = plsp.AutoApproval - } - if plsp.Fqdns != nil { - objectMap["fqdns"] = plsp.Fqdns - } - return json.Marshal(objectMap) -} - -// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service. -type PrivateLinkServicePropertiesAutoApproval struct { - // Subscriptions - The list of subscriptions. - Subscriptions *[]string `json:"subscriptions,omitempty"` -} - -// PrivateLinkServicePropertiesVisibility the visibility list of the private link service. -type PrivateLinkServicePropertiesVisibility struct { - // Subscriptions - The list of subscriptions. - Subscriptions *[]string `json:"subscriptions,omitempty"` -} - -// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring -// and retrieving the results of a long-running operation. -type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result. -func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - plsv.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent { - plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result. -func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - plsv.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent { - plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateLinkServicesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateLinkServicesClient) (PrivateLinkService, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result. -func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pls.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent { - pls, err = client.CreateOrUpdateResponder(pls.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateLinkServicesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateLinkServicesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateLinkServicesDeleteFuture.Result. -func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateLinkServicesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result. -func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call. -type PrivateLinkServiceVisibility struct { - autorest.Response `json:"-"` - // Visible - Private Link Service Visibility (True/False). - Visible *bool `json:"visible,omitempty"` -} - -// Probe a load balancer probe. -type Probe struct { - autorest.Response `json:"-"` - // ProbePropertiesFormat - Properties of load balancer probe. - *ProbePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for Probe. -func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p.ProbePropertiesFormat != nil { - objectMap["properties"] = p.ProbePropertiesFormat - } - if p.Name != nil { - objectMap["name"] = p.Name - } - if p.Etag != nil { - objectMap["etag"] = p.Etag - } - if p.ID != nil { - objectMap["id"] = p.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Probe struct. -func (p *Probe) 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 probePropertiesFormat ProbePropertiesFormat - err = json.Unmarshal(*v, &probePropertiesFormat) - if err != nil { - return err - } - p.ProbePropertiesFormat = &probePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - p.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - p.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - p.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - p.ID = &ID - } - } - } - - return nil -} - -// ProbePropertiesFormat load balancer probe resource. -type ProbePropertiesFormat struct { - // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // Protocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' - Protocol ProbeProtocol `json:"protocol,omitempty"` - // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. - Port *int32 `json:"port,omitempty"` - // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. - IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` - // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. - NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` - // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. - RequestPath *string `json:"requestPath,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if ppf.ProvisioningState != nil { - objectMap["provisioningState"] = ppf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// Profile network profile resource. -type Profile struct { - autorest.Response `json:"-"` - // ProfilePropertiesFormat - Network profile properties. - *ProfilePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for Profile. -func (p Profile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if p.ProfilePropertiesFormat != nil { - objectMap["properties"] = p.ProfilePropertiesFormat - } - if p.Etag != nil { - objectMap["etag"] = p.Etag - } - if p.ID != nil { - objectMap["id"] = p.ID - } - if p.Location != nil { - objectMap["location"] = p.Location - } - if p.Tags != nil { - objectMap["tags"] = p.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Profile struct. -func (p *Profile) 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 profilePropertiesFormat ProfilePropertiesFormat - err = json.Unmarshal(*v, &profilePropertiesFormat) - if err != nil { - return err - } - p.ProfilePropertiesFormat = &profilePropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - p.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - p.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - p.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - p.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - p.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - p.Tags = tags - } - } - } - - return nil -} - -// ProfileListResult response for ListNetworkProfiles API service call. -type ProfileListResult struct { - autorest.Response `json:"-"` - // Value - A list of network profiles that exist in a resource group. - Value *[]Profile `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ProfileListResultIterator provides access to a complete listing of Profile values. -type ProfileListResultIterator struct { - i int - page ProfileListResultPage -} - -// 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 *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.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 *ProfileListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProfileListResultIterator) 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 ProfileListResultIterator) Response() ProfileListResult { - 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 ProfileListResultIterator) Value() Profile { - if !iter.page.NotDone() { - return Profile{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ProfileListResultIterator type. -func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator { - return ProfileListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(plr.NextLink))) -} - -// ProfileListResultPage contains a page of Profile values. -type ProfileListResultPage struct { - fn func(context.Context, ProfileListResult) (ProfileListResult, error) - plr ProfileListResult -} - -// 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 *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.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.plr) - if err != nil { - return err - } - page.plr = 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 *ProfileListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProfileListResultPage) NotDone() bool { - return !page.plr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ProfileListResultPage) Response() ProfileListResult { - return page.plr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProfileListResultPage) Values() []Profile { - if page.plr.IsEmpty() { - return nil - } - return *page.plr.Value -} - -// Creates a new instance of the ProfileListResultPage type. -func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { - return ProfileListResultPage{ - fn: getNextPage, - plr: cur, - } -} - -// ProfilePropertiesFormat network profile properties. -type ProfilePropertiesFormat struct { - // ContainerNetworkInterfaces - List of child container network interfaces. - ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` - // ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations. - ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` - // ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProfilePropertiesFormat. -func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ppf.ContainerNetworkInterfaces != nil { - objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces - } - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ProfilesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ProfilesDeleteFuture.Result. -func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ProtocolConfiguration configuration of the protocol. -type ProtocolConfiguration struct { - // HTTPConfiguration - HTTP configuration of the connectivity check. - HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` -} - -// ProtocolCustomSettingsFormat dDoS custom policy properties. -type ProtocolCustomSettingsFormat struct { - // Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn' - Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"` - // TriggerRateOverride - The customized DDoS protection trigger rate. - TriggerRateOverride *string `json:"triggerRateOverride,omitempty"` - // SourceRateOverride - The customized DDoS protection source rate. - SourceRateOverride *string `json:"sourceRateOverride,omitempty"` - // TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High' - TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"` -} - -// PublicIPAddress public IP address resource. -type PublicIPAddress struct { - autorest.Response `json:"-"` - // Sku - The public IP address SKU. - Sku *PublicIPAddressSku `json:"sku,omitempty"` - // PublicIPAddressPropertiesFormat - Public IP address properties. - *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for PublicIPAddress. -func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pia.Sku != nil { - objectMap["sku"] = pia.Sku - } - if pia.PublicIPAddressPropertiesFormat != nil { - objectMap["properties"] = pia.PublicIPAddressPropertiesFormat - } - if pia.Etag != nil { - objectMap["etag"] = pia.Etag - } - if pia.Zones != nil { - objectMap["zones"] = pia.Zones - } - if pia.ID != nil { - objectMap["id"] = pia.ID - } - if pia.Location != nil { - objectMap["location"] = pia.Location - } - if pia.Tags != nil { - objectMap["tags"] = pia.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. -func (pia *PublicIPAddress) 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 "sku": - if v != nil { - var sku PublicIPAddressSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - pia.Sku = &sku - } - case "properties": - if v != nil { - var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat - err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) - if err != nil { - return err - } - pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pia.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - pia.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pia.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pia.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pia.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pia.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pia.Tags = tags - } - } - } - - return nil -} - -// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address. -type PublicIPAddressDNSSettings struct { - // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - Fqdn *string `json:"fqdn,omitempty"` - // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} - -// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPAddressesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPAddressesClient) (PublicIPAddress, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result. -func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pia.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { - pia, err = client.CreateOrUpdateResponder(pia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request") - } - } - return -} - -// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PublicIPAddressesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPAddressesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPAddressesDeleteFuture.Result. -func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPAddressesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPAddressesClient) (PublicIPAddress, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result. -func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pia.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { - pia, err = client.UpdateTagsResponder(pia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request") - } - } - return -} - -// PublicIPAddressListResult response for ListPublicIpAddresses API service call. -type PublicIPAddressListResult struct { - autorest.Response `json:"-"` - // Value - A list of public IP addresses that exists in a resource group. - Value *[]PublicIPAddress `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. -type PublicIPAddressListResultIterator struct { - i int - page PublicIPAddressListResultPage -} - -// 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 *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.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 *PublicIPAddressListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PublicIPAddressListResultIterator) 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 PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { - 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 PublicIPAddressListResultIterator) Value() PublicIPAddress { - if !iter.page.NotDone() { - return PublicIPAddress{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PublicIPAddressListResultIterator type. -func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator { - return PublicIPAddressListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pialr.NextLink))) -} - -// PublicIPAddressListResultPage contains a page of PublicIPAddress values. -type PublicIPAddressListResultPage struct { - fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error) - pialr PublicIPAddressListResult -} - -// 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 *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.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.pialr) - if err != nil { - return err - } - page.pialr = 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 *PublicIPAddressListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PublicIPAddressListResultPage) NotDone() bool { - return !page.pialr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { - return page.pialr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { - if page.pialr.IsEmpty() { - return nil - } - return *page.pialr.Value -} - -// Creates a new instance of the PublicIPAddressListResultPage type. -func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { - return PublicIPAddressListResultPage{ - fn: getNextPage, - pialr: cur, - } -} - -// PublicIPAddressPropertiesFormat public IP address properties. -type PublicIPAddressPropertiesFormat struct { - // PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic' - PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' - PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` - // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address. - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - // DNSSettings - The FQDN of the DNS record associated with the public IP address. - DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` - // DdosSettings - The DDoS protection custom policy associated with the public IP address. - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - // IPTags - The list of tags associated with the public IP address. - IPTags *[]IPTag `json:"ipTags,omitempty"` - // IPAddress - The IP address associated with the public IP address resource. - IPAddress *string `json:"ipAddress,omitempty"` - // PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - // IdleTimeoutInMinutes - The idle timeout of the public IP address. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // ResourceGUID - The resource GUID property of the public IP resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if piapf.ResourceGUID != nil { - objectMap["resourceGuid"] = piapf.ResourceGUID - } - if piapf.ProvisioningState != nil { - objectMap["provisioningState"] = piapf.ProvisioningState - } - 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' - Name PublicIPAddressSkuName `json:"name,omitempty"` -} - -// PublicIPPrefix public IP prefix resource. -type PublicIPPrefix struct { - autorest.Response `json:"-"` - // Sku - The public IP prefix SKU. - Sku *PublicIPPrefixSku `json:"sku,omitempty"` - // PublicIPPrefixPropertiesFormat - Public IP prefix properties. - *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for PublicIPPrefix. -func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pip.Sku != nil { - objectMap["sku"] = pip.Sku - } - if pip.PublicIPPrefixPropertiesFormat != nil { - objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat - } - if pip.Etag != nil { - objectMap["etag"] = pip.Etag - } - if pip.Zones != nil { - objectMap["zones"] = pip.Zones - } - if pip.ID != nil { - objectMap["id"] = pip.ID - } - if pip.Location != nil { - objectMap["location"] = pip.Location - } - if pip.Tags != nil { - objectMap["tags"] = pip.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct. -func (pip *PublicIPPrefix) 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 "sku": - if v != nil { - var sku PublicIPPrefixSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - pip.Sku = &sku - } - case "properties": - if v != nil { - var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat - err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat) - if err != nil { - return err - } - pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pip.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - pip.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pip.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pip.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pip.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pip.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pip.Tags = tags - } - } - } - - return nil -} - -// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPPrefixesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPPrefixesClient) (PublicIPPrefix, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result. -func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pip.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent { - pip, err = client.CreateOrUpdateResponder(pip.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request") - } - } - return -} - -// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PublicIPPrefixesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPPrefixesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPPrefixesDeleteFuture.Result. -func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPPrefixesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PublicIPPrefixesClient) (PublicIPPrefix, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result. -func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pip.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent { - pip, err = client.UpdateTagsResponder(pip.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request") - } - } - return -} - -// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call. -type PublicIPPrefixListResult struct { - autorest.Response `json:"-"` - // Value - A list of public IP prefixes that exists in a resource group. - Value *[]PublicIPPrefix `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values. -type PublicIPPrefixListResultIterator struct { - i int - page PublicIPPrefixListResultPage -} - -// 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 *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.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 *PublicIPPrefixListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PublicIPPrefixListResultIterator) 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 PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult { - 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 PublicIPPrefixListResultIterator) Value() PublicIPPrefix { - if !iter.page.NotDone() { - return PublicIPPrefix{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PublicIPPrefixListResultIterator type. -func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator { - return PublicIPPrefixListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(piplr.NextLink))) -} - -// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values. -type PublicIPPrefixListResultPage struct { - fn func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error) - piplr PublicIPPrefixListResult -} - -// 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 *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.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.piplr) - if err != nil { - return err - } - page.piplr = 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 *PublicIPPrefixListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PublicIPPrefixListResultPage) NotDone() bool { - return !page.piplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult { - return page.piplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix { - if page.piplr.IsEmpty() { - return nil - } - return *page.piplr.Value -} - -// Creates a new instance of the PublicIPPrefixListResultPage type. -func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage { - return PublicIPPrefixListResultPage{ - fn: getNextPage, - piplr: cur, - } -} - -// PublicIPPrefixPropertiesFormat public IP prefix properties. -type PublicIPPrefixPropertiesFormat struct { - // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' - PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` - // IPTags - The list of tags associated with the public IP prefix. - IPTags *[]IPTag `json:"ipTags,omitempty"` - // PrefixLength - The Length of the Public IP Prefix. - PrefixLength *int32 `json:"prefixLength,omitempty"` - // IPPrefix - The allocated Prefix. - IPPrefix *string `json:"ipPrefix,omitempty"` - // PublicIPAddresses - The list of all referenced PublicIPAddresses. - PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` - // LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix. - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"` - // ResourceGUID - The resource GUID property of the public IP prefix resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if pippf.IPPrefix != nil { - objectMap["ipPrefix"] = pippf.IPPrefix - } - if pippf.PublicIPAddresses != nil { - objectMap["publicIPAddresses"] = pippf.PublicIPAddresses - } - if pippf.ResourceGUID != nil { - objectMap["resourceGuid"] = pippf.ResourceGUID - } - if pippf.ProvisioningState != nil { - objectMap["provisioningState"] = pippf.ProvisioningState - } - 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' - Name PublicIPPrefixSkuName `json:"name,omitempty"` -} - -// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. -type QueryTroubleshootingParameters struct { - // TargetResourceID - The target resource ID to query the troubleshooting result. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// ReferencedPublicIPAddress reference to a public IP address. -type ReferencedPublicIPAddress struct { - // ID - The PublicIPAddress Reference. - ID *string `json:"id,omitempty"` -} - -// Resource common resource representation. -type Resource struct { - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.ID != nil { - objectMap["id"] = r.ID - } - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// ResourceNavigationLink resourceNavigationLink resource. -type ResourceNavigationLink struct { - // ResourceNavigationLinkFormat - Resource navigation link properties format. - *ResourceNavigationLinkFormat `json:"properties,omitempty"` - // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceNavigationLink. -func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rnl.ResourceNavigationLinkFormat != nil { - objectMap["properties"] = rnl.ResourceNavigationLinkFormat - } - if rnl.Name != nil { - objectMap["name"] = rnl.Name - } - if rnl.ID != nil { - objectMap["id"] = rnl.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. -func (rnl *ResourceNavigationLink) 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 resourceNavigationLinkFormat ResourceNavigationLinkFormat - err = json.Unmarshal(*v, &resourceNavigationLinkFormat) - if err != nil { - return err - } - rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rnl.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rnl.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rnl.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rnl.ID = &ID - } - } - } - - return nil -} - -// ResourceNavigationLinkFormat properties of ResourceNavigationLink. -type ResourceNavigationLinkFormat struct { - // LinkedResourceType - Resource type of the linked resource. - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - // Link - Link to the external resource. - Link *string `json:"link,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource. - ProvisioningState *string `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:"-"` - // Value - The resource navigation links in a subnet. - Value *[]ResourceNavigationLink `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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. - Subscriptions *[]string `json:"subscriptions,omitempty"` -} - -// RetentionPolicyParameters parameters that define the retention policy for flow log. -type RetentionPolicyParameters struct { - // Days - Number of days to retain flow log records. - Days *int32 `json:"days,omitempty"` - // Enabled - Flag to enable/disable retention. - Enabled *bool `json:"enabled,omitempty"` -} - -// Route route resource. -type Route struct { - autorest.Response `json:"-"` - // RoutePropertiesFormat - Properties of the route. - *RoutePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for Route. -func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.RoutePropertiesFormat != nil { - objectMap["properties"] = r.RoutePropertiesFormat - } - if r.Name != nil { - objectMap["name"] = r.Name - } - if r.Etag != nil { - objectMap["etag"] = r.Etag - } - if r.ID != nil { - objectMap["id"] = r.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Route struct. -func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat - err = json.Unmarshal(*v, &routePropertiesFormat) - if err != nil { - return err - } - r.RoutePropertiesFormat = &routePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - r.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - r.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - r.ID = &ID - } - } - } - - return nil -} - -// RouteFilter route Filter Resource. -type RouteFilter struct { - autorest.Response `json:"-"` - // RouteFilterPropertiesFormat - Properties of the route filter. - *RouteFilterPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for RouteFilter. -func (rf RouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rf.RouteFilterPropertiesFormat != nil { - objectMap["properties"] = rf.RouteFilterPropertiesFormat - } - if rf.ID != nil { - objectMap["id"] = rf.ID - } - if rf.Location != nil { - objectMap["location"] = rf.Location - } - if rf.Tags != nil { - objectMap["tags"] = rf.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. -func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat - err = json.Unmarshal(*v, &routeFilterPropertiesFormat) - if err != nil { - return err - } - rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rf.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rf.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rf.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rf.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rf.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rf.Tags = tags - } - } - } - - return nil -} - -// RouteFilterListResult response for the ListRouteFilters API service call. -type RouteFilterListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of route filters in a resource group. - Value *[]RouteFilter `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. -type RouteFilterListResultIterator struct { - i int - page RouteFilterListResultPage -} - -// 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 *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.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 *RouteFilterListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteFilterListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult { - 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 RouteFilterListResultIterator) Value() RouteFilter { - if !iter.page.NotDone() { - return RouteFilter{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RouteFilterListResultIterator type. -func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator { - return RouteFilterListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rflr.NextLink))) -} - -// RouteFilterListResultPage contains a page of RouteFilter values. -type RouteFilterListResultPage struct { - fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error) - rflr RouteFilterListResult -} - -// 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 *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.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.rflr) - if err != nil { - return err - } - page.rflr = 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 *RouteFilterListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteFilterListResultPage) NotDone() bool { - return !page.rflr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RouteFilterListResultPage) Response() RouteFilterListResult { - return page.rflr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RouteFilterListResultPage) Values() []RouteFilter { - if page.rflr.IsEmpty() { - return nil - } - return *page.rflr.Value -} - -// Creates a new instance of the RouteFilterListResultPage type. -func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { - return RouteFilterListResultPage{ - fn: getNextPage, - rflr: cur, - } -} - -// RouteFilterPropertiesFormat route Filter Resource. -type RouteFilterPropertiesFormat struct { - // Rules - Collection of RouteFilterRules contained within a route filter. - Rules *[]RouteFilterRule `json:"rules,omitempty"` - // Peerings - A collection of references to express route circuit peerings. - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // Ipv6Peerings - A collection of references to express route circuit ipv6 peerings. - Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - ProvisioningState *string `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 - } - if rfpf.Peerings != nil { - objectMap["peerings"] = rfpf.Peerings - } - if rfpf.Ipv6Peerings != nil { - objectMap["ipv6Peerings"] = rfpf.Ipv6Peerings - } - return json.Marshal(objectMap) -} - -// RouteFilterRule route Filter Rule Resource. -type RouteFilterRule struct { - autorest.Response `json:"-"` - // RouteFilterRulePropertiesFormat - Properties of the route filter rule. - *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for RouteFilterRule. -func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rfr.RouteFilterRulePropertiesFormat != nil { - objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat - } - if rfr.Name != nil { - objectMap["name"] = rfr.Name - } - if rfr.Location != nil { - objectMap["location"] = rfr.Location - } - if rfr.ID != nil { - objectMap["id"] = rfr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. -func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat - err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) - if err != nil { - return err - } - rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rfr.Name = &name - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rfr.Location = &location - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rfr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rfr.ID = &ID - } - } - } - - return nil -} - -// RouteFilterRuleListResult response for the ListRouteFilterRules API service call. -type RouteFilterRuleListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of RouteFilterRules in a resource group. - Value *[]RouteFilterRule `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. -type RouteFilterRuleListResultIterator struct { - i int - page RouteFilterRuleListResultPage -} - -// 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 *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.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 *RouteFilterRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteFilterRuleListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { - 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule { - if !iter.page.NotDone() { - return RouteFilterRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RouteFilterRuleListResultIterator type. -func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator { - return RouteFilterRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rfrlr.NextLink))) -} - -// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. -type RouteFilterRuleListResultPage struct { - fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error) - rfrlr RouteFilterRuleListResult -} - -// 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 *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.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.rfrlr) - if err != nil { - return err - } - page.rfrlr = 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 *RouteFilterRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteFilterRuleListResultPage) NotDone() bool { - return !page.rfrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { - return page.rfrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { - if page.rfrlr.IsEmpty() { - return nil - } - return *page.rfrlr.Value -} - -// Creates a new instance of the RouteFilterRuleListResultPage type. -func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { - return RouteFilterRuleListResultPage{ - fn: getNextPage, - rfrlr: cur, - } -} - -// RouteFilterRulePropertiesFormat route Filter Rule Resource. -type RouteFilterRulePropertiesFormat struct { - // Access - The access type of the rule. Possible values include: 'Allow', 'Deny' - Access Access `json:"access,omitempty"` - // RouteFilterRuleType - The rule type of the rule. - RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` - // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. - Communities *[]string `json:"communities,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - ProvisioningState *string `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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFilterRulesClient) (RouteFilterRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result. -func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rfr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { - rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") - } - } - return -} - -// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFilterRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFilterRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFilterRulesDeleteFuture.Result. -func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFilterRulesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFilterRulesClient) (RouteFilterRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFilterRulesUpdateFuture.Result. -func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rfr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { - rfr, err = client.UpdateResponder(rfr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") - } - } - return -} - -// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type RouteFiltersCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFiltersClient) (RouteFilter, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result. -func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rf.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { - rf, err = client.CreateOrUpdateResponder(rf.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") - } - } - return -} - -// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFiltersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFiltersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFiltersDeleteFuture.Result. -func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFiltersUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteFiltersClient) (RouteFilter, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteFiltersUpdateFuture.Result. -func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rf.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { - rf, err = client.UpdateResponder(rf.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") - } - } - return -} - -// RouteListResult response for the ListRoute API service call. -type RouteListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of routes in a resource group. - Value *[]Route `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RouteListResultIterator provides access to a complete listing of Route values. -type RouteListResultIterator struct { - i int - page RouteListResultPage -} - -// 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 *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.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 *RouteListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult { - 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 RouteListResultIterator) Value() Route { - if !iter.page.NotDone() { - return Route{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RouteListResultIterator type. -func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator { - return RouteListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rlr.NextLink))) -} - -// RouteListResultPage contains a page of Route values. -type RouteListResultPage struct { - fn func(context.Context, RouteListResult) (RouteListResult, error) - rlr RouteListResult -} - -// 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 *RouteListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.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.rlr) - if err != nil { - return err - } - page.rlr = 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 *RouteListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteListResultPage) NotDone() bool { - return !page.rlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RouteListResultPage) Response() RouteListResult { - return page.rlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RouteListResultPage) Values() []Route { - if page.rlr.IsEmpty() { - return nil - } - return *page.rlr.Value -} - -// Creates a new instance of the RouteListResultPage type. -func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { - return RouteListResultPage{ - fn: getNextPage, - rlr: cur, - } -} - -// RoutePropertiesFormat route resource. -type RoutePropertiesFormat struct { - // AddressPrefix - The destination CIDR to which the route applies. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' - NextHopType RouteNextHopType `json:"nextHopType,omitempty"` - // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RoutesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RoutesClient) (Route, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RoutesCreateOrUpdateFuture.Result. -func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - r.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent { - r, err = client.CreateOrUpdateResponder(r.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request") - } - } - return -} - -// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type RoutesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RoutesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RoutesDeleteFuture.Result. -func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RouteTable route table resource. -type RouteTable struct { - autorest.Response `json:"-"` - // RouteTablePropertiesFormat - Properties of the route table. - *RouteTablePropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for RouteTable. -func (rt RouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rt.RouteTablePropertiesFormat != nil { - objectMap["properties"] = rt.RouteTablePropertiesFormat - } - if rt.Etag != nil { - objectMap["etag"] = rt.Etag - } - if rt.ID != nil { - objectMap["id"] = rt.ID - } - if rt.Location != nil { - objectMap["location"] = rt.Location - } - if rt.Tags != nil { - objectMap["tags"] = rt.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RouteTable struct. -func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat - err = json.Unmarshal(*v, &routeTablePropertiesFormat) - if err != nil { - return err - } - rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rt.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rt.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rt.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - rt.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - rt.Tags = tags - } - } - } - - return nil -} - -// RouteTableListResult response for the ListRouteTable API service call. -type RouteTableListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of route tables in a resource group. - Value *[]RouteTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RouteTableListResultIterator provides access to a complete listing of RouteTable values. -type RouteTableListResultIterator struct { - i int - page RouteTableListResultPage -} - -// 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 *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.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 *RouteTableListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult { - 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 RouteTableListResultIterator) Value() RouteTable { - if !iter.page.NotDone() { - return RouteTable{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RouteTableListResultIterator type. -func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator { - return RouteTableListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rtlr.NextLink))) -} - -// RouteTableListResultPage contains a page of RouteTable values. -type RouteTableListResultPage struct { - fn func(context.Context, RouteTableListResult) (RouteTableListResult, error) - rtlr RouteTableListResult -} - -// 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 *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.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.rtlr) - if err != nil { - return err - } - page.rtlr = 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 *RouteTableListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RouteTableListResultPage) NotDone() bool { - return !page.rtlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RouteTableListResultPage) Response() RouteTableListResult { - return page.rtlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RouteTableListResultPage) Values() []RouteTable { - if page.rtlr.IsEmpty() { - return nil - } - return *page.rtlr.Value -} - -// Creates a new instance of the RouteTableListResultPage type. -func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { - return RouteTableListResultPage{ - fn: getNextPage, - rtlr: cur, - } -} - -// RouteTablePropertiesFormat route Table resource. -type RouteTablePropertiesFormat struct { - // Routes - Collection of routes contained within a route table. - Routes *[]Route `json:"routes,omitempty"` - // Subnets - READ-ONLY; A collection of references to subnets. - Subnets *[]Subnet `json:"subnets,omitempty"` - // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable. - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if rtpf.ProvisioningState != nil { - objectMap["provisioningState"] = rtpf.ProvisioningState - } - return json.Marshal(objectMap) -} - -// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type RouteTablesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteTablesClient) (RouteTable, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result. -func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rt.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { - rt, err = client.CreateOrUpdateResponder(rt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request") - } - } - return -} - -// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteTablesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteTablesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteTablesDeleteFuture.Result. -func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteTablesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(RouteTablesClient) (RouteTable, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for RouteTablesUpdateTagsFuture.Result. -func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - rt.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { - rt, err = client.UpdateTagsResponder(rt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request") - } - } - return -} - -// RuleCondition rule condition of type network -type RuleCondition struct { - // IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols. - IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"` - // SourceAddresses - List of source IP addresses for this rule. - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // DestinationAddresses - List of destination IP addresses or Service Tags. - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - // DestinationPorts - List of destination ports. - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - // Name - Name of the rule condition. - Name *string `json:"name,omitempty"` - // Description - Description of the rule condition. - Description *string `json:"description,omitempty"` - // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' - RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` -} - -// MarshalJSON is the custom marshaler for RuleCondition. -func (rc RuleCondition) MarshalJSON() ([]byte, error) { - rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition - objectMap := make(map[string]interface{}) - if rc.IPProtocols != nil { - objectMap["ipProtocols"] = rc.IPProtocols - } - if rc.SourceAddresses != nil { - objectMap["sourceAddresses"] = rc.SourceAddresses - } - if rc.DestinationAddresses != nil { - objectMap["destinationAddresses"] = rc.DestinationAddresses - } - if rc.DestinationPorts != nil { - objectMap["destinationPorts"] = rc.DestinationPorts - } - if rc.Name != nil { - objectMap["name"] = rc.Name - } - if rc.Description != nil { - objectMap["description"] = rc.Description - } - if rc.RuleConditionType != "" { - objectMap["ruleConditionType"] = rc.RuleConditionType - } - return json.Marshal(objectMap) -} - -// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. -func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { - return nil, false -} - -// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. -func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) { - return &rc, true -} - -// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. -func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { - return nil, false -} - -// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. -func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { - return &rc, true -} - -// SecurityGroup networkSecurityGroup resource. -type SecurityGroup struct { - autorest.Response `json:"-"` - // SecurityGroupPropertiesFormat - Properties of the network security group. - *SecurityGroupPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for SecurityGroup. -func (sg SecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sg.SecurityGroupPropertiesFormat != nil { - objectMap["properties"] = sg.SecurityGroupPropertiesFormat - } - if sg.Etag != nil { - objectMap["etag"] = sg.Etag - } - if sg.ID != nil { - objectMap["id"] = sg.ID - } - if sg.Location != nil { - objectMap["location"] = sg.Location - } - if sg.Tags != nil { - objectMap["tags"] = sg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. -func (sg *SecurityGroup) 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 securityGroupPropertiesFormat SecurityGroupPropertiesFormat - err = json.Unmarshal(*v, &securityGroupPropertiesFormat) - if err != nil { - return err - } - sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - sg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - sg.Tags = tags - } - } - } - - return nil -} - -// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. -type SecurityGroupListResult struct { - autorest.Response `json:"-"` - // Value - A list of NetworkSecurityGroup resources. - Value *[]SecurityGroup `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. -type SecurityGroupListResultIterator struct { - i int - page SecurityGroupListResultPage -} - -// 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 *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.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 *SecurityGroupListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SecurityGroupListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult { - 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 SecurityGroupListResultIterator) Value() SecurityGroup { - if !iter.page.NotDone() { - return SecurityGroup{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SecurityGroupListResultIterator type. -func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator { - return SecurityGroupListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sglr.NextLink))) -} - -// SecurityGroupListResultPage contains a page of SecurityGroup values. -type SecurityGroupListResultPage struct { - fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error) - sglr SecurityGroupListResult -} - -// 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 *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.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.sglr) - if err != nil { - return err - } - page.sglr = 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 *SecurityGroupListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SecurityGroupListResultPage) NotDone() bool { - return !page.sglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { - return page.sglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SecurityGroupListResultPage) Values() []SecurityGroup { - if page.sglr.IsEmpty() { - return nil - } - return *page.sglr.Value -} - -// Creates a new instance of the SecurityGroupListResultPage type. -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. -type SecurityGroupNetworkInterface struct { - // ID - ID of the network interface. - ID *string `json:"id,omitempty"` - // SecurityRuleAssociations - All security rules associated with the network interface. - SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` -} - -// SecurityGroupPropertiesFormat network Security Group resource. -type SecurityGroupPropertiesFormat struct { - // SecurityRules - A collection of security rules of the network security group. - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - // DefaultSecurityRules - The default security rules of network security group. - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces. - NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // Subnets - READ-ONLY; A collection of references to subnets. - Subnets *[]Subnet `json:"subnets,omitempty"` - // ResourceGUID - The resource GUID property of the network security group resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 - } - if sgpf.DefaultSecurityRules != nil { - objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules - } - if sgpf.ResourceGUID != nil { - objectMap["resourceGuid"] = sgpf.ResourceGUID - } - if sgpf.ProvisioningState != nil { - objectMap["provisioningState"] = sgpf.ProvisioningState - } - 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' - SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` - // EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic. - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SecurityGroupsClient) (SecurityGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result. -func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.CreateOrUpdateResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - -// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SecurityGroupsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SecurityGroupsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SecurityGroupsDeleteFuture.Result. -func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SecurityGroupsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SecurityGroupsClient) (SecurityGroup, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result. -func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.UpdateTagsResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - -// SecurityGroupViewParameters parameters that define the VM to check security groups for. -type SecurityGroupViewParameters struct { - // TargetResourceID - ID of the target VM. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// SecurityGroupViewResult the information about security rules applied to the specified VM. -type SecurityGroupViewResult struct { - autorest.Response `json:"-"` - // NetworkInterfaces - List of network interfaces on the specified VM. - NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` -} - -// SecurityRule network security rule. -type SecurityRule struct { - autorest.Response `json:"-"` - // SecurityRulePropertiesFormat - Properties of the security rule. - *SecurityRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for SecurityRule. -func (sr SecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sr.SecurityRulePropertiesFormat != nil { - objectMap["properties"] = sr.SecurityRulePropertiesFormat - } - if sr.Name != nil { - objectMap["name"] = sr.Name - } - if sr.Etag != nil { - objectMap["etag"] = sr.Etag - } - if sr.ID != nil { - objectMap["id"] = sr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. -func (sr *SecurityRule) 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 securityRulePropertiesFormat SecurityRulePropertiesFormat - err = json.Unmarshal(*v, &securityRulePropertiesFormat) - if err != nil { - return err - } - sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sr.ID = &ID - } - } - } - - return nil -} - -// SecurityRuleAssociations all security rules associated with the network interface. -type SecurityRuleAssociations struct { - // NetworkInterfaceAssociation - Network interface and it's custom security rules. - NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - // SubnetAssociation - Subnet and it's custom security rules. - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` - // DefaultSecurityRules - Collection of default security rules of the network security group. - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - // EffectiveSecurityRules - Collection of effective security rules. - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` -} - -// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that -// belongs to a network security group. -type SecurityRuleListResult struct { - autorest.Response `json:"-"` - // Value - The security rules in a network security group. - Value *[]SecurityRule `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. -type SecurityRuleListResultIterator struct { - i int - page SecurityRuleListResultPage -} - -// 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 *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.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 *SecurityRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SecurityRuleListResultIterator) 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 SecurityRuleListResultIterator) Response() SecurityRuleListResult { - 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 SecurityRuleListResultIterator) Value() SecurityRule { - if !iter.page.NotDone() { - return SecurityRule{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SecurityRuleListResultIterator type. -func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator { - return SecurityRuleListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(srlr.NextLink))) -} - -// SecurityRuleListResultPage contains a page of SecurityRule values. -type SecurityRuleListResultPage struct { - fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error) - srlr SecurityRuleListResult -} - -// 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 *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.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.srlr) - if err != nil { - return err - } - page.srlr = 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 *SecurityRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SecurityRuleListResultPage) NotDone() bool { - return !page.srlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { - return page.srlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SecurityRuleListResultPage) Values() []SecurityRule { - if page.srlr.IsEmpty() { - return nil - } - return *page.srlr.Value -} - -// Creates a new instance of the SecurityRuleListResultPage type. -func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { - return SecurityRuleListResultPage{ - fn: getNextPage, - srlr: cur, - } -} - -// SecurityRulePropertiesFormat security rule resource. -type SecurityRulePropertiesFormat struct { - // Description - A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - // Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk' - Protocol SecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // SourceAddressPrefixes - The CIDR or source IP ranges. - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - // SourceApplicationSecurityGroups - The application security group specified as source. - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - // DestinationApplicationSecurityGroups - The application security group specified as destination. - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - // SourcePortRanges - The source port ranges. - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - // DestinationPortRanges - The destination port ranges. - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' - Access SecurityRuleAccess `json:"access,omitempty"` - // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' - Direction SecurityRuleDirection `json:"direction,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SecurityRulesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SecurityRulesClient) (SecurityRule, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result. -func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { - sr, err = client.CreateOrUpdateResponder(sr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") - } - } - return -} - -// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SecurityRulesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SecurityRulesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SecurityRulesDeleteFuture.Result. -func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SecurityRulesEvaluationResult network security rules evaluation result. -type SecurityRulesEvaluationResult struct { - // Name - Name of the network security rule. - Name *string `json:"name,omitempty"` - // ProtocolMatched - Value indicating whether protocol is matched. - ProtocolMatched *bool `json:"protocolMatched,omitempty"` - // SourceMatched - Value indicating whether source is matched. - SourceMatched *bool `json:"sourceMatched,omitempty"` - // SourcePortMatched - Value indicating whether source port is matched. - SourcePortMatched *bool `json:"sourcePortMatched,omitempty"` - // DestinationMatched - Value indicating whether destination is matched. - DestinationMatched *bool `json:"destinationMatched,omitempty"` - // DestinationPortMatched - Value indicating whether destination port is matched. - DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"` -} - -// ServiceAssociationLink serviceAssociationLink resource. -type ServiceAssociationLink struct { - // ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format. - *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceAssociationLink. -func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sal.ServiceAssociationLinkPropertiesFormat != nil { - objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat - } - if sal.Name != nil { - objectMap["name"] = sal.Name - } - if sal.Type != nil { - objectMap["type"] = sal.Type - } - if sal.ID != nil { - objectMap["id"] = sal.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct. -func (sal *ServiceAssociationLink) 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 serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat - err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat) - if err != nil { - return err - } - sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sal.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sal.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sal.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sal.ID = &ID - } - } - } - - return nil -} - -// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink. -type ServiceAssociationLinkPropertiesFormat struct { - // LinkedResourceType - Resource type of the linked resource. - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - // Link - Link to the external resource. - Link *string `json:"link,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource. - ProvisioningState *string `json:"provisioningState,omitempty"` - // AllowDelete - If true, the resource can be deleted. - AllowDelete *bool `json:"allowDelete,omitempty"` - // Locations - A list of locations. - 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:"-"` - // Value - The service association links in a subnet. - Value *[]ServiceAssociationLink `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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). - ServiceName *string `json:"serviceName,omitempty"` - // Actions - Describes the actions permitted to the service upon delegation. - Actions *[]string `json:"actions,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `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 - } - if sdpf.Actions != nil { - objectMap["actions"] = sdpf.Actions - } - return json.Marshal(objectMap) -} - -// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ServiceEndpointPoliciesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result. -func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sep.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent { - sep, err = client.CreateOrUpdateResponder(sep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request") - } - } - return -} - -// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServiceEndpointPoliciesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServiceEndpointPoliciesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result. -func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServiceEndpointPoliciesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result. -func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sep.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent { - sep, err = client.UpdateResponder(sep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request") - } - } - return -} - -// ServiceEndpointPolicy service End point policy resource. -type ServiceEndpointPolicy struct { - autorest.Response `json:"-"` - // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy. - *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for ServiceEndpointPolicy. -func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sep.ServiceEndpointPolicyPropertiesFormat != nil { - objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat - } - if sep.Etag != nil { - objectMap["etag"] = sep.Etag - } - if sep.ID != nil { - objectMap["id"] = sep.ID - } - if sep.Location != nil { - objectMap["location"] = sep.Location - } - if sep.Tags != nil { - objectMap["tags"] = sep.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct. -func (sep *ServiceEndpointPolicy) 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 serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat - err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat) - if err != nil { - return err - } - sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sep.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sep.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sep.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - sep.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - sep.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - sep.Tags = tags - } - } - } - - return nil -} - -// ServiceEndpointPolicyDefinition service Endpoint policy definitions. -type ServiceEndpointPolicyDefinition struct { - autorest.Response `json:"-"` - // ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition. - *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition. -func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil { - objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat - } - if sepd.Name != nil { - objectMap["name"] = sepd.Name - } - if sepd.Etag != nil { - objectMap["etag"] = sepd.Etag - } - if sepd.ID != nil { - objectMap["id"] = sepd.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct. -func (sepd *ServiceEndpointPolicyDefinition) 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 serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat - err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat) - if err != nil { - return err - } - sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - sepd.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - sepd.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - sepd.ID = &ID - } - } - } - - return nil -} - -// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service -// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. -type ServiceEndpointPolicyDefinitionListResult struct { - autorest.Response `json:"-"` - // Value - The service endpoint policy definition in a service endpoint policy. - Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of -// ServiceEndpointPolicyDefinition values. -type ServiceEndpointPolicyDefinitionListResultIterator struct { - i int - page ServiceEndpointPolicyDefinitionListResultPage -} - -// 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 *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.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 *ServiceEndpointPolicyDefinitionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServiceEndpointPolicyDefinitionListResultIterator) 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 ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult { - 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 ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition { - if !iter.page.NotDone() { - return ServiceEndpointPolicyDefinition{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type. -func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator { - return ServiceEndpointPolicyDefinitionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(sepdlr.NextLink))) -} - -// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values. -type ServiceEndpointPolicyDefinitionListResultPage struct { - fn func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error) - sepdlr ServiceEndpointPolicyDefinitionListResult -} - -// 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 *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.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.sepdlr) - if err != nil { - return err - } - page.sepdlr = 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 *ServiceEndpointPolicyDefinitionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool { - return !page.sepdlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult { - return page.sepdlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition { - if page.sepdlr.IsEmpty() { - return nil - } - return *page.sepdlr.Value -} - -// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type. -func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage { - return ServiceEndpointPolicyDefinitionListResultPage{ - fn: getNextPage, - sepdlr: cur, - } -} - -// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource. -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - // Description - A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - // Service - Service endpoint name. - Service *string `json:"service,omitempty"` - // ServiceResources - A list of service resources. - ServiceResources *[]string `json:"serviceResources,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result. -func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sepd.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent { - sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request") - } - } - return -} - -// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ServiceEndpointPolicyDefinitionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result. -func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call. -type ServiceEndpointPolicyListResult struct { - autorest.Response `json:"-"` - // Value - A list of ServiceEndpointPolicy resources. - Value *[]ServiceEndpointPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page ServiceEndpointPolicyListResultPage -} - -// 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 *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.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 *ServiceEndpointPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ServiceEndpointPolicyListResultIterator) 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 ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult { - 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 ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy { - if !iter.page.NotDone() { - return ServiceEndpointPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ServiceEndpointPolicyListResultIterator type. -func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator { - return ServiceEndpointPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(seplr.NextLink))) -} - -// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values. -type ServiceEndpointPolicyListResultPage struct { - fn func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error) - seplr ServiceEndpointPolicyListResult -} - -// 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 *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.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.seplr) - if err != nil { - return err - } - page.seplr = 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 *ServiceEndpointPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ServiceEndpointPolicyListResultPage) NotDone() bool { - return !page.seplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult { - return page.seplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy { - if page.seplr.IsEmpty() { - return nil - } - return *page.seplr.Value -} - -// Creates a new instance of the ServiceEndpointPolicyListResultPage type. -func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { - return ServiceEndpointPolicyListResultPage{ - fn: getNextPage, - seplr: cur, - } -} - -// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource. -type ServiceEndpointPolicyPropertiesFormat struct { - // ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy. - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - // Subnets - READ-ONLY; A collection of references to subnets. - Subnets *[]Subnet `json:"subnets,omitempty"` - // ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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. - Service *string `json:"service,omitempty"` - // Locations - A list of locations. - Locations *[]string `json:"locations,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ServiceTagInformation the service tag information. -type ServiceTagInformation struct { - // Properties - READ-ONLY; Properties of the service tag information. - Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"` - // Name - READ-ONLY; The name of service tag. - Name *string `json:"name,omitempty"` - // ID - READ-ONLY; The ID of service tag. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceTagInformation. -func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServiceTagInformationPropertiesFormat properties of the service tag information. -type ServiceTagInformationPropertiesFormat struct { - // ChangeNumber - READ-ONLY; The iteration number of service tag. - ChangeNumber *string `json:"changeNumber,omitempty"` - // Region - READ-ONLY; The region of service tag. - Region *string `json:"region,omitempty"` - // SystemService - READ-ONLY; The name of system service. - SystemService *string `json:"systemService,omitempty"` - // AddressPrefixes - READ-ONLY; The list of IP address prefixes. - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat. -func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ServiceTagsListResult response for the ListServiceTags API service call. -type ServiceTagsListResult struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; The name of the cloud. - Name *string `json:"name,omitempty"` - // ID - READ-ONLY; The ID of the cloud. - ID *string `json:"id,omitempty"` - // Type - READ-ONLY; The azure resource type. - Type *string `json:"type,omitempty"` - // ChangeNumber - READ-ONLY; The iteration number. - ChangeNumber *string `json:"changeNumber,omitempty"` - // Cloud - READ-ONLY; The name of the cloud. - Cloud *string `json:"cloud,omitempty"` - // Values - READ-ONLY; The list of service tag information resources. - Values *[]ServiceTagInformation `json:"values,omitempty"` -} - -// MarshalJSON is the custom marshaler for ServiceTagsListResult. -func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// String ... -type String struct { - autorest.Response `json:"-"` - Value *string `json:"value,omitempty"` -} - -// Subnet subnet in a virtual network resource. -type Subnet struct { - autorest.Response `json:"-"` - // SubnetPropertiesFormat - Properties of the subnet. - *SubnetPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for Subnet. -func (s Subnet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if s.SubnetPropertiesFormat != nil { - objectMap["properties"] = s.SubnetPropertiesFormat - } - if s.Name != nil { - objectMap["name"] = s.Name - } - if s.Etag != nil { - objectMap["etag"] = s.Etag - } - if s.ID != nil { - objectMap["id"] = s.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Subnet struct. -func (s *Subnet) 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 subnetPropertiesFormat SubnetPropertiesFormat - err = json.Unmarshal(*v, &subnetPropertiesFormat) - if err != nil { - return err - } - s.SubnetPropertiesFormat = &subnetPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - s.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - s.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - s.ID = &ID - } - } - } - - return nil -} - -// SubnetAssociation subnet and it's custom security rules. -type SubnetAssociation struct { - // ID - READ-ONLY; Subnet ID. - ID *string `json:"id,omitempty"` - // SecurityRules - Collection of custom security rules. - 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 { - autorest.Response `json:"-"` - // Value - The subnets in a virtual network. - Value *[]Subnet `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// SubnetListResultIterator provides access to a complete listing of Subnet values. -type SubnetListResultIterator struct { - i int - page SubnetListResultPage -} - -// 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 *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.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 *SubnetListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter SubnetListResultIterator) 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 SubnetListResultIterator) Response() SubnetListResult { - 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 SubnetListResultIterator) Value() Subnet { - if !iter.page.NotDone() { - return Subnet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the SubnetListResultIterator type. -func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator { - return SubnetListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(slr.NextLink))) -} - -// SubnetListResultPage contains a page of Subnet values. -type SubnetListResultPage struct { - fn func(context.Context, SubnetListResult) (SubnetListResult, error) - slr SubnetListResult -} - -// 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 *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.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.slr) - if err != nil { - return err - } - page.slr = 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 *SubnetListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page SubnetListResultPage) NotDone() bool { - return !page.slr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page SubnetListResultPage) Response() SubnetListResult { - return page.slr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page SubnetListResultPage) Values() []Subnet { - if page.slr.IsEmpty() { - return nil - } - return *page.slr.Value -} - -// Creates a new instance of the SubnetListResultPage type. -func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { - return SubnetListResultPage{ - fn: getNextPage, - slr: cur, - } -} - -// SubnetPropertiesFormat properties of the subnet. -type SubnetPropertiesFormat struct { - // AddressPrefix - The address prefix for the subnet. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // AddressPrefixes - List of address prefixes for the subnet. - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - // RouteTable - The reference of the RouteTable resource. - RouteTable *RouteTable `json:"routeTable,omitempty"` - // NatGateway - Nat gateway associated with this subnet. - NatGateway *SubResource `json:"natGateway,omitempty"` - // ServiceEndpoints - An array of service endpoints. - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` - // ServiceEndpointPolicies - An array of service endpoint policies. - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - // PrivateEndpoints - READ-ONLY; An array of references to private endpoints. - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - // IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet. - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - // IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet. - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - // ResourceNavigationLinks - Gets an array of references to the external resources using subnet. - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - // ServiceAssociationLinks - Gets an array of references to services injecting into this subnet. - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - // Delegations - Gets an array of references to the delegations on the subnet. - Delegations *[]Delegation `json:"delegations,omitempty"` - // Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. - Purpose *string `json:"purpose,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` - // PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. - PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"` - // PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. - 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.ResourceNavigationLinks != nil { - objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks - } - if spf.ServiceAssociationLinks != nil { - objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks - } - if spf.Delegations != nil { - objectMap["delegations"] = spf.Delegations - } - if spf.ProvisioningState != nil { - objectMap["provisioningState"] = spf.ProvisioningState - } - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SubnetsClient) (Subnet, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SubnetsCreateOrUpdateFuture.Result. -func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.CreateOrUpdateResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type SubnetsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SubnetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SubnetsDeleteFuture.Result. -func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SubnetsPrepareNetworkPoliciesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SubnetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result. -func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture") - return - } - ar.Response = future.Response() - return -} - -// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SubnetsUnprepareNetworkPoliciesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(SubnetsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result. -func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture") - return - } - ar.Response = future.Response() - return -} - -// SubResource reference to another subresource. -type SubResource struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// TagsObject tags object for patch operations. -type TagsObject struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for TagsObject. -func (toVar TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if toVar.Tags != nil { - objectMap["tags"] = toVar.Tags - } - return json.Marshal(objectMap) -} - -// Topology topology of the specified resource group. -type Topology struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; GUID representing the operation id. - ID *string `json:"id,omitempty"` - // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group. - CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` - // LastModified - READ-ONLY; The datetime when the topology was last modified. - LastModified *date.Time `json:"lastModified,omitempty"` - // Resources - A list of topology resources. - 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. - Name *string `json:"name,omitempty"` - // ResourceID - The ID of the resource that is associated with the parent resource. - ResourceID *string `json:"resourceId,omitempty"` - // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains' - AssociationType AssociationType `json:"associationType,omitempty"` -} - -// TopologyParameters parameters that define the representation of topology. -type TopologyParameters struct { - // TargetResourceGroupName - The name of the target resource group to perform topology on. - TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` - // TargetVirtualNetwork - The reference of the Virtual Network resource. - TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` - // TargetSubnet - The reference of the Subnet resource. - TargetSubnet *SubResource `json:"targetSubnet,omitempty"` -} - -// TopologyResource the network resource topology information for the given resource group. -type TopologyResource struct { - // Name - Name of the resource. - Name *string `json:"name,omitempty"` - // ID - ID of the resource. - ID *string `json:"id,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Associations - Holds the associations the resource has with other resources in the resource group. - Associations *[]TopologyAssociation `json:"associations,omitempty"` -} - -// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics. -type TrafficAnalyticsConfigurationProperties struct { - // Enabled - Flag to enable/disable traffic analytics. - Enabled *bool `json:"enabled,omitempty"` - // WorkspaceID - The resource guid of the attached workspace. - WorkspaceID *string `json:"workspaceId,omitempty"` - // WorkspaceRegion - The location of the attached workspace. - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - // WorkspaceResourceID - Resource Id of the attached workspace. - WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` - // TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics. - TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"` -} - -// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics. -type TrafficAnalyticsProperties struct { - // NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} - -// TroubleshootingDetails information gained from troubleshooting of specified resource. -type TroubleshootingDetails struct { - // ID - The id of the get troubleshoot operation. - ID *string `json:"id,omitempty"` - // ReasonType - Reason type of failure. - ReasonType *string `json:"reasonType,omitempty"` - // Summary - A summary of troubleshooting. - Summary *string `json:"summary,omitempty"` - // Detail - Details on troubleshooting results. - Detail *string `json:"detail,omitempty"` - // RecommendedActions - List of recommended actions. - RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` -} - -// TroubleshootingParameters parameters that define the resource to troubleshoot. -type TroubleshootingParameters struct { - // TargetResourceID - The target resource to troubleshoot. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // TroubleshootingProperties - Properties of the troubleshooting resource. - *TroubleshootingProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for TroubleshootingParameters. -func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tp.TargetResourceID != nil { - objectMap["targetResourceId"] = tp.TargetResourceID - } - if tp.TroubleshootingProperties != nil { - objectMap["properties"] = tp.TroubleshootingProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. -func (tp *TroubleshootingParameters) 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 "targetResourceId": - if v != nil { - var targetResourceID string - err = json.Unmarshal(*v, &targetResourceID) - if err != nil { - return err - } - tp.TargetResourceID = &targetResourceID - } - case "properties": - if v != nil { - var troubleshootingProperties TroubleshootingProperties - err = json.Unmarshal(*v, &troubleshootingProperties) - if err != nil { - return err - } - tp.TroubleshootingProperties = &troubleshootingProperties - } - } - } - - return nil -} - -// TroubleshootingProperties storage location provided for troubleshoot. -type TroubleshootingProperties struct { - // StorageID - The ID for the storage account to save the troubleshoot result. - StorageID *string `json:"storageId,omitempty"` - // StoragePath - The path to the blob to save the troubleshoot result in. - StoragePath *string `json:"storagePath,omitempty"` -} - -// TroubleshootingRecommendedActions recommended actions based on discovered issues. -type TroubleshootingRecommendedActions struct { - // ActionID - ID of the recommended action. - ActionID *string `json:"actionId,omitempty"` - // ActionText - Description of recommended actions. - ActionText *string `json:"actionText,omitempty"` - // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. - ActionURI *string `json:"actionUri,omitempty"` - // ActionURIText - The information from the URI for the recommended troubleshooting actions. - ActionURIText *string `json:"actionUriText,omitempty"` -} - -// TroubleshootingResult troubleshooting information gained from specified resource. -type TroubleshootingResult struct { - autorest.Response `json:"-"` - // StartTime - The start time of the troubleshooting. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the troubleshooting. - EndTime *date.Time `json:"endTime,omitempty"` - // Code - The result code of the troubleshooting. - Code *string `json:"code,omitempty"` - // Results - Information from troubleshooting. - Results *[]TroubleshootingDetails `json:"results,omitempty"` -} - -// TunnelConnectionHealth virtualNetworkGatewayConnection properties. -type TunnelConnectionHealth struct { - // Tunnel - READ-ONLY; Tunnel name. - Tunnel *string `json:"tunnel,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format. - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for TunnelConnectionHealth. -func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet. -type UnprepareNetworkPoliciesRequest struct { - // ServiceName - The name of the service for which subnet is being unprepared for. - ServiceName *string `json:"serviceName,omitempty"` -} - -// Usage describes network resource usage. -type Usage struct { - // ID - READ-ONLY; Resource identifier. - ID *string `json:"id,omitempty"` - // Unit - An enum describing the unit of measurement. - Unit *string `json:"unit,omitempty"` - // CurrentValue - The current value of the usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - // Limit - The limit of usage. - Limit *int64 `json:"limit,omitempty"` - // Name - The name of the type of usage. - 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. - Value *string `json:"value,omitempty"` - // LocalizedValue - A localized string describing the resource name. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// UsagesListResult the list usages operation response. -type UsagesListResult struct { - autorest.Response `json:"-"` - // Value - The list network resource usages. - Value *[]Usage `json:"value,omitempty"` - // NextLink - URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// UsagesListResultIterator provides access to a complete listing of Usage values. -type UsagesListResultIterator struct { - i int - page UsagesListResultPage -} - -// 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 *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.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 *UsagesListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter UsagesListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult { - 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 UsagesListResultIterator) Value() Usage { - if !iter.page.NotDone() { - return Usage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the UsagesListResultIterator type. -func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator { - return UsagesListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ulr.NextLink))) -} - -// UsagesListResultPage contains a page of Usage values. -type UsagesListResultPage struct { - fn func(context.Context, UsagesListResult) (UsagesListResult, error) - ulr UsagesListResult -} - -// 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 *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.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.ulr) - if err != nil { - return err - } - page.ulr = 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 *UsagesListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page UsagesListResultPage) NotDone() bool { - return !page.ulr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page UsagesListResultPage) Response() UsagesListResult { - return page.ulr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page UsagesListResultPage) Values() []Usage { - if page.ulr.IsEmpty() { - return nil - } - return *page.ulr.Value -} - -// Creates a new instance of the UsagesListResultPage type. -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. -type VerificationIPFlowParameters struct { - // TargetResourceID - The ID of the target resource to perform next-hop on. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound' - Direction Direction `json:"direction,omitempty"` - // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP' - Protocol IPFlowProtocol `json:"protocol,omitempty"` - // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. - LocalPort *string `json:"localPort,omitempty"` - // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. - RemotePort *string `json:"remotePort,omitempty"` - // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` -} - -// VerificationIPFlowResult results of IP flow verification on the target resource. -type VerificationIPFlowResult struct { - autorest.Response `json:"-"` - // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny' - Access Access `json:"access,omitempty"` - // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. - RuleName *string `json:"ruleName,omitempty"` -} - -// VirtualHub virtualHub Resource. -type VirtualHub struct { - autorest.Response `json:"-"` - // VirtualHubProperties - Properties of the virtual hub. - *VirtualHubProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualHub. -func (vh VirtualHub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vh.VirtualHubProperties != nil { - objectMap["properties"] = vh.VirtualHubProperties - } - if vh.ID != nil { - objectMap["id"] = vh.ID - } - if vh.Location != nil { - objectMap["location"] = vh.Location - } - if vh.Tags != nil { - objectMap["tags"] = vh.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualHub struct. -func (vh *VirtualHub) 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 virtualHubProperties VirtualHubProperties - err = json.Unmarshal(*v, &virtualHubProperties) - if err != nil { - return err - } - vh.VirtualHubProperties = &virtualHubProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vh.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vh.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vh.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vh.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vh.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vh.Tags = tags - } - } - } - - return nil -} - -// VirtualHubID virtual Hub identifier. -type VirtualHubID struct { - // ID - The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription. - ID *string `json:"id,omitempty"` -} - -// VirtualHubProperties parameters for VirtualHub. -type VirtualHubProperties struct { - // VirtualWan - The VirtualWAN to which the VirtualHub belongs. - VirtualWan *SubResource `json:"virtualWan,omitempty"` - // VpnGateway - The VpnGateway associated with this VirtualHub. - VpnGateway *SubResource `json:"vpnGateway,omitempty"` - // P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub. - P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` - // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub. - ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` - // VirtualNetworkConnections - List of all vnet connections with this VirtualHub. - VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"` - // AddressPrefix - Address-prefix for this VirtualHub. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // RouteTable - The routeTable associated with this virtual hub. - RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// VirtualHubRoute virtualHub route. -type VirtualHubRoute struct { - // AddressPrefixes - List of all addressPrefixes. - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - // NextHopIPAddress - NextHop ip address. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} - -// VirtualHubRouteTable virtualHub route table. -type VirtualHubRouteTable struct { - // Routes - List of all routes. - Routes *[]VirtualHubRoute `json:"routes,omitempty"` -} - -// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualHubsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualHubsClient) (VirtualHub, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result. -func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { - vh, err = client.CreateOrUpdateResponder(vh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualHubsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualHubsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualHubsDeleteFuture.Result. -func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualHubsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualHubsClient) (VirtualHub, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualHubsUpdateTagsFuture.Result. -func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vh.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { - vh, err = client.UpdateTagsResponder(vh.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetwork virtual Network resource. -type VirtualNetwork struct { - autorest.Response `json:"-"` - // VirtualNetworkPropertiesFormat - Properties of the virtual network. - *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualNetwork. -func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vn.VirtualNetworkPropertiesFormat != nil { - objectMap["properties"] = vn.VirtualNetworkPropertiesFormat - } - if vn.Etag != nil { - objectMap["etag"] = vn.Etag - } - if vn.ID != nil { - objectMap["id"] = vn.ID - } - if vn.Location != nil { - objectMap["location"] = vn.Location - } - if vn.Tags != nil { - objectMap["tags"] = vn.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. -func (vn *VirtualNetwork) 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 virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) - if err != nil { - return err - } - vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vn.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vn.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vn.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vn.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vn.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vn.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway -// resource. -type VirtualNetworkConnectionGatewayReference struct { - // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - ID *string `json:"id,omitempty"` -} - -// VirtualNetworkGateway a common class for general resource information. -type VirtualNetworkGateway struct { - autorest.Response `json:"-"` - // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. - *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkGateway. -func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vng.VirtualNetworkGatewayPropertiesFormat != nil { - objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat - } - if vng.Etag != nil { - objectMap["etag"] = vng.Etag - } - if vng.ID != nil { - objectMap["id"] = vng.ID - } - if vng.Location != nil { - objectMap["location"] = vng.Location - } - if vng.Tags != nil { - objectMap["tags"] = vng.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. -func (vng *VirtualNetworkGateway) 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 virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) - if err != nil { - return err - } - vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vng.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vng.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vng.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vng.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkGatewayConnection a common class for general resource information. -type VirtualNetworkGatewayConnection struct { - autorest.Response `json:"-"` - // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. - *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. -func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { - objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat - } - if vngc.Etag != nil { - objectMap["etag"] = vngc.Etag - } - if vngc.ID != nil { - objectMap["id"] = vngc.ID - } - if vngc.Location != nil { - objectMap["location"] = vngc.Location - } - if vngc.Tags != nil { - objectMap["tags"] = vngc.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. -func (vngc *VirtualNetworkGatewayConnection) 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 virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) - if err != nil { - return err - } - vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vngc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vngc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vngc.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vngc.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vngc.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkGatewayConnectionListEntity a common class for general resource information. -type VirtualNetworkGatewayConnectionListEntity struct { - // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. - *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity. -func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { - objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat - } - if vngcle.Etag != nil { - objectMap["etag"] = vngcle.Etag - } - if vngcle.ID != nil { - objectMap["id"] = vngcle.ID - } - if vngcle.Location != nil { - objectMap["location"] = vngcle.Location - } - if vngcle.Tags != nil { - objectMap["tags"] = vngcle.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. -func (vngcle *VirtualNetworkGatewayConnectionListEntity) 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 virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) - if err != nil { - return err - } - vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngcle.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vngcle.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vngcle.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vngcle.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vngcle.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vngcle.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties. -type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { - // AuthorizationKey - The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // VirtualNetworkGateway1 - The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` - // VirtualNetworkGateway2 - The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` - // LocalNetworkGateway2 - The reference to local network gateway resource. - LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' - ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - // RoutingWeight - The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // SharedKey - The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // Peer - The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. - 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.ResourceGUID != nil { - objectMap["resourceGuid"] = vngclepf.ResourceGUID - } - if vngclepf.ExpressRouteGatewayBypass != nil { - objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass - } - return json.Marshal(objectMap) -} - -// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API -// service call. -type VirtualNetworkGatewayConnectionListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page VirtualNetworkGatewayConnectionListResultPage -} - -// 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 *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayConnectionListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { - 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { - if !iter.page.NotDone() { - return VirtualNetworkGatewayConnection{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type. -func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator { - return VirtualNetworkGatewayConnectionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vngclr.NextLink))) -} - -// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. -type VirtualNetworkGatewayConnectionListResultPage struct { - fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) - vngclr VirtualNetworkGatewayConnectionListResult -} - -// 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 *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.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.vngclr) - if err != nil { - return err - } - page.vngclr = 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 *VirtualNetworkGatewayConnectionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { - return !page.vngclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { - return page.vngclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { - if page.vngclr.IsEmpty() { - return nil - } - return *page.vngclr.Value -} - -// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type. -func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { - return VirtualNetworkGatewayConnectionListResultPage{ - fn: getNextPage, - vngclr: cur, - } -} - -// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties. -type VirtualNetworkGatewayConnectionPropertiesFormat struct { - // AuthorizationKey - The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // VirtualNetworkGateway1 - The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` - // VirtualNetworkGateway2 - The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` - // LocalNetworkGateway2 - The reference to local network gateway resource. - LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' - ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - // RoutingWeight - The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // SharedKey - The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' - ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // Peer - The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. - 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.SharedKey != nil { - objectMap["sharedKey"] = vngcpf.SharedKey - } - if vngcpf.Peer != nil { - objectMap["peer"] = vngcpf.Peer - } - if vngcpf.EnableBgp != nil { - objectMap["enableBgp"] = vngcpf.EnableBgp - } - if vngcpf.UsePolicyBasedTrafficSelectors != nil { - objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors - } - if vngcpf.IpsecPolicies != nil { - objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies - } - if vngcpf.ResourceGUID != nil { - objectMap["resourceGuid"] = vngcpf.ResourceGUID - } - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result. -func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vngc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { - vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewayConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result. -func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result. -func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - crsk.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent { - crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result. -func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - csk.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent { - csk, err = client.SetSharedKeyResponder(csk.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result. -func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vngc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent { - vngc, err = client.UpdateTagsResponder(vngc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway. -type VirtualNetworkGatewayIPConfiguration struct { - // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. - *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. -func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat - } - if vngic.Name != nil { - objectMap["name"] = vngic.Name - } - if vngic.Etag != nil { - objectMap["etag"] = vngic.Etag - } - if vngic.ID != nil { - objectMap["id"] = vngic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. -func (vngic *VirtualNetworkGatewayIPConfiguration) 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 virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) - if err != nil { - return err - } - vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vngic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vngic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vngic.ID = &ID - } - } - } - - return nil -} - -// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration. -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the public IP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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 { - autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page VirtualNetworkGatewayListConnectionsResultPage -} - -// 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 *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayListConnectionsResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { - 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { - if !iter.page.NotDone() { - return VirtualNetworkGatewayConnectionListEntity{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type. -func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator { - return VirtualNetworkGatewayListConnectionsResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnglcr.NextLink))) -} - -// VirtualNetworkGatewayListConnectionsResultPage contains a page of -// VirtualNetworkGatewayConnectionListEntity values. -type VirtualNetworkGatewayListConnectionsResultPage struct { - fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) - vnglcr VirtualNetworkGatewayListConnectionsResult -} - -// 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 *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.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.vnglcr) - if err != nil { - return err - } - page.vnglcr = 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 *VirtualNetworkGatewayListConnectionsResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { - return !page.vnglcr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { - return page.vnglcr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { - if page.vnglcr.IsEmpty() { - return nil - } - return *page.vnglcr.Value -} - -// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type. -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. -type VirtualNetworkGatewayListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group. - Value *[]VirtualNetworkGateway `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - 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 { - i int - page VirtualNetworkGatewayListResultPage -} - -// 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 *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.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 *VirtualNetworkGatewayListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkGatewayListResultIterator) 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 VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { - 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 VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { - if !iter.page.NotDone() { - return VirtualNetworkGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkGatewayListResultIterator type. -func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator { - return VirtualNetworkGatewayListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnglr.NextLink))) -} - -// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. -type VirtualNetworkGatewayListResultPage struct { - fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) - vnglr VirtualNetworkGatewayListResult -} - -// 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 *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.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.vnglr) - if err != nil { - return err - } - page.vnglr = 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 *VirtualNetworkGatewayListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkGatewayListResultPage) NotDone() bool { - return !page.vnglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { - return page.vnglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { - if page.vnglr.IsEmpty() { - return nil - } - return *page.vnglr.Value -} - -// Creates a new instance of the VirtualNetworkGatewayListResultPage type. -func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { - return VirtualNetworkGatewayListResultPage{ - fn: getNextPage, - vnglr: cur, - } -} - -// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties. -type VirtualNetworkGatewayPropertiesFormat struct { - // IPConfigurations - IP configurations for virtual network gateway. - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - // GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' - GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - // VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' - VpnType VpnType `json:"vpnType,omitempty"` - // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. - EnableBgp *bool `json:"enableBgp,omitempty"` - // ActiveActive - ActiveActive flag. - ActiveActive *bool `json:"activeActive,omitempty"` - // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - // BgpSettings - Virtual network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // CustomRoutes - The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,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.EnableBgp != nil { - objectMap["enableBgp"] = vngpf.EnableBgp - } - 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.ResourceGUID != nil { - objectMap["resourceGuid"] = vngpf.ResourceGUID - } - return json.Marshal(objectMap) -} - -// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result. -func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.CreateOrUpdateResponder(vng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result. -func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (String, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result. -func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GeneratevpnclientpackageResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (String, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result. -func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GenerateVpnProfileResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result. -func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - grlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { - grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result. -func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - bpslr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent { - bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result. -func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - grlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent { - grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result. -func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vcchdlr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent { - vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result. -func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vcipp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { - vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (String, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result. -func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - s.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { - s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaySku virtualNetworkGatewaySku details. -type VirtualNetworkGatewaySku struct { - // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ' - Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` - // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ' - Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` - // Capacity - The capacity. - Capacity *int32 `json:"capacity,omitempty"` -} - -// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysResetFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result. -func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.ResetResponder(vng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result. -func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result. -func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vcipp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent { - vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkGatewaysUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result. -func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vng.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent { - vng, err = client.UpdateTagsResponder(vng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkListResult response for the ListVirtualNetworks API service call. -type VirtualNetworkListResult struct { - autorest.Response `json:"-"` - // Value - Gets a list of VirtualNetwork resources in a resource group. - Value *[]VirtualNetwork `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. -type VirtualNetworkListResultIterator struct { - i int - page VirtualNetworkListResultPage -} - -// 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 *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.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 *VirtualNetworkListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkListResultIterator) 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 VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { - 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 VirtualNetworkListResultIterator) Value() VirtualNetwork { - if !iter.page.NotDone() { - return VirtualNetwork{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkListResultIterator type. -func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator { - return VirtualNetworkListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnlr.NextLink))) -} - -// VirtualNetworkListResultPage contains a page of VirtualNetwork values. -type VirtualNetworkListResultPage struct { - fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error) - vnlr VirtualNetworkListResult -} - -// 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 *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.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.vnlr) - if err != nil { - return err - } - page.vnlr = 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 *VirtualNetworkListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkListResultPage) NotDone() bool { - return !page.vnlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { - return page.vnlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { - if page.vnlr.IsEmpty() { - return nil - } - return *page.vnlr.Value -} - -// Creates a new instance of the VirtualNetworkListResultPage type. -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. -type VirtualNetworkListUsageResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; VirtualNetwork usage stats. - Value *[]VirtualNetworkUsage `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - 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 { - i int - page VirtualNetworkListUsageResultPage -} - -// 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 *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.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 *VirtualNetworkListUsageResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkListUsageResultIterator) 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 VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { - 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 VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { - if !iter.page.NotDone() { - return VirtualNetworkUsage{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkListUsageResultIterator type. -func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator { - return VirtualNetworkListUsageResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnlur.NextLink))) -} - -// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. -type VirtualNetworkListUsageResultPage struct { - fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) - vnlur VirtualNetworkListUsageResult -} - -// 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 *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.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.vnlur) - if err != nil { - return err - } - page.vnlur = 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 *VirtualNetworkListUsageResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkListUsageResultPage) NotDone() bool { - return !page.vnlur.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { - return page.vnlur -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { - if page.vnlur.IsEmpty() { - return nil - } - return *page.vnlur.Value -} - -// Creates a new instance of the VirtualNetworkListUsageResultPage type. -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. -type VirtualNetworkPeering struct { - autorest.Response `json:"-"` - // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. - *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkPeering. -func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnp.VirtualNetworkPeeringPropertiesFormat != nil { - objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat - } - if vnp.Name != nil { - objectMap["name"] = vnp.Name - } - if vnp.Etag != nil { - objectMap["etag"] = vnp.Etag - } - if vnp.ID != nil { - objectMap["id"] = vnp.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. -func (vnp *VirtualNetworkPeering) 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 virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) - if err != nil { - return err - } - vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vnp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vnp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vnp.ID = &ID - } - } - } - - return nil -} - -// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that -// belong to a virtual network. -type VirtualNetworkPeeringListResult struct { - autorest.Response `json:"-"` - // Value - The peerings in a virtual network. - Value *[]VirtualNetworkPeering `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering -// values. -type VirtualNetworkPeeringListResultIterator struct { - i int - page VirtualNetworkPeeringListResultPage -} - -// 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 *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.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 *VirtualNetworkPeeringListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkPeeringListResultIterator) 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 VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { - 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { - if !iter.page.NotDone() { - return VirtualNetworkPeering{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkPeeringListResultIterator type. -func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator { - return VirtualNetworkPeeringListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnplr.NextLink))) -} - -// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. -type VirtualNetworkPeeringListResultPage struct { - fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) - vnplr VirtualNetworkPeeringListResult -} - -// 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 *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.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.vnplr) - if err != nil { - return err - } - page.vnplr = 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 *VirtualNetworkPeeringListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkPeeringListResultPage) NotDone() bool { - return !page.vnplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { - return page.vnplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { - if page.vnplr.IsEmpty() { - return nil - } - return *page.vnplr.Value -} - -// Creates a new instance of the VirtualNetworkPeeringListResultPage type. -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. -type VirtualNetworkPeeringPropertiesFormat struct { - // AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` - // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - // RemoteAddressSpace - The reference of the remote virtual network address space. - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' - PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` - // ProvisioningState - The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkPeeringsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result. -func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnp.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent { - vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkPeeringsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkPeeringsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result. -func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkPropertiesFormat properties of the virtual network. -type VirtualNetworkPropertiesFormat struct { - // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. - DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` - // Subnets - A list of subnets in a Virtual Network. - Subnets *[]Subnet `json:"subnets,omitempty"` - // VirtualNetworkPeerings - A list of peerings in a Virtual Network. - VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` - // ResourceGUID - The resourceGuid property of the Virtual Network resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. - EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` - // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network. - EnableVMProtection *bool `json:"enableVmProtection,omitempty"` - // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` -} - -// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworksCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworksClient) (VirtualNetwork, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result. -func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vn.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { - vn, err = client.CreateOrUpdateResponder(vn.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualNetworksDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworksDeleteFuture.Result. -func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworksUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworksClient) (VirtualNetwork, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result. -func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vn.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { - vn, err = client.UpdateTagsResponder(vn.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkTap virtual Network Tap resource. -type VirtualNetworkTap struct { - autorest.Response `json:"-"` - // VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties. - *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkTap. -func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnt.VirtualNetworkTapPropertiesFormat != nil { - objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat - } - if vnt.Etag != nil { - objectMap["etag"] = vnt.Etag - } - if vnt.ID != nil { - objectMap["id"] = vnt.ID - } - if vnt.Location != nil { - objectMap["location"] = vnt.Location - } - if vnt.Tags != nil { - objectMap["tags"] = vnt.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct. -func (vnt *VirtualNetworkTap) 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 virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat) - if err != nil { - return err - } - vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vnt.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vnt.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vnt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vnt.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vnt.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vnt.Tags = tags - } - } - } - - return nil -} - -// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call. -type VirtualNetworkTapListResult struct { - autorest.Response `json:"-"` - // Value - A list of VirtualNetworkTaps in a resource group. - Value *[]VirtualNetworkTap `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values. -type VirtualNetworkTapListResultIterator struct { - i int - page VirtualNetworkTapListResultPage -} - -// 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 *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.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 *VirtualNetworkTapListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkTapListResultIterator) 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 VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult { - 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 VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap { - if !iter.page.NotDone() { - return VirtualNetworkTap{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkTapListResultIterator type. -func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator { - return VirtualNetworkTapListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vntlr.NextLink))) -} - -// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values. -type VirtualNetworkTapListResultPage struct { - fn func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error) - vntlr VirtualNetworkTapListResult -} - -// 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 *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.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.vntlr) - if err != nil { - return err - } - page.vntlr = 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 *VirtualNetworkTapListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkTapListResultPage) NotDone() bool { - return !page.vntlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult { - return page.vntlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap { - if page.vntlr.IsEmpty() { - return nil - } - return *page.vntlr.Value -} - -// Creates a new instance of the VirtualNetworkTapListResultPage type. -func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage { - return VirtualNetworkTapListResultPage{ - fn: getNextPage, - vntlr: cur, - } -} - -// VirtualNetworkTapPropertiesFormat virtual Network Tap properties. -type VirtualNetworkTapPropertiesFormat struct { - // NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. - NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - // ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap. - DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - // DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap. - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - // DestinationPort - The VXLAN destination port that will receive the tapped traffic. - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result. -func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnt.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent { - vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkTapsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkTapsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result. -func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkTapsUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result. -func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnt.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent { - vnt, err = client.UpdateTagsResponder(vnt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkUsage usage details for subnet. -type VirtualNetworkUsage struct { - // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet. - CurrentValue *float64 `json:"currentValue,omitempty"` - // ID - READ-ONLY; Subnet identifier. - ID *string `json:"id,omitempty"` - // Limit - READ-ONLY; Indicates the size of the subnet. - Limit *float64 `json:"limit,omitempty"` - // Name - READ-ONLY; The name containing common and localized value for usage. - Name *VirtualNetworkUsageName `json:"name,omitempty"` - // Unit - READ-ONLY; Usage units. Returns 'Count'. - Unit *string `json:"unit,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkUsage. -func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualNetworkUsageName usage strings container. -type VirtualNetworkUsageName struct { - // LocalizedValue - READ-ONLY; Localized subnet size and usage string. - LocalizedValue *string `json:"localizedValue,omitempty"` - // Value - READ-ONLY; Subnet size and usage string. - Value *string `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkUsageName. -func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualWAN virtualWAN Resource. -type VirtualWAN struct { - autorest.Response `json:"-"` - // VirtualWanProperties - Properties of the virtual WAN. - *VirtualWanProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VirtualWAN. -func (vw VirtualWAN) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vw.VirtualWanProperties != nil { - objectMap["properties"] = vw.VirtualWanProperties - } - if vw.ID != nil { - objectMap["id"] = vw.ID - } - if vw.Location != nil { - objectMap["location"] = vw.Location - } - if vw.Tags != nil { - objectMap["tags"] = vw.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct. -func (vw *VirtualWAN) 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 virtualWanProperties VirtualWanProperties - err = json.Unmarshal(*v, &virtualWanProperties) - if err != nil { - return err - } - vw.VirtualWanProperties = &virtualWanProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vw.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vw.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vw.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vw.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vw.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vw.Tags = tags - } - } - } - - return nil -} - -// VirtualWanProperties parameters for VirtualWAN. -type VirtualWanProperties struct { - // DisableVpnEncryption - Vpn encryption to be disabled or not. - DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` - // VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN. - VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` - // VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN. - VpnSites *[]SubResource `json:"vpnSites,omitempty"` - // SecurityProviderName - The Security Provider name. - SecurityProviderName *string `json:"securityProviderName,omitempty"` - // AllowBranchToBranchTraffic - True if branch to branch traffic is allowed. - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - // AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed. - AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` - // Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone' - Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` - // P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan. - P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,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.SecurityProviderName != nil { - objectMap["securityProviderName"] = vwp.SecurityProviderName - } - 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.P2SVpnServerConfigurations != nil { - objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations - } - if vwp.ProvisioningState != "" { - objectMap["provisioningState"] = vwp.ProvisioningState - } - return json.Marshal(objectMap) -} - -// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualWansCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualWansClient) (VirtualWAN, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result. -func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vw.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { - vw, err = client.CreateOrUpdateResponder(vw.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualWansDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualWansClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualWansDeleteFuture.Result. -func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualWanSecurityProvider collection of SecurityProviders. -type VirtualWanSecurityProvider struct { - // Name - Name of the security provider. - Name *string `json:"name,omitempty"` - // URL - Url of the security provider. - URL *string `json:"url,omitempty"` - // Type - Name of the security provider. Possible values include: 'External', 'Native' - Type VirtualWanSecurityProviderType `json:"type,omitempty"` -} - -// VirtualWanSecurityProviders collection of SecurityProviders. -type VirtualWanSecurityProviders struct { - autorest.Response `json:"-"` - // SupportedProviders - List of VirtualWAN security providers. - SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` -} - -// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualWansUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualWansClient) (VirtualWAN, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualWansUpdateTagsFuture.Result. -func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vw.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { - vw, err = client.UpdateTagsResponder(vw.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnClientConfiguration vpnClientConfiguration for P2S client. -type VpnClientConfiguration struct { - // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client. - VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - // AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AadTenant *string `json:"aadTenant,omitempty"` - // AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AadAudience *string `json:"aadAudience,omitempty"` - // AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AadIssuer *string `json:"aadIssuer,omitempty"` -} - -// VpnClientConnectionHealth vpnClientConnectionHealth properties. -type VpnClientConnectionHealth struct { - // TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection. - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - // TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection. - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - // VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway. - VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"` - // AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients. - 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. - VpnConnectionID *string `json:"vpnConnectionId,omitempty"` - // VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client. - VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"` - // VpnConnectionTime - READ-ONLY; The start time of a connected vpn client. - VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"` - // PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client. - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - // PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client. - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - // VpnUserName - READ-ONLY; The user name of a connected vpn client. - VpnUserName *string `json:"vpnUserName,omitempty"` - // MaxBandwidth - READ-ONLY; The max band width. - MaxBandwidth *int64 `json:"maxBandwidth,omitempty"` - // EgressPacketsTransferred - READ-ONLY; The egress packets per second. - EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"` - // EgressBytesTransferred - READ-ONLY; The egress bytes per second. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // IngressPacketsTransferred - READ-ONLY; The ingress packets per second. - IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"` - // IngressBytesTransferred - READ-ONLY; The ingress bytes per second. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second. - MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail. -func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health. -type VpnClientConnectionHealthDetailListResult struct { - autorest.Response `json:"-"` - // Value - List of vpn client connection health. - Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"` -} - -// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. -type VpnClientIPsecParameters struct { - autorest.Response `json:"-"` - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` -} - -// VpnClientParameters vpn Client Parameters for package generation. -type VpnClientParameters struct { - // ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86' - ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` - // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' - AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` - // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. - RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` - // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. - ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` -} - -// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. -type VpnClientRevokedCertificate struct { - // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. - *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. -func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { - objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat - } - if vcrc.Name != nil { - objectMap["name"] = vcrc.Name - } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag - } - if vcrc.ID != nil { - objectMap["id"] = vcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. -func (vcrc *VpnClientRevokedCertificate) 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 vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat - err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) - if err != nil { - return err - } - vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vcrc.ID = &ID - } - } - } - - return nil -} - -// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual -// network gateway. -type VpnClientRevokedCertificatePropertiesFormat struct { - // Thumbprint - The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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. - *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnClientRootCertificate. -func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vcrc.VpnClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat - } - if vcrc.Name != nil { - objectMap["name"] = vcrc.Name - } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag - } - if vcrc.ID != nil { - objectMap["id"] = vcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. -func (vcrc *VpnClientRootCertificate) 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 vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vcrc.ID = &ID - } - } - } - - return nil -} - -// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway. -type VpnClientRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `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:"-"` - // VpnConnectionProperties - Properties of the VPN connection. - *VpnConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnConnection. -func (vc VpnConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vc.VpnConnectionProperties != nil { - objectMap["properties"] = vc.VpnConnectionProperties - } - if vc.Name != nil { - objectMap["name"] = vc.Name - } - if vc.ID != nil { - objectMap["id"] = vc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnConnection struct. -func (vc *VpnConnection) 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 vpnConnectionProperties VpnConnectionProperties - err = json.Unmarshal(*v, &vpnConnectionProperties) - if err != nil { - return err - } - vc.VpnConnectionProperties = &vpnConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vc.ID = &ID - } - } - } - - return nil -} - -// VpnConnectionProperties parameters for VpnConnection. -type VpnConnectionProperties struct { - // RemoteVpnSite - Id of the connected vpn site. - RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - // RoutingWeight - Routing weight for vpn connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' - ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` - // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' - VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // EgressBytesTransferred - READ-ONLY; Egress bytes transferred. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // ConnectionBandwidth - Expected bandwidth in MBPS. - ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` - // SharedKey - SharedKey for the vpn connection. - SharedKey *string `json:"sharedKey,omitempty"` - // EnableBgp - EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // EnableRateLimiting - EnableBgp flag. - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - // EnableInternetSecurity - Enable internet security. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - // UseLocalAzureIPAddress - Use local azure ip to initiate connection. - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VpnLinkConnections - List of all vpn site link connections to the gateway. - VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,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.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.ProvisioningState != "" { - objectMap["provisioningState"] = vcp.ProvisioningState - } - if vcp.VpnLinkConnections != nil { - objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections - } - return json.Marshal(objectMap) -} - -// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VpnConnectionsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnConnectionsClient) (VpnConnection, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result. -func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vc.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { - vc, err = client.CreateOrUpdateResponder(vc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnConnectionsDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnConnectionsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnConnectionsDeleteFuture.Result. -func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VpnDeviceScriptParameters vpn device configuration script generation parameters. -type VpnDeviceScriptParameters struct { - // Vendor - The vendor for the vpn device. - Vendor *string `json:"vendor,omitempty"` - // DeviceFamily - The device family for the vpn device. - DeviceFamily *string `json:"deviceFamily,omitempty"` - // FirmwareVersion - The firmware version for the vpn device. - FirmwareVersion *string `json:"firmwareVersion,omitempty"` -} - -// VpnGateway vpnGateway Resource. -type VpnGateway struct { - autorest.Response `json:"-"` - // VpnGatewayProperties - Properties of the VPN gateway. - *VpnGatewayProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VpnGateway. -func (vg VpnGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vg.VpnGatewayProperties != nil { - objectMap["properties"] = vg.VpnGatewayProperties - } - if vg.ID != nil { - objectMap["id"] = vg.ID - } - if vg.Location != nil { - objectMap["location"] = vg.Location - } - if vg.Tags != nil { - objectMap["tags"] = vg.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnGateway struct. -func (vg *VpnGateway) 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 vpnGatewayProperties VpnGatewayProperties - err = json.Unmarshal(*v, &vpnGatewayProperties) - if err != nil { - return err - } - vg.VpnGatewayProperties = &vpnGatewayProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vg.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vg.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vg.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vg.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vg.Tags = tags - } - } - } - - return nil -} - -// VpnGatewayProperties parameters for VpnGateway. -type VpnGatewayProperties struct { - // VirtualHub - The VirtualHub to which the gateway belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - // Connections - List of all vpn connections to the gateway. - Connections *[]VpnConnection `json:"connections,omitempty"` - // BgpSettings - Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VpnGatewayScaleUnit - The scale unit for this vpn gateway. - VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` -} - -// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VpnGatewaysCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnGatewaysClient) (VpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result. -func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { - vg, err = client.CreateOrUpdateResponder(vg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnGatewaysDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnGatewaysClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnGatewaysDeleteFuture.Result. -func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnGatewaysResetFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnGatewaysClient) (VpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnGatewaysResetFuture.Result. -func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { - vg, err = client.ResetResponder(vg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnGatewaysUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnGatewaysClient) (VpnGateway, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result. -func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vg.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { - vg, err = client.UpdateTagsResponder(vg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnLinkBgpSettings BGP settings details for a link. -type VpnLinkBgpSettings struct { - // Asn - The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} - -// VpnLinkProviderProperties list of properties of a link provider. -type VpnLinkProviderProperties struct { - // LinkProviderName - Name of the link provider. - LinkProviderName *string `json:"linkProviderName,omitempty"` - // LinkSpeedInMbps - Link speed. - LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` -} - -// VpnProfileResponse vpn Profile Response for package generation. -type VpnProfileResponse struct { - autorest.Response `json:"-"` - // ProfileURL - URL to the VPN profile. - ProfileURL *string `json:"profileUrl,omitempty"` -} - -// VpnSite vpnSite Resource. -type VpnSite struct { - autorest.Response `json:"-"` - // VpnSiteProperties - Properties of the VPN site. - *VpnSiteProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for VpnSite. -func (vs VpnSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vs.VpnSiteProperties != nil { - objectMap["properties"] = vs.VpnSiteProperties - } - if vs.ID != nil { - objectMap["id"] = vs.ID - } - if vs.Location != nil { - objectMap["location"] = vs.Location - } - if vs.Tags != nil { - objectMap["tags"] = vs.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnSite struct. -func (vs *VpnSite) 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 vpnSiteProperties VpnSiteProperties - err = json.Unmarshal(*v, &vpnSiteProperties) - if err != nil { - return err - } - vs.VpnSiteProperties = &vpnSiteProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vs.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vs.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vs.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vs.Tags = tags - } - } - } - - return nil -} - -// VpnSiteID vpnSite Resource. -type VpnSiteID struct { - // VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. - VpnSite *string `json:"vpnSite,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnSiteID. -func (vsi VpnSiteID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VpnSiteLink vpnSiteLink Resource. -type VpnSiteLink struct { - autorest.Response `json:"-"` - // VpnSiteLinkProperties - Properties of the VPN site link. - *VpnSiteLinkProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnSiteLink. -func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vsl.VpnSiteLinkProperties != nil { - objectMap["properties"] = vsl.VpnSiteLinkProperties - } - if vsl.Name != nil { - objectMap["name"] = vsl.Name - } - if vsl.ID != nil { - objectMap["id"] = vsl.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct. -func (vsl *VpnSiteLink) 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 vpnSiteLinkProperties VpnSiteLinkProperties - err = json.Unmarshal(*v, &vpnSiteLinkProperties) - if err != nil { - return err - } - vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vsl.Etag = &etag - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vsl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vsl.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vsl.ID = &ID - } - } - } - - return nil -} - -// VpnSiteLinkConnection vpnSiteLinkConnection Resource. -type VpnSiteLinkConnection struct { - autorest.Response `json:"-"` - // VpnSiteLinkConnectionProperties - Properties of the VPN site link connection. - *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for VpnSiteLinkConnection. -func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vslc.VpnSiteLinkConnectionProperties != nil { - objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties - } - if vslc.Name != nil { - objectMap["name"] = vslc.Name - } - if vslc.ID != nil { - objectMap["id"] = vslc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct. -func (vslc *VpnSiteLinkConnection) 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 vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties - err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties) - if err != nil { - return err - } - vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vslc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vslc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vslc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vslc.ID = &ID - } - } - } - - return nil -} - -// VpnSiteLinkConnectionProperties parameters for VpnConnection. -type VpnSiteLinkConnectionProperties struct { - // VpnSiteLink - Id of the connected vpn site link. - VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` - // RoutingWeight - Routing weight for vpn connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' - ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` - // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' - VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // EgressBytesTransferred - READ-ONLY; Egress bytes transferred. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - // ConnectionBandwidth - Expected bandwidth in MBPS. - ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` - // SharedKey - SharedKey for the vpn connection. - SharedKey *string `json:"sharedKey,omitempty"` - // EnableBgp - EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - // IpsecPolicies - The IPSec Policies to be considered by this connection. - IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // EnableRateLimiting - EnableBgp flag. - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - // UseLocalAzureIPAddress - Use local azure ip to initiate connection. - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - 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 - } - if vslcp.ProvisioningState != "" { - objectMap["provisioningState"] = vslcp.ProvisioningState - } - return json.Marshal(objectMap) -} - -// VpnSiteLinkProperties parameters for VpnSite. -type VpnSiteLinkProperties struct { - // LinkProperties - The link provider properties. - LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` - // IPAddress - The ip-address for the vpn-site-link. - IPAddress *string `json:"ipAddress,omitempty"` - // BgpProperties - The set of bgp properties. - BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// VpnSiteProperties parameters for VpnSite. -type VpnSiteProperties struct { - // VirtualWan - The VirtualWAN to which the vpnSite belongs. - VirtualWan *SubResource `json:"virtualWan,omitempty"` - // DeviceProperties - The device properties. - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - // IPAddress - The ip-address for the vpn-site. - IPAddress *string `json:"ipAddress,omitempty"` - // SiteKey - The key for vpn-site that can be used for connections. - SiteKey *string `json:"siteKey,omitempty"` - // AddressSpace - The AddressSpace that contains an array of IP address ranges. - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - // BgpProperties - The set of bgp properties. - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // IsSecuritySite - IsSecuritySite flag. - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - // VpnSiteLinks - List of all vpn site links - VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` -} - -// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VpnSitesConfigurationDownloadFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnSitesConfigurationClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result. -func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture") - return - } - ar.Response = future.Response() - return -} - -// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnSitesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnSitesClient) (VpnSite, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result. -func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vs.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { - vs, err = client.CreateOrUpdateResponder(vs.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request") - } - } - return -} - -// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnSitesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnSitesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnSitesDeleteFuture.Result. -func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnSitesUpdateTagsFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VpnSitesClient) (VpnSite, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VpnSitesUpdateTagsFuture.Result. -func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vs.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { - vs, err = client.UpdateTagsResponder(vs.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request") - } - } - return -} - -// Watcher network watcher in a resource group. -type Watcher struct { - autorest.Response `json:"-"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // WatcherPropertiesFormat - Properties of the network watcher. - *WatcherPropertiesFormat `json:"properties,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for Watcher. -func (w Watcher) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if w.Etag != nil { - objectMap["etag"] = w.Etag - } - if w.WatcherPropertiesFormat != nil { - objectMap["properties"] = w.WatcherPropertiesFormat - } - if w.ID != nil { - objectMap["id"] = w.ID - } - if w.Location != nil { - objectMap["location"] = w.Location - } - if w.Tags != nil { - objectMap["tags"] = w.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Watcher struct. -func (w *Watcher) 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 "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - w.Etag = &etag - } - case "properties": - if v != nil { - var watcherPropertiesFormat WatcherPropertiesFormat - err = json.Unmarshal(*v, &watcherPropertiesFormat) - if err != nil { - return err - } - w.WatcherPropertiesFormat = &watcherPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - w.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - w.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - w.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - w.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - w.Tags = tags - } - } - } - - return nil -} - -// WatcherListResult response for ListNetworkWatchers API service call. -type WatcherListResult struct { - autorest.Response `json:"-"` - // Value - List of network watcher resources. - Value *[]Watcher `json:"value,omitempty"` -} - -// WatcherPropertiesFormat the network watcher properties. -type WatcherPropertiesFormat struct { - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersCheckConnectivityFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (ConnectivityInformation, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersCheckConnectivityFuture.Result. -func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ci.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent { - ci, err = client.CheckConnectivityResponder(ci.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WatchersDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersDeleteFuture.Result. -func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersGetAzureReachabilityReportFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (AzureReachabilityReport, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result. -func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - arr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent { - arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersGetFlowLogStatusFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (FlowLogInformation, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetFlowLogStatusFuture.Result. -func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fli.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { - fli, err = client.GetFlowLogStatusResponder(fli.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type WatchersGetNetworkConfigurationDiagnosticFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (ConfigurationDiagnosticResponse, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result. -func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - cdr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent { - cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WatchersGetNextHopFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (NextHopResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetNextHopFuture.Result. -func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - nhr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent { - nhr, err = client.GetNextHopResponder(nhr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersGetTroubleshootingFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (TroubleshootingResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetTroubleshootingFuture.Result. -func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - tr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { - tr, err = client.GetTroubleshootingResponder(tr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersGetTroubleshootingResultFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (TroubleshootingResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result. -func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - tr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { - tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersGetVMSecurityRulesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (SecurityGroupViewResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result. -func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - sgvr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent { - sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersListAvailableProvidersFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (AvailableProvidersList, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersListAvailableProvidersFuture.Result. -func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - apl.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent { - apl, err = client.ListAvailableProvidersResponder(apl.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type WatchersSetFlowLogConfigurationFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (FlowLogInformation, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result. -func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - fli.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent { - fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request") - } - } - return -} - -// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WatchersVerifyIPFlowFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WatchersClient) (VerificationIPFlowResult, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WatchersVerifyIPFlowFuture.Result. -func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vifr.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent { - vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request") - } - } - return -} - -// WebApplicationFirewallCustomRule defines contents of a web application rule. -type WebApplicationFirewallCustomRule struct { - // Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. - Priority *int32 `json:"priority,omitempty"` - // RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid' - RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"` - // MatchConditions - List of match conditions. - MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` - // Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog' - 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 { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result. -func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// WebApplicationFirewallPolicy defines web application firewall policy. -type WebApplicationFirewallPolicy struct { - autorest.Response `json:"-"` - // WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy. - *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - 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"` -} - -// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy. -func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil { - objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat - } - if wafp.Etag != nil { - objectMap["etag"] = wafp.Etag - } - if wafp.ID != nil { - objectMap["id"] = wafp.ID - } - if wafp.Location != nil { - objectMap["location"] = wafp.Location - } - if wafp.Tags != nil { - objectMap["tags"] = wafp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct. -func (wafp *WebApplicationFirewallPolicy) 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 webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat - err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat) - if err != nil { - return err - } - wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - wafp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wafp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wafp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wafp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - wafp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - wafp.Tags = tags - } - } - } - - return nil -} - -// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It -// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. -type WebApplicationFirewallPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. - Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult. -func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of -// WebApplicationFirewallPolicy values. -type WebApplicationFirewallPolicyListResultIterator struct { - i int - page WebApplicationFirewallPolicyListResultPage -} - -// 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 *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.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 *WebApplicationFirewallPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WebApplicationFirewallPolicyListResultIterator) 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 WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult { - 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 WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy { - if !iter.page.NotDone() { - return WebApplicationFirewallPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type. -func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator { - return WebApplicationFirewallPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wafplr.NextLink))) -} - -// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values. -type WebApplicationFirewallPolicyListResultPage struct { - fn func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error) - wafplr WebApplicationFirewallPolicyListResult -} - -// 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 *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.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.wafplr) - if err != nil { - return err - } - page.wafplr = 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 *WebApplicationFirewallPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool { - return !page.wafplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult { - return page.wafplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy { - if page.wafplr.IsEmpty() { - return nil - } - return *page.wafplr.Value -} - -// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type. -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. -type WebApplicationFirewallPolicyPropertiesFormat struct { - // PolicySettings - Describes policySettings for policy. - PolicySettings *PolicySettings `json:"policySettings,omitempty"` - // CustomRules - Describes custom rules inside the policy. - CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"` - // ApplicationGateways - READ-ONLY; A collection of references to application gateways. - ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting' - ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,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 - } - return json.Marshal(objectMap) -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go deleted file mode 100644 index cbfcdd135b0b..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go +++ /dev/null @@ -1,579 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// NatGatewaysClient is the network Client -type NatGatewaysClient struct { - BaseClient -} - -// NewNatGatewaysClient creates an instance of the NatGatewaysClient client. -func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { - return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient 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 NewNatGatewaysClientWithBaseURI(baseURI string, subscriptionID string) NatGatewaysClient { - return NatGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a nat gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// natGatewayName - the name of the nat gateway. -// parameters - parameters supplied to the create or update nat gateway operation. -func (client NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (result NatGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, natGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "natGatewayName": autorest.Encode("path", natGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/natGateways/{natGatewayName}", pathParameters), - autorest.WithJSON(parameters), - 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 NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client NatGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result NatGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the specified nat gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// natGatewayName - the name of the nat gateway. -func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName string, natGatewayName string) (result NatGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, natGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, natGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "natGatewayName": autorest.Encode("path", natGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client NatGatewaysClient) 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 the specified nat gateway in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// natGatewayName - the name of the nat gateway. -// expand - expands referenced resources. -func (client NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (result NatGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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, natGatewayName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "natGatewayName": autorest.Encode("path", natGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) 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 NatGatewaysClient) GetResponder(resp *http.Response) (result NatGateway, 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 nat gateways in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client NatGatewaysClient) List(ctx context.Context, resourceGroupName string) (result NatGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.List") - defer func() { - sc := -1 - if result.nglr.Response.Response != nil { - sc = result.nglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.nglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client NatGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/natGateways", 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 NatGatewaysClient) 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 NatGatewaysClient) ListResponder(resp *http.Response) (result NatGatewayListResult, 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 NatGatewaysClient) listNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { - req, err := lastResults.natGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "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, "network.NatGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client NatGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result NatGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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) - return -} - -// ListAll gets all the Nat Gateways in a subscription. -func (client NatGatewaysClient) ListAll(ctx context.Context) (result NatGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") - defer func() { - sc := -1 - if result.nglr.Response.Response != nil { - sc = result.nglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.nglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client NatGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client NatGatewaysClient) ListAllResponder(resp *http.Response) (result NatGatewayListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client NatGatewaysClient) listAllNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { - req, err := lastResults.natGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client NatGatewaysClient) ListAllComplete(ctx context.Context) (result NatGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates nat gateway tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// natGatewayName - the name of the nat gateway. -// parameters - parameters supplied to update nat gateway tags. -func (client NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (result NatGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, natGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "natGatewayName": autorest.Encode("path", natGatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/natGateways/{natGatewayName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client NatGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client NatGatewaysClient) UpdateTagsResponder(resp *http.Response) (result NatGateway, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go deleted file mode 100644 index 859658a8827c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go +++ /dev/null @@ -1,140 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the network Client -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available Network Rest API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Network/operations"), - 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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 OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.OperationsClient", "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, "network.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go deleted file mode 100644 index a08948c60de5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go +++ /dev/null @@ -1,741 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// P2sVpnGatewaysClient is the network Client -type P2sVpnGatewaysClient struct { - BaseClient -} - -// NewP2sVpnGatewaysClient creates an instance of the P2sVpnGatewaysClient client. -func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { - return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient 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 NewP2sVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnGatewaysClient { - return P2sVpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnGateway. -// gatewayName - the name of the gateway. -// p2SVpnGatewayParameters - parameters supplied to create or Update a virtual wan p2s vpn gateway. -func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - p2SVpnGatewayParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}", pathParameters), - autorest.WithJSON(p2SVpnGatewayParameters), - 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 P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnGateway, 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 deletes a virtual wan p2s vpn gateway. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnGateway. -// gatewayName - the name of the gateway. -func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) 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 -} - -// GenerateVpnProfile generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// gatewayName - the name of the P2SVpnGateway. -// parameters - parameters supplied to the generate P2SVpnGateway VPN client package operation. -func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (result P2sVpnGatewaysGenerateVpnProfileFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GenerateVpnProfile") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, gatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request") - return - } - - result, err = client.GenerateVpnProfileSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request") - return - } - - return -} - -// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request. -func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the -// http.Response Body if it receives an error. -func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result VpnProfileResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get retrieves the details of a virtual wan p2s vpn gateway. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnGateway. -// gatewayName - the name of the gateway. -func (client P2sVpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result P2SVpnGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) 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 P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2SVpnGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetP2sVpnConnectionHealth gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the -// specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// gatewayName - the name of the P2SVpnGateway. -func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealth") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetP2sVpnConnectionHealthPreparer(ctx, resourceGroupName, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure preparing request") - return - } - - result, err = client.GetP2sVpnConnectionHealthSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", result.Response(), "Failure sending request") - return - } - - return -} - -// GetP2sVpnConnectionHealthPreparer prepares the GetP2sVpnConnectionHealth request. -func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetP2sVpnConnectionHealthSender sends the GetP2sVpnConnectionHealth request. The method will close the -// http.Response Body if it receives an error. -func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetP2sVpnConnectionHealthResponder handles the response to the GetP2sVpnConnectionHealth request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthResponder(resp *http.Response) (result P2SVpnGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all the P2SVpnGateways in a subscription. -func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.List") - defer func() { - sc := -1 - if result.lpvgr.Response.Response != nil { - sc = result.lpvgr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lpvgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways", 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 P2sVpnGatewaysClient) 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 P2sVpnGatewaysClient) ListResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, 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 P2sVpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) { - req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client P2sVpnGatewaysClient) ListComplete(ctx context.Context) (result ListP2SVpnGatewaysResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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) - return -} - -// ListByResourceGroup lists all the P2SVpnGateways in a resource group. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnGateway. -func (client P2sVpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lpvgr.Response.Response != nil { - sc = result.lpvgr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lpvgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/p2svpnGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client P2sVpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client P2sVpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) { - req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates virtual wan p2s vpn gateway tags. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnGateway. -// gatewayName - the name of the gateway. -// p2SVpnGatewayParameters - parameters supplied to update a virtual wan p2s vpn gateway tags. -func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2sVpnGatewaysUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/p2svpnGateways/{gatewayName}", pathParameters), - autorest.WithJSON(p2SVpnGatewayParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client P2sVpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result P2SVpnGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go deleted file mode 100644 index be2255e7a86a..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go +++ /dev/null @@ -1,394 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// P2sVpnServerConfigurationsClient is the network Client -type P2sVpnServerConfigurationsClient struct { - BaseClient -} - -// NewP2sVpnServerConfigurationsClient creates an instance of the P2sVpnServerConfigurationsClient client. -func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConfigurationsClient { - return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient 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 NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { - return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a P2SVpnServerConfiguration to associate with a VirtualWan if it doesn't exist else updates -// the existing P2SVpnServerConfiguration. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWanName - the name of the VirtualWan. -// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration. -// p2SVpnServerConfigurationParameters - parameters supplied to create or Update a P2SVpnServerConfiguration. -func (client P2sVpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string, p2SVpnServerConfigurationParameters P2SVpnServerConfiguration) (result P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string, p2SVpnServerConfigurationParameters P2SVpnServerConfiguration) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWanName": autorest.Encode("path", virtualWanName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - p2SVpnServerConfigurationParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", pathParameters), - autorest.WithJSON(p2SVpnServerConfigurationParameters), - 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 P2sVpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client P2sVpnServerConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnServerConfiguration, 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 deletes a P2SVpnServerConfiguration. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnServerConfiguration. -// virtualWanName - the name of the VirtualWan. -// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration. -func (client P2sVpnServerConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2sVpnServerConfigurationsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWanName": autorest.Encode("path", virtualWanName), - } - - const APIVersion = "2019-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.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", 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 P2sVpnServerConfigurationsClient) DeleteSender(req *http.Request) (future P2sVpnServerConfigurationsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client P2sVpnServerConfigurationsClient) 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 retrieves the details of a P2SVpnServerConfiguration. -// Parameters: -// resourceGroupName - the resource group name of the P2SVpnServerConfiguration. -// virtualWanName - the name of the VirtualWan. -// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration. -func (client P2sVpnServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2SVpnServerConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.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, virtualWanName, p2SVpnServerConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client P2sVpnServerConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWanName": autorest.Encode("path", virtualWanName), - } - - const APIVersion = "2019-06-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/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", 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 P2sVpnServerConfigurationsClient) 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 P2sVpnServerConfigurationsClient) GetResponder(resp *http.Response) (result P2SVpnServerConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByVirtualWan retrieves all P2SVpnServerConfigurations for a particular VirtualWan. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWanName - the name of the VirtualWan. -func (client P2sVpnServerConfigurationsClient) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan") - defer func() { - sc := -1 - if result.lpvscr.Response.Response != nil { - sc = result.lpvscr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByVirtualWanNextResults - req, err := client.ListByVirtualWanPreparer(ctx, resourceGroupName, virtualWanName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", nil, "Failure preparing request") - return - } - - resp, err := client.ListByVirtualWanSender(req) - if err != nil { - result.lpvscr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", resp, "Failure sending request") - return - } - - result.lpvscr, err = client.ListByVirtualWanResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", resp, "Failure responding to request") - return - } - if result.lpvscr.hasNextLink() && result.lpvscr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByVirtualWanPreparer prepares the ListByVirtualWan request. -func (client P2sVpnServerConfigurationsClient) ListByVirtualWanPreparer(ctx context.Context, resourceGroupName string, virtualWanName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWanName": autorest.Encode("path", virtualWanName), - } - - const APIVersion = "2019-06-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/virtualWans/{virtualWanName}/p2sVpnServerConfigurations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByVirtualWanSender sends the ListByVirtualWan request. The method will close the -// http.Response Body if it receives an error. -func (client P2sVpnServerConfigurationsClient) ListByVirtualWanSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByVirtualWanResponder handles the response to the ListByVirtualWan request. The method always -// closes the http.Response Body. -func (client P2sVpnServerConfigurationsClient) ListByVirtualWanResponder(resp *http.Response) (result ListP2SVpnServerConfigurationsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByVirtualWanNextResults retrieves the next set of results, if any. -func (client P2sVpnServerConfigurationsClient) listByVirtualWanNextResults(ctx context.Context, lastResults ListP2SVpnServerConfigurationsResult) (result ListP2SVpnServerConfigurationsResult, err error) { - req, err := lastResults.listP2SVpnServerConfigurationsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByVirtualWanSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByVirtualWanResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByVirtualWanComplete enumerates all values, automatically crossing page boundaries as required. -func (client P2sVpnServerConfigurationsClient) ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan") - 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.ListByVirtualWan(ctx, resourceGroupName, virtualWanName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go deleted file mode 100644 index 637c8e00969b..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go +++ /dev/null @@ -1,520 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// PacketCapturesClient is the network Client -type PacketCapturesClient struct { - BaseClient -} - -// NewPacketCapturesClient creates an instance of the PacketCapturesClient client. -func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { - return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient 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 NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient { - return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create create and start a packet capture on the specified VM. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// packetCaptureName - the name of the packet capture session. -// parameters - parameters that define the create packet capture operation. -func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (result PacketCapturesCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.PacketCaptureParameters", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.PacketCaptureParameters.Target", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.PacketCaptureParameters.StorageLocation", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.PacketCapturesClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "packetCaptureName": autorest.Encode("path", packetCaptureName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result PacketCaptureResult, 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 deletes the specified packet capture session. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// packetCaptureName - the name of the packet capture session. -func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "packetCaptureName": autorest.Encode("path", packetCaptureName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", 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 PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PacketCapturesClient) 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 a packet capture session by name. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// packetCaptureName - the name of the packet capture session. -func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCaptureResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.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, networkWatcherName, packetCaptureName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "packetCaptureName": autorest.Encode("path", packetCaptureName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}", 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 PacketCapturesClient) 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 PacketCapturesClient) GetResponder(resp *http.Response) (result PacketCaptureResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetStatus query the status of a running packet capture session. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the Network Watcher resource. -// packetCaptureName - the name given to the packet capture session. -func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesGetStatusFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.GetStatus") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetStatusPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure preparing request") - return - } - - result, err = client.GetStatusSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request") - return - } - - return -} - -// GetStatusPreparer prepares the GetStatus request. -func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "packetCaptureName": autorest.Encode("path", packetCaptureName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetStatusSender sends the GetStatus request. The method will close the -// http.Response Body if it receives an error. -func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetStatusResponder handles the response to the GetStatus request. The method always -// closes the http.Response Body. -func (client PacketCapturesClient) GetStatusResponder(resp *http.Response) (result PacketCaptureQueryStatusResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all packet capture sessions within the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the Network Watcher resource. -func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result PacketCaptureListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers/{networkWatcherName}/packetCaptures", 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 PacketCapturesClient) 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 PacketCapturesClient) ListResponder(resp *http.Response) (result PacketCaptureListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Stop stops a specified packet capture session. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// packetCaptureName - the name of the packet capture session. -func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesStopFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Stop") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure preparing request") - return - } - - result, err = client.StopSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", result.Response(), "Failure sending request") - return - } - - return -} - -// StopPreparer prepares the Stop request. -func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "packetCaptureName": autorest.Encode("path", packetCaptureName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// StopSender sends the Stop request. The method will close the -// http.Response Body if it receives an error. -func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// StopResponder handles the response to the Stop request. The method always -// closes the http.Response Body. -func (client PacketCapturesClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go deleted file mode 100644 index c898aa5f6ac1..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go +++ /dev/null @@ -1,233 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PeerExpressRouteCircuitConnectionsClient is the network Client -type PeerExpressRouteCircuitConnectionsClient struct { - BaseClient -} - -// NewPeerExpressRouteCircuitConnectionsClient creates an instance of the PeerExpressRouteCircuitConnectionsClient -// client. -func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpressRouteCircuitConnectionsClient { - return NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient 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 NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PeerExpressRouteCircuitConnectionsClient { - return PeerExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the specified Peer Express Route Circuit Connection from the specified express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the express route circuit. -// peeringName - the name of the peering. -// connectionName - the name of the peer express route circuit connection. -func (client PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result PeerExpressRouteCircuitConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "connectionName": autorest.Encode("path", connectionName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}", 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 PeerExpressRouteCircuitConnectionsClient) 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 PeerExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result PeerExpressRouteCircuitConnection, 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 global reach peer connections associated with a private peering in an express route circuit. -// Parameters: -// resourceGroupName - the name of the resource group. -// circuitName - the name of the circuit. -// peeringName - the name of the peering. -func (client PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.List") - defer func() { - sc := -1 - if result.percclr.Response.Response != nil { - sc = result.percclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.percclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "circuitName": autorest.Encode("path", circuitName), - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections", 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 PeerExpressRouteCircuitConnectionsClient) 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 PeerExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result PeerExpressRouteCircuitConnectionListResult, 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 PeerExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults PeerExpressRouteCircuitConnectionListResult) (result PeerExpressRouteCircuitConnectionListResult, err error) { - req, err := lastResults.peerExpressRouteCircuitConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "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, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go deleted file mode 100644 index 23805df50eda..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go +++ /dev/null @@ -1,501 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateEndpointsClient is the network Client -type PrivateEndpointsClient struct { - BaseClient -} - -// NewPrivateEndpointsClient creates an instance of the PrivateEndpointsClient client. -func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { - return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient 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 NewPrivateEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointsClient { - return PrivateEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an private endpoint in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateEndpointName - the name of the private endpoint. -// parameters - parameters supplied to the create or update private endpoint operation. -func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (result PrivateEndpointsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateEndpointName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointName": autorest.Encode("path", privateEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateEndpoints/{privateEndpointName}", pathParameters), - autorest.WithJSON(parameters), - 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 PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PrivateEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpoint, 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 deletes the specified private endpoint. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateEndpointName - the name of the private endpoint. -func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupName string, privateEndpointName string) (result PrivateEndpointsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, privateEndpointName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointName": autorest.Encode("path", privateEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateEndpoints/{privateEndpointName}", 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 PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateEndpointsClient) 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 the specified private endpoint by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateEndpointName - the name of the private endpoint. -// expand - expands referenced resources. -func (client PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (result PrivateEndpoint, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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, privateEndpointName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateEndpointName": autorest.Encode("path", privateEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateEndpoints/{privateEndpointName}", 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 PrivateEndpointsClient) 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 PrivateEndpointsClient) GetResponder(resp *http.Response) (result PrivateEndpoint, 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 private endpoints in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client PrivateEndpointsClient) List(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.List") - defer func() { - sc := -1 - if result.pelr.Response.Response != nil { - sc = result.pelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.pelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/privateEndpoints", 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 PrivateEndpointsClient) 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 PrivateEndpointsClient) ListResponder(resp *http.Response) (result PrivateEndpointListResult, 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 PrivateEndpointsClient) listNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { - req, err := lastResults.privateEndpointListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "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, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.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) - return -} - -// ListBySubscription gets all private endpoints in a subscription. -func (client PrivateEndpointsClient) ListBySubscription(ctx context.Context) (result PrivateEndpointListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.ListBySubscription") - defer func() { - sc := -1 - if result.pelr.Response.Response != nil { - sc = result.pelr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.pelr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client PrivateEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client PrivateEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { - req, err := lastResults.privateEndpointListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateEndpointListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.ListBySubscription") - 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.ListBySubscription(ctx) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go deleted file mode 100644 index 5876672c0cea..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go +++ /dev/null @@ -1,1063 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateLinkServicesClient is the network Client -type PrivateLinkServicesClient struct { - BaseClient -} - -// NewPrivateLinkServicesClient creates an instance of the PrivateLinkServicesClient client. -func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClient { - return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient 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 NewPrivateLinkServicesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkServicesClient { - return PrivateLinkServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckPrivateLinkServiceVisibility checks the subscription is visible to private link service -// Parameters: -// location - the location of the domain name. -// parameters - the request body of CheckPrivateLinkService API call. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CheckPrivateLinkServiceVisibilityPreparer(ctx, location, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure preparing request") - return - } - - result, err = client.CheckPrivateLinkServiceVisibilitySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", result.Response(), "Failure sending request") - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityPreparer prepares the CheckPrivateLinkServiceVisibility request. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPreparer(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckPrivateLinkServiceVisibilitySender sends the CheckPrivateLinkServiceVisibility request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CheckPrivateLinkServiceVisibilityResponder handles the response to the CheckPrivateLinkServiceVisibility request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CheckPrivateLinkServiceVisibilityByResourceGroup checks the subscription is visible to private link service -// Parameters: -// location - the location of the domain name. -// resourceGroupName - the name of the resource group. -// parameters - the request body of CheckPrivateLinkService API call. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx, location, resourceGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure preparing request") - return - } - - result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", result.Response(), "Failure sending request") - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityByResourceGroupPreparer prepares the CheckPrivateLinkServiceVisibilityByResourceGroup request. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckPrivateLinkServiceVisibilityByResourceGroupSender sends the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CheckPrivateLinkServiceVisibilityByResourceGroupResponder handles the response to the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates an private link service in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the private link service. -// parameters - parameters supplied to the create or update private link service operation. -func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (result PrivateLinkServicesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateLinkServices/{serviceName}", pathParameters), - autorest.WithJSON(parameters), - 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 PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateLinkService, 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 deletes the specified private link service. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the private link service. -func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateLinkServicesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) 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 -} - -// DeletePrivateEndpointConnection delete private end point connection for a private link service in a subscription. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the private link service. -// peConnectionName - the name of the private end point connection. -func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (result PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.DeletePrivateEndpointConnection") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request") - return - } - - result, err = client.DeletePrivateEndpointConnectionSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request. -func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "peConnectionName": autorest.Encode("path", peConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionResponder(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 the specified private link service by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the private link service. -// expand - expands referenced resources. -func (client PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, expand string) (result PrivateLinkService, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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, serviceName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) 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 PrivateLinkServicesClient) GetResponder(resp *http.Response) (result PrivateLinkService, 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 private link services in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client PrivateLinkServicesClient) List(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.List") - defer func() { - sc := -1 - if result.plslr.Response.Response != nil { - sc = result.plslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.plslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client PrivateLinkServicesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/privateLinkServices", 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 PrivateLinkServicesClient) 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 PrivateLinkServicesClient) ListResponder(resp *http.Response) (result PrivateLinkServiceListResult, 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 PrivateLinkServicesClient) listNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { - req, err := lastResults.privateLinkServiceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "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, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateLinkServicesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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) - return -} - -// ListAutoApprovedPrivateLinkServices returns all of the private link service ids that can be linked to a Private -// Endpoint with auto approved in this subscription in this region. -// Parameters: -// location - the location of the domain name. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") - defer func() { - sc := -1 - if result.aaplsr.Response.Response != nil { - sc = result.aaplsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAutoApprovedPrivateLinkServicesNextResults - req, err := client.ListAutoApprovedPrivateLinkServicesPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", nil, "Failure preparing request") - return - } - - resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) - if err != nil { - result.aaplsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAutoApprovedPrivateLinkServicesPreparer prepares the ListAutoApprovedPrivateLinkServices request. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPreparer(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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAutoApprovedPrivateLinkServicesSender sends the ListAutoApprovedPrivateLinkServices request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAutoApprovedPrivateLinkServicesResponder handles the response to the ListAutoApprovedPrivateLinkServices request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAutoApprovedPrivateLinkServicesNextResults retrieves the next set of results, if any. -func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { - req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAutoApprovedPrivateLinkServicesComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") - 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.ListAutoApprovedPrivateLinkServices(ctx, location) - return -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroup returns all of the private link service ids that can be linked to -// a Private Endpoint with auto approved in this subscription in this region. -// Parameters: -// location - the location of the domain name. -// resourceGroupName - the name of the resource group. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") - defer func() { - sc := -1 - if result.aaplsr.Response.Response != nil { - sc = result.aaplsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAutoApprovedPrivateLinkServicesByResourceGroupNextResults - req, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx, location, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) - if err != nil { - result.aaplsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer prepares the ListAutoApprovedPrivateLinkServicesByResourceGroup request. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupSender sends the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupResponder handles the response to the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAutoApprovedPrivateLinkServicesByResourceGroupNextResults retrieves the next set of results, if any. -func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { - req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") - 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.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, location, resourceGroupName) - return -} - -// ListBySubscription gets all private link service in a subscription. -func (client PrivateLinkServicesClient) ListBySubscription(ctx context.Context) (result PrivateLinkServiceListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListBySubscription") - defer func() { - sc := -1 - if result.plslr.Response.Response != nil { - sc = result.plslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.plslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateLinkServiceListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client PrivateLinkServicesClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { - req, err := lastResults.privateLinkServiceListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateLinkServiceListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListBySubscription") - 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.ListBySubscription(ctx) - return -} - -// UpdatePrivateEndpointConnection approve or reject private end point connection for a private link service in a -// subscription. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the private link service. -// peConnectionName - the name of the private end point connection. -// parameters - parameters supplied to approve or reject the private end point connection. -func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.UpdatePrivateEndpointConnection") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", nil, "Failure preparing request") - return - } - - resp, err := client.UpdatePrivateEndpointConnectionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure sending request") - return - } - - result, err = client.UpdatePrivateEndpointConnectionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePrivateEndpointConnectionPreparer prepares the UpdatePrivateEndpointConnection request. -func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "peConnectionName": autorest.Encode("path", peConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Type = nil - parameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdatePrivateEndpointConnectionSender sends the UpdatePrivateEndpointConnection request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdatePrivateEndpointConnectionResponder handles the response to the UpdatePrivateEndpointConnection request. The method always -// closes the http.Response Body. -func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go deleted file mode 100644 index 6e09f6b50d45..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go +++ /dev/null @@ -1,576 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ProfilesClient is the network Client -type ProfilesClient struct { - BaseClient -} - -// NewProfilesClient creates an instance of the ProfilesClient client. -func NewProfilesClient(subscriptionID string) ProfilesClient { - return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient 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 NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { - return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a network profile. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkProfileName - the name of the network profile. -// parameters - parameters supplied to the create or update network profile operation. -func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (result Profile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkProfileName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkProfileName": autorest.Encode("path", networkProfileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkProfiles/{networkProfileName}", pathParameters), - autorest.WithJSON(parameters), - 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 ProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, 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 deletes the specified network profile. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkProfileName - the name of the NetworkProfile. -func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, networkProfileName string) (result ProfilesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkProfileName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkProfileName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkProfileName": autorest.Encode("path", networkProfileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ProfilesClient) 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 the specified network profile in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkProfileName - the name of the public IP prefix. -// expand - expands referenced resources. -func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result Profile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, networkProfileName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkProfileName": autorest.Encode("path", networkProfileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) 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 ProfilesClient) GetResponder(resp *http.Response) (result Profile, 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 network profiles in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ProfilesClient) List(ctx context.Context, resourceGroupName string) (result ProfileListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.List") - defer func() { - sc := -1 - if result.plr.Response.Response != nil { - sc = result.plr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.plr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkProfiles", 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 ProfilesClient) 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 ProfilesClient) ListResponder(resp *http.Response) (result ProfileListResult, 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 ProfilesClient) listNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) { - req, err := lastResults.profileListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "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, "network.ProfilesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProfilesClient) ListComplete(ctx context.Context, resourceGroupName string) (result ProfileListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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) - return -} - -// ListAll gets all the network profiles in a subscription. -func (client ProfilesClient) ListAll(ctx context.Context) (result ProfileListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll") - defer func() { - sc := -1 - if result.plr.Response.Response != nil { - sc = result.plr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.plr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client ProfilesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client ProfilesClient) ListAllResponder(resp *http.Response) (result ProfileListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client ProfilesClient) listAllNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) { - req, err := lastResults.profileListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProfilesClient) ListAllComplete(ctx context.Context) (result ProfileListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates network profile tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkProfileName - the name of the network profile. -// parameters - parameters supplied to update network profile tags. -func (client ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (result Profile, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkProfileName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkProfileName": autorest.Encode("path", networkProfileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkProfiles/{networkProfileName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client ProfilesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client ProfilesClient) UpdateTagsResponder(resp *http.Response) (result Profile, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go deleted file mode 100644 index 2b7b3196b92c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go +++ /dev/null @@ -1,927 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// PublicIPAddressesClient is the network Client -type PublicIPAddressesClient struct { - BaseClient -} - -// NewPublicIPAddressesClient creates an instance of the PublicIPAddressesClient client. -func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { - return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient 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 NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient { - return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a static or dynamic public IP address. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the public IP address. -// parameters - parameters supplied to the create or update public IP address operation. -func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (result PublicIPAddressesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.PublicIPAddressesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPAddressName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpAddressName": autorest.Encode("path", publicIPAddressName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPAddresses/{publicIpAddressName}", pathParameters), - autorest.WithJSON(parameters), - 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 PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPAddress, 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 deletes the specified public IP address. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the subnet. -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") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPAddressName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpAddressName": autorest.Encode("path", publicIPAddressName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPAddresses/{publicIpAddressName}", 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 PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) 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 the specified public IP address in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the subnet. -// expand - expands referenced resources. -func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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, publicIPAddressName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpAddressName": autorest.Encode("path", publicIPAddressName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPAddresses/{publicIpAddressName}", 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 PublicIPAddressesClient) 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 PublicIPAddressesClient) GetResponder(resp *http.Response) (result PublicIPAddress, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVirtualMachineScaleSetPublicIPAddress get the specified public IP address in a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -// networkInterfaceName - the name of the network interface. -// IPConfigurationName - the name of the IP configuration. -// publicIPAddressName - the name of the public IP Address. -// expand - expands referenced resources. -func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", nil, "Failure preparing request") - return - } - - resp, err := client.GetVirtualMachineScaleSetPublicIPAddressSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure sending request") - return - } - - result, err = client.GetVirtualMachineScaleSetPublicIPAddressResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure responding to request") - return - } - - return -} - -// GetVirtualMachineScaleSetPublicIPAddressPreparer prepares the GetVirtualMachineScaleSetPublicIPAddress request. -func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ipConfigurationName": autorest.Encode("path", IPConfigurationName), - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "publicIpAddressName": autorest.Encode("path", publicIPAddressName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-30" - 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/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVirtualMachineScaleSetPublicIPAddressSender sends the GetVirtualMachineScaleSetPublicIPAddress request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetVirtualMachineScaleSetPublicIPAddressResponder handles the response to the GetVirtualMachineScaleSetPublicIPAddress request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressResponder(resp *http.Response) (result PublicIPAddress, 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 public IP addresses in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.List") - defer func() { - sc := -1 - if result.pialr.Response.Response != nil { - sc = result.pialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.pialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/publicIPAddresses", 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 PublicIPAddressesClient) 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 PublicIPAddressesClient) ListResponder(resp *http.Response) (result PublicIPAddressListResult, 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 PublicIPAddressesClient) listNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "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, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPAddressesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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) - return -} - -// ListAll gets all the public IP addresses in a subscription. -func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result PublicIPAddressListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") - defer func() { - sc := -1 - if result.pialr.Response.Response != nil { - sc = result.pialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.pialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) ListAllResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client PublicIPAddressesClient) listAllNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (result PublicIPAddressListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListVirtualMachineScaleSetPublicIPAddresses gets information about all public IP addresses on a virtual machine -// scale set level. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses") - defer func() { - sc := -1 - if result.pialr.Response.Response != nil { - sc = result.pialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listVirtualMachineScaleSetPublicIPAddressesNextResults - req, err := client.ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", nil, "Failure preparing request") - return - } - - resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) - if err != nil { - result.pialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListVirtualMachineScaleSetPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetPublicIPAddresses request. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-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/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVirtualMachineScaleSetPublicIPAddressesSender sends the ListVirtualMachineScaleSetPublicIPAddresses request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVirtualMachineScaleSetPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetPublicIPAddresses request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listVirtualMachineScaleSetPublicIPAddressesNextResults retrieves the next set of results, if any. -func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListVirtualMachineScaleSetPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses") - 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.ListVirtualMachineScaleSetPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName) - return -} - -// ListVirtualMachineScaleSetVMPublicIPAddresses gets information about all public IP addresses in a virtual machine IP -// configuration in a virtual machine scale set. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualMachineScaleSetName - the name of the virtual machine scale set. -// virtualmachineIndex - the virtual machine index. -// networkInterfaceName - the network interface name. -// IPConfigurationName - the IP configuration name. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses") - defer func() { - sc := -1 - if result.pialr.Response.Response != nil { - sc = result.pialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listVirtualMachineScaleSetVMPublicIPAddressesNextResults - req, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", nil, "Failure preparing request") - return - } - - resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) - if err != nil { - result.pialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListVirtualMachineScaleSetVMPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetVMPublicIPAddresses request. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "ipConfigurationName": autorest.Encode("path", IPConfigurationName), - "networkInterfaceName": autorest.Encode("path", networkInterfaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), - "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), - } - - const APIVersion = "2017-03-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/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListVirtualMachineScaleSetVMPublicIPAddressesSender sends the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListVirtualMachineScaleSetVMPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listVirtualMachineScaleSetVMPublicIPAddressesNextResults retrieves the next set of results, if any. -func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { - req, err := lastResults.publicIPAddressListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure sending next results request") - } - result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListVirtualMachineScaleSetVMPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses") - 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.ListVirtualMachineScaleSetVMPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) - return -} - -// UpdateTags updates public IP address tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPAddressName - the name of the public IP address. -// parameters - parameters supplied to update public IP address tags. -func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddressesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPAddressName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpAddressName": autorest.Encode("path", publicIPAddressName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPAddresses/{publicIpAddressName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client PublicIPAddressesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPAddress, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go deleted file mode 100644 index d3fe16f4deab..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go +++ /dev/null @@ -1,583 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PublicIPPrefixesClient is the network Client -type PublicIPPrefixesClient struct { - BaseClient -} - -// NewPublicIPPrefixesClient creates an instance of the PublicIPPrefixesClient client. -func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { - return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient 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 NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient { - return PublicIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a static or dynamic public IP prefix. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPPrefixName - the name of the public IP prefix. -// parameters - parameters supplied to the create or update public IP prefix operation. -func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (result PublicIPPrefixesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters), - autorest.WithJSON(parameters), - 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 PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPPrefix, 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 deletes the specified public IP prefix. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPPrefixName - the name of the PublicIpPrefix. -func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result PublicIPPrefixesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPPrefixName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PublicIPPrefixesClient) 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 the specified public IP prefix in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPPrefixName - the name of the public IP prefix. -// expand - expands referenced resources. -func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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, publicIPPrefixName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) 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 PublicIPPrefixesClient) GetResponder(resp *http.Response) (result PublicIPPrefix, 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 public IP prefixes in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List") - defer func() { - sc := -1 - if result.piplr.Response.Response != nil { - sc = result.piplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.piplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/publicIPPrefixes", 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 PublicIPPrefixesClient) 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 PublicIPPrefixesClient) ListResponder(resp *http.Response) (result PublicIPPrefixListResult, 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 PublicIPPrefixesClient) listNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) { - req, err := lastResults.publicIPPrefixListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "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, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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) - return -} - -// ListAll gets all the public IP prefixes in a subscription. -func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result PublicIPPrefixListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll") - defer func() { - sc := -1 - if result.piplr.Response.Response != nil { - sc = result.piplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.piplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPPrefixesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client PublicIPPrefixesClient) ListAllResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client PublicIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) { - req, err := lastResults.publicIPPrefixListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (result PublicIPPrefixListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates public IP prefix tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// publicIPPrefixName - the name of the public IP prefix. -// parameters - parameters supplied to update public IP prefix tags. -func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefixesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPPrefixName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client PublicIPPrefixesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPPrefix, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go deleted file mode 100644 index 22f89957d620..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go +++ /dev/null @@ -1,110 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ResourceNavigationLinksClient is the network Client -type ResourceNavigationLinksClient struct { - BaseClient -} - -// NewResourceNavigationLinksClient creates an instance of the ResourceNavigationLinksClient client. -func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationLinksClient { - return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient 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 NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { - return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of resource navigation links for a subnet. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -func (client ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ResourceNavigationLinksListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceNavigationLinksClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-06-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}/subnets/{subnetName}/ResourceNavigationLinks", 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 ResourceNavigationLinksClient) 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 ResourceNavigationLinksClient) ListResponder(resp *http.Response) (result ResourceNavigationLinksListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go deleted file mode 100644 index 40d635dde38c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go +++ /dev/null @@ -1,489 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// RouteFilterRulesClient is the network Client -type RouteFilterRulesClient struct { - BaseClient -} - -// NewRouteFilterRulesClient creates an instance of the RouteFilterRulesClient client. -func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { - return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient 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 NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient { - return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a route in the specified route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// ruleName - the name of the route filter rule. -// routeFilterRuleParameters - parameters supplied to the create or update route filter rule operation. -func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (result RouteFilterRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: routeFilterRuleParameters, - Constraints: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.RouteFilterRuleType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.Communities", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.RouteFilterRulesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "ruleName": autorest.Encode("path", ruleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - routeFilterRuleParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters), - autorest.WithJSON(routeFilterRuleParameters), - 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 RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilterRule, 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 deletes the specified rule from a route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// ruleName - the name of the rule. -func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName, ruleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "ruleName": autorest.Encode("path", ruleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", 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 RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RouteFilterRulesClient) 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 the specified rule from a route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// ruleName - the name of the rule. -func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.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, routeFilterName, ruleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "ruleName": autorest.Encode("path", ruleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", 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 RouteFilterRulesClient) 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 RouteFilterRulesClient) GetResponder(resp *http.Response) (result RouteFilterRule, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByRouteFilter gets all RouteFilterRules in a route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter") - defer func() { - sc := -1 - if result.rfrlr.Response.Response != nil { - sc = result.rfrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByRouteFilterNextResults - req, err := client.ListByRouteFilterPreparer(ctx, resourceGroupName, routeFilterName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", nil, "Failure preparing request") - return - } - - resp, err := client.ListByRouteFilterSender(req) - if err != nil { - result.rfrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByRouteFilterPreparer prepares the ListByRouteFilter request. -func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeFilters/{routeFilterName}/routeFilterRules", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the -// http.Response Body if it receives an error. -func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always -// closes the http.Response Body. -func (client RouteFilterRulesClient) ListByRouteFilterResponder(resp *http.Response) (result RouteFilterRuleListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByRouteFilterNextResults retrieves the next set of results, if any. -func (client RouteFilterRulesClient) listByRouteFilterNextResults(ctx context.Context, lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) { - req, err := lastResults.routeFilterRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByRouteFilterSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByRouteFilterResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByRouteFilterComplete enumerates all values, automatically crossing page boundaries as required. -func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter") - 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.ListByRouteFilter(ctx, resourceGroupName, routeFilterName) - return -} - -// Update updates a route in the specified route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// ruleName - the name of the route filter rule. -// routeFilterRuleParameters - parameters supplied to the update route filter rule operation. -func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (result RouteFilterRulesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "ruleName": autorest.Encode("path", ruleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - routeFilterRuleParameters.Name = nil - routeFilterRuleParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters), - autorest.WithJSON(routeFilterRuleParameters), - 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 RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RouteFilterRulesClient) UpdateResponder(resp *http.Response) (result RouteFilterRule, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go deleted file mode 100644 index 54dac3e88c08..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go +++ /dev/null @@ -1,586 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RouteFiltersClient is the network Client -type RouteFiltersClient struct { - BaseClient -} - -// NewRouteFiltersClient creates an instance of the RouteFiltersClient client. -func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { - return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient 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 NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient { - return RouteFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a route filter in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// routeFilterParameters - parameters supplied to the create or update route filter operation. -func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (result RouteFiltersCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - routeFilterParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters), - autorest.WithJSON(routeFilterParameters), - 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 RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilter, 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 deletes the specified route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFiltersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeFilters/{routeFilterName}", 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 RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RouteFiltersClient) 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 the specified route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// expand - expands referenced express route bgp peering resources. -func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (result RouteFilter, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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, routeFilterName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeFilters/{routeFilterName}", 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 RouteFiltersClient) 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 RouteFiltersClient) GetResponder(resp *http.Response) (result RouteFilter, 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 route filters in a subscription. -func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.List") - defer func() { - sc := -1 - if result.rflr.Response.Response != nil { - sc = result.rflr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rflr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters", 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 RouteFiltersClient) 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 RouteFiltersClient) ListResponder(resp *http.Response) (result RouteFilterListResult, 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 RouteFiltersClient) listNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) { - req, err := lastResults.routeFilterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "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, "network.RouteFiltersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RouteFiltersClient) ListComplete(ctx context.Context) (result RouteFilterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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) - return -} - -// ListByResourceGroup gets all route filters in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RouteFilterListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.rflr.Response.Response != nil { - sc = result.rflr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.rflr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeFilters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client RouteFiltersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client RouteFiltersClient) ListByResourceGroupResponder(resp *http.Response) (result RouteFilterListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client RouteFiltersClient) listByResourceGroupNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) { - req, err := lastResults.routeFilterListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RouteFilterListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates a route filter in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// routeFilterParameters - parameters supplied to the update route filter operation. -func (client RouteFiltersClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (result RouteFiltersUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - routeFilterParameters.Name = nil - routeFilterParameters.Etag = nil - routeFilterParameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters), - autorest.WithJSON(routeFilterParameters), - 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 RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RouteFiltersClient) UpdateResponder(resp *http.Response) (result RouteFilter, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go deleted file mode 100644 index cbe677dba1cd..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go +++ /dev/null @@ -1,391 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RoutesClient is the network Client -type RoutesClient struct { - BaseClient -} - -// NewRoutesClient creates an instance of the RoutesClient client. -func NewRoutesClient(subscriptionID string) RoutesClient { - return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient 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 NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient { - return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a route in the specified route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// routeName - the name of the route. -// routeParameters - parameters supplied to the create or update route operation. -func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (result RoutesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, routeName, routeParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeName": autorest.Encode("path", routeName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}/routes/{routeName}", pathParameters), - autorest.WithJSON(routeParameters), - 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 RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result Route, 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 deletes the specified route from a route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// routeName - the name of the route. -func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result RoutesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName, routeName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeName": autorest.Encode("path", routeName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}/routes/{routeName}", 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 RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RoutesClient) 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 the specified route from a route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// routeName - the name of the route. -func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result Route, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, routeTableName, routeName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeName": autorest.Encode("path", routeName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeTables/{routeTableName}/routes/{routeName}", 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 RoutesClient) 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 RoutesClient) GetResponder(resp *http.Response) (result Route, 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 routes in a route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -func (client RoutesClient) List(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.List") - defer func() { - sc := -1 - if result.rlr.Response.Response != nil { - sc = result.rlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, routeTableName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeTables/{routeTableName}/routes", 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 RoutesClient) 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 RoutesClient) ListResponder(resp *http.Response) (result RouteListResult, 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 RoutesClient) listNextResults(ctx context.Context, lastResults RouteListResult) (result RouteListResult, err error) { - req, err := lastResults.routeListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RoutesClient", "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, "network.RoutesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RoutesClient) ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, routeTableName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go deleted file mode 100644 index 6aeb093717ef..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go +++ /dev/null @@ -1,582 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RouteTablesClient is the network Client -type RouteTablesClient struct { - BaseClient -} - -// NewRouteTablesClient creates an instance of the RouteTablesClient client. -func NewRouteTablesClient(subscriptionID string) RouteTablesClient { - return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient 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 NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient { - return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or updates a route table in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// parameters - parameters supplied to the create or update route table operation. -func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (result RouteTablesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}", pathParameters), - autorest.WithJSON(parameters), - 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 RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteTable, 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 deletes the specified route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteTablesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeTableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}", 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 RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RouteTablesClient) 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 the specified route table. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// expand - expands referenced resources. -func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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, routeTableName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}", 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 RouteTablesClient) 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 RouteTablesClient) GetResponder(resp *http.Response) (result RouteTable, 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 route tables in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client RouteTablesClient) List(ctx context.Context, resourceGroupName string) (result RouteTableListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.List") - defer func() { - sc := -1 - if result.rtlr.Response.Response != nil { - sc = result.rtlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rtlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/routeTables", 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 RouteTablesClient) 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 RouteTablesClient) ListResponder(resp *http.Response) (result RouteTableListResult, 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 RouteTablesClient) listNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { - req, err := lastResults.routeTableListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "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, "network.RouteTablesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string) (result RouteTableListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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) - return -} - -// ListAll gets all route tables in a subscription. -func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") - defer func() { - sc := -1 - if result.rtlr.Response.Response != nil { - sc = result.rtlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.rtlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client RouteTablesClient) ListAllResponder(resp *http.Response) (result RouteTableListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client RouteTablesClient) listAllNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) { - req, err := lastResults.routeTableListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result RouteTableListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates a route table tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeTableName - the name of the route table. -// parameters - parameters supplied to update route table tags. -func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTablesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeTableName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeTableName": autorest.Encode("path", routeTableName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/routeTables/{routeTableName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client RouteTablesClient) UpdateTagsResponder(resp *http.Response) (result RouteTable, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go deleted file mode 100644 index c8e650af094f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go +++ /dev/null @@ -1,582 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SecurityGroupsClient is the network Client -type SecurityGroupsClient struct { - BaseClient -} - -// NewSecurityGroupsClient creates an instance of the SecurityGroupsClient client. -func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { - return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient 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 NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient { - return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a network security group in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// parameters - parameters supplied to the create or update network security group operation. -func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (result SecurityGroupsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters), - autorest.WithJSON(parameters), - 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 SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityGroup, 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 deletes the specified network security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SecurityGroupsClient) 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 the specified network security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// expand - expands referenced resources. -func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, networkSecurityGroupName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) 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 SecurityGroupsClient) GetResponder(resp *http.Response) (result SecurityGroup, 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 network security groups in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List") - defer func() { - sc := -1 - if result.sglr.Response.Response != nil { - sc = result.sglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.sglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkSecurityGroups", 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 SecurityGroupsClient) 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 SecurityGroupsClient) ListResponder(resp *http.Response) (result SecurityGroupListResult, 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 SecurityGroupsClient) listNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { - req, err := lastResults.securityGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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, "network.SecurityGroupsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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) - return -} - -// ListAll gets all network security groups in a subscription. -func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") - defer func() { - sc := -1 - if result.sglr.Response.Response != nil { - sc = result.sglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.sglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client SecurityGroupsClient) ListAllResponder(resp *http.Response) (result SecurityGroupListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client SecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) { - req, err := lastResults.securityGroupListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll") - 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.ListAll(ctx) - return -} - -// UpdateTags updates a network security group tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// parameters - parameters supplied to update network security group tags. -func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroupsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client SecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result SecurityGroup, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go deleted file mode 100644 index 98b411ff8d77..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go +++ /dev/null @@ -1,391 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SecurityRulesClient is the network Client -type SecurityRulesClient struct { - BaseClient -} - -// NewSecurityRulesClient creates an instance of the SecurityRulesClient client. -func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { - return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient 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 NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { - return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a security rule in the specified network security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// securityRuleName - the name of the security rule. -// securityRuleParameters - parameters supplied to the create or update network security rule operation. -func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (result SecurityRulesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityRuleName": autorest.Encode("path", securityRuleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", pathParameters), - autorest.WithJSON(securityRuleParameters), - 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 SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityRule, 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 deletes the specified network security rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// securityRuleName - the name of the security rule. -func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRulesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityRuleName": autorest.Encode("path", securityRuleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", 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 SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SecurityRulesClient) 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 get the specified network security rule. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -// securityRuleName - the name of the security rule. -func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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, networkSecurityGroupName, securityRuleName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "securityRuleName": autorest.Encode("path", securityRuleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}", 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 SecurityRulesClient) 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 SecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, 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 security rules in a network security group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkSecurityGroupName - the name of the network security group. -func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.List") - defer func() { - sc := -1 - if result.srlr.Response.Response != nil { - sc = result.srlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.srlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkSecurityGroups/{networkSecurityGroupName}/securityRules", 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 SecurityRulesClient) 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 SecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, 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 SecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { - req, err := lastResults.securityRuleListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.SecurityRulesClient", "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, "network.SecurityRulesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client SecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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, networkSecurityGroupName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go deleted file mode 100644 index 3b3fce7bfc24..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go +++ /dev/null @@ -1,110 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceAssociationLinksClient is the network Client -type ServiceAssociationLinksClient struct { - BaseClient -} - -// NewServiceAssociationLinksClient creates an instance of the ServiceAssociationLinksClient client. -func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationLinksClient { - return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient 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 NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { - return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of service association links for a subnet. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -func (client ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ServiceAssociationLinksListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceAssociationLinksClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-06-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}/subnets/{subnetName}/ServiceAssociationLinks", 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 ServiceAssociationLinksClient) 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 ServiceAssociationLinksClient) ListResponder(resp *http.Response) (result ServiceAssociationLinksListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go deleted file mode 100644 index 5c72d4d12ce0..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go +++ /dev/null @@ -1,583 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceEndpointPoliciesClient is the network Client -type ServiceEndpointPoliciesClient struct { - BaseClient -} - -// NewServiceEndpointPoliciesClient creates an instance of the ServiceEndpointPoliciesClient client. -func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoliciesClient { - return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient 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 NewServiceEndpointPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPoliciesClient { - return ServiceEndpointPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a service Endpoint Policies. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy. -// parameters - parameters supplied to the create or update service endpoint policy operation. -func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (result ServiceEndpointPoliciesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", pathParameters), - autorest.WithJSON(parameters), - 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 ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, 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 deletes the specified service endpoint policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy. -func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPoliciesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPoliciesClient) 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 the specified service Endpoint Policies in a specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy. -// expand - expands referenced resources. -func (client ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (result ServiceEndpointPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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, serviceEndpointPolicyName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) 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 ServiceEndpointPoliciesClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicy, 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 the service endpoint policies in a subscription. -func (client ServiceEndpointPoliciesClient) List(ctx context.Context) (result ServiceEndpointPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.List") - defer func() { - sc := -1 - if result.seplr.Response.Response != nil { - sc = result.seplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.seplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies", 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 ServiceEndpointPoliciesClient) 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 ServiceEndpointPoliciesClient) ListResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, 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 ServiceEndpointPoliciesClient) listNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) { - req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "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, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServiceEndpointPoliciesClient) ListComplete(ctx context.Context) (result ServiceEndpointPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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) - return -} - -// ListByResourceGroup gets all service endpoint Policies in a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.seplr.Response.Response != nil { - sc = result.seplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.seplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/serviceEndpointPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceEndpointPoliciesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPoliciesClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ServiceEndpointPoliciesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) { - req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Update updates service Endpoint Policies. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy. -// parameters - parameters supplied to update service endpoint policy tags. -func (client ServiceEndpointPoliciesClient) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPoliciesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", pathParameters), - autorest.WithJSON(parameters), - 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 ServiceEndpointPoliciesClient) UpdateSender(req *http.Request) (future ServiceEndpointPoliciesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPoliciesClient) UpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go deleted file mode 100644 index 0a9760b35207..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go +++ /dev/null @@ -1,393 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceEndpointPolicyDefinitionsClient is the network Client -type ServiceEndpointPolicyDefinitionsClient struct { - BaseClient -} - -// NewServiceEndpointPolicyDefinitionsClient creates an instance of the ServiceEndpointPolicyDefinitionsClient client. -func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEndpointPolicyDefinitionsClient { - return NewServiceEndpointPolicyDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient 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 NewServiceEndpointPolicyDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPolicyDefinitionsClient { - return ServiceEndpointPolicyDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a service endpoint policy definition in the specified service endpoint policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy. -// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name. -// serviceEndpointPolicyDefinitions - parameters supplied to the create or update service endpoint policy -// operation. -func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (result ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", pathParameters), - autorest.WithJSON(serviceEndpointPolicyDefinitions), - 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 ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, 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 deletes the specified ServiceEndpoint policy definitions. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the Service Endpoint Policy. -// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition. -func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinitionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPolicyDefinitionsClient) 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 get the specified service endpoint policy definitions from service endpoint policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy name. -// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name. -func (client ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) 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 ServiceEndpointPolicyDefinitionsClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup gets all service endpoint policy definitions in a service end point policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceEndpointPolicyName - the name of the service endpoint policy name. -func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.sepdlr.Response.Response != nil { - sc = result.sepdlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, serviceEndpointPolicyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.sepdlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyDefinitionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyDefinitionListResult) (result ServiceEndpointPolicyDefinitionListResult, err error) { - req, err := lastResults.serviceEndpointPolicyDefinitionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName, serviceEndpointPolicyName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go deleted file mode 100644 index d5bd97bb5567..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go +++ /dev/null @@ -1,107 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ServiceTagsClient is the network Client -type ServiceTagsClient struct { - BaseClient -} - -// NewServiceTagsClient creates an instance of the ServiceTagsClient client. -func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { - return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient 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 NewServiceTagsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagsClient { - return ServiceTagsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of service tag information resources. -// Parameters: -// location - the location that will be used as a reference for version (not as a filter based on location, you -// will get the list of service tags with prefix details across all regions but limited to the cloud that your -// subscription belongs to). -func (client ServiceTagsClient) List(ctx context.Context, location string) (result ServiceTagsListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ServiceTagsClient) 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags", 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 ServiceTagsClient) 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 ServiceTagsClient) ListResponder(resp *http.Response) (result ServiceTagsListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go deleted file mode 100644 index d89d324c9479..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go +++ /dev/null @@ -1,563 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// SubnetsClient is the network Client -type SubnetsClient struct { - BaseClient -} - -// NewSubnetsClient creates an instance of the SubnetsClient client. -func NewSubnetsClient(subscriptionID string) SubnetsClient { - return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient 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 NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient { - return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a subnet in the specified virtual network. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -// subnetParameters - parameters supplied to the create or update subnet operation. -func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (result SubnetsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", pathParameters), - autorest.WithJSON(subnetParameters), - 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 SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result Subnet, 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 deletes the specified subnet. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result SubnetsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", 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 SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client SubnetsClient) 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 the specified subnet by virtual network and resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -// expand - expands referenced resources. -func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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, virtualNetworkName, subnetName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}", 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 SubnetsClient) 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 SubnetsClient) GetResponder(resp *http.Response) (result Subnet, 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 subnets in a virtual network. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.List") - defer func() { - sc := -1 - if result.slr.Response.Response != nil { - sc = result.slr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.slr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client SubnetsClient) ListPreparer(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 = "2019-06-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}/subnets", 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 SubnetsClient) 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 SubnetsClient) ListResponder(resp *http.Response) (result SubnetListResult, 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 SubnetsClient) listNextResults(ctx context.Context, lastResults SubnetListResult) (result SubnetListResult, err error) { - req, err := lastResults.subnetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.SubnetsClient", "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, "network.SubnetsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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, virtualNetworkName) - return -} - -// PrepareNetworkPolicies prepares a subnet by applying network intent policies. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -// prepareNetworkPoliciesRequestParameters - parameters supplied to prepare subnet by applying network intent -// policies. -func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.PrepareNetworkPolicies") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PrepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure preparing request") - return - } - - result, err = client.PrepareNetworkPoliciesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request") - return - } - - return -} - -// PrepareNetworkPoliciesPreparer prepares the PrepareNetworkPolicies request. -func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies", pathParameters), - autorest.WithJSON(prepareNetworkPoliciesRequestParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PrepareNetworkPoliciesSender sends the PrepareNetworkPolicies request. The method will close the -// http.Response Body if it receives an error. -func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PrepareNetworkPoliciesResponder handles the response to the PrepareNetworkPolicies request. The method always -// closes the http.Response Body. -func (client SubnetsClient) PrepareNetworkPoliciesResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// UnprepareNetworkPolicies unprepares a subnet by removing network intent policies. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// subnetName - the name of the subnet. -// unprepareNetworkPoliciesRequestParameters - parameters supplied to unprepare subnet to remove network intent -// policies. -func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest) (result SubnetsUnprepareNetworkPoliciesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.UnprepareNetworkPolicies") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UnprepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure preparing request") - return - } - - result, err = client.UnprepareNetworkPoliciesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", result.Response(), "Failure sending request") - return - } - - return -} - -// UnprepareNetworkPoliciesPreparer prepares the UnprepareNetworkPolicies request. -func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subnetName": autorest.Encode("path", subnetName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies", pathParameters), - autorest.WithJSON(unprepareNetworkPoliciesRequestParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UnprepareNetworkPoliciesSender sends the UnprepareNetworkPolicies request. The method will close the -// http.Response Body if it receives an error. -func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UnprepareNetworkPoliciesResponder handles the response to the UnprepareNetworkPolicies request. The method always -// closes the http.Response Body. -func (client SubnetsClient) UnprepareNetworkPoliciesResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go deleted file mode 100644 index e42f1b0ede3f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go +++ /dev/null @@ -1,154 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// UsagesClient is the network Client -type UsagesClient struct { - BaseClient -} - -// NewUsagesClient creates an instance of the UsagesClient client. -func NewUsagesClient(subscriptionID string) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient 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 NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List list network usages for a subscription. -// Parameters: -// location - the location where resource usage is queried. -func (client UsagesClient) List(ctx context.Context, location string) (result UsagesListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") - defer func() { - sc := -1 - if result.ulr.Response.Response != nil { - sc = result.ulr.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("network.UsagesClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ulr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client UsagesClient) 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages", 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 UsagesClient) 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 UsagesClient) ListResponder(resp *http.Response) (result UsagesListResult, 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 UsagesClient) listNextResults(ctx context.Context, lastResults UsagesListResult) (result UsagesListResult, err error) { - req, err := lastResults.usagesListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.UsagesClient", "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, "network.UsagesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsagesListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go deleted file mode 100644 index 2b9dc7989483..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package network - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " network/2019-06-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go deleted file mode 100644 index d59e60d6b44c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go +++ /dev/null @@ -1,579 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualHubsClient is the network Client -type VirtualHubsClient struct { - BaseClient -} - -// NewVirtualHubsClient creates an instance of the VirtualHubsClient client. -func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { - return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient 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 NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubsClient { - return VirtualHubsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -// virtualHubParameters - parameters supplied to create or update VirtualHub. -func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (result VirtualHubsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - virtualHubParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}", pathParameters), - autorest.WithJSON(virtualHubParameters), - 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 VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHub, 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 deletes a VirtualHub. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHubsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-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.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualHubsClient) 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 retrieves the details of a VirtualHub. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHub, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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, virtualHubName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-06-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/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) 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 VirtualHubsClient) GetResponder(resp *http.Response) (result VirtualHub, 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 the VirtualHubs in a subscription. -func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHubsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.List") - defer func() { - sc := -1 - if result.lvhr.Response.Response != nil { - sc = result.lvhr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lvhr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs", 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 VirtualHubsClient) 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 VirtualHubsClient) ListResponder(resp *http.Response) (result ListVirtualHubsResult, 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 VirtualHubsClient) listNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { - req, err := lastResults.listVirtualHubsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVirtualHubsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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) - return -} - -// ListByResourceGroup lists all the VirtualHubs in a resource group. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lvhr.Response.Response != nil { - sc = result.lvhr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lvhr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/virtualHubs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualHubsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VirtualHubsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) { - req, err := lastResults.listVirtualHubsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates VirtualHub tags. -// Parameters: -// resourceGroupName - the resource group name of the VirtualHub. -// virtualHubName - the name of the VirtualHub. -// virtualHubParameters - parameters supplied to update VirtualHub tags. -func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHubsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualHubName": autorest.Encode("path", virtualHubName), - } - - const APIVersion = "2019-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.Network/virtualHubs/{virtualHubName}", pathParameters), - autorest.WithJSON(virtualHubParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualHubsClient) UpdateTagsResponder(resp *http.Response) (result VirtualHub, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go deleted file mode 100644 index c95aa636214e..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go +++ /dev/null @@ -1,743 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualNetworkGatewayConnectionsClient is the network Client -type VirtualNetworkGatewayConnectionsClient struct { - BaseClient -} - -// NewVirtualNetworkGatewayConnectionsClient creates an instance of the VirtualNetworkGatewayConnectionsClient client. -func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNetworkGatewayConnectionsClient { - return NewVirtualNetworkGatewayConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient 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 NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient { - return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a virtual network gateway connection in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. -// parameters - parameters supplied to the create or update virtual network gateway connection operation. -func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (result VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-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.Network/connections/{virtualNetworkGatewayConnectionName}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, 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 deletes the specified virtual network Gateway connection. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. -func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-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.Network/connections/{virtualNetworkGatewayConnectionName}", 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 VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) 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 the specified virtual network gateway connection by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. -func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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, virtualNetworkGatewayConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-06-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/connections/{virtualNetworkGatewayConnectionName}", 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 VirtualNetworkGatewayConnectionsClient) 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 VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetSharedKey the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified -// virtual network gateway connection shared key through Network resource provider. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the virtual network gateway connection shared key name. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.GetSharedKey") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request") - return - } - - resp, err := client.GetSharedKeySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure sending request") - return - } - - result, err = client.GetSharedKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure responding to request") - return - } - - return -} - -// GetSharedKeyPreparer prepares the GetSharedKey request. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-06-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/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSharedKeySender sends the GetSharedKey request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSharedKeyResponder handles the response to the GetSharedKey request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List the List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections -// created. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.List") - defer func() { - sc := -1 - if result.vngclr.Response.Response != nil { - sc = result.vngclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vngclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/connections", 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 VirtualNetworkGatewayConnectionsClient) 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 VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListResult, 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 VirtualNetworkGatewayConnectionsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) { - req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "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, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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) - return -} - -// ResetSharedKey the VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway -// connection shared key for passed virtual network gateway connection in the specified resource group through Network -// resource provider. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the virtual network gateway connection reset shared key Name. -// parameters - parameters supplied to the begin reset virtual network gateway connection shared key operation -// through network resource provider. -func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (result VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetSharedKey") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) - } - - req, err := client.ResetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure preparing request") - return - } - - result, err = client.ResetSharedKeySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetSharedKeyPreparer prepares the ResetSharedKey request. -func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetSharedKeySender sends the ResetSharedKey request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetSharedKeyResponder handles the response to the ResetSharedKey request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(resp *http.Response) (result ConnectionResetSharedKey, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetSharedKey the Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection -// shared key for passed virtual network gateway connection in the specified resource group through Network resource -// provider. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the virtual network gateway connection name. -// parameters - parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation -// throughNetwork resource provider. -func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (result VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.SetSharedKey") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", err.Error()) - } - - req, err := client.SetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure preparing request") - return - } - - result, err = client.SetSharedKeySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request") - return - } - - return -} - -// SetSharedKeyPreparer prepares the SetSharedKey request. -func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-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.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetSharedKeySender sends the SetSharedKey request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// SetSharedKeyResponder handles the response to the SetSharedKey request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates a virtual network gateway connection tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection. -// parameters - parameters supplied to update virtual network gateway connection tags. -func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (result VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-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.Network/connections/{virtualNetworkGatewayConnectionName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go deleted file mode 100644 index b7e626efb48d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go +++ /dev/null @@ -1,1653 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualNetworkGatewaysClient is the network Client -type VirtualNetworkGatewaysClient struct { - BaseClient -} - -// NewVirtualNetworkGatewaysClient creates an instance of the VirtualNetworkGatewaysClient client. -func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewaysClient { - return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient 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 NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient { - return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a virtual network gateway in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// parameters - parameters supplied to create or update virtual network gateway operation. -func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkGatewaysClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGateway, 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 deletes the specified virtual network gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", 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 VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) 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 -} - -// Generatevpnclientpackage generates VPN client package for P2S client of the virtual network gateway in the specified -// resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// parameters - parameters supplied to the generate virtual network gateway VPN client package operation. -func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Generatevpnclientpackage") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GeneratevpnclientpackagePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request") - return - } - - result, err = client.GeneratevpnclientpackageSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request") - return - } - - return -} - -// GeneratevpnclientpackagePreparer prepares the Generatevpnclientpackage request. -func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GeneratevpnclientpackageResponder handles the response to the Generatevpnclientpackage request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(resp *http.Response) (result String, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GenerateVpnProfile generates VPN profile for P2S client of the virtual network gateway in the specified resource -// group. Used for IKEV2 and radius based authentication. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// parameters - parameters supplied to the generate virtual network gateway VPN client package operation. -func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GenerateVpnProfile") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request") - return - } - - result, err = client.GenerateVpnProfileSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request") - return - } - - return -} - -// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request. -func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result String, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets the specified virtual network gateway by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-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/virtualNetworkGateways/{virtualNetworkGatewayName}", 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 VirtualNetworkGatewaysClient) 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 VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetAdvertisedRoutes this operation retrieves a list of routes the virtual network gateway is advertising to the -// specified peer. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// peer - the IP address of the peer. -func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetAdvertisedRoutes") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetAdvertisedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure preparing request") - return - } - - result, err = client.GetAdvertisedRoutesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request") - return - } - - return -} - -// GetAdvertisedRoutesPreparer prepares the GetAdvertisedRoutes request. -func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "peer": autorest.Encode("query", peer), - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetAdvertisedRoutesResponder handles the response to the GetAdvertisedRoutes request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetBgpPeerStatus the GetBgpPeerStatus operation retrieves the status of all BGP peers. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// peer - the IP address of the peer to retrieve the status of. -func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetBgpPeerStatus") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetBgpPeerStatusPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure preparing request") - return - } - - result, err = client.GetBgpPeerStatusSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request") - return - } - - return -} - -// GetBgpPeerStatusPreparer prepares the GetBgpPeerStatus request. -func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(peer) > 0 { - queryParameters["peer"] = autorest.Encode("query", peer) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetBgpPeerStatusResponder handles the response to the GetBgpPeerStatus request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusResponder(resp *http.Response) (result BgpPeerStatusListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetLearnedRoutes this operation retrieves a list of routes the virtual network gateway has learned, including routes -// learned from BGP peers. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetLearnedRoutes") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetLearnedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure preparing request") - return - } - - result, err = client.GetLearnedRoutesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request") - return - } - - return -} - -// GetLearnedRoutesPreparer prepares the GetLearnedRoutes request. -func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetLearnedRoutesResponder handles the response to the GetLearnedRoutes request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVpnclientConnectionHealth get VPN client connection health detail per P2S client connection of the virtual -// network gateway in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVpnclientConnectionHealthPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure preparing request") - return - } - - result, err = client.GetVpnclientConnectionHealthSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", result.Response(), "Failure sending request") - return - } - - return -} - -// GetVpnclientConnectionHealthPreparer prepares the GetVpnclientConnectionHealth request. -func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVpnclientConnectionHealthSender sends the GetVpnclientConnectionHealth request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetVpnclientConnectionHealthResponder handles the response to the GetVpnclientConnectionHealth request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthResponder(resp *http.Response) (result VpnClientConnectionHealthDetailListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVpnclientIpsecParameters the Get VpnclientIpsecParameters operation retrieves information about the vpnclient -// ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource -// provider. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the virtual network gateway name. -func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientIpsecParameters") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure preparing request") - return - } - - result, err = client.GetVpnclientIpsecParametersSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", result.Response(), "Failure sending request") - return - } - - return -} - -// GetVpnclientIpsecParametersPreparer prepares the GetVpnclientIpsecParameters request. -func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetVpnclientIpsecParametersResponder handles the response to the GetVpnclientIpsecParameters request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVpnProfilePackageURL gets pre-generated VPN profile for P2S client of the virtual network gateway in the -// specified resource group. The profile needs to be generated first using generateVpnProfile. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnProfilePackageURL") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetVpnProfilePackageURLPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure preparing request") - return - } - - result, err = client.GetVpnProfilePackageURLSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request") - return - } - - return -} - -// GetVpnProfilePackageURLPreparer prepares the GetVpnProfilePackageURL request. -func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVpnProfilePackageURLSender sends the GetVpnProfilePackageURL request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetVpnProfilePackageURLResponder handles the response to the GetVpnProfilePackageURL request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp *http.Response) (result String, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all virtual network gateways by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.List") - defer func() { - sc := -1 - if result.vnglr.Response.Response != nil { - sc = result.vnglr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vnglr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/virtualNetworkGateways", 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 VirtualNetworkGatewaysClient) 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 VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayListResult, 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 VirtualNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) { - req, err := lastResults.virtualNetworkGatewayListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "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, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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) - return -} - -// ListConnections gets all the connections in a virtual network gateway. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections") - defer func() { - sc := -1 - if result.vnglcr.Response.Response != nil { - sc = result.vnglcr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listConnectionsNextResults - req, err := client.ListConnectionsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", nil, "Failure preparing request") - return - } - - resp, err := client.ListConnectionsSender(req) - if err != nil { - result.vnglcr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListConnectionsPreparer prepares the ListConnections request. -func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-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/virtualNetworkGateways/{virtualNetworkGatewayName}/connections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListConnectionsSender sends the ListConnections request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) ListConnectionsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListConnectionsResponder handles the response to the ListConnections request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) ListConnectionsResponder(resp *http.Response) (result VirtualNetworkGatewayListConnectionsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listConnectionsNextResults retrieves the next set of results, if any. -func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListConnectionsResult) (result VirtualNetworkGatewayListConnectionsResult, err error) { - req, err := lastResults.virtualNetworkGatewayListConnectionsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListConnectionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListConnectionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListConnectionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections") - 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.ListConnections(ctx, resourceGroupName, virtualNetworkGatewayName) - return -} - -// Reset resets the primary of the virtual network gateway in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// gatewayVip - virtual network gateway vip address supplied to the begin reset of the active-active feature -// enabled gateway. -func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result VirtualNetworkGatewaysResetFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Reset") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, gatewayVip) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request") - return - } - - result, err = client.ResetSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetPreparer prepares the Reset request. -func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(gatewayVip) > 0 { - queryParameters["gatewayVip"] = autorest.Encode("query", gatewayVip) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetSender sends the Reset request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetResponder handles the response to the Reset request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ResetVpnClientSharedKey resets the VPN client shared key of the virtual network gateway in the specified resource -// group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ResetVpnClientSharedKey") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResetVpnClientSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure preparing request") - return - } - - result, err = client.ResetVpnClientSharedKeySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetVpnClientSharedKeyPreparer prepares the ResetVpnClientSharedKey request. -func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetVpnClientSharedKeySender sends the ResetVpnClientSharedKey request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetVpnClientSharedKeyResponder handles the response to the ResetVpnClientSharedKey request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// SetVpnclientIpsecParameters the Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S -// client of virtual network gateway in the specified resource group through Network resource provider. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// vpnclientIpsecParams - parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network -// Gateway P2S client operation through Network resource provider. -func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (result VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SetVpnclientIpsecParameters") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: vpnclientIpsecParams, - Constraints: []validation.Constraint{{Target: "vpnclientIpsecParams.SaLifeTimeSeconds", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "vpnclientIpsecParams.SaDataSizeKilobytes", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", err.Error()) - } - - req, err := client.SetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure preparing request") - return - } - - result, err = client.SetVpnclientIpsecParametersSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", result.Response(), "Failure sending request") - return - } - - return -} - -// SetVpnclientIpsecParametersPreparer prepares the SetVpnclientIpsecParameters request. -func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters", pathParameters), - autorest.WithJSON(vpnclientIpsecParams), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// SetVpnclientIpsecParametersResponder handles the response to the SetVpnclientIpsecParameters request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SupportedVpnDevices gets a xml format representation for supported vpn devices. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result String, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SupportedVpnDevices") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.SupportedVpnDevicesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", nil, "Failure preparing request") - return - } - - resp, err := client.SupportedVpnDevicesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure sending request") - return - } - - result, err = client.SupportedVpnDevicesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure responding to request") - return - } - - return -} - -// SupportedVpnDevicesPreparer prepares the SupportedVpnDevices request. -func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SupportedVpnDevicesSender sends the SupportedVpnDevices request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SupportedVpnDevicesResponder handles the response to the SupportedVpnDevices request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesResponder(resp *http.Response) (result String, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates a virtual network gateway tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayName - the name of the virtual network gateway. -// parameters - parameters supplied to update virtual network gateway tags. -func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (result VirtualNetworkGatewaysUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), - } - - const APIVersion = "2019-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// VpnDeviceConfigurationScript gets a xml format representation for vpn device configuration script. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection for which the -// configuration script is generated. -// parameters - parameters supplied to the generate vpn device script operation. -func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (result String, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.VpnDeviceConfigurationScriptPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", nil, "Failure preparing request") - return - } - - resp, err := client.VpnDeviceConfigurationScriptSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure sending request") - return - } - - result, err = client.VpnDeviceConfigurationScriptResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure responding to request") - return - } - - return -} - -// VpnDeviceConfigurationScriptPreparer prepares the VpnDeviceConfigurationScript request. -func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// VpnDeviceConfigurationScriptSender sends the VpnDeviceConfigurationScript request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// VpnDeviceConfigurationScriptResponder handles the response to the VpnDeviceConfigurationScript request. The method always -// closes the http.Response Body. -func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptResponder(resp *http.Response) (result String, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go deleted file mode 100644 index 65f80190b8fd..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go +++ /dev/null @@ -1,393 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualNetworkPeeringsClient is the network Client -type VirtualNetworkPeeringsClient struct { - BaseClient -} - -// NewVirtualNetworkPeeringsClient creates an instance of the VirtualNetworkPeeringsClient client. -func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeeringsClient { - return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient 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 NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient { - return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a peering in the specified virtual network. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// virtualNetworkPeeringName - the name of the peering. -// virtualNetworkPeeringParameters - parameters supplied to the create or update virtual network peering -// operation. -func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), - } - - const APIVersion = "2019-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.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", pathParameters), - autorest.WithJSON(virtualNetworkPeeringParameters), - 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 VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkPeering, 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 deletes the specified virtual network peering. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// virtualNetworkPeeringName - the name of the virtual network peering. -func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeeringsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), - } - - const APIVersion = "2019-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.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}", 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 VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkPeeringsClient) 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 the specified virtual network peering. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// virtualNetworkPeeringName - the name of the virtual network peering. -func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeering, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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, virtualNetworkName, virtualNetworkPeeringName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkName": autorest.Encode("path", virtualNetworkName), - "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), - } - - const APIVersion = "2019-06-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}/virtualNetworkPeerings/{virtualNetworkPeeringName}", 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 VirtualNetworkPeeringsClient) 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 VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (result VirtualNetworkPeering, 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 network peerings in a virtual network. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.List") - defer func() { - sc := -1 - if result.vnplr.Response.Response != nil { - sc = result.vnplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vnplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualNetworkPeeringsClient) ListPreparer(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 = "2019-06-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}/virtualNetworkPeerings", 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 VirtualNetworkPeeringsClient) 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 VirtualNetworkPeeringsClient) ListResponder(resp *http.Response) (result VirtualNetworkPeeringListResult, 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 VirtualNetworkPeeringsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkPeeringListResult) (result VirtualNetworkPeeringListResult, err error) { - req, err := lastResults.virtualNetworkPeeringListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "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, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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, virtualNetworkName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go deleted file mode 100644 index ff9a5b57d3b2..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go +++ /dev/null @@ -1,778 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualNetworksClient is the network Client -type VirtualNetworksClient struct { - BaseClient -} - -// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client. -func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { - return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient 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 NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient { - return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckIPAddressAvailability checks whether a private IP address is available for use. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// IPAddress - the private IP address to be verified. -func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (result IPAddressAvailabilityResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CheckIPAddressAvailability") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CheckIPAddressAvailabilityPreparer(ctx, resourceGroupName, virtualNetworkName, IPAddress) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckIPAddressAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckIPAddressAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckIPAddressAvailabilityPreparer prepares the CheckIPAddressAvailability request. -func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress 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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - "ipAddress": autorest.Encode("query", IPAddress), - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckIPAddressAvailabilitySender sends the CheckIPAddressAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworksClient) CheckIPAddressAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CheckIPAddressAvailabilityResponder handles the response to the CheckIPAddressAvailability request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *http.Response) (result IPAddressAvailabilityResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates a virtual network in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// parameters - parameters supplied to the create or update virtual network operation. -func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (*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 = "2019-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.Network/virtualNetworks/{virtualNetworkName}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetwork, 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 deletes the specified virtual network. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworksDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworksClient) DeletePreparer(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 = "2019-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.Network/virtualNetworks/{virtualNetworkName}", 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 VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) 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 the specified virtual network by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// expand - expands referenced resources. -func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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, virtualNetworkName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand 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 = "2019-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.Network/virtualNetworks/{virtualNetworkName}", 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 VirtualNetworksClient) 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 VirtualNetworksClient) GetResponder(resp *http.Response) (result VirtualNetwork, 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. -func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List") - defer func() { - sc := -1 - if result.vnlr.Response.Response != nil { - sc = result.vnlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vnlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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", 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 VirtualNetworksClient) 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 VirtualNetworksClient) ListResponder(resp *http.Response) (result VirtualNetworkListResult, 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 VirtualNetworksClient) listNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { - req, err := lastResults.virtualNetworkListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "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, "network.VirtualNetworksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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) - return -} - -// ListAll gets all virtual networks in a subscription. -func (client VirtualNetworksClient) ListAll(ctx context.Context) (result VirtualNetworkListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") - defer func() { - sc := -1 - if result.vnlr.Response.Response != nil { - sc = result.vnlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.vnlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) ListAllResponder(resp *http.Response) (result VirtualNetworkListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client VirtualNetworksClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) { - req, err := lastResults.virtualNetworkListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result VirtualNetworkListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListUsage lists usage stats. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage") - defer func() { - sc := -1 - if result.vnlur.Response.Response != nil { - sc = result.vnlur.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listUsageNextResults - req, err := client.ListUsagePreparer(ctx, resourceGroupName, virtualNetworkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", nil, "Failure preparing request") - return - } - - resp, err := client.ListUsageSender(req) - if err != nil { - result.vnlur.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListUsagePreparer prepares the ListUsage request. -func (client VirtualNetworksClient) ListUsagePreparer(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 = "2019-06-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}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListUsageSender sends the ListUsage request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworksClient) ListUsageSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListUsageResponder handles the response to the ListUsage request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) ListUsageResponder(resp *http.Response) (result VirtualNetworkListUsageResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listUsageNextResults retrieves the next set of results, if any. -func (client VirtualNetworksClient) listUsageNextResults(ctx context.Context, lastResults VirtualNetworkListUsageResult) (result VirtualNetworkListUsageResult, err error) { - req, err := lastResults.virtualNetworkListUsageResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListUsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure sending next results request") - } - result, err = client.ListUsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListUsageComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage") - 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.ListUsage(ctx, resourceGroupName, virtualNetworkName) - return -} - -// UpdateTags updates a virtual network tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// virtualNetworkName - the name of the virtual network. -// parameters - parameters supplied to update virtual network tags. -func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetworksUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (*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 = "2019-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.Network/virtualNetworks/{virtualNetworkName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualNetworksClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetwork, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go deleted file mode 100644 index d78ef5234b8a..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go +++ /dev/null @@ -1,611 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VirtualNetworkTapsClient is the network Client -type VirtualNetworkTapsClient struct { - BaseClient -} - -// NewVirtualNetworkTapsClient creates an instance of the VirtualNetworkTapsClient client. -func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient { - return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient 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 NewVirtualNetworkTapsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkTapsClient { - return VirtualNetworkTapsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a Virtual Network Tap. -// Parameters: -// resourceGroupName - the name of the resource group. -// tapName - the name of the virtual network tap. -// parameters - parameters supplied to the create or update virtual network tap operation. -func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (result VirtualNetworkTapsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.VirtualNetworkTapsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, tapName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapName": autorest.Encode("path", tapName), - } - - const APIVersion = "2019-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.Network/virtualNetworkTaps/{tapName}", pathParameters), - autorest.WithJSON(parameters), - 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 VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkTapsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkTap, 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 deletes the specified virtual network tap. -// Parameters: -// resourceGroupName - the name of the resource group. -// tapName - the name of the virtual network tap. -func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTapsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, tapName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapName": autorest.Encode("path", tapName), - } - - const APIVersion = "2019-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkTapsClient) 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 information about the specified virtual network tap. -// Parameters: -// resourceGroupName - the name of the resource group. -// tapName - the name of virtual network tap. -func (client VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTap, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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, tapName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapName": autorest.Encode("path", tapName), - } - - const APIVersion = "2019-06-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/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) 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 VirtualNetworkTapsClient) GetResponder(resp *http.Response) (result VirtualNetworkTap, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAll gets all the VirtualNetworkTaps in a subscription. -func (client VirtualNetworkTapsClient) ListAll(ctx context.Context) (result VirtualNetworkTapListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll") - defer func() { - sc := -1 - if result.vntlr.Response.Response != nil { - sc = result.vntlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.vntlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkTapsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client VirtualNetworkTapsClient) ListAllResponder(resp *http.Response) (result VirtualNetworkTapListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client VirtualNetworkTapsClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) { - req, err := lastResults.virtualNetworkTapListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkTapsClient) ListAllComplete(ctx context.Context) (result VirtualNetworkTapListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll") - 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.ListAll(ctx) - return -} - -// ListByResourceGroup gets all the VirtualNetworkTaps in a subscription. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.vntlr.Response.Response != nil { - sc = result.vntlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.vntlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/virtualNetworkTaps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkTapsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VirtualNetworkTapsClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualNetworkTapListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VirtualNetworkTapsClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) { - req, err := lastResults.virtualNetworkTapListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates an VirtualNetworkTap tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// tapName - the name of the tap. -// tapParameters - parameters supplied to update VirtualNetworkTap tags. -func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTapsUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, tapName, tapParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tapName": autorest.Encode("path", tapName), - } - - const APIVersion = "2019-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.Network/virtualNetworkTaps/{tapName}", pathParameters), - autorest.WithJSON(tapParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkTapsUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualNetworkTapsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkTap, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go deleted file mode 100644 index 4d32ab9862ce..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go +++ /dev/null @@ -1,579 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualWansClient is the network Client -type VirtualWansClient struct { - BaseClient -} - -// NewVirtualWansClient creates an instance of the VirtualWansClient client. -func NewVirtualWansClient(subscriptionID string) VirtualWansClient { - return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient 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 NewVirtualWansClientWithBaseURI(baseURI string, subscriptionID string) VirtualWansClient { - return VirtualWansClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWANName - the name of the VirtualWAN being created or updated. -// wANParameters - parameters supplied to create or update VirtualWAN. -func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWansCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "VirtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - wANParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}", pathParameters), - autorest.WithJSON(wANParameters), - 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 VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualWansClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, 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 deletes a VirtualWAN. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWANName - the name of the VirtualWAN being deleted. -func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWansDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "VirtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-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.Network/virtualWans/{VirtualWANName}", 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 VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualWansClient) 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 retrieves the details of a VirtualWAN. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWANName - the name of the VirtualWAN being retrieved. -func (client VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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, virtualWANName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "VirtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-06-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/virtualWans/{VirtualWANName}", 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 VirtualWansClient) 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 VirtualWansClient) GetResponder(resp *http.Response) (result VirtualWAN, 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 the VirtualWANs in a subscription. -func (client VirtualWansClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.List") - defer func() { - sc := -1 - if result.lvwnr.Response.Response != nil { - sc = result.lvwnr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lvwnr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", 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 VirtualWansClient) 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 VirtualWansClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, 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 VirtualWansClient) listNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { - req, err := lastResults.listVirtualWANsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "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, "network.VirtualWansClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualWansClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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) - return -} - -// ListByResourceGroup lists all the VirtualWANs in a resource group. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -func (client VirtualWansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lvwnr.Response.Response != nil { - sc = result.lvwnr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lvwnr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/virtualWans", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualWansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VirtualWansClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VirtualWansClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) { - req, err := lastResults.listVirtualWANsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates a VirtualWAN tags. -// Parameters: -// resourceGroupName - the resource group name of the VirtualWan. -// virtualWANName - the name of the VirtualWAN being updated. -// wANParameters - parameters supplied to Update VirtualWAN tags. -func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWansUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "VirtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-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.Network/virtualWans/{VirtualWANName}", pathParameters), - autorest.WithJSON(wANParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (future VirtualWansUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VirtualWansClient) UpdateTagsResponder(resp *http.Response) (result VirtualWAN, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go deleted file mode 100644 index e6f0f2e8459d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go +++ /dev/null @@ -1,393 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnConnectionsClient is the network Client -type VpnConnectionsClient struct { - BaseClient -} - -// NewVpnConnectionsClient creates an instance of the VpnConnectionsClient client. -func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { - return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient 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 NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnConnectionsClient { - return VpnConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing -// connection. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// connectionName - the name of the connection. -// vpnConnectionParameters - parameters supplied to create or Update a VPN Connection. -func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (result VpnConnectionsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - vpnConnectionParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", pathParameters), - autorest.WithJSON(vpnConnectionParameters), - 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 VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnConnection, 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 deletes a vpn connection. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// connectionName - the name of the connection. -func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnectionsDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VpnConnectionsClient) 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 retrieves the details of a vpn connection. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// connectionName - the name of the vpn connection. -func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.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, gatewayName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) 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 VpnConnectionsClient) GetResponder(resp *http.Response) (result VpnConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByVpnGateway retrieves all vpn connections for a particular virtual wan vpn gateway. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway") - defer func() { - sc := -1 - if result.lvcr.Response.Response != nil { - sc = result.lvcr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByVpnGatewayNextResults - req, err := client.ListByVpnGatewayPreparer(ctx, resourceGroupName, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", nil, "Failure preparing request") - return - } - - resp, err := client.ListByVpnGatewaySender(req) - if err != nil { - result.lvcr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByVpnGatewayPreparer prepares the ListByVpnGateway request. -func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways/{gatewayName}/vpnConnections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the -// http.Response Body if it receives an error. -func (client VpnConnectionsClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always -// closes the http.Response Body. -func (client VpnConnectionsClient) ListByVpnGatewayResponder(resp *http.Response) (result ListVpnConnectionsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByVpnGatewayNextResults retrieves the next set of results, if any. -func (client VpnConnectionsClient) listByVpnGatewayNextResults(ctx context.Context, lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) { - req, err := lastResults.listVpnConnectionsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByVpnGatewaySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByVpnGatewayResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnConnectionsClient) ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway") - 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.ListByVpnGateway(ctx, resourceGroupName, gatewayName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go deleted file mode 100644 index f0e7324e227d..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go +++ /dev/null @@ -1,658 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnGatewaysClient is the network Client -type VpnGatewaysClient struct { - BaseClient -} - -// NewVpnGatewaysClient creates an instance of the VpnGatewaysClient client. -func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { - return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient 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 NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnGatewaysClient { - return VpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// vpnGatewayParameters - parameters supplied to create or Update a virtual wan vpn gateway. -func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (result VpnGatewaysCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - vpnGatewayParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}", pathParameters), - autorest.WithJSON(vpnGatewayParameters), - 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 VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGateway, 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 deletes a virtual wan vpn gateway. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VpnGatewaysClient) 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 retrieves the details of a virtual wan vpn gateway. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGateway, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) 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 VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGateway, 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 the VpnGateways in a subscription. -func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGatewaysResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.List") - defer func() { - sc := -1 - if result.lvgr.Response.Response != nil { - sc = result.lvgr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lvgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways", 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 VpnGatewaysClient) 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 VpnGatewaysClient) ListResponder(resp *http.Response) (result ListVpnGatewaysResult, 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 VpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { - req, err := lastResults.listVpnGatewaysResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVpnGatewaysResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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) - return -} - -// ListByResourceGroup lists all the VpnGateways in a resource group. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lvgr.Response.Response != nil { - sc = result.lvgr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lvgr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) { - req, err := lastResults.listVpnGatewaysResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// Reset resets the primary of the vpn gateway in the specified resource group. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysResetFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Reset") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResetPreparer(ctx, resourceGroupName, gatewayName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure preparing request") - return - } - - result, err = client.ResetSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", result.Response(), "Failure sending request") - return - } - - return -} - -// ResetPreparer prepares the Reset request. -func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetSender sends the Reset request. The method will close the -// http.Response Body if it receives an error. -func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ResetResponder handles the response to the Reset request. The method always -// closes the http.Response Body. -func (client VpnGatewaysClient) ResetResponder(resp *http.Response) (result VpnGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates virtual wan vpn gateway tags. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags. -func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/vpnGateways/{gatewayName}", pathParameters), - autorest.WithJSON(vpnGatewayParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VpnGateway, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go deleted file mode 100644 index 3fad7fe51080..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go +++ /dev/null @@ -1,152 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnLinkConnectionsClient is the network Client -type VpnLinkConnectionsClient struct { - BaseClient -} - -// NewVpnLinkConnectionsClient creates an instance of the VpnLinkConnectionsClient client. -func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient { - return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient 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 NewVpnLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnLinkConnectionsClient { - return VpnLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByVpnConnection retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// connectionName - the name of the vpn connection. -func (client VpnLinkConnectionsClient) ListByVpnConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") - defer func() { - sc := -1 - if result.lvslcr.Response.Response != nil { - sc = result.lvslcr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByVpnConnectionNextResults - req, err := client.ListByVpnConnectionPreparer(ctx, resourceGroupName, gatewayName, connectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", nil, "Failure preparing request") - return - } - - resp, err := client.ListByVpnConnectionSender(req) - if err != nil { - result.lvslcr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByVpnConnectionPreparer prepares the ListByVpnConnection request. -func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "gatewayName": autorest.Encode("path", gatewayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByVpnConnectionSender sends the ListByVpnConnection request. The method will close the -// http.Response Body if it receives an error. -func (client VpnLinkConnectionsClient) ListByVpnConnectionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByVpnConnectionResponder handles the response to the ListByVpnConnection request. The method always -// closes the http.Response Body. -func (client VpnLinkConnectionsClient) ListByVpnConnectionResponder(resp *http.Response) (result ListVpnSiteLinkConnectionsResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByVpnConnectionNextResults retrieves the next set of results, if any. -func (client VpnLinkConnectionsClient) listByVpnConnectionNextResults(ctx context.Context, lastResults ListVpnSiteLinkConnectionsResult) (result ListVpnSiteLinkConnectionsResult, err error) { - req, err := lastResults.listVpnSiteLinkConnectionsResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByVpnConnectionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByVpnConnectionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByVpnConnectionComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnLinkConnectionsClient) ListByVpnConnectionComplete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") - 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.ListByVpnConnection(ctx, resourceGroupName, gatewayName, connectionName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go deleted file mode 100644 index 1e8b7ad67bbc..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go +++ /dev/null @@ -1,112 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnSiteLinkConnectionsClient is the network Client -type VpnSiteLinkConnectionsClient struct { - BaseClient -} - -// NewVpnSiteLinkConnectionsClient creates an instance of the VpnSiteLinkConnectionsClient client. -func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectionsClient { - return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient 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 NewVpnSiteLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinkConnectionsClient { - return VpnSiteLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves the details of a vpn site link connection. -// Parameters: -// resourceGroupName - the resource group name of the VpnGateway. -// gatewayName - the name of the gateway. -// connectionName - the name of the vpn connection. -// linkConnectionName - the name of the vpn connection. -func (client VpnSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result VpnSiteLinkConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinkConnectionsClient.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, gatewayName, connectionName, linkConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "connectionName": autorest.Encode("path", connectionName), - "gatewayName": autorest.Encode("path", gatewayName), - "linkConnectionName": autorest.Encode("path", linkConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}", 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 VpnSiteLinkConnectionsClient) 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 VpnSiteLinkConnectionsClient) GetResponder(resp *http.Response) (result VpnSiteLinkConnection, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go deleted file mode 100644 index d83c085329ae..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go +++ /dev/null @@ -1,227 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnSiteLinksClient is the network Client -type VpnSiteLinksClient struct { - BaseClient -} - -// NewVpnSiteLinksClient creates an instance of the VpnSiteLinksClient client. -func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { - return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient 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 NewVpnSiteLinksClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinksClient { - return VpnSiteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get retrieves the details of a VPN site link. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite. -// vpnSiteLinkName - the name of the VpnSiteLink being retrieved. -func (client VpnSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (result VpnSiteLink, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.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, vpnSiteName, vpnSiteLinkName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteLinkName": autorest.Encode("path", vpnSiteLinkName), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-06-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/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}", 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 VpnSiteLinksClient) 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 VpnSiteLinksClient) GetResponder(resp *http.Response) (result VpnSiteLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByVpnSite lists all the vpnSiteLinks in a resource group for a vpn site. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite. -func (client VpnSiteLinksClient) ListByVpnSite(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") - defer func() { - sc := -1 - if result.lvslr.Response.Response != nil { - sc = result.lvslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByVpnSiteNextResults - req, err := client.ListByVpnSitePreparer(ctx, resourceGroupName, vpnSiteName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", nil, "Failure preparing request") - return - } - - resp, err := client.ListByVpnSiteSender(req) - if err != nil { - result.lvslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByVpnSitePreparer prepares the ListByVpnSite request. -func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-06-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/vpnSites/{vpnSiteName}/vpnSiteLinks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByVpnSiteSender sends the ListByVpnSite request. The method will close the -// http.Response Body if it receives an error. -func (client VpnSiteLinksClient) ListByVpnSiteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByVpnSiteResponder handles the response to the ListByVpnSite request. The method always -// closes the http.Response Body. -func (client VpnSiteLinksClient) ListByVpnSiteResponder(resp *http.Response) (result ListVpnSiteLinksResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByVpnSiteNextResults retrieves the next set of results, if any. -func (client VpnSiteLinksClient) listByVpnSiteNextResults(ctx context.Context, lastResults ListVpnSiteLinksResult) (result ListVpnSiteLinksResult, err error) { - req, err := lastResults.listVpnSiteLinksResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByVpnSiteSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByVpnSiteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByVpnSiteComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnSiteLinksClient) ListByVpnSiteComplete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") - 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.ListByVpnSite(ctx, resourceGroupName, vpnSiteName) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go deleted file mode 100644 index e1c0000be515..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go +++ /dev/null @@ -1,579 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VpnSitesClient is the network Client -type VpnSitesClient struct { - BaseClient -} - -// NewVpnSitesClient creates an instance of the VpnSitesClient client. -func NewVpnSitesClient(subscriptionID string) VpnSitesClient { - return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient 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 NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesClient { - return VpnSitesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite being created or updated. -// vpnSiteParameters - parameters supplied to create or update VpnSite. -func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (result VpnSitesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - vpnSiteParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}", pathParameters), - autorest.WithJSON(vpnSiteParameters), - 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 VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnSite, 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 deletes a VpnSite. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite being deleted. -func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSitesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, vpnSiteName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-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.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VpnSitesClient) 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 retrieves the details of a VPN site. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite being retrieved. -func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSite, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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, vpnSiteName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-06-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/vpnSites/{vpnSiteName}", 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 VpnSitesClient) 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 VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite, 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 the VpnSites in a subscription. -func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.List") - defer func() { - sc := -1 - if result.lvsr.Response.Response != nil { - sc = result.lvsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lvsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites", 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 VpnSitesClient) 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 VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnSitesResult, 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 VpnSitesClient) listNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { - req, err := lastResults.listVpnSitesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSitesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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) - return -} - -// ListByResourceGroup lists all the vpnSites in a resource group. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.lvsr.Response.Response != nil { - sc = result.lvsr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.lvsr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/vpnSites", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client VpnSitesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnSitesResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client VpnSitesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) { - req, err := lastResults.listVpnSitesResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup") - 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.ListByResourceGroup(ctx, resourceGroupName) - return -} - -// UpdateTags updates VpnSite tags. -// Parameters: -// resourceGroupName - the resource group name of the VpnSite. -// vpnSiteName - the name of the VpnSite being updated. -// vpnSiteParameters - parameters supplied to update VpnSite tags. -func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSitesUpdateTagsFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.UpdateTags") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure preparing request") - return - } - - result, err = client.UpdateTagsSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vpnSiteName": autorest.Encode("path", vpnSiteName), - } - - const APIVersion = "2019-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.Network/vpnSites/{vpnSiteName}", pathParameters), - autorest.WithJSON(vpnSiteParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client VpnSitesClient) UpdateTagsResponder(resp *http.Response) (result VpnSite, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go deleted file mode 100644 index 9fa306ac60d9..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go +++ /dev/null @@ -1,120 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// VpnSitesConfigurationClient is the network Client -type VpnSitesConfigurationClient struct { - BaseClient -} - -// NewVpnSitesConfigurationClient creates an instance of the VpnSitesConfigurationClient client. -func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfigurationClient { - return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient 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 NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesConfigurationClient { - return VpnSitesConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Download gives the sas-url to download the configurations for vpn-sites in a resource group. -// Parameters: -// resourceGroupName - the resource group name. -// virtualWANName - the name of the VirtualWAN for which configuration of all vpn-sites is needed. -// request - parameters supplied to download vpn-sites configuration. -func (client VpnSitesConfigurationClient) Download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesConfigurationClient.Download") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: request, - Constraints: []validation.Constraint{{Target: "request.OutputBlobSasURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.VpnSitesConfigurationClient", "Download", err.Error()) - } - - req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request") - return - } - - result, err = client.DownloadSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request") - return - } - - return -} - -// DownloadPreparer prepares the Download request. -func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualWANName": autorest.Encode("path", virtualWANName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration", pathParameters), - autorest.WithJSON(request), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DownloadSender sends the Download request. The method will close the -// http.Response Body if it receives an error. -func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DownloadResponder handles the response to the Download request. The method always -// closes the http.Response Body. -func (client VpnSitesConfigurationClient) DownloadResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go deleted file mode 100644 index 5bb9e39d4eb7..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go +++ /dev/null @@ -1,1560 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// WatchersClient is the network Client -type WatchersClient struct { - BaseClient -} - -// NewWatchersClient creates an instance of the WatchersClient client. -func NewWatchersClient(subscriptionID string) WatchersClient { - return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient 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 NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient { - return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckConnectivity verifies the possibility of establishing a direct TCP connection from a virtual machine to a given -// endpoint including another VM or an arbitrary remote server. -// Parameters: -// resourceGroupName - the name of the network watcher resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that determine how the connectivity check will be performed. -func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (result WatchersCheckConnectivityFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CheckConnectivity") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Destination", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "CheckConnectivity", err.Error()) - } - - req, err := client.CheckConnectivityPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure preparing request") - return - } - - result, err = client.CheckConnectivitySender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request") - return - } - - return -} - -// CheckConnectivityPreparer prepares the CheckConnectivity request. -func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckConnectivitySender sends the CheckConnectivity request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CheckConnectivityResponder handles the response to the CheckConnectivity request. The method always -// closes the http.Response Body. -func (client WatchersClient) CheckConnectivityResponder(resp *http.Response) (result ConnectivityInformation, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdate creates or updates a network watcher in the specified resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters that define the network watcher resource. -func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (result Watcher, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}", pathParameters), - autorest.WithJSON(parameters), - 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 WatchersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (result Watcher, 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 deletes the specified network watcher resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -func (client WatchersClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result WatchersDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}", 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 WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client WatchersClient) 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 the specified network watcher by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -func (client WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string) (result Watcher, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.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, networkWatcherName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers/{networkWatcherName}", 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 WatchersClient) 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 WatchersClient) GetResponder(resp *http.Response) (result Watcher, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetAzureReachabilityReport gets the relative latency score for internet service providers from a specified location -// to Azure regions. -// Parameters: -// resourceGroupName - the name of the network watcher resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that determine Azure reachability report configuration. -func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (result WatchersGetAzureReachabilityReportFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetAzureReachabilityReport") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ProviderLocation", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ProviderLocation.Country", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.StartTime", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.EndTime", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetAzureReachabilityReport", err.Error()) - } - - req, err := client.GetAzureReachabilityReportPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure preparing request") - return - } - - result, err = client.GetAzureReachabilityReportSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request") - return - } - - return -} - -// GetAzureReachabilityReportPreparer prepares the GetAzureReachabilityReport request. -func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetAzureReachabilityReportSender sends the GetAzureReachabilityReport request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetAzureReachabilityReportResponder handles the response to the GetAzureReachabilityReport request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Response) (result AzureReachabilityReport, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetFlowLogStatus queries status of flow log and traffic analytics (optional) on a specified resource. -// Parameters: -// resourceGroupName - the name of the network watcher resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status. -func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetFlowLogStatus", err.Error()) - } - - req, err := client.GetFlowLogStatusPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure preparing request") - return - } - - result, err = client.GetFlowLogStatusSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request") - return - } - - return -} - -// GetFlowLogStatusPreparer prepares the GetFlowLogStatus request. -func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetFlowLogStatusResponder handles the response to the GetFlowLogStatus request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (result FlowLogInformation, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetNetworkConfigurationDiagnostic get network configuration diagnostic. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters to get network configuration diagnostic. -func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (result WatchersGetNetworkConfigurationDiagnosticFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNetworkConfigurationDiagnostic") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Profiles", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetNetworkConfigurationDiagnostic", err.Error()) - } - - req, err := client.GetNetworkConfigurationDiagnosticPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure preparing request") - return - } - - result, err = client.GetNetworkConfigurationDiagnosticSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", result.Response(), "Failure sending request") - return - } - - return -} - -// GetNetworkConfigurationDiagnosticPreparer prepares the GetNetworkConfigurationDiagnostic request. -func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetNetworkConfigurationDiagnosticSender sends the GetNetworkConfigurationDiagnostic request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetNetworkConfigurationDiagnosticResponder handles the response to the GetNetworkConfigurationDiagnostic request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetNetworkConfigurationDiagnosticResponder(resp *http.Response) (result ConfigurationDiagnosticResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetNextHop gets the next hop from the specified VM. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters that define the source and destination endpoint. -func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (result WatchersGetNextHopFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNextHop") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.SourceIPAddress", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.DestinationIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetNextHop", err.Error()) - } - - req, err := client.GetNextHopPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure preparing request") - return - } - - result, err = client.GetNextHopSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", result.Response(), "Failure sending request") - return - } - - return -} - -// GetNextHopPreparer prepares the GetNextHop request. -func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetNextHopSender sends the GetNextHop request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetNextHopResponder handles the response to the GetNextHop request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetNextHopResponder(resp *http.Response) (result NextHopResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetTopology gets the current network topology by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters that define the representation of topology. -func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (result Topology, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTopology") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetTopologyPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", nil, "Failure preparing request") - return - } - - resp, err := client.GetTopologySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure sending request") - return - } - - result, err = client.GetTopologyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure responding to request") - return - } - - return -} - -// GetTopologyPreparer prepares the GetTopology request. -func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetTopologySender sends the GetTopology request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetTopologySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetTopologyResponder handles the response to the GetTopology request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result Topology, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetTroubleshooting initiate troubleshooting on a specified resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that define the resource to troubleshoot. -func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (result WatchersGetTroubleshootingFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshooting") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TroubleshootingProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.TroubleshootingProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.TroubleshootingProperties.StoragePath", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetTroubleshooting", err.Error()) - } - - req, err := client.GetTroubleshootingPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure preparing request") - return - } - - result, err = client.GetTroubleshootingSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request") - return - } - - return -} - -// GetTroubleshootingPreparer prepares the GetTroubleshooting request. -func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetTroubleshootingResponder handles the response to the GetTroubleshooting request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (result TroubleshootingResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that define the resource to query the troubleshooting result. -func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (result WatchersGetTroubleshootingResultFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshootingResult") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetTroubleshootingResult", err.Error()) - } - - req, err := client.GetTroubleshootingResultPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure preparing request") - return - } - - result, err = client.GetTroubleshootingResultSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request") - return - } - - return -} - -// GetTroubleshootingResultPreparer prepares the GetTroubleshootingResult request. -func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetTroubleshootingResultResponder handles the response to the GetTroubleshootingResult request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetTroubleshootingResultResponder(resp *http.Response) (result TroubleshootingResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetVMSecurityRules gets the configured and effective security group rules on the specified VM. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters that define the VM to check security groups for. -func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (result WatchersGetVMSecurityRulesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetVMSecurityRules") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "GetVMSecurityRules", err.Error()) - } - - req, err := client.GetVMSecurityRulesPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure preparing request") - return - } - - result, err = client.GetVMSecurityRulesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request") - return - } - - return -} - -// GetVMSecurityRulesPreparer prepares the GetVMSecurityRules request. -func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// GetVMSecurityRulesResponder handles the response to the GetVMSecurityRules request. The method always -// closes the http.Response Body. -func (client WatchersClient) GetVMSecurityRulesResponder(resp *http.Response) (result SecurityGroupViewResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets all network watchers by resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client WatchersClient) List(ctx context.Context, resourceGroupName string) (result WatcherListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/networkWatchers", 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 WatchersClient) 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 WatchersClient) ListResponder(resp *http.Response) (result WatcherListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAll gets all network watchers by subscription. -func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAll") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure sending request") - return - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure responding to request") - return - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client WatchersClient) ListAllResponder(resp *http.Response) (result WatcherListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAvailableProviders lists all available internet service providers for a specified Azure region. -// Parameters: -// resourceGroupName - the name of the network watcher resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that scope the list of available providers. -func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (result WatchersListAvailableProvidersFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAvailableProviders") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListAvailableProvidersPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure preparing request") - return - } - - result, err = client.ListAvailableProvidersSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request") - return - } - - return -} - -// ListAvailableProvidersPreparer prepares the ListAvailableProviders request. -func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAvailableProvidersSender sends the ListAvailableProviders request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// ListAvailableProvidersResponder handles the response to the ListAvailableProviders request. The method always -// closes the http.Response Body. -func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response) (result AvailableProvidersList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource. -// Parameters: -// resourceGroupName - the name of the network watcher resource group. -// networkWatcherName - the name of the network watcher resource. -// parameters - parameters that define the configuration of flow log. -func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (result WatchersSetFlowLogConfigurationFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.SetFlowLogConfiguration") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FlowLogProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.FlowLogProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FlowLogProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.FlowAnalyticsConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceRegion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceResourceID", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "SetFlowLogConfiguration", err.Error()) - } - - req, err := client.SetFlowLogConfigurationPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure preparing request") - return - } - - result, err = client.SetFlowLogConfigurationSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request") - return - } - - return -} - -// SetFlowLogConfigurationPreparer prepares the SetFlowLogConfiguration request. -func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// SetFlowLogConfigurationResponder handles the response to the SetFlowLogConfiguration request. The method always -// closes the http.Response Body. -func (client WatchersClient) SetFlowLogConfigurationResponder(resp *http.Response) (result FlowLogInformation, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UpdateTags updates a network watcher tags. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters supplied to update network watcher tags. -func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (result Watcher, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.UpdateTags") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateTagsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure sending request") - return - } - - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure responding to request") - return - } - - return -} - -// UpdateTagsPreparer prepares the UpdateTags request. -func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/networkWatchers/{networkWatcherName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateTagsSender sends the UpdateTags request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateTagsResponder handles the response to the UpdateTags request. The method always -// closes the http.Response Body. -func (client WatchersClient) UpdateTagsResponder(resp *http.Response) (result Watcher, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// VerifyIPFlow verify IP flow from the specified VM to a location given the currently configured NSG rules. -// Parameters: -// resourceGroupName - the name of the resource group. -// networkWatcherName - the name of the network watcher. -// parameters - parameters that define the IP flow to be verified. -func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (result WatchersVerifyIPFlowFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.VerifyIPFlow") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.LocalPort", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.RemotePort", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.LocalIPAddress", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.RemoteIPAddress", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WatchersClient", "VerifyIPFlow", err.Error()) - } - - req, err := client.VerifyIPFlowPreparer(ctx, resourceGroupName, networkWatcherName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure preparing request") - return - } - - result, err = client.VerifyIPFlowSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request") - return - } - - return -} - -// VerifyIPFlowPreparer prepares the VerifyIPFlow request. -func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "networkWatcherName": autorest.Encode("path", networkWatcherName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the -// http.Response Body if it receives an error. -func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// VerifyIPFlowResponder handles the response to the VerifyIPFlow request. The method always -// closes the http.Response Body. -func (client WatchersClient) VerifyIPFlowResponder(resp *http.Response) (result VerificationIPFlowResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go deleted file mode 100644 index 12419a5a84a5..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go +++ /dev/null @@ -1,513 +0,0 @@ -package network - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// WebApplicationFirewallPoliciesClient is the network Client -type WebApplicationFirewallPoliciesClient struct { - BaseClient -} - -// NewWebApplicationFirewallPoliciesClient creates an instance of the WebApplicationFirewallPoliciesClient client. -func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicationFirewallPoliciesClient { - return NewWebApplicationFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { - return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or update policy with specified rule set name within a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// policyName - the name of the policy. -// parameters - policy to be created. -func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (result WebApplicationFirewallPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.CreateOrUpdate") - 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: policyName, - Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, policyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "policyName": autorest.Encode("path", policyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", pathParameters), - autorest.WithJSON(parameters), - 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 WebApplicationFirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, 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 deletes Policy. -// Parameters: -// resourceGroupName - the name of the resource group. -// policyName - the name of the policy. -func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPoliciesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: policyName, - Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, policyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "policyName": autorest.Encode("path", policyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", 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 WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client WebApplicationFirewallPoliciesClient) 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 retrieve protection policy with specified name within a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// policyName - the name of the policy. -func (client WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName, - Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { - return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, policyName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "policyName": autorest.Encode("path", policyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, 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 of the protection policies within a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -func (client WebApplicationFirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.List") - defer func() { - sc := -1 - if result.wafplr.Response.Response != nil { - sc = result.wafplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wafplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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/ApplicationGatewayWebApplicationFirewallPolicies", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, 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 WebApplicationFirewallPoliciesClient) listNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { - req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "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, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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) - return -} - -// ListAll gets all the WAF policies in a subscription. -func (client WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context) (result WebApplicationFirewallPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") - defer func() { - sc := -1 - if result.wafplr.Response.Response != nil { - sc = result.wafplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllNextResults - req, err := client.ListAllPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.wafplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client WebApplicationFirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client WebApplicationFirewallPoliciesClient) ListAllResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllNextResults retrieves the next set of results, if any. -func (client WebApplicationFirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { - req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllComplete enumerates all values, automatically crossing page boundaries as required. -func (client WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context) (result WebApplicationFirewallPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") - 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.ListAll(ctx) - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json deleted file mode 100644 index 03415d0dc92f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", - "tag": "package-2019-06", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go deleted file mode 100644 index e5143f115417..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go +++ /dev/null @@ -1,1398 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// AccountsClient is the the Azure Storage Management API. -type AccountsClient struct { - BaseClient -} - -// NewAccountsClient creates an instance of the AccountsClient client. -func NewAccountsClient(subscriptionID string) AccountsClient { - return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient 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 NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { - return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckNameAvailability checks that the storage account name is valid and is not already in use. -// Parameters: -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client AccountsClient) CheckNameAvailability(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.CheckNameAvailability") - 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: accountName, - Constraints: []validation.Constraint{{Target: "accountName.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "accountName.Type", Name: validation.Null, Rule: true, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "CheckNameAvailability", err.Error()) - } - - req, err := client.CheckNameAvailabilityPreparer(ctx, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CheckNameAvailability", nil, "Failure preparing request") - return - } - - resp, err := client.CheckNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CheckNameAvailability", resp, "Failure sending request") - return - } - - result, err = client.CheckNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "CheckNameAvailability", resp, "Failure responding to request") - return - } - - return -} - -// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, accountName AccountCheckNameAvailabilityParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability", pathParameters), - autorest.WithJSON(accountName), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always -// closes the http.Response Body. -func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Create asynchronously creates a new storage account with the specified parameters. If an account is already created -// and a subsequent create request is issued with different properties, the account properties will be updated. If an -// account is already created and a subsequent create or update request is issued with the exact same set of -// properties, the request will succeed. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the parameters to provide for the created account. -func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result AccountsCreateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Create") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Identity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Identity.Type", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.AccountPropertiesCreateParameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.NetBiosDomainName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.ForestName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainGUID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.DomainSid", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountPropertiesCreateParameters.AzureFilesIdentityBasedAuthentication.ActiveDirectoryProperties.AzureStorageSid", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = client.CreateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", result.Response(), "Failure sending request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a storage account in Microsoft Azure. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}", 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 AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Failover failover request can be triggered for a storage account in case of availability issues. The failover occurs -// from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will -// become primary after failover. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client AccountsClient) Failover(ctx context.Context, resourceGroupName string, accountName string) (result AccountsFailoverFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Failover") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "Failover", err.Error()) - } - - req, err := client.FailoverPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", nil, "Failure preparing request") - return - } - - result, err = client.FailoverSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", result.Response(), "Failure sending request") - return - } - - return -} - -// FailoverPreparer prepares the Failover request. -func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// FailoverSender sends the Failover request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) FailoverSender(req *http.Request) (future AccountsFailoverFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// FailoverResponder handles the response to the Failover request. The method always -// closes the http.Response Body. -func (client AccountsClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// GetProperties returns the properties for the specified storage account including but not limited to name, SKU name, -// location, and account status. The ListKeys operation should be used to retrieve storage keys. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// expand - may be used to expand the properties within account's properties. By default, data is not included -// when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. -func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, expand AccountExpand) (result Account, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "GetProperties", err.Error()) - } - - req, err := client.GetPropertiesPreparer(ctx, resourceGroupName, accountName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", nil, "Failure preparing request") - return - } - - resp, err := client.GetPropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", resp, "Failure sending request") - return - } - - result, err = client.GetPropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "GetProperties", resp, "Failure responding to request") - return - } - - return -} - -// GetPropertiesPreparer prepares the GetProperties request. -func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, expand AccountExpand) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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.Storage/storageAccounts/{accountName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetPropertiesSender sends the GetProperties request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetPropertiesResponder handles the response to the GetProperties request. The method always -// closes the http.Response Body. -func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result Account, 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 the storage accounts available under the subscription. Note that storage keys are not returned; use -// the ListKeys operation for this. -func (client AccountsClient) List(ctx context.Context) (result AccountListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.List") - defer func() { - sc := -1 - if result.alr.Response.Response != nil { - sc = result.alr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.alr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts", 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 AccountsClient) 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 AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, 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 AccountsClient) listNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) { - req, err := lastResults.accountListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.AccountsClient", "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, "storage.AccountsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AccountsClient) ListComplete(ctx context.Context) (result AccountListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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) - return -} - -// ListAccountSAS list SAS credentials of a storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the parameters to provide to list SAS credentials for the storage account. -func (client AccountsClient) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (result ListAccountSasResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListAccountSAS") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessExpiryTime", Name: validation.Null, Rule: true, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "ListAccountSAS", err.Error()) - } - - req, err := client.ListAccountSASPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", nil, "Failure preparing request") - return - } - - resp, err := client.ListAccountSASSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", resp, "Failure sending request") - return - } - - result, err = client.ListAccountSASResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListAccountSAS", resp, "Failure responding to request") - return - } - - return -} - -// ListAccountSASPreparer prepares the ListAccountSAS request. -func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountSasParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAccountSASSender sends the ListAccountSAS request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAccountSASResponder handles the response to the ListAccountSAS request. The method always -// closes the http.Response Body. -func (client AccountsClient) ListAccountSASResponder(resp *http.Response) (result ListAccountSasResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup lists all the storage accounts available under the given resource group. Note that storage keys -// are not returned; use the ListKeys operation for this. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "ListByResourceGroup", err.Error()) - } - - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListKeys lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// expand - specifies type of the key to be listed. Possible value is kerb. -func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, expand ListKeyExpand) (result AccountListKeysResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListKeys") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "ListKeys", err.Error()) - } - - req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", nil, "Failure preparing request") - return - } - - resp, err := client.ListKeysSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", resp, "Failure sending request") - return - } - - result, err = client.ListKeysResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListKeys", resp, "Failure responding to request") - return - } - - return -} - -// ListKeysPreparer prepares the ListKeys request. -func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string, expand ListKeyExpand) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(expand)) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListKeysSender sends the ListKeys request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListKeysResponder handles the response to the ListKeys request. The method always -// closes the http.Response Body. -func (client AccountsClient) ListKeysResponder(resp *http.Response) (result AccountListKeysResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListServiceSAS list service SAS credentials of a specific resource. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the parameters to provide to list service SAS credentials. -func (client AccountsClient) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (result ListServiceSasResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListServiceSAS") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.CanonicalizedResource", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Identifier", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Identifier", Name: validation.MaxLength, Rule: 64, Chain: nil}}}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "ListServiceSAS", err.Error()) - } - - req, err := client.ListServiceSASPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", nil, "Failure preparing request") - return - } - - resp, err := client.ListServiceSASSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", resp, "Failure sending request") - return - } - - result, err = client.ListServiceSASResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "ListServiceSAS", resp, "Failure responding to request") - return - } - - return -} - -// ListServiceSASPreparer prepares the ListServiceSAS request. -func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters ServiceSasParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListServiceSASSender sends the ListServiceSAS request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListServiceSASResponder handles the response to the ListServiceSAS request. The method always -// closes the http.Response Body. -func (client AccountsClient) ListServiceSASResponder(resp *http.Response) (result ListServiceSasResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// RegenerateKey regenerates one of the access keys or Kerberos keys for the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// regenerateKey - specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2. -func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (result AccountListKeysResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RegenerateKey") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: regenerateKey, - Constraints: []validation.Constraint{{Target: "regenerateKey.KeyName", Name: validation.Null, Rule: true, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "RegenerateKey", err.Error()) - } - - req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, accountName, regenerateKey) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", nil, "Failure preparing request") - return - } - - resp, err := client.RegenerateKeySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", resp, "Failure sending request") - return - } - - result, err = client.RegenerateKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RegenerateKey", resp, "Failure responding to request") - return - } - - return -} - -// RegenerateKeyPreparer prepares the RegenerateKey request. -func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey", pathParameters), - autorest.WithJSON(regenerateKey), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RegenerateKeySender sends the RegenerateKey request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always -// closes the http.Response Body. -func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result AccountListKeysResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// RestoreBlobRanges restore blobs in the specified blob ranges -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the parameters to provide for restore blob ranges. -func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (result AccountsRestoreBlobRangesFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RestoreBlobRanges") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.TimeToRestore", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.BlobRanges", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "RestoreBlobRanges", err.Error()) - } - - req, err := client.RestoreBlobRangesPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure preparing request") - return - } - - result, err = client.RestoreBlobRangesSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request") - return - } - - return -} - -// RestoreBlobRangesPreparer prepares the RestoreBlobRanges request. -func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestoreBlobRangesSender sends the RestoreBlobRanges request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// RestoreBlobRangesResponder handles the response to the RestoreBlobRanges request. The method always -// closes the http.Response Body. -func (client AccountsClient) RestoreBlobRangesResponder(resp *http.Response) (result BlobRestoreStatus, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// RevokeUserDelegationKeys revoke user delegation keys. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RevokeUserDelegationKeys") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "RevokeUserDelegationKeys", err.Error()) - } - - req, err := client.RevokeUserDelegationKeysPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", nil, "Failure preparing request") - return - } - - resp, err := client.RevokeUserDelegationKeysSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", resp, "Failure sending request") - return - } - - result, err = client.RevokeUserDelegationKeysResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", resp, "Failure responding to request") - return - } - - return -} - -// RevokeUserDelegationKeysPreparer prepares the RevokeUserDelegationKeys request. -func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RevokeUserDelegationKeysSender sends the RevokeUserDelegationKeys request. The method will close the -// http.Response Body if it receives an error. -func (client AccountsClient) RevokeUserDelegationKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RevokeUserDelegationKeysResponder handles the response to the RevokeUserDelegationKeys request. The method always -// closes the http.Response Body. -func (client AccountsClient) RevokeUserDelegationKeysResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update the update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. -// It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; -// the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value -// must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This -// call does not change the storage keys for the account. If you want to change the storage account keys, use the -// regenerate keys operation. The location and name of the storage account cannot be changed after creation. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the parameters to provide for the updated account. -func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.AccountsClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}", pathParameters), - autorest.WithJSON(parameters), - 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 AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go deleted file mode 100644 index 6d09490a099c..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go +++ /dev/null @@ -1,1437 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// BlobContainersClient is the the Azure Storage Management API. -type BlobContainersClient struct { - BaseClient -} - -// NewBlobContainersClient creates an instance of the BlobContainersClient client. -func NewBlobContainersClient(subscriptionID string) BlobContainersClient { - return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient 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 NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { - return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ClearLegalHold clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. -// ClearLegalHold clears out only the specified tags in the request. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// legalHold - the LegalHold property that will be clear from a blob container. -func (client BlobContainersClient) ClearLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (result LegalHold, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.ClearLegalHold") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: legalHold, - Constraints: []validation.Constraint{{Target: "legalHold.Tags", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "ClearLegalHold", err.Error()) - } - - req, err := client.ClearLegalHoldPreparer(ctx, resourceGroupName, accountName, containerName, legalHold) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", nil, "Failure preparing request") - return - } - - resp, err := client.ClearLegalHoldSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", resp, "Failure sending request") - return - } - - result, err = client.ClearLegalHoldResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ClearLegalHold", resp, "Failure responding to request") - return - } - - return -} - -// ClearLegalHoldPreparer prepares the ClearLegalHold request. -func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - legalHold.HasLegalHold = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold", pathParameters), - autorest.WithJSON(legalHold), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ClearLegalHoldSender sends the ClearLegalHold request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) ClearLegalHoldSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ClearLegalHoldResponder handles the response to the ClearLegalHold request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) ClearLegalHoldResponder(resp *http.Response) (result LegalHold, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Create creates a new container under the specified account as described by request body. The container resource -// includes metadata and properties for that container. It does not include a list of the blobs contained by the -// container. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// blobContainer - properties of the blob container to create. -func (client BlobContainersClient) Create(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (result BlobContainer, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.Create") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, containerName, blobContainer) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters), - autorest.WithJSON(blobContainer), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) CreateResponder(resp *http.Response) (result BlobContainer, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdateImmutabilityPolicy creates or updates an unlocked immutability policy. ETag in If-Match is honored if -// given but not required for this operation. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// parameters - the ImmutabilityPolicy Properties that will be created or updated to a blob container. -// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used -// to apply the operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. -func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *ImmutabilityPolicy, ifMatch string) (result ImmutabilityPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.CreateOrUpdateImmutabilityPolicy") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", err.Error()) - } - - req, err := client.CreateOrUpdateImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateImmutabilityPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateImmutabilityPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdateImmutabilityPolicyPreparer prepares the CreateOrUpdateImmutabilityPolicy request. -func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *ImmutabilityPolicy, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "immutabilityPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateImmutabilityPolicySender sends the CreateOrUpdateImmutabilityPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateImmutabilityPolicyResponder handles the response to the CreateOrUpdateImmutabilityPolicy request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes specified container under its account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -func (client BlobContainersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, containerName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, containerName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", 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 BlobContainersClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteImmutabilityPolicy aborts an unlocked immutability policy. The response of delete has -// immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked -// immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside -// the policy locked container. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used -// to apply the operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. -func (client BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.DeleteImmutabilityPolicy") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "DeleteImmutabilityPolicy", err.Error()) - } - - req, err := client.DeleteImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteImmutabilityPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", resp, "Failure sending request") - return - } - - result, err = client.DeleteImmutabilityPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "DeleteImmutabilityPolicy", resp, "Failure responding to request") - return - } - - return -} - -// DeleteImmutabilityPolicyPreparer prepares the DeleteImmutabilityPolicy request. -func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "immutabilityPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteImmutabilityPolicySender sends the DeleteImmutabilityPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) DeleteImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteImmutabilityPolicyResponder handles the response to the DeleteImmutabilityPolicy request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) DeleteImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ExtendImmutabilityPolicy extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only -// action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used -// to apply the operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. -// parameters - the ImmutabilityPolicy Properties that will be extended for a blob container. -func (client BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, parameters *ImmutabilityPolicy) (result ImmutabilityPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.ExtendImmutabilityPolicy") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "ExtendImmutabilityPolicy", err.Error()) - } - - req, err := client.ExtendImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.ExtendImmutabilityPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", resp, "Failure sending request") - return - } - - result, err = client.ExtendImmutabilityPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "ExtendImmutabilityPolicy", resp, "Failure responding to request") - return - } - - return -} - -// ExtendImmutabilityPolicyPreparer prepares the ExtendImmutabilityPolicy request. -func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string, parameters *ImmutabilityPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ExtendImmutabilityPolicySender sends the ExtendImmutabilityPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) ExtendImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ExtendImmutabilityPolicyResponder handles the response to the ExtendImmutabilityPolicy request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) ExtendImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets properties of a specified container. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -func (client BlobContainersClient) Get(ctx context.Context, resourceGroupName string, accountName string, containerName string) (result BlobContainer, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, containerName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", 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 BlobContainersClient) 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 BlobContainersClient) GetResponder(resp *http.Response) (result BlobContainer, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetImmutabilityPolicy gets the existing immutability policy along with the corresponding ETag in response headers -// and body. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used -// to apply the operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. -func (client BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.GetImmutabilityPolicy") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "GetImmutabilityPolicy", err.Error()) - } - - req, err := client.GetImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.GetImmutabilityPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", resp, "Failure sending request") - return - } - - result, err = client.GetImmutabilityPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "GetImmutabilityPolicy", resp, "Failure responding to request") - return - } - - return -} - -// GetImmutabilityPolicyPreparer prepares the GetImmutabilityPolicy request. -func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "immutabilityPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetImmutabilityPolicySender sends the GetImmutabilityPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) GetImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetImmutabilityPolicyResponder handles the response to the GetImmutabilityPolicy request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) GetImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Lease the Lease Container operation establishes and manages a lock on a container for delete operations. The lock -// duration can be 15 to 60 seconds, or can be infinite. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// parameters - lease Container request body. -func (client BlobContainersClient) Lease(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *LeaseContainerRequest) (result LeaseContainerResponse, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.Lease") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "Lease", err.Error()) - } - - req, err := client.LeasePreparer(ctx, resourceGroupName, accountName, containerName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Lease", nil, "Failure preparing request") - return - } - - resp, err := client.LeaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Lease", resp, "Failure sending request") - return - } - - result, err = client.LeaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Lease", resp, "Failure responding to request") - return - } - - return -} - -// LeasePreparer prepares the Lease request. -func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *LeaseContainerRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// LeaseSender sends the Lease request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) LeaseSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// LeaseResponder handles the response to the Lease request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) LeaseResponder(resp *http.Response) (result LeaseContainerResponse, 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 containers and does not support a prefix like data plane. Also SRP today does not return continuation -// token. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// maxpagesize - optional. Specified maximum number of containers that can be included in the list. -// filter - optional. When specified, only container names starting with the filter will be listed. -// include - optional, used to include the properties for soft deleted blob containers. -func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") - defer func() { - sc := -1 - if result.lci.Response.Response != nil { - sc = result.lci.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, include) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lci.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(maxpagesize) > 0 { - queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(string(include)) > 0 { - queryParameters["$include"] = autorest.Encode("query", include) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers", 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 BlobContainersClient) 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 BlobContainersClient) ListResponder(resp *http.Response) (result ListContainerItems, 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 BlobContainersClient) listNextResults(ctx context.Context, lastResults ListContainerItems) (result ListContainerItems, err error) { - req, err := lastResults.listContainerItemsPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.BlobContainersClient", "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, "storage.BlobContainersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.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, accountName, maxpagesize, filter, include) - return -} - -// LockImmutabilityPolicy sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is -// ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// ifMatch - the entity state (ETag) version of the immutability policy to update. A value of "*" can be used -// to apply the operation only if the immutability policy already exists. If omitted, this operation will -// always be applied. -func (client BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result ImmutabilityPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.LockImmutabilityPolicy") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "LockImmutabilityPolicy", err.Error()) - } - - req, err := client.LockImmutabilityPolicyPreparer(ctx, resourceGroupName, accountName, containerName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.LockImmutabilityPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", resp, "Failure sending request") - return - } - - result, err = client.LockImmutabilityPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "LockImmutabilityPolicy", resp, "Failure responding to request") - return - } - - return -} - -// LockImmutabilityPolicyPreparer prepares the LockImmutabilityPolicy request. -func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// LockImmutabilityPolicySender sends the LockImmutabilityPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) LockImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// LockImmutabilityPolicyResponder handles the response to the LockImmutabilityPolicy request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) LockImmutabilityPolicyResponder(resp *http.Response) (result ImmutabilityPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetLegalHold sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an -// append pattern and does not clear out the existing tags that are not specified in the request. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// legalHold - the LegalHold property that will be set to a blob container. -func (client BlobContainersClient) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (result LegalHold, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.SetLegalHold") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: legalHold, - Constraints: []validation.Constraint{{Target: "legalHold.Tags", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "SetLegalHold", err.Error()) - } - - req, err := client.SetLegalHoldPreparer(ctx, resourceGroupName, accountName, containerName, legalHold) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", nil, "Failure preparing request") - return - } - - resp, err := client.SetLegalHoldSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", resp, "Failure sending request") - return - } - - result, err = client.SetLegalHoldResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "SetLegalHold", resp, "Failure responding to request") - return - } - - return -} - -// SetLegalHoldPreparer prepares the SetLegalHold request. -func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold LegalHold) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - legalHold.HasLegalHold = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold", pathParameters), - autorest.WithJSON(legalHold), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetLegalHoldSender sends the SetLegalHold request. The method will close the -// http.Response Body if it receives an error. -func (client BlobContainersClient) SetLegalHoldSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetLegalHoldResponder handles the response to the SetLegalHold request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) SetLegalHoldResponder(resp *http.Response) (result LegalHold, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates container properties as specified in request body. Properties not mentioned in the request will be -// unchanged. Update fails if the specified container doesn't already exist. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// containerName - the name of the blob container within the specified storage account. Blob container names -// must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every -// dash (-) character must be immediately preceded and followed by a letter or number. -// blobContainer - properties to update for the blob container. -func (client BlobContainersClient) Update(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (result BlobContainer, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.Update") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: containerName, - Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobContainersClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, containerName, blobContainer) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer BlobContainer) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "containerName": autorest.Encode("path", containerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", pathParameters), - autorest.WithJSON(blobContainer), - 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 BlobContainersClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client BlobContainersClient) UpdateResponder(resp *http.Response) (result BlobContainer, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go deleted file mode 100644 index 7eebcf4ad956..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go +++ /dev/null @@ -1,336 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// BlobServicesClient is the the Azure Storage Management API. -type BlobServicesClient struct { - BaseClient -} - -// NewBlobServicesClient creates an instance of the BlobServicesClient client. -func NewBlobServicesClient(subscriptionID string) BlobServicesClient { - return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient 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 NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient { - return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// GetServiceProperties gets the properties of a storage account’s Blob service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client BlobServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result BlobServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobServicesClient.GetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobServicesClient", "GetServiceProperties", err.Error()) - } - - req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "GetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.GetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "GetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.GetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "GetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// GetServicePropertiesPreparer prepares the GetServiceProperties request. -func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "BlobServicesName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client BlobServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always -// closes the http.Response Body. -func (client BlobServicesClient) GetServicePropertiesResponder(resp *http.Response) (result BlobServiceProperties, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list blob services of storage account. It returns a collection of one object named default. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client BlobServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result BlobServiceItems, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobServicesClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.BlobServicesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/blobServices", 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 BlobServicesClient) 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 BlobServicesClient) ListResponder(resp *http.Response) (result BlobServiceItems, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetServiceProperties sets the properties of a storage account’s Blob service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the properties of a storage account’s Blob service, including properties for Storage Analytics -// and CORS (Cross-Origin Resource Sharing) rules. -func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties) (result BlobServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BlobServicesClient.SetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}, - {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}, - {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error()) - } - - req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "SetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.SetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "SetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.SetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.BlobServicesClient", "SetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// SetServicePropertiesPreparer prepares the SetServiceProperties request. -func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters BlobServiceProperties) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "BlobServicesName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Sku = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client BlobServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always -// closes the http.Response Body. -func (client BlobServicesClient) SetServicePropertiesResponder(resp *http.Response) (result BlobServiceProperties, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go deleted file mode 100644 index a61c8d456843..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package storage implements the Azure ARM Storage service API version 2019-06-01. -// -// The Azure Storage Management API. -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Storage - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Storage. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient 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 NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go deleted file mode 100644 index aad90b84a290..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go +++ /dev/null @@ -1,469 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// EncryptionScopesClient is the the Azure Storage Management API. -type EncryptionScopesClient struct { - BaseClient -} - -// NewEncryptionScopesClient creates an instance of the EncryptionScopesClient client. -func NewEncryptionScopesClient(subscriptionID string) EncryptionScopesClient { - return NewEncryptionScopesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewEncryptionScopesClientWithBaseURI creates an instance of the EncryptionScopesClient 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 NewEncryptionScopesClientWithBaseURI(baseURI string, subscriptionID string) EncryptionScopesClient { - return EncryptionScopesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get returns the properties for the specified encryption scope. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption -// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) -// only. Every dash (-) character must be immediately preceded and followed by a letter or number. -func (client EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (result EncryptionScope, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: encryptionScopeName, - Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.EncryptionScopesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, encryptionScopeName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client EncryptionScopesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "encryptionScopeName": autorest.Encode("path", encryptionScopeName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", 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 EncryptionScopesClient) 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 EncryptionScopesClient) GetResponder(resp *http.Response) (result EncryptionScope, 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 the encryption scopes available under the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client EncryptionScopesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.List") - defer func() { - sc := -1 - if result.eslr.Response.Response != nil { - sc = result.eslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.EncryptionScopesClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.eslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure sending request") - return - } - - result.eslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure responding to request") - return - } - if result.eslr.hasNextLink() && result.eslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client EncryptionScopesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes", 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 EncryptionScopesClient) 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 EncryptionScopesClient) ListResponder(resp *http.Response) (result EncryptionScopeListResult, 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 EncryptionScopesClient) listNextResults(ctx context.Context, lastResults EncryptionScopeListResult) (result EncryptionScopeListResult, err error) { - req, err := lastResults.encryptionScopeListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "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, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client EncryptionScopesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.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, accountName) - return -} - -// Patch update encryption scope properties as specified in the request body. Update fails if the specified encryption -// scope does not already exist. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption -// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) -// only. Every dash (-) character must be immediately preceded and followed by a letter or number. -// encryptionScope - encryption scope properties to be used for the update. -func (client EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Patch") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: encryptionScopeName, - Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.EncryptionScopesClient", "Patch", err.Error()) - } - - req, err := client.PatchPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", nil, "Failure preparing request") - return - } - - resp, err := client.PatchSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure sending request") - return - } - - result, err = client.PatchResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure responding to request") - return - } - - return -} - -// PatchPreparer prepares the Patch request. -func (client EncryptionScopesClient) PatchPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "encryptionScopeName": autorest.Encode("path", encryptionScopeName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters), - autorest.WithJSON(encryptionScope), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PatchSender sends the Patch request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionScopesClient) PatchSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// PatchResponder handles the response to the Patch request. The method always -// closes the http.Response Body. -func (client EncryptionScopesClient) PatchResponder(resp *http.Response) (result EncryptionScope, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Put synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope -// is already created and a subsequent request is issued with different properties, the encryption scope properties -// will be updated per the specified request. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption -// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) -// only. Every dash (-) character must be immediately preceded and followed by a letter or number. -// encryptionScope - encryption scope properties to be used for the create or update. -func (client EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Put") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: encryptionScopeName, - Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.EncryptionScopesClient", "Put", err.Error()) - } - - req, err := client.PutPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", nil, "Failure preparing request") - return - } - - resp, err := client.PutSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure sending request") - return - } - - result, err = client.PutResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure responding to request") - return - } - - return -} - -// PutPreparer prepares the Put request. -func (client EncryptionScopesClient) PutPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "encryptionScopeName": autorest.Encode("path", encryptionScopeName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters), - autorest.WithJSON(encryptionScope), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PutSender sends the Put request. The method will close the -// http.Response Body if it receives an error. -func (client EncryptionScopesClient) PutSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// PutResponder handles the response to the Put request. The method always -// closes the http.Response Body. -func (client EncryptionScopesClient) PutResponder(resp *http.Response) (result EncryptionScope, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/enums.go deleted file mode 100644 index 5dbcc9d0fd76..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/enums.go +++ /dev/null @@ -1,784 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// 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 ( - // AccountExpandBlobRestoreStatus ... - AccountExpandBlobRestoreStatus AccountExpand = "blobRestoreStatus" - // AccountExpandGeoReplicationStats ... - AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats" -) - -// PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type. -func PossibleAccountExpandValues() []AccountExpand { - return []AccountExpand{AccountExpandBlobRestoreStatus, 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} -} - -// BlobRestoreProgressStatus enumerates the values for blob restore progress status. -type BlobRestoreProgressStatus string - -const ( - // Complete ... - Complete BlobRestoreProgressStatus = "Complete" - // Failed ... - Failed BlobRestoreProgressStatus = "Failed" - // InProgress ... - InProgress BlobRestoreProgressStatus = "InProgress" -) - -// PossibleBlobRestoreProgressStatusValues returns an array of possible values for the BlobRestoreProgressStatus const type. -func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus { - return []BlobRestoreProgressStatus{Complete, Failed, InProgress} -} - -// 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} -} - -// EnabledProtocols enumerates the values for enabled protocols. -type EnabledProtocols string - -const ( - // NFS ... - NFS EnabledProtocols = "NFS" - // SMB ... - SMB EnabledProtocols = "SMB" -) - -// PossibleEnabledProtocolsValues returns an array of possible values for the EnabledProtocols const type. -func PossibleEnabledProtocolsValues() []EnabledProtocols { - return []EnabledProtocols{NFS, SMB} -} - -// EncryptionScopeSource enumerates the values for encryption scope source. -type EncryptionScopeSource string - -const ( - // MicrosoftKeyVault ... - MicrosoftKeyVault EncryptionScopeSource = "Microsoft.KeyVault" - // MicrosoftStorage ... - MicrosoftStorage EncryptionScopeSource = "Microsoft.Storage" -) - -// PossibleEncryptionScopeSourceValues returns an array of possible values for the EncryptionScopeSource const type. -func PossibleEncryptionScopeSourceValues() []EncryptionScopeSource { - return []EncryptionScopeSource{MicrosoftKeyVault, MicrosoftStorage} -} - -// EncryptionScopeState enumerates the values for encryption scope state. -type EncryptionScopeState string - -const ( - // Disabled ... - Disabled EncryptionScopeState = "Disabled" - // Enabled ... - Enabled EncryptionScopeState = "Enabled" -) - -// PossibleEncryptionScopeStateValues returns an array of possible values for the EncryptionScopeState const type. -func PossibleEncryptionScopeStateValues() []EncryptionScopeState { - return []EncryptionScopeState{Disabled, Enabled} -} - -// 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} -} - -// GetShareExpand enumerates the values for get share expand. -type GetShareExpand string - -const ( - // Stats ... - Stats GetShareExpand = "stats" -) - -// PossibleGetShareExpandValues returns an array of possible values for the GetShareExpand const type. -func PossibleGetShareExpandValues() []GetShareExpand { - return []GetShareExpand{Stats} -} - -// 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 ( - // KeySourceMicrosoftKeyvault ... - KeySourceMicrosoftKeyvault KeySource = "Microsoft.Keyvault" - // KeySourceMicrosoftStorage ... - KeySourceMicrosoftStorage KeySource = "Microsoft.Storage" -) - -// PossibleKeySourceValues returns an array of possible values for the KeySource const type. -func PossibleKeySourceValues() []KeySource { - return []KeySource{KeySourceMicrosoftKeyvault, KeySourceMicrosoftStorage} -} - -// KeyType enumerates the values for key type. -type KeyType string - -const ( - // KeyTypeAccount ... - KeyTypeAccount KeyType = "Account" - // KeyTypeService ... - KeyTypeService KeyType = "Service" -) - -// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. -func PossibleKeyTypeValues() []KeyType { - return []KeyType{KeyTypeAccount, KeyTypeService} -} - -// 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 ( - // LargeFileSharesStateDisabled ... - LargeFileSharesStateDisabled LargeFileSharesState = "Disabled" - // LargeFileSharesStateEnabled ... - LargeFileSharesStateEnabled LargeFileSharesState = "Enabled" -) - -// PossibleLargeFileSharesStateValues returns an array of possible values for the LargeFileSharesState const type. -func PossibleLargeFileSharesStateValues() []LargeFileSharesState { - return []LargeFileSharesState{LargeFileSharesStateDisabled, LargeFileSharesStateEnabled} -} - -// 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} -} - -// ListContainersInclude enumerates the values for list containers include. -type ListContainersInclude string - -const ( - // Deleted ... - Deleted ListContainersInclude = "deleted" -) - -// PossibleListContainersIncludeValues returns an array of possible values for the ListContainersInclude const type. -func PossibleListContainersIncludeValues() []ListContainersInclude { - return []ListContainersInclude{Deleted} -} - -// 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} -} - -// ListSharesExpand enumerates the values for list shares expand. -type ListSharesExpand string - -const ( - // ListSharesExpandDeleted ... - ListSharesExpandDeleted ListSharesExpand = "deleted" -) - -// PossibleListSharesExpandValues returns an array of possible values for the ListSharesExpand const type. -func PossibleListSharesExpandValues() []ListSharesExpand { - return []ListSharesExpand{ListSharesExpandDeleted} -} - -// 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} -} - -// 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} -} - -// 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} -} - -// RootSquashType enumerates the values for root squash type. -type RootSquashType string - -const ( - // AllSquash ... - AllSquash RootSquashType = "AllSquash" - // NoRootSquash ... - NoRootSquash RootSquashType = "NoRootSquash" - // RootSquash ... - RootSquash RootSquashType = "RootSquash" -) - -// PossibleRootSquashTypeValues returns an array of possible values for the RootSquashType const type. -func PossibleRootSquashTypeValues() []RootSquashType { - return []RootSquashType{AllSquash, NoRootSquash, RootSquash} -} - -// RoutingChoice enumerates the values for routing choice. -type RoutingChoice string - -const ( - // InternetRouting ... - InternetRouting RoutingChoice = "InternetRouting" - // MicrosoftRouting ... - MicrosoftRouting RoutingChoice = "MicrosoftRouting" -) - -// PossibleRoutingChoiceValues returns an array of possible values for the RoutingChoice const type. -func PossibleRoutingChoiceValues() []RoutingChoice { - return []RoutingChoice{InternetRouting, MicrosoftRouting} -} - -// 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} -} - -// ShareAccessTier enumerates the values for share access tier. -type ShareAccessTier string - -const ( - // ShareAccessTierCool ... - ShareAccessTierCool ShareAccessTier = "Cool" - // ShareAccessTierHot ... - ShareAccessTierHot ShareAccessTier = "Hot" - // ShareAccessTierPremium ... - ShareAccessTierPremium ShareAccessTier = "Premium" - // ShareAccessTierTransactionOptimized ... - ShareAccessTierTransactionOptimized ShareAccessTier = "TransactionOptimized" -) - -// PossibleShareAccessTierValues returns an array of possible values for the ShareAccessTier const type. -func PossibleShareAccessTierValues() []ShareAccessTier { - return []ShareAccessTier{ShareAccessTierCool, ShareAccessTierHot, ShareAccessTierPremium, ShareAccessTierTransactionOptimized} -} - -// 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go deleted file mode 100644 index 6589e7d82724..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go +++ /dev/null @@ -1,323 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// FileServicesClient is the the Azure Storage Management API. -type FileServicesClient struct { - BaseClient -} - -// NewFileServicesClient creates an instance of the FileServicesClient client. -func NewFileServicesClient(subscriptionID string) FileServicesClient { - return NewFileServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient 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 NewFileServicesClientWithBaseURI(baseURI string, subscriptionID string) FileServicesClient { - return FileServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// GetServiceProperties gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource -// Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client FileServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result FileServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileServicesClient.GetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileServicesClient", "GetServiceProperties", err.Error()) - } - - req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "GetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.GetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "GetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.GetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "GetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// GetServicePropertiesPreparer prepares the GetServiceProperties request. -func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "FileServicesName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client FileServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always -// closes the http.Response Body. -func (client FileServicesClient) GetServicePropertiesResponder(resp *http.Response) (result FileServiceProperties, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all file services in storage accounts -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client FileServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result FileServiceItems, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileServicesClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileServicesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/fileServices", 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 FileServicesClient) 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 FileServicesClient) ListResponder(resp *http.Response) (result FileServiceItems, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetServiceProperties sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource -// Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the properties of file services in storage accounts, including CORS (Cross-Origin Resource -// Sharing) rules. -func (client FileServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties) (result FileServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileServicesClient.SetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("storage.FileServicesClient", "SetServiceProperties", err.Error()) - } - - req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "SetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.SetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "SetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.SetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileServicesClient", "SetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// SetServicePropertiesPreparer prepares the SetServiceProperties request. -func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters FileServiceProperties) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "FileServicesName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Sku = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client FileServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always -// closes the http.Response Body. -func (client FileServicesClient) SetServicePropertiesResponder(resp *http.Response) (result FileServiceProperties, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go deleted file mode 100644 index 43bec0596f36..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go +++ /dev/null @@ -1,689 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// FileSharesClient is the the Azure Storage Management API. -type FileSharesClient struct { - BaseClient -} - -// NewFileSharesClient creates an instance of the FileSharesClient client. -func NewFileSharesClient(subscriptionID string) FileSharesClient { - return NewFileSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient 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 NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileSharesClient { - return FileSharesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a new share under the specified account as described by request body. The share resource includes -// metadata and properties for that share. It does not include a list of the files contained by the share. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// shareName - the name of the file share within the specified storage account. File share names must be -// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) -// character must be immediately preceded and followed by a letter or number. -// fileShare - properties of the file share to create. -func (client FileSharesClient) Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare) (result FileShare, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Create") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: shareName, - Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: fileShare, - Constraints: []validation.Constraint{{Target: "fileShare.FileShareProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(102400), Chain: nil}, - {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, - }}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, shareName, fileShare) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "shareName": autorest.Encode("path", shareName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", pathParameters), - autorest.WithJSON(fileShare), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client FileSharesClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client FileSharesClient) CreateResponder(resp *http.Response) (result FileShare, 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 deletes specified share under its account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// shareName - the name of the file share within the specified storage account. File share names must be -// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) -// character must be immediately preceded and followed by a letter or number. -func (client FileSharesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: shareName, - Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, shareName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "shareName": autorest.Encode("path", shareName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", 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 FileSharesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client FileSharesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets properties of a specified share. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// shareName - the name of the file share within the specified storage account. File share names must be -// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) -// character must be immediately preceded and followed by a letter or number. -// expand - optional, used to expand the properties within share's properties. -func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (result FileShare, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: shareName, - Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, shareName, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "shareName": autorest.Encode("path", shareName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", 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 FileSharesClient) 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 FileSharesClient) GetResponder(resp *http.Response) (result FileShare, 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 shares. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// maxpagesize - optional. Specified maximum number of shares that can be included in the list. -// filter - optional. When specified, only share names starting with the filter will be listed. -// expand - optional, used to expand the properties within share's properties. -func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") - defer func() { - sc := -1 - if result.fsi.Response.Response != nil { - sc = result.fsi.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, expand) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.fsi.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", resp, "Failure sending request") - return - } - - 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 - } - - return -} - -// ListPreparer prepares the List request. -func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(maxpagesize) > 0 { - queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(string(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.Storage/storageAccounts/{accountName}/fileServices/default/shares", 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 FileSharesClient) 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 FileSharesClient) ListResponder(resp *http.Response) (result FileShareItems, 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 FileSharesClient) listNextResults(ctx context.Context, lastResults FileShareItems) (result FileShareItems, err error) { - req, err := lastResults.fileShareItemsPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.FileSharesClient", "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, "storage.FileSharesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.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, accountName, maxpagesize, filter, expand) - return -} - -// Restore restore a file share within a valid retention days if share soft delete is enabled -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// shareName - the name of the file share within the specified storage account. File share names must be -// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) -// character must be immediately preceded and followed by a letter or number. -func (client FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Restore") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: shareName, - Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: deletedShare, - Constraints: []validation.Constraint{{Target: "deletedShare.DeletedShareName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "deletedShare.DeletedShareVersion", Name: validation.Null, Rule: true, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "Restore", err.Error()) - } - - req, err := client.RestorePreparer(ctx, resourceGroupName, accountName, shareName, deletedShare) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", nil, "Failure preparing request") - return - } - - resp, err := client.RestoreSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure sending request") - return - } - - result, err = client.RestoreResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure responding to request") - return - } - - return -} - -// RestorePreparer prepares the Restore request. -func (client FileSharesClient) RestorePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "shareName": autorest.Encode("path", shareName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore", pathParameters), - autorest.WithJSON(deletedShare), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestoreSender sends the Restore request. The method will close the -// http.Response Body if it receives an error. -func (client FileSharesClient) RestoreSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RestoreResponder handles the response to the Restore request. The method always -// closes the http.Response Body. -func (client FileSharesClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates share properties as specified in request body. Properties not mentioned in the request will not be -// changed. Update fails if the specified share does not already exist. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// shareName - the name of the file share within the specified storage account. File share names must be -// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) -// character must be immediately preceded and followed by a letter or number. -// fileShare - properties to update for the file share. -func (client FileSharesClient) Update(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare) (result FileShare, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Update") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: shareName, - Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.FileSharesClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, shareName, fileShare) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare FileShare) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "shareName": autorest.Encode("path", shareName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", pathParameters), - autorest.WithJSON(fileShare), - 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 FileSharesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client FileSharesClient) UpdateResponder(resp *http.Response) (result FileShare, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go deleted file mode 100644 index 2543202c4c8f..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go +++ /dev/null @@ -1,316 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ManagementPoliciesClient is the the Azure Storage Management API. -type ManagementPoliciesClient struct { - BaseClient -} - -// NewManagementPoliciesClient creates an instance of the ManagementPoliciesClient client. -func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient { - return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient 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 NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient { - return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate sets the managementpolicy to the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// properties - the ManagementPolicy set to a storage account. -func (client ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPolicy) (result ManagementPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagementPoliciesClient.CreateOrUpdate") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: properties, - Constraints: []validation.Constraint{{Target: "properties.ManagementPolicyProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "properties.ManagementPolicyProperties.Policy", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "properties.ManagementPolicyProperties.Policy.Rules", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("storage.ManagementPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, properties) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "managementPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", pathParameters), - autorest.WithJSON(properties), - 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 ManagementPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ManagementPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagementPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the managementpolicy associated with the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client ManagementPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagementPoliciesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.ManagementPoliciesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "managementPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", 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 ManagementPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ManagementPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the managementpolicy associated with the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result ManagementPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ManagementPoliciesClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.ManagementPoliciesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ManagementPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "managementPolicyName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", 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 ManagementPoliciesClient) 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 ManagementPoliciesClient) GetResponder(resp *http.Response) (result ManagementPolicy, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go deleted file mode 100644 index ba7702675388..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go +++ /dev/null @@ -1,4491 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" - -// Account the storage account. -type Account struct { - autorest.Response `json:"-"` - // Sku - READ-ONLY; Gets the SKU. - Sku *Sku `json:"sku,omitempty"` - // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' - Kind Kind `json:"kind,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` - // AccountProperties - Properties of the storage account. - *AccountProperties `json:"properties,omitempty"` - // 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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Account. -func (a Account) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if a.Identity != nil { - objectMap["identity"] = a.Identity - } - if a.AccountProperties != nil { - objectMap["properties"] = a.AccountProperties - } - if a.Tags != nil { - objectMap["tags"] = a.Tags - } - if a.Location != nil { - objectMap["location"] = a.Location - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Account struct. -func (a *Account) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - a.Sku = &sku - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - a.Kind = kind - } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - a.Identity = &identity - } - case "properties": - if v != nil { - var accountProperties AccountProperties - err = json.Unmarshal(*v, &accountProperties) - if err != nil { - return err - } - a.AccountProperties = &accountProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - a.Tags = tags - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - a.Location = &location - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - a.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - a.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - a.Type = &typeVar - } - } - } - - return nil -} - -// AccountCheckNameAvailabilityParameters the parameters used to check the availability of the storage -// account name. -type AccountCheckNameAvailabilityParameters struct { - // Name - The storage account name. - Name *string `json:"name,omitempty"` - // Type - The type of resource, Microsoft.Storage/storageAccounts - Type *string `json:"type,omitempty"` -} - -// AccountCreateParameters the parameters used when creating a storage account. -type AccountCreateParameters struct { - // Sku - Required. Gets or sets the SKU name. - Sku *Sku `json:"sku,omitempty"` - // Kind - Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' - Kind Kind `json:"kind,omitempty"` - // Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - Location *string `json:"location,omitempty"` - // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - Tags map[string]*string `json:"tags"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` - // AccountPropertiesCreateParameters - The parameters used to create the storage account. - *AccountPropertiesCreateParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountCreateParameters. -func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if acp.Sku != nil { - objectMap["sku"] = acp.Sku - } - if acp.Kind != "" { - objectMap["kind"] = acp.Kind - } - if acp.Location != nil { - objectMap["location"] = acp.Location - } - if acp.Tags != nil { - objectMap["tags"] = acp.Tags - } - if acp.Identity != nil { - objectMap["identity"] = acp.Identity - } - if acp.AccountPropertiesCreateParameters != nil { - objectMap["properties"] = acp.AccountPropertiesCreateParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AccountCreateParameters struct. -func (acp *AccountCreateParameters) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - acp.Sku = &sku - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - acp.Kind = kind - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - acp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - acp.Tags = tags - } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - acp.Identity = &identity - } - case "properties": - if v != nil { - var accountPropertiesCreateParameters AccountPropertiesCreateParameters - err = json.Unmarshal(*v, &accountPropertiesCreateParameters) - if err != nil { - return err - } - acp.AccountPropertiesCreateParameters = &accountPropertiesCreateParameters - } - } - } - - return nil -} - -// AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or -// dfs object via a internet routing endpoint. -type AccountInternetEndpoints struct { - // Blob - READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty"` - // File - READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty"` - // Web - READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty"` - // Dfs - READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountInternetEndpoints. -func (aie AccountInternetEndpoints) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AccountKey an access key for the storage account. -type AccountKey struct { - // KeyName - READ-ONLY; Name of the key. - KeyName *string `json:"keyName,omitempty"` - // Value - READ-ONLY; Base 64-encoded value of the key. - Value *string `json:"value,omitempty"` - // Permissions - READ-ONLY; Permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full' - Permissions KeyPermission `json:"permissions,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountKey. -func (ak AccountKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AccountListKeysResult the response from the ListKeys operation. -type AccountListKeysResult struct { - autorest.Response `json:"-"` - // Keys - READ-ONLY; Gets the list of storage account keys and their properties for the specified storage account. - Keys *[]AccountKey `json:"keys,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountListKeysResult. -func (alkr AccountListKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AccountListResult the response from the List Storage Accounts operation. -type AccountListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Gets the list of storage accounts and their properties. - Value *[]Account `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to query next page of storage accounts. Returned when total number of requested storage accounts exceed maximum page size. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountListResult. -func (alr AccountListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AccountListResultIterator provides access to a complete listing of Account values. -type AccountListResultIterator struct { - i int - page AccountListResultPage -} - -// 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 *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.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 *AccountListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter AccountListResultIterator) 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 AccountListResultIterator) Response() AccountListResult { - 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 AccountListResultIterator) Value() Account { - if !iter.page.NotDone() { - return Account{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the AccountListResultIterator type. -func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator { - return AccountListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(alr.NextLink))) -} - -// AccountListResultPage contains a page of Account values. -type AccountListResultPage struct { - fn func(context.Context, AccountListResult) (AccountListResult, error) - alr AccountListResult -} - -// 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 *AccountListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.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.alr) - if err != nil { - return err - } - page.alr = 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 *AccountListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page AccountListResultPage) NotDone() bool { - return !page.alr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page AccountListResultPage) Response() AccountListResult { - return page.alr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page AccountListResultPage) Values() []Account { - if page.alr.IsEmpty() { - return nil - } - return *page.alr.Value -} - -// Creates a new instance of the AccountListResultPage type. -func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage { - return AccountListResultPage{ - fn: getNextPage, - alr: cur, - } -} - -// AccountMicrosoftEndpoints the URIs that are used to perform a retrieval of a public blob, queue, table, -// web or dfs object via a microsoft routing endpoint. -type AccountMicrosoftEndpoints struct { - // Blob - READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty"` - // Queue - READ-ONLY; Gets the queue endpoint. - Queue *string `json:"queue,omitempty"` - // Table - READ-ONLY; Gets the table endpoint. - Table *string `json:"table,omitempty"` - // File - READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty"` - // Web - READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty"` - // Dfs - READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountMicrosoftEndpoints. -func (ame AccountMicrosoftEndpoints) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AccountProperties properties of the storage account. -type AccountProperties struct { - // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. - PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"` - // PrimaryLocation - READ-ONLY; Gets the location of the primary data center for the storage account. - PrimaryLocation *string `json:"primaryLocation,omitempty"` - // StatusOfPrimary - READ-ONLY; Gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'Available', 'Unavailable' - StatusOfPrimary AccountStatus `json:"statusOfPrimary,omitempty"` - // LastGeoFailoverTime - READ-ONLY; Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS. - LastGeoFailoverTime *date.Time `json:"lastGeoFailoverTime,omitempty"` - // SecondaryLocation - READ-ONLY; Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS. - SecondaryLocation *string `json:"secondaryLocation,omitempty"` - // StatusOfSecondary - READ-ONLY; Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'Available', 'Unavailable' - StatusOfSecondary AccountStatus `json:"statusOfSecondary,omitempty"` - // CreationTime - READ-ONLY; Gets the creation date and time of the storage account in UTC. - CreationTime *date.Time `json:"creationTime,omitempty"` - // CustomDomain - READ-ONLY; Gets the custom domain the user assigned to this storage account. - CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // SecondaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. - SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"` - // Encryption - READ-ONLY; Gets the encryption settings on the account. If unspecified, the account is unencrypted. - Encryption *Encryption `json:"encryption,omitempty"` - // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' - AccessTier AccessTier `json:"accessTier,omitempty"` - // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` - // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` - // NetworkRuleSet - READ-ONLY; Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` - // GeoReplicationStats - READ-ONLY; Geo Replication Stats - GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"` - // FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. - FailoverInProgress *bool `json:"failoverInProgress,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' - LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` - // PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` - // BlobRestoreStatus - READ-ONLY; Blob restore status - BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"` - // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` - // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' - 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.RoutingPreference != nil { - objectMap["routingPreference"] = ap.RoutingPreference - } - 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. - CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled. - Encryption *Encryption `json:"encryption,omitempty"` - // NetworkRuleSet - Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' - AccessTier AccessTier `json:"accessTier,omitempty"` - // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` - // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` - // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' - LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` - // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` - // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` - // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' - MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` -} - -// AccountPropertiesUpdateParameters the parameters used when updating a storage account. -type AccountPropertiesUpdateParameters struct { - // CustomDomain - Custom domain assigned to the storage account by the user. 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. - CustomDomain *CustomDomain `json:"customDomain,omitempty"` - // Encryption - Provides the encryption settings on the account. The default setting is unencrypted. - Encryption *Encryption `json:"encryption,omitempty"` - // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' - AccessTier AccessTier `json:"accessTier,omitempty"` - // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. - AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` - // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` - // NetworkRuleSet - Network rule set - NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' - LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` - // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer - RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` - // AllowBlobPublicAccess - Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. - AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` - // MinimumTLSVersion - Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS10', 'TLS11', 'TLS12' - MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` -} - -// AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. -type AccountRegenerateKeyParameters struct { - // KeyName - The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. - KeyName *string `json:"keyName,omitempty"` -} - -// AccountSasParameters the parameters to list SAS credentials of a storage account. -type AccountSasParameters struct { - // Services - The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'B', 'Q', 'T', 'F' - Services Services `json:"signedServices,omitempty"` - // ResourceTypes - The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 'SignedResourceTypesS', 'SignedResourceTypesC', 'SignedResourceTypesO' - ResourceTypes SignedResourceTypes `json:"signedResourceTypes,omitempty"` - // Permissions - The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P' - Permissions Permissions `json:"signedPermission,omitempty"` - // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests. - IPAddressOrRange *string `json:"signedIp,omitempty"` - // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS' - Protocols HTTPProtocol `json:"signedProtocol,omitempty"` - // SharedAccessStartTime - The time at which the SAS becomes valid. - SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` - // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid. - SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` - // KeyToSign - The key to sign the account SAS token with. - KeyToSign *string `json:"keyToSign,omitempty"` -} - -// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AccountsCreateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AccountsClient) (Account, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AccountsCreateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AccountsCreateFuture.Result. -func (future *AccountsCreateFuture) result(client AccountsClient) (a Account, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - a.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent { - a, err = client.CreateResponder(a.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", a.Response.Response, "Failure responding to request") - } - } - return -} - -// AccountsFailoverFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type AccountsFailoverFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AccountsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AccountsFailoverFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AccountsFailoverFuture.Result. -func (future *AccountsFailoverFuture) result(client AccountsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsFailoverFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("storage.AccountsFailoverFuture") - return - } - ar.Response = future.Response() - return -} - -// AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type AccountsRestoreBlobRangesFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(AccountsClient) (BlobRestoreStatus, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *AccountsRestoreBlobRangesFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for AccountsRestoreBlobRangesFuture.Result. -func (future *AccountsRestoreBlobRangesFuture) result(client AccountsClient) (brs BlobRestoreStatus, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - brs.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if brs.Response.Response, err = future.GetResult(sender); err == nil && brs.Response.Response.StatusCode != http.StatusNoContent { - brs, err = client.RestoreBlobRangesResponder(brs.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", brs.Response.Response, "Failure responding to request") - } - } - return -} - -// AccountUpdateParameters the parameters that can be provided when updating the storage account -// properties. -type AccountUpdateParameters struct { - // Sku - Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value. - Sku *Sku `json:"sku,omitempty"` - // Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. - Tags map[string]*string `json:"tags"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` - // AccountPropertiesUpdateParameters - The parameters used when updating a storage account. - *AccountPropertiesUpdateParameters `json:"properties,omitempty"` - // Kind - Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' - Kind Kind `json:"kind,omitempty"` -} - -// MarshalJSON is the custom marshaler for AccountUpdateParameters. -func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aup.Sku != nil { - objectMap["sku"] = aup.Sku - } - if aup.Tags != nil { - objectMap["tags"] = aup.Tags - } - if aup.Identity != nil { - objectMap["identity"] = aup.Identity - } - if aup.AccountPropertiesUpdateParameters != nil { - objectMap["properties"] = aup.AccountPropertiesUpdateParameters - } - if aup.Kind != "" { - objectMap["kind"] = aup.Kind - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct. -func (aup *AccountUpdateParameters) 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 "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - aup.Sku = &sku - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - aup.Tags = tags - } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - aup.Identity = &identity - } - case "properties": - if v != nil { - var accountPropertiesUpdateParameters AccountPropertiesUpdateParameters - err = json.Unmarshal(*v, &accountPropertiesUpdateParameters) - if err != nil { - return err - } - aup.AccountPropertiesUpdateParameters = &accountPropertiesUpdateParameters - } - case "kind": - if v != nil { - var kind Kind - err = json.Unmarshal(*v, &kind) - if err != nil { - return err - } - aup.Kind = kind - } - } - } - - return nil -} - -// ActiveDirectoryProperties settings properties for Active Directory (AD). -type ActiveDirectoryProperties struct { - // DomainName - Specifies the primary domain that the AD DNS server is authoritative for. - DomainName *string `json:"domainName,omitempty"` - // NetBiosDomainName - Specifies the NetBIOS domain name. - NetBiosDomainName *string `json:"netBiosDomainName,omitempty"` - // ForestName - Specifies the Active Directory forest to get. - ForestName *string `json:"forestName,omitempty"` - // DomainGUID - Specifies the domain GUID. - DomainGUID *string `json:"domainGuid,omitempty"` - // DomainSid - Specifies the security identifier (SID). - DomainSid *string `json:"domainSid,omitempty"` - // AzureStorageSid - Specifies the security identifier (SID) for Azure Storage. - AzureStorageSid *string `json:"azureStorageSid,omitempty"` -} - -// 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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureEntityResource. -func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// AzureFilesIdentityBasedAuthentication settings for Azure Files identity based authentication. -type AzureFilesIdentityBasedAuthentication struct { - // DirectoryServiceOptions - Indicates the directory service used. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS', 'DirectoryServiceOptionsAD' - DirectoryServiceOptions DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` - // ActiveDirectoryProperties - Required if choose AD. - ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"` -} - -// BlobContainer properties of the blob container, including Id, resource name, resource type, Etag. -type BlobContainer struct { - autorest.Response `json:"-"` - // ContainerProperties - Properties of the blob container. - *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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for BlobContainer. -func (bc BlobContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bc.ContainerProperties != nil { - objectMap["properties"] = bc.ContainerProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BlobContainer struct. -func (bc *BlobContainer) 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 containerProperties ContainerProperties - err = json.Unmarshal(*v, &containerProperties) - if err != nil { - return err - } - bc.ContainerProperties = &containerProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - bc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bc.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bc.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bc.Type = &typeVar - } - } - } - - return nil -} - -// BlobRestoreParameters blob restore parameters -type BlobRestoreParameters struct { - // TimeToRestore - Restore blob to the specified time. - TimeToRestore *date.Time `json:"timeToRestore,omitempty"` - // BlobRanges - Blob ranges to restore. - BlobRanges *[]BlobRestoreRange `json:"blobRanges,omitempty"` -} - -// BlobRestoreRange blob range -type BlobRestoreRange struct { - // StartRange - Blob start range. This is inclusive. Empty means account start. - StartRange *string `json:"startRange,omitempty"` - // EndRange - Blob end range. This is exclusive. Empty means account end. - EndRange *string `json:"endRange,omitempty"` -} - -// BlobRestoreStatus blob restore status. -type BlobRestoreStatus struct { - autorest.Response `json:"-"` - // Status - READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed' - Status BlobRestoreProgressStatus `json:"status,omitempty"` - // FailureReason - READ-ONLY; Failure reason when blob restore is failed. - FailureReason *string `json:"failureReason,omitempty"` - // RestoreID - READ-ONLY; Id for tracking blob restore request. - RestoreID *string `json:"restoreId,omitempty"` - // Parameters - READ-ONLY; Blob restore request parameters. - Parameters *BlobRestoreParameters `json:"parameters,omitempty"` -} - -// MarshalJSON is the custom marshaler for BlobRestoreStatus. -func (brs BlobRestoreStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// BlobServiceItems ... -type BlobServiceItems struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of blob services returned. - Value *[]BlobServiceProperties `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for BlobServiceItems. -func (bsi BlobServiceItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// BlobServiceProperties the properties of a storage account’s Blob service. -type BlobServiceProperties struct { - autorest.Response `json:"-"` - // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. - *BlobServicePropertiesProperties `json:"properties,omitempty"` - // Sku - READ-ONLY; Sku name and tier. - Sku *Sku `json:"sku,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for BlobServiceProperties. -func (bsp BlobServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bsp.BlobServicePropertiesProperties != nil { - objectMap["properties"] = bsp.BlobServicePropertiesProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for BlobServiceProperties struct. -func (bsp *BlobServiceProperties) 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 blobServiceProperties BlobServicePropertiesProperties - err = json.Unmarshal(*v, &blobServiceProperties) - if err != nil { - return err - } - bsp.BlobServicePropertiesProperties = &blobServiceProperties - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - bsp.Sku = &sku - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - bsp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - bsp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - bsp.Type = &typeVar - } - } - } - - return nil -} - -// BlobServicePropertiesProperties the properties of a storage account’s Blob service. -type BlobServicePropertiesProperties struct { - // Cors - Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. - Cors *CorsRules `json:"cors,omitempty"` - // DefaultServiceVersion - DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. - DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` - // DeleteRetentionPolicy - The blob service properties for blob soft delete. - DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` - // IsVersioningEnabled - Versioning is enabled if set to true. - IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` - // AutomaticSnapshotPolicyEnabled - Deprecated in favor of isVersioningEnabled property. - AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` - // ChangeFeed - The blob service properties for change feed events. - ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` - // RestorePolicy - The blob service properties for blob restore policy. - RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` - // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete. - ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` -} - -// ChangeFeed the blob service properties for change feed events. -type ChangeFeed struct { - // Enabled - Indicates whether change feed event logging is enabled for the Blob service. - Enabled *bool `json:"enabled,omitempty"` -} - -// CheckNameAvailabilityResult the CheckNameAvailability operation response. -type CheckNameAvailabilityResult struct { - autorest.Response `json:"-"` - // NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - READ-ONLY; Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists' - Reason Reason `json:"reason,omitempty"` - // Message - READ-ONLY; Gets an error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty"` -} - -// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult. -func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// CloudError an error response from the Storage service. -type CloudError struct { - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody an error response from the Storage service. -type CloudErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. - Details *[]CloudErrorBody `json:"details,omitempty"` -} - -// ContainerProperties the properties of a container. -type ContainerProperties struct { - // Version - READ-ONLY; The version of the deleted blob container. - Version *string `json:"version,omitempty"` - // Deleted - READ-ONLY; Indicates whether the blob container was deleted. - Deleted *bool `json:"deleted,omitempty"` - // DeletedTime - READ-ONLY; Blob container deletion time. - DeletedTime *date.Time `json:"deletedTime,omitempty"` - // RemainingRetentionDays - READ-ONLY; Remaining retention days for soft deleted blob container. - RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` - // DefaultEncryptionScope - Default the container to use specified encryption scope for all writes. - DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` - // DenyEncryptionScopeOverride - Block override of encryption scope from the container default. - DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` - // PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone' - PublicAccess PublicAccess `json:"publicAccess,omitempty"` - // LastModifiedTime - READ-ONLY; Returns the date and time the container was last modified. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // LeaseStatus - READ-ONLY; The lease status of the container. Possible values include: 'LeaseStatusLocked', 'LeaseStatusUnlocked' - LeaseStatus LeaseStatus `json:"leaseStatus,omitempty"` - // LeaseState - READ-ONLY; Lease state of the container. Possible values include: 'LeaseStateAvailable', 'LeaseStateLeased', 'LeaseStateExpired', 'LeaseStateBreaking', 'LeaseStateBroken' - LeaseState LeaseState `json:"leaseState,omitempty"` - // LeaseDuration - READ-ONLY; Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed' - LeaseDuration LeaseDuration `json:"leaseDuration,omitempty"` - // Metadata - A name-value pair to associate with the container as metadata. - Metadata map[string]*string `json:"metadata"` - // ImmutabilityPolicy - READ-ONLY; The ImmutabilityPolicy property of the container. - ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - // LegalHold - READ-ONLY; The LegalHold property of the container. - LegalHold *LegalHoldProperties `json:"legalHold,omitempty"` - // 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. - HasLegalHold *bool `json:"hasLegalHold,omitempty"` - // HasImmutabilityPolicy - READ-ONLY; The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. - HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerProperties. -func (cp ContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cp.DefaultEncryptionScope != nil { - objectMap["defaultEncryptionScope"] = cp.DefaultEncryptionScope - } - if cp.DenyEncryptionScopeOverride != nil { - objectMap["denyEncryptionScopeOverride"] = cp.DenyEncryptionScopeOverride - } - if cp.PublicAccess != "" { - objectMap["publicAccess"] = cp.PublicAccess - } - if cp.Metadata != nil { - objectMap["metadata"] = cp.Metadata - } - return json.Marshal(objectMap) -} - -// CorsRule specifies a CORS rule for the Blob service. -type CorsRule struct { - // AllowedOrigins - Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains - AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` - // AllowedMethods - Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. - AllowedMethods *[]string `json:"allowedMethods,omitempty"` - // MaxAgeInSeconds - Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. - MaxAgeInSeconds *int32 `json:"maxAgeInSeconds,omitempty"` - // ExposedHeaders - Required if CorsRule element is present. A list of response headers to expose to CORS clients. - ExposedHeaders *[]string `json:"exposedHeaders,omitempty"` - // AllowedHeaders - Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. - AllowedHeaders *[]string `json:"allowedHeaders,omitempty"` -} - -// CorsRules sets the CORS rules. You can include up to five CorsRule elements in the request. -type CorsRules struct { - // CorsRules - The List of CORS rules. You can include up to five CorsRule elements in the request. - CorsRules *[]CorsRule `json:"corsRules,omitempty"` -} - -// CustomDomain the custom domain assigned to this storage account. This can be set via Update. -type CustomDomain struct { - // Name - Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. - Name *string `json:"name,omitempty"` - // UseSubDomainName - Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. - UseSubDomainName *bool `json:"useSubDomainName,omitempty"` -} - -// DateAfterCreation object to define the number of days after creation. -type DateAfterCreation struct { - // DaysAfterCreationGreaterThan - Value indicating the age in days after creation - DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` -} - -// DateAfterModification object to define the number of days after last modification. -type DateAfterModification struct { - // DaysAfterModificationGreaterThan - Value indicating the age in days after last modification - DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` -} - -// DeletedShare the deleted share to be restored. -type DeletedShare struct { - // DeletedShareName - Required. Identify the name of the deleted share that will be restored. - DeletedShareName *string `json:"deletedShareName,omitempty"` - // DeletedShareVersion - Required. Identify the version of the deleted share that will be restored. - DeletedShareVersion *string `json:"deletedShareVersion,omitempty"` -} - -// DeleteRetentionPolicy the service properties for soft delete. -type DeleteRetentionPolicy struct { - // Enabled - Indicates whether DeleteRetentionPolicy is enabled. - Enabled *bool `json:"enabled,omitempty"` - // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. - Days *int32 `json:"days,omitempty"` -} - -// Dimension dimension of blobs, possibly be blob type or access tier. -type Dimension struct { - // Name - Display name of dimension. - Name *string `json:"name,omitempty"` - // DisplayName - Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` -} - -// Encryption the encryption settings on the storage account. -type Encryption struct { - // Services - List of services which support encryption. - Services *EncryptionServices `json:"services,omitempty"` - // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'KeySourceMicrosoftStorage', 'KeySourceMicrosoftKeyvault' - KeySource KeySource `json:"keySource,omitempty"` - // RequireInfrastructureEncryption - A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. - RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` - // KeyVaultProperties - Properties provided by key vault. - KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` -} - -// EncryptionScope the Encryption Scope resource. -type EncryptionScope struct { - autorest.Response `json:"-"` - // EncryptionScopeProperties - Properties of the encryption scope. - *EncryptionScopeProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionScope. -func (es EncryptionScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if es.EncryptionScopeProperties != nil { - objectMap["properties"] = es.EncryptionScopeProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for EncryptionScope struct. -func (es *EncryptionScope) 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 encryptionScopeProperties EncryptionScopeProperties - err = json.Unmarshal(*v, &encryptionScopeProperties) - if err != nil { - return err - } - es.EncryptionScopeProperties = &encryptionScopeProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - es.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - es.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - es.Type = &typeVar - } - } - } - - return nil -} - -// EncryptionScopeKeyVaultProperties the key vault properties for the encryption scope. This is a required -// field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. -type EncryptionScopeKeyVaultProperties struct { - // KeyURI - The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope. - KeyURI *string `json:"keyUri,omitempty"` -} - -// EncryptionScopeListResult list of encryption scopes requested, and if paging is required, a URL to the -// next page of encryption scopes. -type EncryptionScopeListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of encryption scopes requested. - Value *[]EncryptionScope `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested encryption scopes exceeds the maximum page size. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionScopeListResult. -func (eslr EncryptionScopeListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// EncryptionScopeListResultIterator provides access to a complete listing of EncryptionScope values. -type EncryptionScopeListResultIterator struct { - i int - page EncryptionScopeListResultPage -} - -// 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 *EncryptionScopeListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultIterator.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 *EncryptionScopeListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EncryptionScopeListResultIterator) 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 EncryptionScopeListResultIterator) Response() EncryptionScopeListResult { - 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 EncryptionScopeListResultIterator) Value() EncryptionScope { - if !iter.page.NotDone() { - return EncryptionScope{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EncryptionScopeListResultIterator type. -func NewEncryptionScopeListResultIterator(page EncryptionScopeListResultPage) EncryptionScopeListResultIterator { - return EncryptionScopeListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (eslr EncryptionScopeListResult) IsEmpty() bool { - return eslr.Value == nil || len(*eslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (eslr EncryptionScopeListResult) hasNextLink() bool { - return eslr.NextLink != nil && len(*eslr.NextLink) != 0 -} - -// encryptionScopeListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (eslr EncryptionScopeListResult) encryptionScopeListResultPreparer(ctx context.Context) (*http.Request, error) { - if !eslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(eslr.NextLink))) -} - -// EncryptionScopeListResultPage contains a page of EncryptionScope values. -type EncryptionScopeListResultPage struct { - fn func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error) - eslr EncryptionScopeListResult -} - -// 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 *EncryptionScopeListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultPage.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.eslr) - if err != nil { - return err - } - page.eslr = 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 *EncryptionScopeListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EncryptionScopeListResultPage) NotDone() bool { - return !page.eslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EncryptionScopeListResultPage) Response() EncryptionScopeListResult { - return page.eslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EncryptionScopeListResultPage) Values() []EncryptionScope { - if page.eslr.IsEmpty() { - return nil - } - return *page.eslr.Value -} - -// Creates a new instance of the EncryptionScopeListResultPage type. -func NewEncryptionScopeListResultPage(cur EncryptionScopeListResult, getNextPage func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error)) EncryptionScopeListResultPage { - return EncryptionScopeListResultPage{ - fn: getNextPage, - eslr: cur, - } -} - -// EncryptionScopeProperties properties of the encryption scope. -type EncryptionScopeProperties struct { - // Source - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyVault' - Source EncryptionScopeSource `json:"source,omitempty"` - // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled' - State EncryptionScopeState `json:"state,omitempty"` - // CreationTime - READ-ONLY; Gets the creation date and time of the encryption scope in UTC. - CreationTime *date.Time `json:"creationTime,omitempty"` - // LastModifiedTime - READ-ONLY; Gets the last modification date and time of the encryption scope in UTC. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // KeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. - KeyVaultProperties *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"` -} - -// MarshalJSON is the custom marshaler for EncryptionScopeProperties. -func (esp EncryptionScopeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if esp.Source != "" { - objectMap["source"] = esp.Source - } - if esp.State != "" { - objectMap["state"] = esp.State - } - if esp.KeyVaultProperties != nil { - objectMap["keyVaultProperties"] = esp.KeyVaultProperties - } - return json.Marshal(objectMap) -} - -// EncryptionService a service that allows server-side encryption to be used. -type EncryptionService struct { - // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. - Enabled *bool `json:"enabled,omitempty"` - // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. - LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` - // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount' - KeyType KeyType `json:"keyType,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 - } - if es.KeyType != "" { - objectMap["keyType"] = es.KeyType - } - return json.Marshal(objectMap) -} - -// EncryptionServices a list of services that support encryption. -type EncryptionServices struct { - // Blob - The encryption function of the blob storage service. - Blob *EncryptionService `json:"blob,omitempty"` - // File - The encryption function of the file storage service. - File *EncryptionService `json:"file,omitempty"` - // Table - The encryption function of the table storage service. - Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. - Queue *EncryptionService `json:"queue,omitempty"` -} - -// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs -// object. -type Endpoints struct { - // Blob - READ-ONLY; Gets the blob endpoint. - Blob *string `json:"blob,omitempty"` - // Queue - READ-ONLY; Gets the queue endpoint. - Queue *string `json:"queue,omitempty"` - // Table - READ-ONLY; Gets the table endpoint. - Table *string `json:"table,omitempty"` - // File - READ-ONLY; Gets the file endpoint. - File *string `json:"file,omitempty"` - // Web - READ-ONLY; Gets the web endpoint. - Web *string `json:"web,omitempty"` - // Dfs - READ-ONLY; Gets the dfs endpoint. - Dfs *string `json:"dfs,omitempty"` - // MicrosoftEndpoints - Gets the microsoft routing storage endpoints. - MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"` - // InternetEndpoints - Gets the internet routing storage endpoints - InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"` -} - -// MarshalJSON is the custom marshaler for Endpoints. -func (e Endpoints) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if e.MicrosoftEndpoints != nil { - objectMap["microsoftEndpoints"] = e.MicrosoftEndpoints - } - if e.InternetEndpoints != nil { - objectMap["internetEndpoints"] = e.InternetEndpoints - } - return json.Marshal(objectMap) -} - -// ErrorResponse an error response from the storage resource provider. -type ErrorResponse struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` -} - -// FileServiceItems ... -type FileServiceItems struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of file services returned. - Value *[]FileServiceProperties `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileServiceItems. -func (fsi FileServiceItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// FileServiceProperties the properties of File services in storage account. -type FileServiceProperties struct { - autorest.Response `json:"-"` - // FileServicePropertiesProperties - The properties of File services in storage account. - *FileServicePropertiesProperties `json:"properties,omitempty"` - // Sku - READ-ONLY; Sku name and tier. - Sku *Sku `json:"sku,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileServiceProperties. -func (fsp FileServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fsp.FileServicePropertiesProperties != nil { - objectMap["properties"] = fsp.FileServicePropertiesProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FileServiceProperties struct. -func (fsp *FileServiceProperties) 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 fileServiceProperties FileServicePropertiesProperties - err = json.Unmarshal(*v, &fileServiceProperties) - if err != nil { - return err - } - fsp.FileServicePropertiesProperties = &fileServiceProperties - } - case "sku": - if v != nil { - var sku Sku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - fsp.Sku = &sku - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fsp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fsp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fsp.Type = &typeVar - } - } - } - - return nil -} - -// FileServicePropertiesProperties the properties of File services in storage account. -type FileServicePropertiesProperties struct { - // Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. - Cors *CorsRules `json:"cors,omitempty"` - // ShareDeleteRetentionPolicy - The file service properties for share soft delete. - ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` -} - -// FileShare properties of the file share, including Id, resource name, resource type, Etag. -type FileShare struct { - autorest.Response `json:"-"` - // FileShareProperties - Properties of the file share. - *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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileShare. -func (fs FileShare) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fs.FileShareProperties != nil { - objectMap["properties"] = fs.FileShareProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FileShare struct. -func (fs *FileShare) 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 fileShareProperties FileShareProperties - err = json.Unmarshal(*v, &fileShareProperties) - if err != nil { - return err - } - fs.FileShareProperties = &fileShareProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fs.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fs.Type = &typeVar - } - } - } - - return nil -} - -// FileShareItem the file share properties be listed out. -type FileShareItem struct { - // FileShareProperties - The file share properties be listed out. - *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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileShareItem. -func (fsi FileShareItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fsi.FileShareProperties != nil { - objectMap["properties"] = fsi.FileShareProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FileShareItem struct. -func (fsi *FileShareItem) 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 fileShareProperties FileShareProperties - err = json.Unmarshal(*v, &fileShareProperties) - if err != nil { - return err - } - fsi.FileShareProperties = &fileShareProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fsi.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fsi.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fsi.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - fsi.Type = &typeVar - } - } - } - - return nil -} - -// FileShareItems response schema. Contains list of shares returned, and if paging is requested or -// required, a URL to next page of shares. -type FileShareItems struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of file shares returned. - Value *[]FileShareItem `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to query next page of shares. Returned when total number of requested shares exceed maximum page size. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileShareItems. -func (fsi FileShareItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// FileShareItemsIterator provides access to a complete listing of FileShareItem values. -type FileShareItemsIterator struct { - i int - page FileShareItemsPage -} - -// 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 *FileShareItemsIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileShareItemsIterator.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 *FileShareItemsIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter FileShareItemsIterator) 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 FileShareItemsIterator) Response() FileShareItems { - 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 FileShareItemsIterator) Value() FileShareItem { - if !iter.page.NotDone() { - return FileShareItem{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the FileShareItemsIterator type. -func NewFileShareItemsIterator(page FileShareItemsPage) FileShareItemsIterator { - return FileShareItemsIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(fsi.NextLink))) -} - -// FileShareItemsPage contains a page of FileShareItem values. -type FileShareItemsPage struct { - fn func(context.Context, FileShareItems) (FileShareItems, error) - fsi FileShareItems -} - -// 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 *FileShareItemsPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/FileShareItemsPage.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.fsi) - if err != nil { - return err - } - page.fsi = 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 *FileShareItemsPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page FileShareItemsPage) NotDone() bool { - return !page.fsi.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page FileShareItemsPage) Response() FileShareItems { - return page.fsi -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page FileShareItemsPage) Values() []FileShareItem { - if page.fsi.IsEmpty() { - return nil - } - return *page.fsi.Value -} - -// Creates a new instance of the FileShareItemsPage type. -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. -type FileShareProperties struct { - // LastModifiedTime - READ-ONLY; Returns the date and time the share was last modified. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // Metadata - A name-value pair to associate with the share as metadata. - Metadata map[string]*string `json:"metadata"` - // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. - ShareQuota *int32 `json:"shareQuota,omitempty"` - // EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS' - EnabledProtocols EnabledProtocols `json:"enabledProtocols,omitempty"` - // RootSquash - The property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash' - RootSquash RootSquashType `json:"rootSquash,omitempty"` - // Version - READ-ONLY; The version of the share. - Version *string `json:"version,omitempty"` - // Deleted - READ-ONLY; Indicates whether the share was deleted. - Deleted *bool `json:"deleted,omitempty"` - // DeletedTime - READ-ONLY; The deleted time if the share was deleted. - DeletedTime *date.Time `json:"deletedTime,omitempty"` - // RemainingRetentionDays - READ-ONLY; Remaining retention days for share that was soft deleted. - RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` - // AccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Possible values include: 'ShareAccessTierTransactionOptimized', 'ShareAccessTierHot', 'ShareAccessTierCool', 'ShareAccessTierPremium' - AccessTier ShareAccessTier `json:"accessTier,omitempty"` - // AccessTierChangeTime - READ-ONLY; Indicates the last modification time for share access tier. - AccessTierChangeTime *date.Time `json:"accessTierChangeTime,omitempty"` - // AccessTierStatus - READ-ONLY; Indicates if there is a pending transition for access tier. - AccessTierStatus *string `json:"accessTierStatus,omitempty"` - // ShareUsageBytes - READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. - ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty"` -} - -// MarshalJSON is the custom marshaler for FileShareProperties. -func (fsp FileShareProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fsp.Metadata != nil { - objectMap["metadata"] = fsp.Metadata - } - if fsp.ShareQuota != nil { - objectMap["shareQuota"] = fsp.ShareQuota - } - if fsp.EnabledProtocols != "" { - objectMap["enabledProtocols"] = fsp.EnabledProtocols - } - if fsp.RootSquash != "" { - objectMap["rootSquash"] = fsp.RootSquash - } - if fsp.AccessTier != "" { - objectMap["accessTier"] = fsp.AccessTier - } - return json.Marshal(objectMap) -} - -// GeoReplicationStats statistics related to replication for storage account's Blob, Table, Queue and File -// services. It is only available when geo-redundant replication is enabled for the storage account. -type GeoReplicationStats struct { - // Status - READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' - Status GeoReplicationStatus `json:"status,omitempty"` - // LastSyncTime - READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. - LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` - // CanFailover - READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. - CanFailover *bool `json:"canFailover,omitempty"` -} - -// MarshalJSON is the custom marshaler for GeoReplicationStats. -func (grs GeoReplicationStats) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Identity identity for the resource. -type Identity struct { - // PrincipalID - READ-ONLY; The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty"` - // TenantID - READ-ONLY; The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty"` - // Type - The identity type. - 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 { - autorest.Response `json:"-"` - // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. - *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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ImmutabilityPolicy. -func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if IP.ImmutabilityPolicyProperty != nil { - objectMap["properties"] = IP.ImmutabilityPolicyProperty - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicy struct. -func (IP *ImmutabilityPolicy) 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 immutabilityPolicyProperty ImmutabilityPolicyProperty - err = json.Unmarshal(*v, &immutabilityPolicyProperty) - if err != nil { - return err - } - IP.ImmutabilityPolicyProperty = &immutabilityPolicyProperty - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - IP.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - IP.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - IP.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - IP.Type = &typeVar - } - } - } - - return nil -} - -// ImmutabilityPolicyProperties the properties of an ImmutabilityPolicy of a blob container. -type ImmutabilityPolicyProperties struct { - // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. - *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - READ-ONLY; ImmutabilityPolicy Etag. - Etag *string `json:"etag,omitempty"` - // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. - UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` -} - -// MarshalJSON is the custom marshaler for ImmutabilityPolicyProperties. -func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ipp.ImmutabilityPolicyProperty != nil { - objectMap["properties"] = ipp.ImmutabilityPolicyProperty - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ImmutabilityPolicyProperties struct. -func (ipp *ImmutabilityPolicyProperties) 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 immutabilityPolicyProperty ImmutabilityPolicyProperty - err = json.Unmarshal(*v, &immutabilityPolicyProperty) - if err != nil { - return err - } - ipp.ImmutabilityPolicyProperty = &immutabilityPolicyProperty - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ipp.Etag = &etag - } - case "updateHistory": - if v != nil { - var updateHistory []UpdateHistoryProperty - err = json.Unmarshal(*v, &updateHistory) - if err != nil { - return err - } - ipp.UpdateHistory = &updateHistory - } - } - } - - return nil -} - -// ImmutabilityPolicyProperty the properties of an ImmutabilityPolicy of a blob container. -type ImmutabilityPolicyProperty struct { - // ImmutabilityPeriodSinceCreationInDays - The immutability period for the blobs in the container since the policy creation, in days. - ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` - // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' - State ImmutabilityPolicyState `json:"state,omitempty"` - // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,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 - } - if ipp.AllowProtectedAppendWrites != nil { - objectMap["allowProtectedAppendWrites"] = ipp.AllowProtectedAppendWrites - } - 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. - IPAddressOrRange *string `json:"value,omitempty"` - // Action - The action of IP ACL rule. Possible values include: 'Allow' - Action Action `json:"action,omitempty"` -} - -// KeyVaultProperties properties of key vault. -type KeyVaultProperties struct { - // KeyName - The name of KeyVault key. - KeyName *string `json:"keyname,omitempty"` - // KeyVersion - The version of KeyVault key. - KeyVersion *string `json:"keyversion,omitempty"` - // KeyVaultURI - The Uri of KeyVault. - KeyVaultURI *string `json:"keyvaulturi,omitempty"` - // CurrentVersionedKeyIdentifier - READ-ONLY; The object identifier of the current versioned Key Vault Key in use. - CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` - // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key. - LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` -} - -// MarshalJSON is the custom marshaler for KeyVaultProperties. -func (kvp KeyVaultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if kvp.KeyName != nil { - objectMap["keyname"] = kvp.KeyName - } - if kvp.KeyVersion != nil { - objectMap["keyversion"] = kvp.KeyVersion - } - if kvp.KeyVaultURI != nil { - objectMap["keyvaulturi"] = kvp.KeyVaultURI - } - return json.Marshal(objectMap) -} - -// LeaseContainerRequest lease Container request schema. -type LeaseContainerRequest struct { - // Action - Specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break' - Action Action1 `json:"action,omitempty"` - // LeaseID - Identifies the lease. Can be specified in any valid GUID string format. - LeaseID *string `json:"leaseId,omitempty"` - // BreakPeriod - Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. - BreakPeriod *int32 `json:"breakPeriod,omitempty"` - // LeaseDuration - Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. - LeaseDuration *int32 `json:"leaseDuration,omitempty"` - // ProposedLeaseID - Optional for acquire, required for change. Proposed lease ID, in a GUID string format. - ProposedLeaseID *string `json:"proposedLeaseId,omitempty"` -} - -// LeaseContainerResponse lease Container response schema. -type LeaseContainerResponse struct { - autorest.Response `json:"-"` - // LeaseID - Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease. - LeaseID *string `json:"leaseId,omitempty"` - // LeaseTimeSeconds - Approximate time remaining in the lease period, in seconds. - LeaseTimeSeconds *string `json:"leaseTimeSeconds,omitempty"` -} - -// LegalHold the LegalHold property of a blob container. -type LegalHold struct { - autorest.Response `json:"-"` - // 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. - HasLegalHold *bool `json:"hasLegalHold,omitempty"` - // Tags - Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. - 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. - HasLegalHold *bool `json:"hasLegalHold,omitempty"` - // Tags - The list of LegalHold tags of a blob container. - 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:"-"` - // AccountSasToken - READ-ONLY; List SAS credentials of storage account. - AccountSasToken *string `json:"accountSasToken,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListAccountSasResponse. -func (lasr ListAccountSasResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListContainerItem the blob container properties be listed out. -type ListContainerItem struct { - // ContainerProperties - The blob container properties be listed out. - *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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListContainerItem. -func (lci ListContainerItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lci.ContainerProperties != nil { - objectMap["properties"] = lci.ContainerProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ListContainerItem struct. -func (lci *ListContainerItem) 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 containerProperties ContainerProperties - err = json.Unmarshal(*v, &containerProperties) - if err != nil { - return err - } - lci.ContainerProperties = &containerProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lci.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lci.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lci.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lci.Type = &typeVar - } - } - } - - return nil -} - -// ListContainerItems response schema. Contains list of blobs returned, and if paging is requested or -// required, a URL to next page of containers. -type ListContainerItems struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of blobs containers returned. - Value *[]ListContainerItem `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers exceed maximum page size. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListContainerItems. -func (lci ListContainerItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListContainerItemsIterator provides access to a complete listing of ListContainerItem values. -type ListContainerItemsIterator struct { - i int - page ListContainerItemsPage -} - -// 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 *ListContainerItemsIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsIterator.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 *ListContainerItemsIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListContainerItemsIterator) 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 ListContainerItemsIterator) Response() ListContainerItems { - 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 ListContainerItemsIterator) Value() ListContainerItem { - if !iter.page.NotDone() { - return ListContainerItem{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListContainerItemsIterator type. -func NewListContainerItemsIterator(page ListContainerItemsPage) ListContainerItemsIterator { - return ListContainerItemsIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -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.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lci.NextLink))) -} - -// ListContainerItemsPage contains a page of ListContainerItem values. -type ListContainerItemsPage struct { - fn func(context.Context, ListContainerItems) (ListContainerItems, error) - lci ListContainerItems -} - -// 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 *ListContainerItemsPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsPage.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.lci) - if err != nil { - return err - } - page.lci = 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 *ListContainerItemsPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListContainerItemsPage) NotDone() bool { - return !page.lci.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListContainerItemsPage) Response() ListContainerItems { - return page.lci -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListContainerItemsPage) Values() []ListContainerItem { - if page.lci.IsEmpty() { - return nil - } - return *page.lci.Value -} - -// Creates a new instance of the ListContainerItemsPage type. -func NewListContainerItemsPage(cur ListContainerItems, getNextPage func(context.Context, ListContainerItems) (ListContainerItems, error)) ListContainerItemsPage { - return ListContainerItemsPage{ - fn: getNextPage, - lci: cur, - } -} - -// ListQueue ... -type ListQueue struct { - // ListQueueProperties - List Queue resource properties. - *ListQueueProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListQueue. -func (lq ListQueue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lq.ListQueueProperties != nil { - objectMap["properties"] = lq.ListQueueProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ListQueue struct. -func (lq *ListQueue) 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 queueProperties ListQueueProperties - err = json.Unmarshal(*v, &queueProperties) - if err != nil { - return err - } - lq.ListQueueProperties = &queueProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - lq.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - lq.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lq.Type = &typeVar - } - } - } - - return nil -} - -// ListQueueProperties ... -type ListQueueProperties struct { - // Metadata - A name-value pair that represents queue metadata. - Metadata map[string]*string `json:"metadata"` -} - -// MarshalJSON is the custom marshaler for ListQueueProperties. -func (lqp ListQueueProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lqp.Metadata != nil { - objectMap["metadata"] = lqp.Metadata - } - return json.Marshal(objectMap) -} - -// ListQueueResource response schema. Contains list of queues returned -type ListQueueResource struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of queues returned. - Value *[]ListQueue `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to list next page of queues - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListQueueResource. -func (lqr ListQueueResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListQueueResourceIterator provides access to a complete listing of ListQueue values. -type ListQueueResourceIterator struct { - i int - page ListQueueResourcePage -} - -// 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 *ListQueueResourceIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourceIterator.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 *ListQueueResourceIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListQueueResourceIterator) 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 ListQueueResourceIterator) Response() ListQueueResource { - 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 ListQueueResourceIterator) Value() ListQueue { - if !iter.page.NotDone() { - return ListQueue{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListQueueResourceIterator type. -func NewListQueueResourceIterator(page ListQueueResourcePage) ListQueueResourceIterator { - return ListQueueResourceIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lqr ListQueueResource) IsEmpty() bool { - return lqr.Value == nil || len(*lqr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lqr ListQueueResource) hasNextLink() bool { - return lqr.NextLink != nil && len(*lqr.NextLink) != 0 -} - -// listQueueResourcePreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lqr ListQueueResource) listQueueResourcePreparer(ctx context.Context) (*http.Request, error) { - if !lqr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lqr.NextLink))) -} - -// ListQueueResourcePage contains a page of ListQueue values. -type ListQueueResourcePage struct { - fn func(context.Context, ListQueueResource) (ListQueueResource, error) - lqr ListQueueResource -} - -// 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 *ListQueueResourcePage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourcePage.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.lqr) - if err != nil { - return err - } - page.lqr = 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 *ListQueueResourcePage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListQueueResourcePage) NotDone() bool { - return !page.lqr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListQueueResourcePage) Response() ListQueueResource { - return page.lqr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListQueueResourcePage) Values() []ListQueue { - if page.lqr.IsEmpty() { - return nil - } - return *page.lqr.Value -} - -// Creates a new instance of the ListQueueResourcePage type. -func NewListQueueResourcePage(cur ListQueueResource, getNextPage func(context.Context, ListQueueResource) (ListQueueResource, error)) ListQueueResourcePage { - return ListQueueResourcePage{ - fn: getNextPage, - lqr: cur, - } -} - -// ListQueueServices ... -type ListQueueServices struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of queue services returned. - Value *[]QueueServiceProperties `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListQueueServices. -func (lqs ListQueueServices) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListServiceSasResponse the List service SAS credentials operation response. -type ListServiceSasResponse struct { - autorest.Response `json:"-"` - // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. - ServiceSasToken *string `json:"serviceSasToken,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListServiceSasResponse. -func (lssr ListServiceSasResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListTableResource response schema. Contains list of tables returned -type ListTableResource struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of tables returned. - Value *[]Table `json:"value,omitempty"` - // NextLink - READ-ONLY; Request URL that can be used to query next page of tables - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListTableResource. -func (ltr ListTableResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ListTableResourceIterator provides access to a complete listing of Table values. -type ListTableResourceIterator struct { - i int - page ListTableResourcePage -} - -// 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 *ListTableResourceIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourceIterator.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 *ListTableResourceIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListTableResourceIterator) 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 ListTableResourceIterator) Response() ListTableResource { - 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 ListTableResourceIterator) Value() Table { - if !iter.page.NotDone() { - return Table{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ListTableResourceIterator type. -func NewListTableResourceIterator(page ListTableResourcePage) ListTableResourceIterator { - return ListTableResourceIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ltr ListTableResource) IsEmpty() bool { - return ltr.Value == nil || len(*ltr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ltr ListTableResource) hasNextLink() bool { - return ltr.NextLink != nil && len(*ltr.NextLink) != 0 -} - -// listTableResourcePreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ltr ListTableResource) listTableResourcePreparer(ctx context.Context) (*http.Request, error) { - if !ltr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ltr.NextLink))) -} - -// ListTableResourcePage contains a page of Table values. -type ListTableResourcePage struct { - fn func(context.Context, ListTableResource) (ListTableResource, error) - ltr ListTableResource -} - -// 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 *ListTableResourcePage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourcePage.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.ltr) - if err != nil { - return err - } - page.ltr = 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 *ListTableResourcePage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListTableResourcePage) NotDone() bool { - return !page.ltr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListTableResourcePage) Response() ListTableResource { - return page.ltr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListTableResourcePage) Values() []Table { - if page.ltr.IsEmpty() { - return nil - } - return *page.ltr.Value -} - -// Creates a new instance of the ListTableResourcePage type. -func NewListTableResourcePage(cur ListTableResource, getNextPage func(context.Context, ListTableResource) (ListTableResource, error)) ListTableResourcePage { - return ListTableResourcePage{ - fn: getNextPage, - ltr: cur, - } -} - -// ListTableServices ... -type ListTableServices struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; List of table services returned. - Value *[]TableServiceProperties `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for ListTableServices. -func (lts ListTableServices) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// ManagementPolicy the Get Storage Account ManagementPolicies operation response. -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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ManagementPolicy. -func (mp ManagementPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mp.ManagementPolicyProperties != nil { - objectMap["properties"] = mp.ManagementPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ManagementPolicy struct. -func (mp *ManagementPolicy) 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 managementPolicyProperties ManagementPolicyProperties - err = json.Unmarshal(*v, &managementPolicyProperties) - if err != nil { - return err - } - mp.ManagementPolicyProperties = &managementPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - mp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - mp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - mp.Type = &typeVar - } - } - } - - return nil -} - -// ManagementPolicyAction actions are applied to the filtered blobs when the execution condition is met. -type ManagementPolicyAction struct { - // BaseBlob - The management policy action for base blob - BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` - // Snapshot - The management policy action for snapshot - Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` -} - -// ManagementPolicyBaseBlob management policy action for base blob. -type ManagementPolicyBaseBlob struct { - // TierToCool - The function to tier blobs to cool storage. Support blobs currently at Hot tier - TierToCool *DateAfterModification `json:"tierToCool,omitempty"` - // TierToArchive - The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier - TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` - // Delete - The function to delete the blob - Delete *DateAfterModification `json:"delete,omitempty"` -} - -// ManagementPolicyDefinition an object that defines the Lifecycle rule. Each definition is made up with a -// filters set and an actions set. -type ManagementPolicyDefinition struct { - // Actions - An object that defines the action set. - Actions *ManagementPolicyAction `json:"actions,omitempty"` - // Filters - An object that defines the filter set. - Filters *ManagementPolicyFilter `json:"filters,omitempty"` -} - -// ManagementPolicyFilter filters limit rule actions to a subset of blobs within the storage account. If -// multiple filters are defined, a logical AND is performed on all filters. -type ManagementPolicyFilter struct { - // PrefixMatch - An array of strings for prefixes to be match. - PrefixMatch *[]string `json:"prefixMatch,omitempty"` - // BlobTypes - An array of predefined enum values. Only blockBlob is supported. - BlobTypes *[]string `json:"blobTypes,omitempty"` - // BlobIndexMatch - An array of blob index tag based filters, there can be at most 10 tag filters - BlobIndexMatch *[]TagFilter `json:"blobIndexMatch,omitempty"` -} - -// ManagementPolicyProperties the Storage Account ManagementPolicy properties. -type ManagementPolicyProperties struct { - // LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // Policy - The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - 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. - Enabled *bool `json:"enabled,omitempty"` - // Name - A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. - Name *string `json:"name,omitempty"` - // Type - The valid value is Lifecycle - Type *string `json:"type,omitempty"` - // Definition - An object that defines the Lifecycle rule. - Definition *ManagementPolicyDefinition `json:"definition,omitempty"` -} - -// ManagementPolicySchema the Storage Account ManagementPolicies Rules. See more details in: -// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. -type ManagementPolicySchema struct { - // Rules - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - Rules *[]ManagementPolicyRule `json:"rules,omitempty"` -} - -// ManagementPolicySnapShot management policy action for snapshot. -type ManagementPolicySnapShot struct { - // Delete - The function to delete the blob snapshot - Delete *DateAfterCreation `json:"delete,omitempty"` -} - -// MetricSpecification metric specification of operation. -type MetricSpecification struct { - // Name - Name of metric specification. - Name *string `json:"name,omitempty"` - // DisplayName - Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` - // DisplayDescription - Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` - // Unit - Unit could be Bytes or Count. - Unit *string `json:"unit,omitempty"` - // Dimensions - Dimensions of blobs, including blob type and access tier. - Dimensions *[]Dimension `json:"dimensions,omitempty"` - // AggregationType - Aggregation type could be Average. - AggregationType *string `json:"aggregationType,omitempty"` - // FillGapWithZero - The property to decide fill gap with zero or not. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - // Category - The category this metric specification belong to, could be Capacity. - Category *string `json:"category,omitempty"` - // ResourceIDDimensionNameOverride - Account Resource Id. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` -} - -// NetworkRuleSet network rule set -type NetworkRuleSet struct { - // Bypass - Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices' - Bypass Bypass `json:"bypass,omitempty"` - // VirtualNetworkRules - Sets the virtual network rules - VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` - // IPRules - Sets the IP ACL rules - IPRules *[]IPRule `json:"ipRules,omitempty"` - // DefaultAction - Specifies the default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' - DefaultAction DefaultAction `json:"defaultAction,omitempty"` -} - -// ObjectReplicationPolicies list storage account object replication policies. -type ObjectReplicationPolicies struct { - autorest.Response `json:"-"` - // Value - The replication policy between two storage accounts. - Value *[]ObjectReplicationPolicy `json:"value,omitempty"` -} - -// ObjectReplicationPolicy the replication policy between two storage accounts. Multiple rules can be -// defined in one policy. -type ObjectReplicationPolicy struct { - autorest.Response `json:"-"` - // ObjectReplicationPolicyProperties - Returns the Storage Account Object Replication Policy. - *ObjectReplicationPolicyProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ObjectReplicationPolicy. -func (orp ObjectReplicationPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if orp.ObjectReplicationPolicyProperties != nil { - objectMap["properties"] = orp.ObjectReplicationPolicyProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ObjectReplicationPolicy struct. -func (orp *ObjectReplicationPolicy) 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 objectReplicationPolicyProperties ObjectReplicationPolicyProperties - err = json.Unmarshal(*v, &objectReplicationPolicyProperties) - if err != nil { - return err - } - orp.ObjectReplicationPolicyProperties = &objectReplicationPolicyProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - orp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - orp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - orp.Type = &typeVar - } - } - } - - return nil -} - -// ObjectReplicationPolicyFilter filters limit replication to a subset of blobs within the storage account. -// A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is -// performed on all filters. -type ObjectReplicationPolicyFilter struct { - // PrefixMatch - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. - PrefixMatch *[]string `json:"prefixMatch,omitempty"` - // MinCreationTime - Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z - MinCreationTime *string `json:"minCreationTime,omitempty"` -} - -// ObjectReplicationPolicyProperties the Storage Account ObjectReplicationPolicy properties. -type ObjectReplicationPolicyProperties struct { - // PolicyID - READ-ONLY; A unique id for object replication policy. - PolicyID *string `json:"policyId,omitempty"` - // EnabledTime - READ-ONLY; Indicates when the policy is enabled on the source account. - EnabledTime *date.Time `json:"enabledTime,omitempty"` - // SourceAccount - Required. Source account name. - SourceAccount *string `json:"sourceAccount,omitempty"` - // DestinationAccount - Required. Destination account name. - DestinationAccount *string `json:"destinationAccount,omitempty"` - // Rules - The storage account object replication rules. - Rules *[]ObjectReplicationPolicyRule `json:"rules,omitempty"` -} - -// MarshalJSON is the custom marshaler for ObjectReplicationPolicyProperties. -func (orpp ObjectReplicationPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if orpp.SourceAccount != nil { - objectMap["sourceAccount"] = orpp.SourceAccount - } - if orpp.DestinationAccount != nil { - objectMap["destinationAccount"] = orpp.DestinationAccount - } - if orpp.Rules != nil { - objectMap["rules"] = orpp.Rules - } - return json.Marshal(objectMap) -} - -// ObjectReplicationPolicyRule the replication policy rule between two containers. -type ObjectReplicationPolicyRule struct { - // RuleID - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. - RuleID *string `json:"ruleId,omitempty"` - // SourceContainer - Required. Source container name. - SourceContainer *string `json:"sourceContainer,omitempty"` - // DestinationContainer - Required. Destination container name. - DestinationContainer *string `json:"destinationContainer,omitempty"` - // Filters - Optional. An object that defines the filter set. - Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"` -} - -// Operation storage REST API operation definition. -type Operation struct { - // Name - Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - // Display - Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - The origin of operations. - Origin *string `json:"origin,omitempty"` - // OperationProperties - Properties of operation, include metric specifications. - *OperationProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if o.Name != nil { - objectMap["name"] = o.Name - } - if o.Display != nil { - objectMap["display"] = o.Display - } - if o.Origin != nil { - objectMap["origin"] = o.Origin - } - if o.OperationProperties != nil { - objectMap["properties"] = o.OperationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Operation struct. -func (o *Operation) 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 - } - o.Name = &name - } - case "display": - if v != nil { - var display OperationDisplay - err = json.Unmarshal(*v, &display) - if err != nil { - return err - } - o.Display = &display - } - case "origin": - if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) - if err != nil { - return err - } - o.Origin = &origin - } - case "properties": - if v != nil { - var operationProperties OperationProperties - err = json.Unmarshal(*v, &operationProperties) - if err != nil { - return err - } - o.OperationProperties = &operationProperties - } - } - } - - return nil -} - -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - Service provider: Microsoft Storage. - Provider *string `json:"provider,omitempty"` - // Resource - Resource on which the operation is performed etc. - Resource *string `json:"resource,omitempty"` - // Operation - Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - // Description - Description of the operation. - Description *string `json:"description,omitempty"` -} - -// OperationListResult result of the request to list Storage operations. It contains a list of operations -// and a URL link to get the next set of results. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - List of Storage operations supported by the Storage resource provider. - Value *[]Operation `json:"value,omitempty"` -} - -// OperationProperties properties of operation, include metric specifications. -type OperationProperties struct { - // ServiceSpecification - One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// PrivateEndpoint the Private Endpoint resource. -type PrivateEndpoint struct { - // ID - READ-ONLY; The ARM identifier for Private Endpoint - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpoint. -func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateEndpointConnection the Private Endpoint Connection resource. -type PrivateEndpointConnection struct { - autorest.Response `json:"-"` - // PrivateEndpointConnectionProperties - Resource properties. - *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateEndpointConnection. -func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pec.PrivateEndpointConnectionProperties != nil { - objectMap["properties"] = pec.PrivateEndpointConnectionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. -func (pec *PrivateEndpointConnection) 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 privateEndpointConnectionProperties PrivateEndpointConnectionProperties - err = json.Unmarshal(*v, &privateEndpointConnectionProperties) - if err != nil { - return err - } - pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pec.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pec.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pec.Type = &typeVar - } - } - } - - return nil -} - -// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified -// storage account -type PrivateEndpointConnectionListResult struct { - autorest.Response `json:"-"` - // Value - Array of private endpoint connections - Value *[]PrivateEndpointConnection `json:"value,omitempty"` -} - -// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // PrivateEndpoint - The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' - ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} - -// PrivateLinkResource a private link resource -type PrivateLinkResource struct { - // PrivateLinkResourceProperties - Resource properties. - *PrivateLinkResourceProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateLinkResource. -func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if plr.PrivateLinkResourceProperties != nil { - objectMap["properties"] = plr.PrivateLinkResourceProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct. -func (plr *PrivateLinkResource) 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 privateLinkResourceProperties PrivateLinkResourceProperties - err = json.Unmarshal(*v, &privateLinkResourceProperties) - if err != nil { - return err - } - plr.PrivateLinkResourceProperties = &privateLinkResourceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - plr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - plr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - plr.Type = &typeVar - } - } - } - - return nil -} - -// PrivateLinkResourceListResult a list of private link resources -type PrivateLinkResourceListResult struct { - autorest.Response `json:"-"` - // Value - Array of private link resources - Value *[]PrivateLinkResource `json:"value,omitempty"` -} - -// PrivateLinkResourceProperties properties of a private link resource. -type PrivateLinkResourceProperties struct { - // GroupID - READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty"` - // RequiredMembers - READ-ONLY; The private link resource required member names. - RequiredMembers *[]string `json:"requiredMembers,omitempty"` - // RequiredZoneNames - The private link resource Private link DNS zone name. - 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 { - // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected' - Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` - // Description - The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` - // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer. - ActionRequired *string `json:"actionRequired,omitempty"` -} - -// 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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Queue ... -type Queue struct { - autorest.Response `json:"-"` - // QueueProperties - Queue resource properties. - *QueueProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Queue. -func (q Queue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if q.QueueProperties != nil { - objectMap["properties"] = q.QueueProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Queue struct. -func (q *Queue) 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 queueProperties QueueProperties - err = json.Unmarshal(*v, &queueProperties) - if err != nil { - return err - } - q.QueueProperties = &queueProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - q.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - q.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - q.Type = &typeVar - } - } - } - - return nil -} - -// QueueProperties ... -type QueueProperties struct { - // Metadata - A name-value pair that represents queue metadata. - Metadata map[string]*string `json:"metadata"` - // ApproximateMessageCount - READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher. - ApproximateMessageCount *int32 `json:"approximateMessageCount,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueueProperties. -func (qp QueueProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qp.Metadata != nil { - objectMap["metadata"] = qp.Metadata - } - return json.Marshal(objectMap) -} - -// QueueServiceProperties the properties of a storage account’s Queue service. -type QueueServiceProperties struct { - autorest.Response `json:"-"` - // QueueServicePropertiesProperties - The properties of a storage account’s Queue service. - *QueueServicePropertiesProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for QueueServiceProperties. -func (qsp QueueServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if qsp.QueueServicePropertiesProperties != nil { - objectMap["properties"] = qsp.QueueServicePropertiesProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for QueueServiceProperties struct. -func (qsp *QueueServiceProperties) 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 queueServiceProperties QueueServicePropertiesProperties - err = json.Unmarshal(*v, &queueServiceProperties) - if err != nil { - return err - } - qsp.QueueServicePropertiesProperties = &queueServiceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - qsp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - qsp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - qsp.Type = &typeVar - } - } - } - - return nil -} - -// QueueServicePropertiesProperties the properties of a storage account’s Queue service. -type QueueServicePropertiesProperties struct { - // Cors - Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. - Cors *CorsRules `json:"cors,omitempty"` -} - -// 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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// RestorePolicyProperties the blob service properties for blob restore policy -type RestorePolicyProperties struct { - // Enabled - Blob restore is enabled if set to true. - Enabled *bool `json:"enabled,omitempty"` - // Days - how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. - Days *int32 `json:"days,omitempty"` - // LastEnabledTime - READ-ONLY; Deprecated in favor of minRestoreTime property. - LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` - // MinRestoreTime - READ-ONLY; Returns the minimum date and time that the restore can be started. - MinRestoreTime *date.Time `json:"minRestoreTime,omitempty"` -} - -// MarshalJSON is the custom marshaler for RestorePolicyProperties. -func (rpp RestorePolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rpp.Enabled != nil { - objectMap["enabled"] = rpp.Enabled - } - if rpp.Days != nil { - objectMap["days"] = rpp.Days - } - return json.Marshal(objectMap) -} - -// Restriction the restriction because of which SKU cannot be used. -type Restriction struct { - // Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location. - Type *string `json:"type,omitempty"` - // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - Values *[]string `json:"values,omitempty"` - // ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. Possible values include: 'QuotaID', 'NotAvailableForSubscription' - 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) -} - -// RoutingPreference routing preference defines the type of network, either microsoft or internet routing -// to be used to deliver the user data, the default option is microsoft routing -type RoutingPreference struct { - // RoutingChoice - Routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting' - RoutingChoice RoutingChoice `json:"routingChoice,omitempty"` - // PublishMicrosoftEndpoints - A boolean flag which indicates whether microsoft routing storage endpoints are to be published - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` - // PublishInternetEndpoints - A boolean flag which indicates whether internet routing storage endpoints are to be published - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` -} - -// ServiceSasParameters the parameters to list service SAS credentials of a specific resource. -type ServiceSasParameters struct { - // CanonicalizedResource - The canonical path to the signed resource. - CanonicalizedResource *string `json:"canonicalizedResource,omitempty"` - // Resource - The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'SignedResourceB', 'SignedResourceC', 'SignedResourceF', 'SignedResourceS' - Resource SignedResource `json:"signedResource,omitempty"` - // Permissions - The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'R', 'D', 'W', 'L', 'A', 'C', 'U', 'P' - Permissions Permissions `json:"signedPermission,omitempty"` - // IPAddressOrRange - An IP address or a range of IP addresses from which to accept requests. - IPAddressOrRange *string `json:"signedIp,omitempty"` - // Protocols - The protocol permitted for a request made with the account SAS. Possible values include: 'Httpshttp', 'HTTPS' - Protocols HTTPProtocol `json:"signedProtocol,omitempty"` - // SharedAccessStartTime - The time at which the SAS becomes valid. - SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` - // SharedAccessExpiryTime - The time at which the shared access signature becomes invalid. - SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` - // Identifier - A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. - Identifier *string `json:"signedIdentifier,omitempty"` - // PartitionKeyStart - The start of partition key. - PartitionKeyStart *string `json:"startPk,omitempty"` - // PartitionKeyEnd - The end of partition key. - PartitionKeyEnd *string `json:"endPk,omitempty"` - // RowKeyStart - The start of row key. - RowKeyStart *string `json:"startRk,omitempty"` - // RowKeyEnd - The end of row key. - RowKeyEnd *string `json:"endRk,omitempty"` - // KeyToSign - The key to sign the account SAS token with. - KeyToSign *string `json:"keyToSign,omitempty"` - // CacheControl - The response header override for cache control. - CacheControl *string `json:"rscc,omitempty"` - // ContentDisposition - The response header override for content disposition. - ContentDisposition *string `json:"rscd,omitempty"` - // ContentEncoding - The response header override for content encoding. - ContentEncoding *string `json:"rsce,omitempty"` - // ContentLanguage - The response header override for content language. - ContentLanguage *string `json:"rscl,omitempty"` - // ContentType - The response header override for content type. - ContentType *string `json:"rsct,omitempty"` -} - -// ServiceSpecification one property of operation, include metric specifications. -type ServiceSpecification struct { - // MetricSpecifications - Metric specifications of operation. - MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// Sku the SKU of the storage account. -type Sku struct { - // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' - Name SkuName `json:"name,omitempty"` - // Tier - Possible values include: 'Standard', 'Premium' - Tier SkuTier `json:"tier,omitempty"` -} - -// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, -// change notification, etc. -type SKUCapability struct { - // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. - Value *string `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for SKUCapability. -func (sc SKUCapability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SkuInformation storage SKU and its properties -type SkuInformation struct { - // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' - Name SkuName `json:"name,omitempty"` - // Tier - Possible values include: 'Standard', 'Premium' - Tier SkuTier `json:"tier,omitempty"` - // ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'. - ResourceType *string `json:"resourceType,omitempty"` - // Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' - Kind Kind `json:"kind,omitempty"` - // Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). - Locations *[]string `json:"locations,omitempty"` - // Capabilities - READ-ONLY; The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. - Capabilities *[]SKUCapability `json:"capabilities,omitempty"` - // Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions *[]Restriction `json:"restrictions,omitempty"` -} - -// MarshalJSON is the custom marshaler for SkuInformation. -func (si SkuInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if si.Name != "" { - objectMap["name"] = si.Name - } - if si.Tier != "" { - objectMap["tier"] = si.Tier - } - if si.Restrictions != nil { - objectMap["restrictions"] = si.Restrictions - } - return json.Marshal(objectMap) -} - -// SkuListResult the response from the List Storage SKUs operation. -type SkuListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Get the list result of storage SKUs and their properties. - Value *[]SkuInformation `json:"value,omitempty"` -} - -// MarshalJSON is the custom marshaler for SkuListResult. -func (slr SkuListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Table properties of the table, including Id, resource name, resource type. -type Table struct { - autorest.Response `json:"-"` - // TableProperties - Table resource properties. - *TableProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Table. -func (t Table) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if t.TableProperties != nil { - objectMap["properties"] = t.TableProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Table struct. -func (t *Table) 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 tableProperties TableProperties - err = json.Unmarshal(*v, &tableProperties) - if err != nil { - return err - } - t.TableProperties = &tableProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - t.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - t.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - t.Type = &typeVar - } - } - } - - return nil -} - -// TableProperties ... -type TableProperties struct { - // TableName - READ-ONLY; Table name under the specified account - TableName *string `json:"tableName,omitempty"` -} - -// MarshalJSON is the custom marshaler for TableProperties. -func (tp TableProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// TableServiceProperties the properties of a storage account’s Table service. -type TableServiceProperties struct { - autorest.Response `json:"-"` - // TableServicePropertiesProperties - The properties of a storage account’s Table service. - *TableServicePropertiesProperties `json:"properties,omitempty"` - // 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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TableServiceProperties. -func (tsp TableServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tsp.TableServicePropertiesProperties != nil { - objectMap["properties"] = tsp.TableServicePropertiesProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for TableServiceProperties struct. -func (tsp *TableServiceProperties) 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 tableServiceProperties TableServicePropertiesProperties - err = json.Unmarshal(*v, &tableServiceProperties) - if err != nil { - return err - } - tsp.TableServicePropertiesProperties = &tableServiceProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - tsp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - tsp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - tsp.Type = &typeVar - } - } - } - - return nil -} - -// TableServicePropertiesProperties the properties of a storage account’s Table service. -type TableServicePropertiesProperties struct { - // Cors - Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service. - Cors *CorsRules `json:"cors,omitempty"` -} - -// TagFilter blob index tag based filtering for blob objects -type TagFilter struct { - // Name - This is the filter tag name, it can have 1 - 128 characters - Name *string `json:"name,omitempty"` - // Op - This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported - Op *string `json:"op,omitempty"` - // Value - This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters - Value *string `json:"value,omitempty"` -} - -// TagProperty a tag of the LegalHold of a blob container. -type TagProperty struct { - // Tag - READ-ONLY; The tag value. - Tag *string `json:"tag,omitempty"` - // Timestamp - READ-ONLY; Returns the date and time the tag was added. - Timestamp *date.Time `json:"timestamp,omitempty"` - // ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who added the tag. - ObjectIdentifier *string `json:"objectIdentifier,omitempty"` - // TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who added the tag. - TenantID *string `json:"tenantId,omitempty"` - // Upn - READ-ONLY; Returns the User Principal Name of the user who added the tag. - Upn *string `json:"upn,omitempty"` -} - -// MarshalJSON is the custom marshaler for TagProperty. -func (tp TagProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// 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 *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. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - if tr.Location != nil { - objectMap["location"] = tr.Location - } - return json.Marshal(objectMap) -} - -// UpdateHistoryProperty an update history of the ImmutabilityPolicy of a blob container. -type UpdateHistoryProperty struct { - // Update - READ-ONLY; The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'Put', 'Lock', 'Extend' - Update ImmutabilityPolicyUpdateType `json:"update,omitempty"` - // ImmutabilityPeriodSinceCreationInDays - READ-ONLY; The immutability period for the blobs in the container since the policy creation, in days. - ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` - // Timestamp - READ-ONLY; Returns the date and time the ImmutabilityPolicy was updated. - Timestamp *date.Time `json:"timestamp,omitempty"` - // ObjectIdentifier - READ-ONLY; Returns the Object ID of the user who updated the ImmutabilityPolicy. - ObjectIdentifier *string `json:"objectIdentifier,omitempty"` - // TenantID - READ-ONLY; Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. - TenantID *string `json:"tenantId,omitempty"` - // Upn - READ-ONLY; Returns the User Principal Name of the user who updated the ImmutabilityPolicy. - Upn *string `json:"upn,omitempty"` -} - -// MarshalJSON is the custom marshaler for UpdateHistoryProperty. -func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Usage describes Storage Resource Usage. -type Usage struct { - // Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond' - Unit UsageUnit `json:"unit,omitempty"` - // CurrentValue - READ-ONLY; Gets the current count of the allocated resources in the subscription. - CurrentValue *int32 `json:"currentValue,omitempty"` - // Limit - READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription. - Limit *int32 `json:"limit,omitempty"` - // Name - READ-ONLY; Gets the name of the type of usage. - Name *UsageName `json:"name,omitempty"` -} - -// MarshalJSON is the custom marshaler for Usage. -func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UsageListResult the response from the List Usages operation. -type UsageListResult struct { - autorest.Response `json:"-"` - // Value - Gets or sets the list of Storage Resource Usages. - Value *[]Usage `json:"value,omitempty"` -} - -// UsageName the usage names that can be used; currently limited to StorageAccount. -type UsageName struct { - // Value - READ-ONLY; Gets a string describing the resource name. - Value *string `json:"value,omitempty"` - // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// MarshalJSON is the custom marshaler for UsageName. -func (un UsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// VirtualNetworkRule virtual Network rule. -type VirtualNetworkRule struct { - // VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - VirtualNetworkResourceID *string `json:"id,omitempty"` - // Action - The action of virtual network rule. Possible values include: 'Allow' - Action Action `json:"action,omitempty"` - // State - Gets the state of virtual network rule. Possible values include: 'StateProvisioning', 'StateDeprovisioning', 'StateSucceeded', 'StateFailed', 'StateNetworkSourceDeleted' - State State `json:"state,omitempty"` -} diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go deleted file mode 100644 index 4889447a5b12..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go +++ /dev/null @@ -1,417 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// ObjectReplicationPoliciesClient is the the Azure Storage Management API. -type ObjectReplicationPoliciesClient struct { - BaseClient -} - -// NewObjectReplicationPoliciesClient creates an instance of the ObjectReplicationPoliciesClient client. -func NewObjectReplicationPoliciesClient(subscriptionID string) ObjectReplicationPoliciesClient { - return NewObjectReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewObjectReplicationPoliciesClientWithBaseURI creates an instance of the ObjectReplicationPoliciesClient 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 NewObjectReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ObjectReplicationPoliciesClient { - return ObjectReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update the object replication policy of the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. -// properties - the object replication policy set to a storage account. A unique policy ID will be created if -// absent. -func (client ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (result ObjectReplicationPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.CreateOrUpdate") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: objectReplicationPolicyID, - Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: properties, - Constraints: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties.SourceAccount", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ObjectReplicationPolicyProperties.DestinationAccount", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID, properties) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ObjectReplicationPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", pathParameters), - autorest.WithJSON(properties), - 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 ObjectReplicationPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ObjectReplicationPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the object replication policy associated with the specified storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. -func (client ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: objectReplicationPolicyID, - Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ObjectReplicationPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", 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 ObjectReplicationPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ObjectReplicationPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get the object replication policy of the storage account by policy ID. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. -func (client ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result ObjectReplicationPolicy, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: objectReplicationPolicyID, - Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ObjectReplicationPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) GetResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list the object replication policies associated with the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client ObjectReplicationPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ObjectReplicationPolicies, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ObjectReplicationPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies", 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) ListResponder(resp *http.Response) (result ObjectReplicationPolicies, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go deleted file mode 100644 index df3d803f11d9..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go +++ /dev/null @@ -1,98 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the the Azure Storage Management API. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available Storage Rest API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Storage/operations"), - 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go deleted file mode 100644 index f8a170017618..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go +++ /dev/null @@ -1,411 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// PrivateEndpointConnectionsClient is the the Azure Storage Management API. -type PrivateEndpointConnectionsClient struct { - BaseClient -} - -// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. -func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { - return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient 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 NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { - return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Delete deletes the specified private endpoint connection associated with the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure -// resource -func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the specified private endpoint connection associated with the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure -// resource -func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) 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 PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all the private endpoint connections associated with the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result PrivateEndpointConnectionListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/privateEndpointConnections", 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 PrivateEndpointConnectionsClient) 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 PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Put update the state of specified private endpoint connection associated with the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure -// resource -// properties - the private endpoint connection properties. -func (client PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Put") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: properties, - Constraints: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Put", err.Error()) - } - - req, err := client.PutPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName, properties) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", nil, "Failure preparing request") - return - } - - resp, err := client.PutSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", resp, "Failure sending request") - return - } - - result, err = client.PutResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", resp, "Failure responding to request") - return - } - - return -} - -// PutPreparer prepares the Put request. -func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), - autorest.WithJSON(properties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PutSender sends the Put request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateEndpointConnectionsClient) PutSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// PutResponder handles the response to the Put request. The method always -// closes the http.Response Body. -func (client PrivateEndpointConnectionsClient) PutResponder(resp *http.Response) (result PrivateEndpointConnection, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go deleted file mode 100644 index baff8333a779..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go +++ /dev/null @@ -1,124 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// PrivateLinkResourcesClient is the the Azure Storage Management API. -type PrivateLinkResourcesClient struct { - BaseClient -} - -// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client. -func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { - return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient 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 NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { - return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByStorageAccount gets the private link resources that need to be created for a storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, resourceGroupName string, accountName string) (result PrivateLinkResourceListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByStorageAccount") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.PrivateLinkResourcesClient", "ListByStorageAccount", err.Error()) - } - - req, err := client.ListByStorageAccountPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", nil, "Failure preparing request") - return - } - - resp, err := client.ListByStorageAccountSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", resp, "Failure sending request") - return - } - - result, err = client.ListByStorageAccountResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", resp, "Failure responding to request") - return - } - - return -} - -// ListByStorageAccountPreparer prepares the ListByStorageAccount request. -func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/privateLinkResources", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByStorageAccountSender sends the ListByStorageAccount request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateLinkResourcesClient) ListByStorageAccountSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByStorageAccountResponder handles the response to the ListByStorageAccount request. The method always -// closes the http.Response Body. -func (client PrivateLinkResourcesClient) ListByStorageAccountResponder(resp *http.Response) (result PrivateLinkResourceListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go deleted file mode 100644 index b002fcf81c72..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go +++ /dev/null @@ -1,571 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// QueueClient is the the Azure Storage Management API. -type QueueClient struct { - BaseClient -} - -// NewQueueClient creates an instance of the QueueClient client. -func NewQueueClient(subscriptionID string) QueueClient { - return NewQueueClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewQueueClientWithBaseURI creates an instance of the QueueClient 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 NewQueueClientWithBaseURI(baseURI string, subscriptionID string) QueueClient { - return QueueClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a new queue with the specified queue name, under the specified account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an -// alphanumeric character and it cannot have two consecutive dash(-) characters. -// queue - queue properties and metadata to be created with -func (client QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Create") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, queueName, queue) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client QueueClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueName": autorest.Encode("path", queueName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), - autorest.WithJSON(queue), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client QueueClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client QueueClient) CreateResponder(resp *http.Response) (result Queue, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the queue with the specified queue name, under the specified account if it exists. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an -// alphanumeric character and it cannot have two consecutive dash(-) characters. -func (client QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, queueName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client QueueClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueName": autorest.Encode("path", queueName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", 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 QueueClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client QueueClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the queue with the specified queue name, under the specified account if it exists. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an -// alphanumeric character and it cannot have two consecutive dash(-) characters. -func (client QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result Queue, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, queueName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client QueueClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueName": autorest.Encode("path", queueName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", 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 QueueClient) 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 QueueClient) GetResponder(resp *http.Response) (result Queue, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all the queues under the specified storage account -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// maxpagesize - optional, a maximum number of queues that should be included in a list queue response -// filter - optional, When specified, only the queues with a name starting with the given filter will be -// listed. -func (client QueueClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourcePage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.List") - defer func() { - sc := -1 - if result.lqr.Response.Response != nil { - sc = result.lqr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.lqr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure sending request") - return - } - - result.lqr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure responding to request") - return - } - if result.lqr.hasNextLink() && result.lqr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client QueueClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(maxpagesize) > 0 { - queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues", 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 QueueClient) 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 QueueClient) ListResponder(resp *http.Response) (result ListQueueResource, 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 QueueClient) listNextResults(ctx context.Context, lastResults ListQueueResource) (result ListQueueResource, err error) { - req, err := lastResults.listQueueResourcePreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.QueueClient", "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, "storage.QueueClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client QueueClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourceIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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, accountName, maxpagesize, filter) - return -} - -// Update creates a new queue with the specified queue name, under the specified account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an -// alphanumeric character and it cannot have two consecutive dash(-) characters. -// queue - queue properties and metadata to be created with -func (client QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Update") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, queueName, queue) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client QueueClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueName": autorest.Encode("path", queueName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), - autorest.WithJSON(queue), - 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 QueueClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client QueueClient) UpdateResponder(resp *http.Response) (result Queue, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go deleted file mode 100644 index 8a1160036a92..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go +++ /dev/null @@ -1,313 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// QueueServicesClient is the the Azure Storage Management API. -type QueueServicesClient struct { - BaseClient -} - -// NewQueueServicesClient creates an instance of the QueueServicesClient client. -func NewQueueServicesClient(subscriptionID string) QueueServicesClient { - return NewQueueServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewQueueServicesClientWithBaseURI creates an instance of the QueueServicesClient 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 NewQueueServicesClientWithBaseURI(baseURI string, subscriptionID string) QueueServicesClient { - return QueueServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// GetServiceProperties gets the properties of a storage account’s Queue service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result QueueServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.GetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueServicesClient", "GetServiceProperties", err.Error()) - } - - req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.GetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.GetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// GetServicePropertiesPreparer prepares the GetServiceProperties request. -func (client QueueServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueServiceName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client QueueServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always -// closes the http.Response Body. -func (client QueueServicesClient) GetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all queue services for the storage account -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListQueueServices, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueServicesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client QueueServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices", 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 QueueServicesClient) 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 QueueServicesClient) ListResponder(resp *http.Response) (result ListQueueServices, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetServiceProperties sets the properties of a storage account’s Queue service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the properties of a storage account’s Queue service, only properties for Storage Analytics and -// CORS (Cross-Origin Resource Sharing) rules can be specified. -func (client QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (result QueueServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.SetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.QueueServicesClient", "SetServiceProperties", err.Error()) - } - - req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.SetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.SetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// SetServicePropertiesPreparer prepares the SetServiceProperties request. -func (client QueueServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "queueServiceName": autorest.Encode("path", "default"), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client QueueServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always -// closes the http.Response Body. -func (client QueueServicesClient) SetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go deleted file mode 100644 index ffbbacd1efdb..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go +++ /dev/null @@ -1,109 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// SkusClient is the the Azure Storage Management API. -type SkusClient struct { - BaseClient -} - -// NewSkusClient creates an instance of the SkusClient client. -func NewSkusClient(subscriptionID string) SkusClient { - return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewSkusClientWithBaseURI creates an instance of the SkusClient 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 NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { - return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists the available SKUs supported by Microsoft.Storage for given subscription. -func (client SkusClient) List(ctx context.Context) (result SkuListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/SkusClient.List") - 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: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.SkusClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus", 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 SkusClient) 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 SkusClient) ListResponder(resp *http.Response) (result SkuListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go deleted file mode 100644 index 305f1888cd68..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go +++ /dev/null @@ -1,556 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// TableClient is the the Azure Storage Management API. -type TableClient struct { - BaseClient -} - -// NewTableClient creates an instance of the TableClient client. -func NewTableClient(subscriptionID string) TableClient { - return NewTableClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTableClientWithBaseURI creates an instance of the TableClient 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 NewTableClientWithBaseURI(baseURI string, subscriptionID string) TableClient { - return TableClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Create creates a new table with the specified table name, under the specified account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Create") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: tableName, - Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableClient", "Create", err.Error()) - } - - req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", nil, "Failure preparing request") - return - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure sending request") - return - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure responding to request") - return - } - - return -} - -// CreatePreparer prepares the Create request. -func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client TableClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client TableClient) CreateResponder(resp *http.Response) (result Table, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the table with the specified table name, under the specified account if it exists. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: tableName, - Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, tableName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client TableClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", 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 TableClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client TableClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the table with the specified table name, under the specified account if it exists. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: tableName, - Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableClient", "Get", err.Error()) - } - - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, tableName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client TableClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", 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 TableClient) 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 TableClient) GetResponder(resp *http.Response) (result Table, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of all the tables under the specified storage account -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client TableClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourcePage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.List") - defer func() { - sc := -1 - if result.ltr.Response.Response != nil { - sc = result.ltr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableClient", "List", err.Error()) - } - - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.ltr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure sending request") - return - } - - result.ltr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure responding to request") - return - } - if result.ltr.hasNextLink() && result.ltr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client TableClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/default/tables", 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 TableClient) 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 TableClient) ListResponder(resp *http.Response) (result ListTableResource, 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 TableClient) listNextResults(ctx context.Context, lastResults ListTableResource) (result ListTableResource, err error) { - req, err := lastResults.listTableResourcePreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "storage.TableClient", "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, "storage.TableClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client TableClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourceIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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, accountName) - return -} - -// Update creates a new table with the specified table name, under the specified account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The -// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. -func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Update") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: tableName, - Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, - {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableClient", "Update", err.Error()) - } - - req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableName": autorest.Encode("path", tableName), - } - - const APIVersion = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), - 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 TableClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client TableClient) UpdateResponder(resp *http.Response) (result Table, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go deleted file mode 100644 index bbb0a5753f16..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go +++ /dev/null @@ -1,313 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// TableServicesClient is the the Azure Storage Management API. -type TableServicesClient struct { - BaseClient -} - -// NewTableServicesClient creates an instance of the TableServicesClient client. -func NewTableServicesClient(subscriptionID string) TableServicesClient { - return NewTableServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewTableServicesClientWithBaseURI creates an instance of the TableServicesClient 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 NewTableServicesClientWithBaseURI(baseURI string, subscriptionID string) TableServicesClient { - return TableServicesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// GetServiceProperties gets the properties of a storage account’s Table service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result TableServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.GetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableServicesClient", "GetServiceProperties", err.Error()) - } - - req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.GetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.GetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// GetServicePropertiesPreparer prepares the GetServiceProperties request. -func (client TableServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableServiceName": autorest.Encode("path", "default"), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client TableServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always -// closes the http.Response Body. -func (client TableServicesClient) GetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list all table services for the storage account. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -func (client TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableServices, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.List") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableServicesClient", "List", err.Error()) - } - - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client TableServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices", 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 TableServicesClient) 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 TableServicesClient) ListResponder(resp *http.Response) (result ListTableServices, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// SetServiceProperties sets the properties of a storage account’s Table service, including properties for Storage -// Analytics and CORS (Cross-Origin Resource Sharing) rules. -// Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. -// accountName - the name of the storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// parameters - the properties of a storage account’s Table service, only properties for Storage Analytics and -// CORS (Cross-Origin Resource Sharing) rules can be specified. -func (client TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (result TableServiceProperties, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.SetServiceProperties") - 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: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.TableServicesClient", "SetServiceProperties", err.Error()) - } - - req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", nil, "Failure preparing request") - return - } - - resp, err := client.SetServicePropertiesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure sending request") - return - } - - result, err = client.SetServicePropertiesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure responding to request") - return - } - - return -} - -// SetServicePropertiesPreparer prepares the SetServiceProperties request. -func (client TableServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "accountName": autorest.Encode("path", accountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "tableServiceName": autorest.Encode("path", "default"), - } - - const APIVersion = "2019-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.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the -// http.Response Body if it receives an error. -func (client TableServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always -// closes the http.Response Body. -func (client TableServicesClient) SetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go deleted file mode 100644 index 3672a72ce2c9..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go +++ /dev/null @@ -1,112 +0,0 @@ -package storage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -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" -) - -// UsagesClient is the the Azure Storage Management API. -type UsagesClient struct { - BaseClient -} - -// NewUsagesClient creates an instance of the UsagesClient client. -func NewUsagesClient(subscriptionID string) UsagesClient { - return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient 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 NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { - return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByLocation gets the current usage count and the limit for the resources of the location under the subscription. -// Parameters: -// location - the location of the Azure Storage resource. -func (client UsagesClient) ListByLocation(ctx context.Context, location string) (result UsageListResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.ListByLocation") - 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: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("storage.UsagesClient", "ListByLocation", err.Error()) - } - - req, err := client.ListByLocationPreparer(ctx, location) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ListByLocationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", resp, "Failure sending request") - return - } - - result, err = client.ListByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "storage.UsagesClient", "ListByLocation", resp, "Failure responding to request") - return - } - - return -} - -// ListByLocationPreparer prepares the ListByLocation request. -func (client UsagesClient) ListByLocationPreparer(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 = "2019-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByLocationSender sends the ListByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client UsagesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByLocationResponder handles the response to the ListByLocation request. The method always -// closes the http.Response Body. -func (client UsagesClient) ListByLocationResponder(resp *http.Response) (result UsageListResult, 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/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go deleted file mode 100644 index 226079255d37..000000000000 --- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package storage - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " storage/2019-06-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/README.md b/cluster-autoscaler/vendor/github.com/go-logr/logr/README.md index a8c29bfbd530..8969526a6e5d 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/README.md +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/README.md @@ -91,11 +91,12 @@ logr design but also left out some parts and changed others: | Adding a name to a logger | `WithName` | no API | | Modify verbosity of log entries in a call chain | `V` | no API | | Grouping of key/value pairs | not supported | `WithGroup`, `GroupValue` | +| Pass context for extracting additional values | no API | API variants like `InfoCtx` | The high-level slog API is explicitly meant to be one of many different APIs that can be layered on top of a shared `slog.Handler`. logr is one such -alternative API, with [interoperability](#slog-interoperability) provided by the [`slogr`](slogr) -package. +alternative API, with [interoperability](#slog-interoperability) provided by +some conversion functions. ### Inspiration @@ -145,24 +146,24 @@ There are implementations for the following logging libraries: ## slog interoperability Interoperability goes both ways, using the `logr.Logger` API with a `slog.Handler` -and using the `slog.Logger` API with a `logr.LogSink`. [slogr](./slogr) provides `NewLogr` and -`NewSlogHandler` API calls to convert between a `logr.Logger` and a `slog.Handler`. +and using the `slog.Logger` API with a `logr.LogSink`. `FromSlogHandler` and +`ToSlogHandler` convert between a `logr.Logger` and a `slog.Handler`. As usual, `slog.New` can be used to wrap such a `slog.Handler` in the high-level -slog API. `slogr` itself leaves that to the caller. +slog API. -## Using a `logr.Sink` as backend for slog +### Using a `logr.LogSink` as backend for slog Ideally, a logr sink implementation should support both logr and slog by -implementing both the normal logr interface(s) and `slogr.SlogSink`. Because +implementing both the normal logr interface(s) and `SlogSink`. Because of a conflict in the parameters of the common `Enabled` method, it is [not possible to implement both slog.Handler and logr.Sink in the same type](https://github.com/golang/go/issues/59110). If both are supported, log calls can go from the high-level APIs to the backend -without the need to convert parameters. `NewLogr` and `NewSlogHandler` can +without the need to convert parameters. `FromSlogHandler` and `ToSlogHandler` can convert back and forth without adding additional wrappers, with one exception: when `Logger.V` was used to adjust the verbosity for a `slog.Handler`, then -`NewSlogHandler` has to use a wrapper which adjusts the verbosity for future +`ToSlogHandler` has to use a wrapper which adjusts the verbosity for future log calls. Such an implementation should also support values that implement specific @@ -187,13 +188,13 @@ Not supporting slog has several drawbacks: These drawbacks are severe enough that applications using a mixture of slog and logr should switch to a different backend. -## Using a `slog.Handler` as backend for logr +### Using a `slog.Handler` as backend for logr Using a plain `slog.Handler` without support for logr works better than the other direction: - All logr verbosity levels can be mapped 1:1 to their corresponding slog level by negating them. -- Stack unwinding is done by the `slogr.SlogSink` and the resulting program +- Stack unwinding is done by the `SlogSink` and the resulting program counter is passed to the `slog.Handler`. - Names added via `Logger.WithName` are gathered and recorded in an additional attribute with `logger` as key and the names separated by slash as value. @@ -205,27 +206,39 @@ ideally support both `logr.Marshaler` and `slog.Valuer`. If compatibility with logr implementations without slog support is not important, then `slog.Valuer` is sufficient. -## Context support for slog +### Context support for slog Storing a logger in a `context.Context` is not supported by -slog. `logr.NewContext` and `logr.FromContext` can be used with slog like this -to fill this gap: - - func HandlerFromContext(ctx context.Context) slog.Handler { - logger, err := logr.FromContext(ctx) - if err == nil { - return slogr.NewSlogHandler(logger) - } - return slog.Default().Handler() - } - - func ContextWithHandler(ctx context.Context, handler slog.Handler) context.Context { - return logr.NewContext(ctx, slogr.NewLogr(handler)) - } - -The downside is that storing and retrieving a `slog.Handler` needs more -allocations compared to using a `logr.Logger`. Therefore the recommendation is -to use the `logr.Logger` API in code which uses contextual logging. +slog. `NewContextWithSlogLogger` and `FromContextAsSlogLogger` can be +used to fill this gap. They store and retrieve a `slog.Logger` pointer +under the same context key that is also used by `NewContext` and +`FromContext` for `logr.Logger` value. + +When `NewContextWithSlogLogger` is followed by `FromContext`, the latter will +automatically convert the `slog.Logger` to a +`logr.Logger`. `FromContextAsSlogLogger` does the same for the other direction. + +With this approach, binaries which use either slog or logr are as efficient as +possible with no unnecessary allocations. This is also why the API stores a +`slog.Logger` pointer: when storing a `slog.Handler`, creating a `slog.Logger` +on retrieval would need to allocate one. + +The downside is that switching back and forth needs more allocations. Because +logr is the API that is already in use by different packages, in particular +Kubernetes, the recommendation is to use the `logr.Logger` API in code which +uses contextual logging. + +An alternative to adding values to a logger and storing that logger in the +context is to store the values in the context and to configure a logging +backend to extract those values when emitting log entries. This only works when +log calls are passed the context, which is not supported by the logr API. + +With the slog API, it is possible, but not +required. https://github.com/veqryn/slog-context is a package for slog which +provides additional support code for this approach. It also contains wrappers +for the context functions in logr, so developers who prefer to not use the logr +APIs directly can use those instead and the resulting code will still be +interoperable with logr. ## FAQ diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/tee.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/context.go similarity index 53% rename from cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/tee.go rename to cluster-autoscaler/vendor/github.com/go-logr/logr/context.go index ab4607842b0a..de8bcc3ad892 100644 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/tee.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/context.go @@ -1,5 +1,5 @@ /* -Copyright (c) 2014 VMware, Inc. All Rights Reserved. +Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,28 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -package progress +package logr -// Tee works like Unix tee; it forwards all progress reports it receives to the -// specified sinks -func Tee(s1, s2 Sinker) Sinker { - fn := func() chan<- Report { - d1 := s1.Sink() - d2 := s2.Sink() - u := make(chan Report) - go tee(u, d1, d2) - return u - } +// contextKey is how we find Loggers in a context.Context. With Go < 1.21, +// the value is always a Logger value. With Go >= 1.21, the value can be a +// Logger value or a slog.Logger pointer. +type contextKey struct{} - return SinkFunc(fn) -} +// notFoundError exists to carry an IsNotFound method. +type notFoundError struct{} -func tee(u <-chan Report, d1, d2 chan<- Report) { - defer close(d1) - defer close(d2) +func (notFoundError) Error() string { + return "no logr.Logger was present" +} - for r := range u { - d1 <- r - d2 <- r - } +func (notFoundError) IsNotFound() bool { + return true } diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/context_noslog.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/context_noslog.go new file mode 100644 index 000000000000..f012f9a18e8b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/context_noslog.go @@ -0,0 +1,49 @@ +//go:build !go1.21 +// +build !go1.21 + +/* +Copyright 2019 The logr Authors. + +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 logr + +import ( + "context" +) + +// FromContext returns a Logger from ctx or an error if no Logger is found. +func FromContext(ctx context.Context) (Logger, error) { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v, nil + } + + return Logger{}, notFoundError{} +} + +// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this +// returns a Logger that discards all log messages. +func FromContextOrDiscard(ctx context.Context) Logger { + if v, ok := ctx.Value(contextKey{}).(Logger); ok { + return v + } + + return Discard() +} + +// NewContext returns a new Context, derived from ctx, which carries the +// provided Logger. +func NewContext(ctx context.Context, logger Logger) context.Context { + return context.WithValue(ctx, contextKey{}, logger) +} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/context_slog.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/context_slog.go new file mode 100644 index 000000000000..065ef0b82803 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/context_slog.go @@ -0,0 +1,83 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2019 The logr Authors. + +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 logr + +import ( + "context" + "fmt" + "log/slog" +) + +// FromContext returns a Logger from ctx or an error if no Logger is found. +func FromContext(ctx context.Context) (Logger, error) { + v := ctx.Value(contextKey{}) + if v == nil { + return Logger{}, notFoundError{} + } + + switch v := v.(type) { + case Logger: + return v, nil + case *slog.Logger: + return FromSlogHandler(v.Handler()), nil + default: + // Not reached. + panic(fmt.Sprintf("unexpected value type for logr context key: %T", v)) + } +} + +// FromContextAsSlogLogger returns a slog.Logger from ctx or nil if no such Logger is found. +func FromContextAsSlogLogger(ctx context.Context) *slog.Logger { + v := ctx.Value(contextKey{}) + if v == nil { + return nil + } + + switch v := v.(type) { + case Logger: + return slog.New(ToSlogHandler(v)) + case *slog.Logger: + return v + default: + // Not reached. + panic(fmt.Sprintf("unexpected value type for logr context key: %T", v)) + } +} + +// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this +// returns a Logger that discards all log messages. +func FromContextOrDiscard(ctx context.Context) Logger { + if logger, err := FromContext(ctx); err == nil { + return logger + } + return Discard() +} + +// NewContext returns a new Context, derived from ctx, which carries the +// provided Logger. +func NewContext(ctx context.Context, logger Logger) context.Context { + return context.WithValue(ctx, contextKey{}, logger) +} + +// NewContextWithSlogLogger returns a new Context, derived from ctx, which carries the +// provided slog.Logger. +func NewContextWithSlogLogger(ctx context.Context, logger *slog.Logger) context.Context { + return context.WithValue(ctx, contextKey{}, logger) +} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/funcr.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/funcr.go index 12e5807cc5c3..fb2f866f4b74 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/funcr.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/funcr.go @@ -100,6 +100,11 @@ type Options struct { // details, see docs for Go's time.Layout. TimestampFormat string + // LogInfoLevel tells funcr what key to use to log the info level. + // If not specified, the info level will be logged as "level". + // If this is set to "", the info level will not be logged at all. + LogInfoLevel *string + // Verbosity tells funcr which V logs to produce. Higher values enable // more logs. Info logs at or below this level will be written, while logs // above this level will be discarded. @@ -213,6 +218,10 @@ func newFormatter(opts Options, outfmt outputFormat) Formatter { if opts.MaxLogDepth == 0 { opts.MaxLogDepth = defaultMaxLogDepth } + if opts.LogInfoLevel == nil { + opts.LogInfoLevel = new(string) + *opts.LogInfoLevel = "level" + } f := Formatter{ outputFormat: outfmt, prefix: "", @@ -227,12 +236,15 @@ func newFormatter(opts Options, outfmt outputFormat) Formatter { // implementation. It should be constructed with NewFormatter. Some of // its methods directly implement logr.LogSink. type Formatter struct { - outputFormat outputFormat - prefix string - values []any - valuesStr string - depth int - opts *Options + outputFormat outputFormat + prefix string + values []any + valuesStr string + parentValuesStr string + depth int + opts *Options + group string // for slog groups + groupDepth int } // outputFormat indicates which outputFormat to use. @@ -253,33 +265,62 @@ func (f Formatter) render(builtins, args []any) string { // Empirically bytes.Buffer is faster than strings.Builder for this. buf := bytes.NewBuffer(make([]byte, 0, 1024)) if f.outputFormat == outputJSON { - buf.WriteByte('{') + buf.WriteByte('{') // for the whole line } + vals := builtins if hook := f.opts.RenderBuiltinsHook; hook != nil { vals = hook(f.sanitize(vals)) } f.flatten(buf, vals, false, false) // keys are ours, no need to escape continuing := len(builtins) > 0 - if len(f.valuesStr) > 0 { + + if f.parentValuesStr != "" { if continuing { - if f.outputFormat == outputJSON { - buf.WriteByte(',') - } else { - buf.WriteByte(' ') - } + buf.WriteByte(f.comma()) } + buf.WriteString(f.parentValuesStr) continuing = true + } + + groupDepth := f.groupDepth + if f.group != "" { + if f.valuesStr != "" || len(args) != 0 { + if continuing { + buf.WriteByte(f.comma()) + } + buf.WriteString(f.quoted(f.group, true)) // escape user-provided keys + buf.WriteByte(f.colon()) + buf.WriteByte('{') // for the group + continuing = false + } else { + // The group was empty + groupDepth-- + } + } + + if f.valuesStr != "" { + if continuing { + buf.WriteByte(f.comma()) + } buf.WriteString(f.valuesStr) + continuing = true } + vals = args if hook := f.opts.RenderArgsHook; hook != nil { vals = hook(f.sanitize(vals)) } f.flatten(buf, vals, continuing, true) // escape user-provided keys + + for i := 0; i < groupDepth; i++ { + buf.WriteByte('}') // for the groups + } + if f.outputFormat == outputJSON { - buf.WriteByte('}') + buf.WriteByte('}') // for the whole line } + return buf.String() } @@ -298,9 +339,16 @@ func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, continuing bool, esc if len(kvList)%2 != 0 { kvList = append(kvList, noValue) } + copied := false for i := 0; i < len(kvList); i += 2 { k, ok := kvList[i].(string) if !ok { + if !copied { + newList := make([]any, len(kvList)) + copy(newList, kvList) + kvList = newList + copied = true + } k = f.nonStringKey(kvList[i]) kvList[i] = k } @@ -308,7 +356,7 @@ func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, continuing bool, esc if i > 0 || continuing { if f.outputFormat == outputJSON { - buf.WriteByte(',') + buf.WriteByte(f.comma()) } else { // In theory the format could be something we don't understand. In // practice, we control it, so it won't be. @@ -316,24 +364,35 @@ func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, continuing bool, esc } } - if escapeKeys { - buf.WriteString(prettyString(k)) - } else { - // this is faster - buf.WriteByte('"') - buf.WriteString(k) - buf.WriteByte('"') - } - if f.outputFormat == outputJSON { - buf.WriteByte(':') - } else { - buf.WriteByte('=') - } + buf.WriteString(f.quoted(k, escapeKeys)) + buf.WriteByte(f.colon()) buf.WriteString(f.pretty(v)) } return kvList } +func (f Formatter) quoted(str string, escape bool) string { + if escape { + return prettyString(str) + } + // this is faster + return `"` + str + `"` +} + +func (f Formatter) comma() byte { + if f.outputFormat == outputJSON { + return ',' + } + return ' ' +} + +func (f Formatter) colon() byte { + if f.outputFormat == outputJSON { + return ':' + } + return '=' +} + func (f Formatter) pretty(value any) string { return f.prettyWithFlags(value, 0, 0) } @@ -407,12 +466,12 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { } for i := 0; i < len(v); i += 2 { if i > 0 { - buf.WriteByte(',') + buf.WriteByte(f.comma()) } k, _ := v[i].(string) // sanitize() above means no need to check success // arbitrary keys might need escaping buf.WriteString(prettyString(k)) - buf.WriteByte(':') + buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1)) } if flags&flagRawStruct == 0 { @@ -481,7 +540,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { continue } if printComma { - buf.WriteByte(',') + buf.WriteByte(f.comma()) } printComma = true // if we got here, we are rendering a field if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" { @@ -492,10 +551,8 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { name = fld.Name } // field names can't contain characters which need escaping - buf.WriteByte('"') - buf.WriteString(name) - buf.WriteByte('"') - buf.WriteByte(':') + buf.WriteString(f.quoted(name, false)) + buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1)) } if flags&flagRawStruct == 0 { @@ -520,7 +577,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { buf.WriteByte('[') for i := 0; i < v.Len(); i++ { if i > 0 { - buf.WriteByte(',') + buf.WriteByte(f.comma()) } e := v.Index(i) buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1)) @@ -534,7 +591,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { i := 0 for it.Next() { if i > 0 { - buf.WriteByte(',') + buf.WriteByte(f.comma()) } // If a map key supports TextMarshaler, use it. keystr := "" @@ -556,7 +613,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { } } buf.WriteString(keystr) - buf.WriteByte(':') + buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1)) i++ } @@ -706,6 +763,53 @@ func (f Formatter) sanitize(kvList []any) []any { return kvList } +// startGroup opens a new group scope (basically a sub-struct), which locks all +// the current saved values and starts them anew. This is needed to satisfy +// slog. +func (f *Formatter) startGroup(group string) { + // Unnamed groups are just inlined. + if group == "" { + return + } + + // Any saved values can no longer be changed. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + continuing := false + + if f.parentValuesStr != "" { + buf.WriteString(f.parentValuesStr) + continuing = true + } + + if f.group != "" && f.valuesStr != "" { + if continuing { + buf.WriteByte(f.comma()) + } + buf.WriteString(f.quoted(f.group, true)) // escape user-provided keys + buf.WriteByte(f.colon()) + buf.WriteByte('{') // for the group + continuing = false + } + + if f.valuesStr != "" { + if continuing { + buf.WriteByte(f.comma()) + } + buf.WriteString(f.valuesStr) + } + + // NOTE: We don't close the scope here - that's done later, when a log line + // is actually rendered (because we have N scopes to close). + + f.parentValuesStr = buf.String() + + // Start collecting new values. + f.group = group + f.groupDepth++ + f.valuesStr = "" + f.values = nil +} + // Init configures this Formatter from runtime info, such as the call depth // imposed by logr itself. // Note that this receiver is a pointer, so depth can be saved. @@ -740,7 +844,10 @@ func (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, args if policy := f.opts.LogCaller; policy == All || policy == Info { args = append(args, "caller", f.caller()) } - args = append(args, "level", level, "msg", msg) + if key := *f.opts.LogInfoLevel; key != "" { + args = append(args, key, level) + } + args = append(args, "msg", msg) return prefix, f.render(args, kvList) } diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/slogsink.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/slogsink.go new file mode 100644 index 000000000000..7bd84761e2d0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/funcr/slogsink.go @@ -0,0 +1,105 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +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 funcr + +import ( + "context" + "log/slog" + + "github.com/go-logr/logr" +) + +var _ logr.SlogSink = &fnlogger{} + +const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink + +func (l fnlogger) Handle(_ context.Context, record slog.Record) error { + kvList := make([]any, 0, 2*record.NumAttrs()) + record.Attrs(func(attr slog.Attr) bool { + kvList = attrToKVs(attr, kvList) + return true + }) + + if record.Level >= slog.LevelError { + l.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...) + } else { + level := l.levelFromSlog(record.Level) + l.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...) + } + return nil +} + +func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { + kvList := make([]any, 0, 2*len(attrs)) + for _, attr := range attrs { + kvList = attrToKVs(attr, kvList) + } + l.AddValues(kvList) + return &l +} + +func (l fnlogger) WithGroup(name string) logr.SlogSink { + l.startGroup(name) + return &l +} + +// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups +// and other details of slog. +func attrToKVs(attr slog.Attr, kvList []any) []any { + attrVal := attr.Value.Resolve() + if attrVal.Kind() == slog.KindGroup { + groupVal := attrVal.Group() + grpKVs := make([]any, 0, 2*len(groupVal)) + for _, attr := range groupVal { + grpKVs = attrToKVs(attr, grpKVs) + } + if attr.Key == "" { + // slog says we have to inline these + kvList = append(kvList, grpKVs...) + } else { + kvList = append(kvList, attr.Key, PseudoStruct(grpKVs)) + } + } else if attr.Key != "" { + kvList = append(kvList, attr.Key, attrVal.Any()) + } + + return kvList +} + +// levelFromSlog adjusts the level by the logger's verbosity and negates it. +// It ensures that the result is >= 0. This is necessary because the result is +// passed to a LogSink and that API did not historically document whether +// levels could be negative or what that meant. +// +// Some example usage: +// +// logrV0 := getMyLogger() +// logrV2 := logrV0.V(2) +// slogV2 := slog.New(logr.ToSlogHandler(logrV2)) +// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) +// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) +// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) +func (l fnlogger) levelFromSlog(level slog.Level) int { + result := -level + if result < 0 { + result = 0 // because LogSink doesn't expect negative V levels + } + return int(result) +} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/logr.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/logr.go index 2a5075a180f4..b4428e105b48 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/logr.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/logr.go @@ -207,10 +207,6 @@ limitations under the License. // those. package logr -import ( - "context" -) - // New returns a new Logger instance. This is primarily used by libraries // implementing LogSink, rather than end users. Passing a nil sink will create // a Logger which discards all log lines. @@ -410,45 +406,6 @@ func (l Logger) IsZero() bool { return l.sink == nil } -// contextKey is how we find Loggers in a context.Context. -type contextKey struct{} - -// FromContext returns a Logger from ctx or an error if no Logger is found. -func FromContext(ctx context.Context) (Logger, error) { - if v, ok := ctx.Value(contextKey{}).(Logger); ok { - return v, nil - } - - return Logger{}, notFoundError{} -} - -// notFoundError exists to carry an IsNotFound method. -type notFoundError struct{} - -func (notFoundError) Error() string { - return "no logr.Logger was present" -} - -func (notFoundError) IsNotFound() bool { - return true -} - -// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this -// returns a Logger that discards all log messages. -func FromContextOrDiscard(ctx context.Context) Logger { - if v, ok := ctx.Value(contextKey{}).(Logger); ok { - return v - } - - return Discard() -} - -// NewContext returns a new Context, derived from ctx, which carries the -// provided Logger. -func NewContext(ctx context.Context, logger Logger) context.Context { - return context.WithValue(ctx, contextKey{}, logger) -} - // RuntimeInfo holds information that the logr "core" library knows which // LogSinks might want to know. type RuntimeInfo struct { diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/sloghandler.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/sloghandler.go similarity index 63% rename from cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/sloghandler.go rename to cluster-autoscaler/vendor/github.com/go-logr/logr/sloghandler.go index ec6725ce2cdb..82d1ba494819 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/sloghandler.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/sloghandler.go @@ -17,18 +17,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -package slogr +package logr import ( "context" "log/slog" - - "github.com/go-logr/logr" ) type slogHandler struct { // May be nil, in which case all logs get discarded. - sink logr.LogSink + sink LogSink // Non-nil if sink is non-nil and implements SlogSink. slogSink SlogSink @@ -54,7 +52,7 @@ func (l *slogHandler) GetLevel() slog.Level { return l.levelBias } -func (l *slogHandler) Enabled(ctx context.Context, level slog.Level) bool { +func (l *slogHandler) Enabled(_ context.Context, level slog.Level) bool { return l.sink != nil && (level >= slog.LevelError || l.sink.Enabled(l.levelFromSlog(level))) } @@ -72,9 +70,7 @@ func (l *slogHandler) Handle(ctx context.Context, record slog.Record) error { kvList := make([]any, 0, 2*record.NumAttrs()) record.Attrs(func(attr slog.Attr) bool { - if attr.Key != "" { - kvList = append(kvList, l.addGroupPrefix(attr.Key), attr.Value.Resolve().Any()) - } + kvList = attrToKVs(attr, l.groupPrefix, kvList) return true }) if record.Level >= slog.LevelError { @@ -90,15 +86,15 @@ func (l *slogHandler) Handle(ctx context.Context, record slog.Record) error { // are called by Handle, code in slog gets skipped. // // This offset currently (Go 1.21.0) works for calls through -// slog.New(NewSlogHandler(...)). There's no guarantee that the call +// slog.New(ToSlogHandler(...)). There's no guarantee that the call // chain won't change. Wrapping the handler will also break unwinding. It's // still better than not adjusting at all.... // -// This cannot be done when constructing the handler because NewLogr needs +// This cannot be done when constructing the handler because FromSlogHandler needs // access to the original sink without this adjustment. A second copy would // work, but then WithAttrs would have to be called for both of them. -func (l *slogHandler) sinkWithCallDepth() logr.LogSink { - if sink, ok := l.sink.(logr.CallDepthLogSink); ok { +func (l *slogHandler) sinkWithCallDepth() LogSink { + if sink, ok := l.sink.(CallDepthLogSink); ok { return sink.WithCallDepth(2) } return l.sink @@ -109,60 +105,88 @@ func (l *slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler { return l } - copy := *l + clone := *l if l.slogSink != nil { - copy.slogSink = l.slogSink.WithAttrs(attrs) - copy.sink = copy.slogSink + clone.slogSink = l.slogSink.WithAttrs(attrs) + clone.sink = clone.slogSink } else { kvList := make([]any, 0, 2*len(attrs)) for _, attr := range attrs { - if attr.Key != "" { - kvList = append(kvList, l.addGroupPrefix(attr.Key), attr.Value.Resolve().Any()) - } + kvList = attrToKVs(attr, l.groupPrefix, kvList) } - copy.sink = l.sink.WithValues(kvList...) + clone.sink = l.sink.WithValues(kvList...) } - return © + return &clone } func (l *slogHandler) WithGroup(name string) slog.Handler { if l.sink == nil { return l } - copy := *l + if name == "" { + // slog says to inline empty groups + return l + } + clone := *l if l.slogSink != nil { - copy.slogSink = l.slogSink.WithGroup(name) - copy.sink = l.slogSink + clone.slogSink = l.slogSink.WithGroup(name) + clone.sink = clone.slogSink } else { - copy.groupPrefix = copy.addGroupPrefix(name) + clone.groupPrefix = addPrefix(clone.groupPrefix, name) + } + return &clone +} + +// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups +// and other details of slog. +func attrToKVs(attr slog.Attr, groupPrefix string, kvList []any) []any { + attrVal := attr.Value.Resolve() + if attrVal.Kind() == slog.KindGroup { + groupVal := attrVal.Group() + grpKVs := make([]any, 0, 2*len(groupVal)) + prefix := groupPrefix + if attr.Key != "" { + prefix = addPrefix(groupPrefix, attr.Key) + } + for _, attr := range groupVal { + grpKVs = attrToKVs(attr, prefix, grpKVs) + } + kvList = append(kvList, grpKVs...) + } else if attr.Key != "" { + kvList = append(kvList, addPrefix(groupPrefix, attr.Key), attrVal.Any()) } - return © + + return kvList } -func (l *slogHandler) addGroupPrefix(name string) string { - if l.groupPrefix == "" { +func addPrefix(prefix, name string) string { + if prefix == "" { return name } - return l.groupPrefix + groupSeparator + name + if name == "" { + return prefix + } + return prefix + groupSeparator + name } // levelFromSlog adjusts the level by the logger's verbosity and negates it. // It ensures that the result is >= 0. This is necessary because the result is -// passed to a logr.LogSink and that API did not historically document whether +// passed to a LogSink and that API did not historically document whether // levels could be negative or what that meant. // // Some example usage: -// logrV0 := getMyLogger() -// logrV2 := logrV0.V(2) -// slogV2 := slog.New(slogr.NewSlogHandler(logrV2)) -// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) -// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) -// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) +// +// logrV0 := getMyLogger() +// logrV2 := logrV0.V(2) +// slogV2 := slog.New(logr.ToSlogHandler(logrV2)) +// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) +// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) +// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) func (l *slogHandler) levelFromSlog(level slog.Level) int { result := -level - result += l.levelBias // in case the original logr.Logger had a V level + result += l.levelBias // in case the original Logger had a V level if result < 0 { - result = 0 // because logr.LogSink doesn't expect negative V levels + result = 0 // because LogSink doesn't expect negative V levels } return int(result) } diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr.go new file mode 100644 index 000000000000..28a83d02439e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr.go @@ -0,0 +1,100 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +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 logr + +import ( + "context" + "log/slog" +) + +// FromSlogHandler returns a Logger which writes to the slog.Handler. +// +// The logr verbosity level is mapped to slog levels such that V(0) becomes +// slog.LevelInfo and V(4) becomes slog.LevelDebug. +func FromSlogHandler(handler slog.Handler) Logger { + if handler, ok := handler.(*slogHandler); ok { + if handler.sink == nil { + return Discard() + } + return New(handler.sink).V(int(handler.levelBias)) + } + return New(&slogSink{handler: handler}) +} + +// ToSlogHandler returns a slog.Handler which writes to the same sink as the Logger. +// +// The returned logger writes all records with level >= slog.LevelError as +// error log entries with LogSink.Error, regardless of the verbosity level of +// the Logger: +// +// logger := +// slog.New(ToSlogHandler(logger.V(10))).Error(...) -> logSink.Error(...) +// +// The level of all other records gets reduced by the verbosity +// level of the Logger and the result is negated. If it happens +// to be negative, then it gets replaced by zero because a LogSink +// is not expected to handled negative levels: +// +// slog.New(ToSlogHandler(logger)).Debug(...) -> logger.GetSink().Info(level=4, ...) +// slog.New(ToSlogHandler(logger)).Warning(...) -> logger.GetSink().Info(level=0, ...) +// slog.New(ToSlogHandler(logger)).Info(...) -> logger.GetSink().Info(level=0, ...) +// slog.New(ToSlogHandler(logger.V(4))).Info(...) -> logger.GetSink().Info(level=4, ...) +func ToSlogHandler(logger Logger) slog.Handler { + if sink, ok := logger.GetSink().(*slogSink); ok && logger.GetV() == 0 { + return sink.handler + } + + handler := &slogHandler{sink: logger.GetSink(), levelBias: slog.Level(logger.GetV())} + if slogSink, ok := handler.sink.(SlogSink); ok { + handler.slogSink = slogSink + } + return handler +} + +// SlogSink is an optional interface that a LogSink can implement to support +// logging through the slog.Logger or slog.Handler APIs better. It then should +// also support special slog values like slog.Group. When used as a +// slog.Handler, the advantages are: +// +// - stack unwinding gets avoided in favor of logging the pre-recorded PC, +// as intended by slog +// - proper grouping of key/value pairs via WithGroup +// - verbosity levels > slog.LevelInfo can be recorded +// - less overhead +// +// Both APIs (Logger and slog.Logger/Handler) then are supported equally +// well. Developers can pick whatever API suits them better and/or mix +// packages which use either API in the same binary with a common logging +// implementation. +// +// This interface is necessary because the type implementing the LogSink +// interface cannot also implement the slog.Handler interface due to the +// different prototype of the common Enabled method. +// +// An implementation could support both interfaces in two different types, but then +// additional interfaces would be needed to convert between those types in FromSlogHandler +// and ToSlogHandler. +type SlogSink interface { + LogSink + + Handle(ctx context.Context, record slog.Record) error + WithAttrs(attrs []slog.Attr) SlogSink + WithGroup(name string) SlogSink +} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogr.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogr.go index eb519ae23f85..36432c56fdf6 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogr.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogr.go @@ -23,10 +23,11 @@ limitations under the License. // // See the README in the top-level [./logr] package for a discussion of // interoperability. +// +// Deprecated: use the main logr package instead. package slogr import ( - "context" "log/slog" "github.com/go-logr/logr" @@ -34,75 +35,27 @@ import ( // NewLogr returns a logr.Logger which writes to the slog.Handler. // -// The logr verbosity level is mapped to slog levels such that V(0) becomes -// slog.LevelInfo and V(4) becomes slog.LevelDebug. +// Deprecated: use [logr.FromSlogHandler] instead. func NewLogr(handler slog.Handler) logr.Logger { - if handler, ok := handler.(*slogHandler); ok { - if handler.sink == nil { - return logr.Discard() - } - return logr.New(handler.sink).V(int(handler.levelBias)) - } - return logr.New(&slogSink{handler: handler}) + return logr.FromSlogHandler(handler) } // NewSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. // -// The returned logger writes all records with level >= slog.LevelError as -// error log entries with LogSink.Error, regardless of the verbosity level of -// the logr.Logger: -// -// logger := -// slog.New(NewSlogHandler(logger.V(10))).Error(...) -> logSink.Error(...) -// -// The level of all other records gets reduced by the verbosity -// level of the logr.Logger and the result is negated. If it happens -// to be negative, then it gets replaced by zero because a LogSink -// is not expected to handled negative levels: -// -// slog.New(NewSlogHandler(logger)).Debug(...) -> logger.GetSink().Info(level=4, ...) -// slog.New(NewSlogHandler(logger)).Warning(...) -> logger.GetSink().Info(level=0, ...) -// slog.New(NewSlogHandler(logger)).Info(...) -> logger.GetSink().Info(level=0, ...) -// slog.New(NewSlogHandler(logger.V(4))).Info(...) -> logger.GetSink().Info(level=4, ...) +// Deprecated: use [logr.ToSlogHandler] instead. func NewSlogHandler(logger logr.Logger) slog.Handler { - if sink, ok := logger.GetSink().(*slogSink); ok && logger.GetV() == 0 { - return sink.handler - } + return logr.ToSlogHandler(logger) +} - handler := &slogHandler{sink: logger.GetSink(), levelBias: slog.Level(logger.GetV())} - if slogSink, ok := handler.sink.(SlogSink); ok { - handler.slogSink = slogSink - } - return handler +// ToSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. +// +// Deprecated: use [logr.ToSlogHandler] instead. +func ToSlogHandler(logger logr.Logger) slog.Handler { + return logr.ToSlogHandler(logger) } // SlogSink is an optional interface that a LogSink can implement to support -// logging through the slog.Logger or slog.Handler APIs better. It then should -// also support special slog values like slog.Group. When used as a -// slog.Handler, the advantages are: +// logging through the slog.Logger or slog.Handler APIs better. // -// - stack unwinding gets avoided in favor of logging the pre-recorded PC, -// as intended by slog -// - proper grouping of key/value pairs via WithGroup -// - verbosity levels > slog.LevelInfo can be recorded -// - less overhead -// -// Both APIs (logr.Logger and slog.Logger/Handler) then are supported equally -// well. Developers can pick whatever API suits them better and/or mix -// packages which use either API in the same binary with a common logging -// implementation. -// -// This interface is necessary because the type implementing the LogSink -// interface cannot also implement the slog.Handler interface due to the -// different prototype of the common Enabled method. -// -// An implementation could support both interfaces in two different types, but then -// additional interfaces would be needed to convert between those types in NewLogr -// and NewSlogHandler. -type SlogSink interface { - logr.LogSink - - Handle(ctx context.Context, record slog.Record) error - WithAttrs(attrs []slog.Attr) SlogSink - WithGroup(name string) SlogSink -} +// Deprecated: use [logr.SlogSink] instead. +type SlogSink = logr.SlogSink diff --git a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogsink.go b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogsink.go similarity index 82% rename from cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogsink.go rename to cluster-autoscaler/vendor/github.com/go-logr/logr/slogsink.go index 6fbac561d98b..4060fcbc2b0b 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/logr/slogr/slogsink.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/logr/slogsink.go @@ -17,24 +17,22 @@ See the License for the specific language governing permissions and limitations under the License. */ -package slogr +package logr import ( "context" "log/slog" "runtime" "time" - - "github.com/go-logr/logr" ) var ( - _ logr.LogSink = &slogSink{} - _ logr.CallDepthLogSink = &slogSink{} - _ Underlier = &slogSink{} + _ LogSink = &slogSink{} + _ CallDepthLogSink = &slogSink{} + _ Underlier = &slogSink{} ) -// Underlier is implemented by the LogSink returned by NewLogr. +// Underlier is implemented by the LogSink returned by NewFromLogHandler. type Underlier interface { // GetUnderlying returns the Handler used by the LogSink. GetUnderlying() slog.Handler @@ -54,7 +52,7 @@ type slogSink struct { handler slog.Handler } -func (l *slogSink) Init(info logr.RuntimeInfo) { +func (l *slogSink) Init(info RuntimeInfo) { l.callDepth = info.CallDepth } @@ -62,7 +60,7 @@ func (l *slogSink) GetUnderlying() slog.Handler { return l.handler } -func (l *slogSink) WithCallDepth(depth int) logr.LogSink { +func (l *slogSink) WithCallDepth(depth int) LogSink { newLogger := *l newLogger.callDepth += depth return &newLogger @@ -93,18 +91,18 @@ func (l *slogSink) log(err error, msg string, level slog.Level, kvList ...interf record.AddAttrs(slog.Any(errKey, err)) } record.Add(kvList...) - l.handler.Handle(context.Background(), record) + _ = l.handler.Handle(context.Background(), record) } -func (l slogSink) WithName(name string) logr.LogSink { +func (l slogSink) WithName(name string) LogSink { if l.name != "" { - l.name = l.name + "/" + l.name += "/" } l.name += name return &l } -func (l slogSink) WithValues(kvList ...interface{}) logr.LogSink { +func (l slogSink) WithValues(kvList ...interface{}) LogSink { l.handler = l.handler.WithAttrs(kvListToAttrs(kvList...)) return &l } diff --git a/cluster-autoscaler/vendor/github.com/go-logr/zapr/.golangci.yaml b/cluster-autoscaler/vendor/github.com/go-logr/zapr/.golangci.yaml new file mode 100644 index 000000000000..64246c50cc23 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/.golangci.yaml @@ -0,0 +1,20 @@ +issues: + exclude-use-default: false + +linters: + disable-all: true + enable: + - asciicheck + - errcheck + - forcetypeassert + - gocritic + - gofmt + - goimports + - gosimple + - govet + - ineffassign + - misspell + - revive + - staticcheck + - typecheck + - unused diff --git a/cluster-autoscaler/vendor/github.com/go-logr/zapr/README.md b/cluster-autoscaler/vendor/github.com/go-logr/zapr/README.md index 78f5f7653f6b..ff332da3a1e2 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/zapr/README.md +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/README.md @@ -2,12 +2,17 @@ Zapr :zap: ========== A [logr](https://github.com/go-logr/logr) implementation using -[Zap](https://github.com/uber-go/zap). +[Zap](https://github.com/uber-go/zap). Can also be used as +[slog](https://pkg.go.dev/log/slog) handler. Usage ----- +Via logr: + ```go +package main + import ( "fmt" @@ -29,6 +34,33 @@ func main() { } ``` +Via slog: + +``` +package main + +import ( + "fmt" + "log/slog" + + "github.com/go-logr/logr/slogr" + "github.com/go-logr/zapr" + "go.uber.org/zap" +) + +func main() { + var log *slog.Logger + + zapLog, err := zap.NewDevelopment() + if err != nil { + panic(fmt.Sprintf("who watches the watchmen (%v)?", err)) + } + log = slog.New(slogr.NewSlogHandler(zapr.NewLogger(zapLog))) + + log.Info("Logr in action!", "the answer", 42) +} +``` + Increasing Verbosity -------------------- @@ -68,3 +100,8 @@ For the most part, concepts in Zap correspond directly with those in logr. Unlike Zap, all fields *must* be in the form of sugared fields -- it's illegal to pass a strongly-typed Zap field in a key position to any of the logging methods (`Log`, `Error`). + +The zapr `logr.LogSink` implementation also implements `logr.SlogHandler`. That +enables `slogr.NewSlogHandler` to provide a `slog.Handler` which just passes +parameters through to zapr. zapr handles special slog values (Group, +LogValuer), regardless of which front-end API is used. diff --git a/cluster-autoscaler/vendor/github.com/go-logr/zapr/slogzapr.go b/cluster-autoscaler/vendor/github.com/go-logr/zapr/slogzapr.go new file mode 100644 index 000000000000..84f56e4351b0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/slogzapr.go @@ -0,0 +1,183 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +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 zapr + +import ( + "context" + "log/slog" + "runtime" + + "github.com/go-logr/logr/slogr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +var _ slogr.SlogSink = &zapLogger{} + +func (zl *zapLogger) Handle(_ context.Context, record slog.Record) error { + zapLevel := zap.InfoLevel + intLevel := 0 + isError := false + switch { + case record.Level >= slog.LevelError: + zapLevel = zap.ErrorLevel + isError = true + case record.Level >= slog.LevelWarn: + zapLevel = zap.WarnLevel + case record.Level >= 0: + // Already set above -> info. + default: + zapLevel = zapcore.Level(record.Level) + intLevel = int(-zapLevel) + } + + if checkedEntry := zl.l.Check(zapLevel, record.Message); checkedEntry != nil { + checkedEntry.Time = record.Time + checkedEntry.Caller = pcToCallerEntry(record.PC) + var fieldsBuffer [2]zap.Field + fields := fieldsBuffer[:0] + if !isError && zl.numericLevelKey != "" { + // Record verbosity for info entries. + fields = append(fields, zap.Int(zl.numericLevelKey, intLevel)) + } + // Inline all attributes. + fields = append(fields, zap.Inline(zapcore.ObjectMarshalerFunc(func(enc zapcore.ObjectEncoder) error { + record.Attrs(func(attr slog.Attr) bool { + encodeSlog(enc, attr) + return true + }) + return nil + }))) + checkedEntry.Write(fields...) + } + return nil +} + +func encodeSlog(enc zapcore.ObjectEncoder, attr slog.Attr) { + if attr.Equal(slog.Attr{}) { + // Ignore empty attribute. + return + } + + // Check in order of expected frequency, most common ones first. + // + // Usage statistics for parameters from Kubernetes 152876a3e, + // calculated with k/k/test/integration/logs/benchmark: + // + // kube-controller-manager -v10: + // strings: 10043 (85%) + // with API objects: 2 (0% of all arguments) + // types and their number of usage: NodeStatus:2 + // numbers: 792 (6%) + // ObjectRef: 292 (2%) + // others: 595 (5%) + // + // kube-scheduler -v10: + // strings: 1325 (40%) + // with API objects: 109 (3% of all arguments) + // types and their number of usage: PersistentVolume:50 PersistentVolumeClaim:59 + // numbers: 473 (14%) + // ObjectRef: 1305 (39%) + // others: 176 (5%) + + kind := attr.Value.Kind() + switch kind { + case slog.KindString: + enc.AddString(attr.Key, attr.Value.String()) + case slog.KindLogValuer: + // This includes klog.KObj. + encodeSlog(enc, slog.Attr{ + Key: attr.Key, + Value: attr.Value.Resolve(), + }) + case slog.KindInt64: + enc.AddInt64(attr.Key, attr.Value.Int64()) + case slog.KindUint64: + enc.AddUint64(attr.Key, attr.Value.Uint64()) + case slog.KindFloat64: + enc.AddFloat64(attr.Key, attr.Value.Float64()) + case slog.KindBool: + enc.AddBool(attr.Key, attr.Value.Bool()) + case slog.KindDuration: + enc.AddDuration(attr.Key, attr.Value.Duration()) + case slog.KindTime: + enc.AddTime(attr.Key, attr.Value.Time()) + case slog.KindGroup: + attrs := attr.Value.Group() + if attr.Key == "" { + // Inline group. + for _, attr := range attrs { + encodeSlog(enc, attr) + } + return + } + if len(attrs) == 0 { + // Ignore empty group. + return + } + _ = enc.AddObject(attr.Key, marshalAttrs(attrs)) + default: + // We have to go through reflection in zap.Any to get support + // for e.g. fmt.Stringer. + zap.Any(attr.Key, attr.Value.Any()).AddTo(enc) + } +} + +type marshalAttrs []slog.Attr + +func (attrs marshalAttrs) MarshalLogObject(enc zapcore.ObjectEncoder) error { + for _, attr := range attrs { + encodeSlog(enc, attr) + } + return nil +} + +var _ zapcore.ObjectMarshaler = marshalAttrs(nil) + +func pcToCallerEntry(pc uintptr) zapcore.EntryCaller { + if pc == 0 { + return zapcore.EntryCaller{} + } + // Same as https://cs.opensource.google/go/x/exp/+/642cacee:slog/record.go;drc=642cacee5cc05231f45555a333d07f1005ffc287;l=70 + fs := runtime.CallersFrames([]uintptr{pc}) + f, _ := fs.Next() + if f.File == "" { + return zapcore.EntryCaller{} + } + return zapcore.EntryCaller{ + Defined: true, + PC: pc, + File: f.File, + Line: f.Line, + Function: f.Function, + } +} + +func (zl *zapLogger) WithAttrs(attrs []slog.Attr) slogr.SlogSink { + newLogger := *zl + newLogger.l = newLogger.l.With(zap.Inline(marshalAttrs(attrs))) + return &newLogger +} + +func (zl *zapLogger) WithGroup(name string) slogr.SlogSink { + newLogger := *zl + newLogger.l = newLogger.l.With(zap.Namespace(name)) + return &newLogger +} diff --git a/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr.go b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr.go index 8bb7fceb3f0c..c8503ab9ead3 100644 --- a/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr.go @@ -31,14 +31,14 @@ limitations under the License. // Package zapr defines an implementation of the github.com/go-logr/logr // interfaces built on top of Zap (go.uber.org/zap). // -// Usage +// # Usage // // A new logr.Logger can be constructed from an existing zap.Logger using // the NewLogger function: // -// log := zapr.NewLogger(someZapLogger) +// log := zapr.NewLogger(someZapLogger) // -// Implementation Details +// # Implementation Details // // For the most part, concepts in Zap correspond directly with those in // logr. @@ -168,15 +168,6 @@ func (zl *zapLogger) handleFields(lvl int, args []interface{}, additional ...zap return append(fields, additional...) } -func zapIt(field string, val interface{}) zap.Field { - // Handle types that implement logr.Marshaler: log the replacement - // object instead of the original one. - if marshaler, ok := val.(logr.Marshaler); ok { - field, val = invokeMarshaler(field, marshaler) - } - return zap.Any(field, val) -} - func invokeMarshaler(field string, m logr.Marshaler) (f string, ret interface{}) { defer func() { if r := recover(); r != nil { diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/list/path.go b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_noslog.go similarity index 56% rename from cluster-autoscaler/vendor/github.com/vmware/govmomi/list/path.go rename to cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_noslog.go index f3a106520155..ec8517b79388 100644 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/list/path.go +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_noslog.go @@ -1,5 +1,8 @@ +//go:build !go1.21 +// +build !go1.21 + /* -Copyright (c) 2014 VMware, Inc. All Rights Reserved. +Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,31 +17,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package list +package zapr import ( - "path" - "strings" + "github.com/go-logr/logr" + "go.uber.org/zap" ) -func ToParts(p string) []string { - p = path.Clean(p) - if p == "/" { - return []string{} - } - - if len(p) > 0 { - // Prefix ./ if relative - if p[0] != '/' && p[0] != '.' { - p = "./" + p - } +func zapIt(field string, val interface{}) zap.Field { + // Handle types that implement logr.Marshaler: log the replacement + // object instead of the original one. + if marshaler, ok := val.(logr.Marshaler); ok { + field, val = invokeMarshaler(field, marshaler) } - - ps := strings.Split(p, "/") - if ps[0] == "" { - // Start at root - ps = ps[1:] - } - - return ps + return zap.Any(field, val) } diff --git a/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_slog.go b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_slog.go new file mode 100644 index 000000000000..f07203604df0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/go-logr/zapr/zapr_slog.go @@ -0,0 +1,48 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2023 The logr Authors. + +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 zapr + +import ( + "log/slog" + + "github.com/go-logr/logr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +func zapIt(field string, val interface{}) zap.Field { + switch valTyped := val.(type) { + case logr.Marshaler: + // Handle types that implement logr.Marshaler: log the replacement + // object instead of the original one. + field, val = invokeMarshaler(field, valTyped) + case slog.LogValuer: + // The same for slog.LogValuer. We let slog.Value handle + // potential panics and recursion. + val = slog.AnyValue(val).Resolve() + } + if slogValue, ok := val.(slog.Value); ok { + return zap.Inline(zapcore.ObjectMarshalerFunc(func(enc zapcore.ObjectEncoder) error { + encodeSlog(enc, slog.Attr{Key: field, Value: slogValue}) + return nil + })) + } + return zap.Any(field, val) +} diff --git a/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/fileutils.go b/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/fileutils.go index 7421e6207f6b..81851c819434 100644 --- a/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/fileutils.go +++ b/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/fileutils.go @@ -125,6 +125,7 @@ func CopyDirectory(source string, dest string) error { if err != nil { return nil } + destPath := filepath.Join(dest, relPath) if info.IsDir() { // Skip the source directory. @@ -138,18 +139,20 @@ func CopyDirectory(source string, dest string) error { uid := int(st.Uid) gid := int(st.Gid) - if err := os.Mkdir(filepath.Join(dest, relPath), info.Mode()); err != nil { + if err := os.Mkdir(destPath, info.Mode()); err != nil { return err } - - if err := os.Lchown(filepath.Join(dest, relPath), uid, gid); err != nil { + if err := os.Lchown(destPath, uid, gid); err != nil { + return err + } + if err := os.Chmod(destPath, info.Mode()); err != nil { return err } } return nil } - return CopyFile(path, filepath.Join(dest, relPath)) + return CopyFile(path, destPath) }) } diff --git a/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/idtools.go b/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/idtools.go index bad6539df533..0ae2dfb29f4e 100644 --- a/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/idtools.go +++ b/cluster-autoscaler/vendor/github.com/mrunalp/fileutils/idtools.go @@ -49,6 +49,9 @@ func MkdirAllNewAs(path string, mode os.FileMode, ownerUID, ownerGID int) error if err := os.Chown(pathComponent, ownerUID, ownerGID); err != nil { return err } + if err := os.Chmod(pathComponent, mode); err != nil { + return err + } } return nil } diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index fea67526e058..9a65dd10c5d0 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -1,3 +1,64 @@ +## 2.15.0 + +### Features + +- JUnit reports now interpret Label(owner:X) and set owner to X. [8f3bd70] +- include cancellation reason when cancelling spec context [96e915c] + +### Fixes + +- emit output of failed go tool cover invocation so users can try to debug things for themselves [c245d09] +- fix outline when using nodot in ginkgo v2 [dca77c8] +- Document areas where GinkgoT() behaves differently from testing.T [dbaf18f] +- bugfix(docs): use Unsetenv instead of Clearenv (#1337) [6f67a14] + +### Maintenance + +- Bump to go 1.20 [4fcd0b3] + +## 2.14.0 + +### Features +You can now use `GinkgoTB()` when you need an instance of `testing.TB` to pass to a library. + +Prior to this release table testing only supported generating individual `It`s for each test entry. `DescribeTableSubtree` extends table testing support to entire testing subtrees - under the hood `DescrieTableSubtree` generates a new container for each entry and invokes your function to fill our the container. See the [docs](https://onsi.github.io/ginkgo/#generating-subtree-tables) to learn more. + +- Introduce DescribeTableSubtree [65ec56d] +- add GinkgoTB() to docs [4a2c832] +- Add GinkgoTB() function (#1333) [92b6744] + +### Fixes +- Fix typo in internal/suite.go (#1332) [beb9507] +- Fix typo in docs/index.md (#1319) [4ac3a13] +- allow wasm to compile with ginkgo present (#1311) [b2e5bc5] + +### Maintenance +- Bump golang.org/x/tools from 0.16.0 to 0.16.1 (#1316) [465a8ec] +- Bump actions/setup-go from 4 to 5 (#1313) [eab0e40] +- Bump github/codeql-action from 2 to 3 (#1317) [fbf9724] +- Bump golang.org/x/crypto (#1318) [3ee80ee] +- Bump golang.org/x/tools from 0.14.0 to 0.16.0 (#1306) [123e1d5] +- Bump github.com/onsi/gomega from 1.29.0 to 1.30.0 (#1297) [558f6e0] +- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#1307) [84ff7f3] + +## 2.13.2 + +### Fixes +- Fix file handler leak (#1309) [e2e81c8] +- Avoid allocations with `(*regexp.Regexp).MatchString` (#1302) [3b2a2a7] + +## 2.13.1 + +### Fixes +- # 1296 fix(precompiled test guite): exec bit check omitted on Windows (#1301) [26eea01] + +### Maintenance +- Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#1291) [7161a9d] +- Bump golang.org/x/sys from 0.13.0 to 0.14.0 (#1295) [7fc7b10] +- Bump golang.org/x/tools from 0.12.0 to 0.14.0 (#1282) [74bbd65] +- Bump github.com/onsi/gomega from 1.27.10 to 1.29.0 (#1290) [9373633] +- Bump golang.org/x/net in /integration/_fixtures/version_mismatch_fixture (#1286) [6e3cf65] + ## 2.13.0 ### Features diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go index bd3c6d0287a5..26de28b5707c 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go @@ -144,7 +144,7 @@ func FinalizeProfilesAndReportsForSuites(suites TestSuites, cliConfig types.CLIC return messages, nil } -//loads each profile, combines them, deletes them, stores them in destination +// loads each profile, combines them, deletes them, stores them in destination func MergeAndCleanupCoverProfiles(profiles []string, destination string) error { combined := &bytes.Buffer{} modeRegex := regexp.MustCompile(`^mode: .*\n`) @@ -184,7 +184,7 @@ func GetCoverageFromCoverProfile(profile string) (float64, error) { cmd := exec.Command("go", "tool", "cover", "-func", profile) output, err := cmd.CombinedOutput() if err != nil { - return 0, fmt.Errorf("Could not process Coverprofile %s: %s", profile, err.Error()) + return 0, fmt.Errorf("Could not process Coverprofile %s: %s - %s", profile, err.Error(), string(output)) } re := regexp.MustCompile(`total:\s*\(statements\)\s*(\d*\.\d*)\%`) matches := re.FindStringSubmatch(string(output)) diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go index 64dcb1b78c6e..df99875be204 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go @@ -7,6 +7,7 @@ import ( "path" "path/filepath" "regexp" + "runtime" "strings" "github.com/onsi/ginkgo/v2/types" @@ -192,7 +193,7 @@ func precompiledTestSuite(path string) (TestSuite, error) { return TestSuite{}, errors.New("this is not a .test binary") } - if filepath.Ext(path) == ".test" && info.Mode()&0111 == 0 { + if filepath.Ext(path) == ".test" && runtime.GOOS != "windows" && info.Mode()&0111 == 0 { return TestSuite{}, errors.New("this is not executable") } @@ -225,7 +226,7 @@ func suitesInDir(dir string, recurse bool) TestSuites { files, _ := os.ReadDir(dir) re := regexp.MustCompile(`^[^._].*_test\.go$`) for _, file := range files { - if !file.IsDir() && re.Match([]byte(file.Name())) { + if !file.IsDir() && re.MatchString(file.Name()) { suite := TestSuite{ Path: relPath(dir), PackageName: packageNameForSuite(dir), @@ -240,7 +241,7 @@ func suitesInDir(dir string, recurse bool) TestSuites { if recurse { re = regexp.MustCompile(`^[._]`) for _, file := range files { - if file.IsDir() && !re.Match([]byte(file.Name())) { + if file.IsDir() && !re.MatchString(file.Name()) { suites = append(suites, suitesInDir(dir+"/"+file.Name(), recurse)...) } } @@ -271,7 +272,7 @@ func filesHaveGinkgoSuite(dir string, files []os.DirEntry) bool { reGinkgo := regexp.MustCompile(`package ginkgo|\/ginkgo"|\/ginkgo\/v2"|\/ginkgo\/v2/dsl/`) for _, file := range files { - if !file.IsDir() && reTestFile.Match([]byte(file.Name())) { + if !file.IsDir() && reTestFile.MatchString(file.Name()) { contents, _ := os.ReadFile(dir + "/" + file.Name()) if reGinkgo.Match(contents) { return true diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go index 958daccbfa8c..5d8d00bb17f4 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go @@ -1,10 +1,11 @@ package outline import ( - "github.com/onsi/ginkgo/v2/types" "go/ast" "go/token" "strconv" + + "github.com/onsi/ginkgo/v2/types" ) const ( diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go index 67ec5ab75798..f0a6b5d26cd0 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go @@ -28,14 +28,7 @@ func packageNameForImport(f *ast.File, path string) *string { } name := spec.Name.String() if name == "" { - // If the package name is not explicitly specified, - // make an educated guess. This is not guaranteed to be correct. - lastSlash := strings.LastIndex(path, "/") - if lastSlash == -1 { - name = path - } else { - name = path[lastSlash+1:] - } + name = "ginkgo" } if name == "." { name = "" diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go index f5ddff30fc76..a34d94354d9b 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go @@ -78,7 +78,7 @@ func (d Dependencies) resolveAndAdd(deps []string, depth int) { if err != nil { continue } - if !pkg.Goroot && (!ginkgoAndGomegaFilter.Match([]byte(pkg.Dir)) || ginkgoIntegrationTestFilter.Match([]byte(pkg.Dir))) { + if !pkg.Goroot && (!ginkgoAndGomegaFilter.MatchString(pkg.Dir) || ginkgoIntegrationTestFilter.MatchString(pkg.Dir)) { d.addDepIfNotPresent(pkg.Dir, depth) } } diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go index e9f7ec0cb3b0..17d052bdc3c1 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go @@ -79,7 +79,7 @@ func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Ti continue } - if goTestRegExp.Match([]byte(info.Name())) { + if goTestRegExp.MatchString(info.Name()) { testHash += p.hashForFileInfo(info) if info.ModTime().After(testModifiedTime) { testModifiedTime = info.ModTime() @@ -87,7 +87,7 @@ func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Ti continue } - if p.watchRegExp.Match([]byte(info.Name())) { + if p.watchRegExp.MatchString(info.Name()) { codeHash += p.hashForFileInfo(info) if info.ModTime().After(codeModifiedTime) { codeModifiedTime = info.ModTime() diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go index 28447ffdd261..02c6739e5be7 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go @@ -1,7 +1,10 @@ package ginkgo import ( + "testing" + "github.com/onsi/ginkgo/v2/internal/testingtproxy" + "github.com/onsi/ginkgo/v2/types" ) /* @@ -12,10 +15,15 @@ GinkgoT() is analogous to *testing.T and implements the majority of *testing.T's GinkgoT() takes an optional offset argument that can be used to get the correct line number associated with the failure - though you do not need to use this if you call GinkgoHelper() or GinkgoT().Helper() appropriately +GinkgoT() attempts to mimic the behavior of `testing.T` with the exception of the following: + +- Error/Errorf: failures in Ginkgo always immediately stop execution and there is no mechanism to log a failure without aborting the test. As such Error/Errorf are equivalent to Fatal/Fatalf. +- Parallel() is a no-op as Ginkgo's multi-process parallelism model is substantially different from go test's in-process model. + You can learn more here: https://onsi.github.io/ginkgo/#using-third-party-libraries */ func GinkgoT(optionalOffset ...int) FullGinkgoTInterface { - offset := 3 + offset := 1 if len(optionalOffset) > 0 { offset = optionalOffset[0] } @@ -41,21 +49,21 @@ The portion of the interface returned by GinkgoT() that maps onto methods in the type GinkgoTInterface interface { Cleanup(func()) Setenv(kev, value string) - Error(args ...interface{}) - Errorf(format string, args ...interface{}) + Error(args ...any) + Errorf(format string, args ...any) Fail() FailNow() Failed() bool - Fatal(args ...interface{}) - Fatalf(format string, args ...interface{}) + Fatal(args ...any) + Fatalf(format string, args ...any) Helper() - Log(args ...interface{}) - Logf(format string, args ...interface{}) + Log(args ...any) + Logf(format string, args ...any) Name() string Parallel() - Skip(args ...interface{}) + Skip(args ...any) SkipNow() - Skipf(format string, args ...interface{}) + Skipf(format string, args ...any) Skipped() bool TempDir() string } @@ -71,9 +79,9 @@ type FullGinkgoTInterface interface { AddReportEntryVisibilityNever(name string, args ...any) //Prints to the GinkgoWriter - Print(a ...interface{}) - Printf(format string, a ...interface{}) - Println(a ...interface{}) + Print(a ...any) + Printf(format string, a ...any) + Println(a ...any) //Provides access to Ginkgo's color formatting, correctly configured to match the color settings specified in the invocation of ginkgo F(format string, args ...any) string @@ -92,3 +100,81 @@ type FullGinkgoTInterface interface { AttachProgressReporter(func() string) func() } + +/* +GinkgoTB() implements a wrapper that exactly matches the testing.TB interface. + +In go 1.18 a new private() function was added to the testing.TB interface. Any function which accepts testing.TB as input needs to be passed in something that directly implements testing.TB. + +This wrapper satisfies the testing.TB interface and intended to be used as a drop-in replacement with third party libraries that accept testing.TB. + +Similar to GinkgoT(), GinkgoTB() takes an optional offset argument that can be used to get the +correct line number associated with the failure - though you do not need to use this if you call GinkgoHelper() or GinkgoT().Helper() appropriately +*/ +func GinkgoTB(optionalOffset ...int) *GinkgoTBWrapper { + offset := 2 + if len(optionalOffset) > 0 { + offset = optionalOffset[0] + } + return &GinkgoTBWrapper{GinkgoT: GinkgoT(offset)} +} + +type GinkgoTBWrapper struct { + testing.TB + GinkgoT FullGinkgoTInterface +} + +func (g *GinkgoTBWrapper) Cleanup(f func()) { + g.GinkgoT.Cleanup(f) +} +func (g *GinkgoTBWrapper) Error(args ...any) { + g.GinkgoT.Error(args...) +} +func (g *GinkgoTBWrapper) Errorf(format string, args ...any) { + g.GinkgoT.Errorf(format, args...) +} +func (g *GinkgoTBWrapper) Fail() { + g.GinkgoT.Fail() +} +func (g *GinkgoTBWrapper) FailNow() { + g.GinkgoT.FailNow() +} +func (g *GinkgoTBWrapper) Failed() bool { + return g.GinkgoT.Failed() +} +func (g *GinkgoTBWrapper) Fatal(args ...any) { + g.GinkgoT.Fatal(args...) +} +func (g *GinkgoTBWrapper) Fatalf(format string, args ...any) { + g.GinkgoT.Fatalf(format, args...) +} +func (g *GinkgoTBWrapper) Helper() { + types.MarkAsHelper(1) +} +func (g *GinkgoTBWrapper) Log(args ...any) { + g.GinkgoT.Log(args...) +} +func (g *GinkgoTBWrapper) Logf(format string, args ...any) { + g.GinkgoT.Logf(format, args...) +} +func (g *GinkgoTBWrapper) Name() string { + return g.GinkgoT.Name() +} +func (g *GinkgoTBWrapper) Setenv(key, value string) { + g.GinkgoT.Setenv(key, value) +} +func (g *GinkgoTBWrapper) Skip(args ...any) { + g.GinkgoT.Skip(args...) +} +func (g *GinkgoTBWrapper) SkipNow() { + g.GinkgoT.SkipNow() +} +func (g *GinkgoTBWrapper) Skipf(format string, args ...any) { + g.GinkgoT.Skipf(format, args...) +} +func (g *GinkgoTBWrapper) Skipped() bool { + return g.GinkgoT.Skipped() +} +func (g *GinkgoTBWrapper) TempDir() string { + return g.GinkgoT.TempDir() +} diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go new file mode 100644 index 000000000000..4c374935b8a5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go @@ -0,0 +1,7 @@ +//go:build wasm + +package internal + +func NewOutputInterceptor() OutputInterceptor { + return &NoopOutputInterceptor{} +} diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go new file mode 100644 index 000000000000..8c53fe0adad4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go @@ -0,0 +1,10 @@ +//go:build wasm + +package internal + +import ( + "os" + "syscall" +) + +var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1} diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go index 2515b84a140c..2d2ea2fc3577 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go @@ -17,7 +17,7 @@ type specContext struct { context.Context *ProgressReporterManager - cancel context.CancelFunc + cancel context.CancelCauseFunc suite *Suite } @@ -30,7 +30,7 @@ Note that while SpecContext is used to enforce deadlines by Ginkgo it is not con This is because Ginkgo needs finer control over when the context is canceled. Specifically, Ginkgo needs to generate a ProgressReport before it cancels the context to ensure progress is captured where the spec is currently running. The only way to avoid a race here is to manually control the cancellation. */ func NewSpecContext(suite *Suite) *specContext { - ctx, cancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancelCause(context.Background()) sc := &specContext{ cancel: cancel, suite: suite, diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/suite.go index fe6e8288ad90..2b4db48af87f 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/internal/suite.go @@ -79,7 +79,7 @@ func NewSuite() *Suite { func (suite *Suite) Clone() (*Suite, error) { if suite.phase != PhaseBuildTopLevel { - return nil, fmt.Errorf("cnanot clone suite after tree has been built") + return nil, fmt.Errorf("cannot clone suite after tree has been built") } return &Suite{ tree: &TreeNode{}, @@ -858,7 +858,7 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } sc := NewSpecContext(suite) - defer sc.cancel() + defer sc.cancel(fmt.Errorf("spec has finished")) suite.selectiveLock.Lock() suite.currentSpecContext = sc @@ -958,7 +958,7 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ // tell the spec to stop. it's important we generate the progress report first to make sure we capture where // the spec is actually stuck - sc.cancel() + sc.cancel(fmt.Errorf("%s timeout occurred", timeoutInPlay)) //and now we wait for the grace period gracePeriodChannel = time.After(gracePeriod) case <-interruptStatus.Channel: @@ -985,7 +985,7 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } progressReport = progressReport.WithoutOtherGoroutines() - sc.cancel() + sc.cancel(fmt.Errorf(interruptStatus.Message())) if interruptStatus.Level == interrupt_handler.InterruptLevelBailOut { if interruptStatus.ShouldIncludeProgressReport() { diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go index be506f9b472d..5d3e8db994bb 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go @@ -18,6 +18,7 @@ func GenerateJSONReport(report types.Report, destination string) error { if err != nil { return err } + defer f.Close() enc := json.NewEncoder(f) enc.SetIndent("", " ") err = enc.Encode([]types.Report{ @@ -26,7 +27,7 @@ func GenerateJSONReport(report types.Report, destination string) error { if err != nil { return err } - return f.Close() + return nil } // MergeJSONReports produces a single JSON-formatted report at the passed in destination by merging the JSON-formatted reports provided in sources @@ -57,11 +58,12 @@ func MergeAndCleanupJSONReports(sources []string, destination string) ([]string, if err != nil { return messages, err } + defer f.Close() enc := json.NewEncoder(f) enc.SetIndent("", " ") err = enc.Encode(allReports) if err != nil { return messages, err } - return messages, f.Close() + return messages, nil } diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go index 816042208c08..43244a9bd519 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go @@ -15,6 +15,7 @@ import ( "fmt" "os" "path" + "regexp" "strings" "github.com/onsi/ginkgo/v2/config" @@ -104,6 +105,8 @@ type JUnitProperty struct { Value string `xml:"value,attr"` } +var ownerRE = regexp.MustCompile(`(?i)^owner:(.*)$`) + type JUnitTestCase struct { // Name maps onto the full text of the spec - equivalent to "[SpecReport.LeafNodeType] SpecReport.FullText()" Name string `xml:"name,attr"` @@ -113,6 +116,8 @@ type JUnitTestCase struct { Status string `xml:"status,attr"` // Time is the time in seconds to execute the spec - maps onto SpecReport.RunTime Time float64 `xml:"time,attr"` + // Owner is the owner the spec - is set if a label matching Label("owner:X") is provided. The last matching label is used as the owner, thereby allowing specs to override owners specified in container nodes. + Owner string `xml:"owner,attr,omitempty"` //Skipped is populated with a message if the test was skipped or pending Skipped *JUnitSkipped `xml:"skipped,omitempty"` //Error is populated if the test panicked or was interrupted @@ -195,6 +200,12 @@ func GenerateJUnitReportWithConfig(report types.Report, dst string, config Junit if len(labels) > 0 && !config.OmitSpecLabels { name = name + " [" + strings.Join(labels, ", ") + "]" } + owner := "" + for _, label := range labels { + if matches := ownerRE.FindStringSubmatch(label); len(matches) == 2 { + owner = matches[1] + } + } name = strings.TrimSpace(name) test := JUnitTestCase{ @@ -202,6 +213,7 @@ func GenerateJUnitReportWithConfig(report types.Report, dst string, config Junit Classname: report.SuiteDescription, Status: spec.State.String(), Time: spec.RunTime.Seconds(), + Owner: owner, } if !spec.State.Is(config.OmitTimelinesForSpecState) { test.SystemErr = systemErrForUnstructuredReporters(spec) diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/table_dsl.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/table_dsl.go index ac9b7abb5ee2..a3aef821bff4 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/table_dsl.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/table_dsl.go @@ -46,7 +46,7 @@ And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-s */ func DescribeTable(description string, args ...interface{}) bool { GinkgoHelper() - generateTable(description, args...) + generateTable(description, false, args...) return true } @@ -56,7 +56,7 @@ You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`. func FDescribeTable(description string, args ...interface{}) bool { GinkgoHelper() args = append(args, internal.Focus) - generateTable(description, args...) + generateTable(description, false, args...) return true } @@ -66,7 +66,7 @@ You can mark a table as pending with `PDescribeTable`. This is equivalent to `P func PDescribeTable(description string, args ...interface{}) bool { GinkgoHelper() args = append(args, internal.Pending) - generateTable(description, args...) + generateTable(description, false, args...) return true } @@ -75,6 +75,71 @@ You can mark a table as pending with `XDescribeTable`. This is equivalent to `X */ var XDescribeTable = PDescribeTable +/* +DescribeTableSubtree describes a table-driven spec that generates a set of tests for each entry. + +For example: + + DescribeTableSubtree("a subtree table", + func(url string, code int, message string) { + var resp *http.Response + BeforeEach(func() { + var err error + resp, err = http.Get(url) + Expect(err).NotTo(HaveOccurred()) + DeferCleanup(resp.Body.Close) + }) + + It("should return the expected status code", func() { + Expect(resp.StatusCode).To(Equal(code)) + }) + + It("should return the expected message", func() { + body, err := ioutil.ReadAll(resp.Body) + Expect(err).NotTo(HaveOccurred()) + Expect(string(body)).To(Equal(message)) + }) + }, + Entry("default response", "example.com/response", http.StatusOK, "hello world"), + Entry("missing response", "example.com/missing", http.StatusNotFound, "wat?"), + ) + +Note that you **must** place define an It inside the body function. + +You can learn more about DescribeTableSubtree here: https://onsi.github.io/ginkgo/#table-specs +And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-specs-patterns +*/ +func DescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + generateTable(description, true, args...) + return true +} + +/* +You can focus a table with `FDescribeTableSubtree`. This is equivalent to `FDescribe`. +*/ +func FDescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Focus) + generateTable(description, true, args...) + return true +} + +/* +You can mark a table as pending with `PDescribeTableSubtree`. This is equivalent to `PDescribe`. +*/ +func PDescribeTableSubtree(description string, args ...interface{}) bool { + GinkgoHelper() + args = append(args, internal.Pending) + generateTable(description, true, args...) + return true +} + +/* +You can mark a table as pending with `XDescribeTableSubtree`. This is equivalent to `XDescribe`. +*/ +var XDescribeTableSubtree = PDescribeTableSubtree + /* TableEntry represents an entry in a table test. You generally use the `Entry` constructor. */ @@ -131,14 +196,14 @@ var XEntry = PEntry var contextType = reflect.TypeOf(new(context.Context)).Elem() var specContextType = reflect.TypeOf(new(SpecContext)).Elem() -func generateTable(description string, args ...interface{}) { +func generateTable(description string, isSubtree bool, args ...interface{}) { GinkgoHelper() cl := types.NewCodeLocation(0) containerNodeArgs := []interface{}{cl} entries := []TableEntry{} - var itBody interface{} - var itBodyType reflect.Type + var internalBody interface{} + var internalBodyType reflect.Type var tableLevelEntryDescription interface{} tableLevelEntryDescription = func(args ...interface{}) string { @@ -166,11 +231,11 @@ func generateTable(description string, args ...interface{}) { case t.Kind() == reflect.Func && t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(""): tableLevelEntryDescription = arg case t.Kind() == reflect.Func: - if itBody != nil { + if internalBody != nil { exitIfErr(types.GinkgoErrors.MultipleEntryBodyFunctionsForTable(cl)) } - itBody = arg - itBodyType = reflect.TypeOf(itBody) + internalBody = arg + internalBodyType = reflect.TypeOf(internalBody) default: containerNodeArgs = append(containerNodeArgs, arg) } @@ -200,39 +265,47 @@ func generateTable(description string, args ...interface{}) { err = types.GinkgoErrors.InvalidEntryDescription(entry.codeLocation) } - itNodeArgs := []interface{}{entry.codeLocation} - itNodeArgs = append(itNodeArgs, entry.decorations...) + internalNodeArgs := []interface{}{entry.codeLocation} + internalNodeArgs = append(internalNodeArgs, entry.decorations...) hasContext := false - if itBodyType.NumIn() > 0. { - if itBodyType.In(0).Implements(specContextType) { + if internalBodyType.NumIn() > 0. { + if internalBodyType.In(0).Implements(specContextType) { hasContext = true - } else if itBodyType.In(0).Implements(contextType) && (len(entry.parameters) == 0 || !reflect.TypeOf(entry.parameters[0]).Implements(contextType)) { + } else if internalBodyType.In(0).Implements(contextType) && (len(entry.parameters) == 0 || !reflect.TypeOf(entry.parameters[0]).Implements(contextType)) { hasContext = true } } if err == nil { - err = validateParameters(itBody, entry.parameters, "Table Body function", entry.codeLocation, hasContext) + err = validateParameters(internalBody, entry.parameters, "Table Body function", entry.codeLocation, hasContext) } if hasContext { - itNodeArgs = append(itNodeArgs, func(c SpecContext) { + internalNodeArgs = append(internalNodeArgs, func(c SpecContext) { if err != nil { panic(err) } - invokeFunction(itBody, append([]interface{}{c}, entry.parameters...)) + invokeFunction(internalBody, append([]interface{}{c}, entry.parameters...)) }) + if isSubtree { + exitIfErr(types.GinkgoErrors.ContextsCannotBeUsedInSubtreeTables(cl)) + } } else { - itNodeArgs = append(itNodeArgs, func() { + internalNodeArgs = append(internalNodeArgs, func() { if err != nil { panic(err) } - invokeFunction(itBody, entry.parameters) + invokeFunction(internalBody, entry.parameters) }) } - pushNode(internal.NewNode(deprecationTracker, types.NodeTypeIt, description, itNodeArgs...)) + internalNodeType := types.NodeTypeIt + if isSubtree { + internalNodeType = types.NodeTypeContainer + } + + pushNode(internal.NewNode(deprecationTracker, internalNodeType, description, internalNodeArgs...)) } }) diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/code_location.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/code_location.go index 9cd5768170a4..57e87517e076 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/code_location.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/code_location.go @@ -149,7 +149,7 @@ func PruneStack(fullStackTrace string, skip int) string { re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`) for i := 0; i < len(stack)/2; i++ { // We filter out based on the source code file name. - if !re.Match([]byte(stack[i*2+1])) { + if !re.MatchString(stack[i*2+1]) { prunedStack = append(prunedStack, stack[i*2]) prunedStack = append(prunedStack, stack[i*2+1]) } diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/errors.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/errors.go index 4fbdc3e9b1d3..6bb72d00ccda 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/errors.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/errors.go @@ -505,6 +505,15 @@ func (g ginkgoErrors) IncorrectVariadicParameterTypeToTableFunction(expected, ac } } +func (g ginkgoErrors) ContextsCannotBeUsedInSubtreeTables(cl CodeLocation) error { + return GinkgoError{ + Heading: "Contexts cannot be used in subtree tables", + Message: "You''ve defined a subtree body function that accepts a context but did not provide one in the table entry. Ginkgo SpecContexts can only be passed in to subject and setup nodes - so if you are trying to implement a spec timeout you should request a context in the It function within your subtree body function, not in the subtree body function itself.", + CodeLocation: cl, + DocLink: "table-specs", + } +} + /* Parallel Synchronization errors */ func (g ginkgoErrors) AggregatedReportUnavailableDueToNodeDisappearing() error { diff --git a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/version.go b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/version.go index a37f308286b7..ed934647454b 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/cluster-autoscaler/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.13.0" +const VERSION = "2.15.0" diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/onsi/gomega/CHANGELOG.md index 4fc45f29c025..fece58b1110f 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,26 @@ +## 1.31.0 + +### Features +- Async assertions include context cancellation cause if present [121c37f] + +### Maintenance +- Bump minimum go version [dee1e3c] +- docs: fix typo in example usage "occured" -> "occurred" [49005fe] +- Bump actions/setup-go from 4 to 5 (#714) [f1c8757] +- Bump github/codeql-action from 2 to 3 (#715) [9836e76] +- Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.2 (#713) [54726f0] +- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#711) [df97ecc] +- docs: fix `HaveExactElement` typo (#712) [a672c86] + +## 1.30.0 + +### Features +- BeTrueBecause and BeFalseBecause allow for better failure messages [4da4c7f] + +### Maintenance +- Bump actions/checkout from 3 to 4 (#694) [6ca6e97] +- doc: fix type on gleak go doc [f1b8343] + ## 1.29.0 ### Features diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/gomega_dsl.go b/cluster-autoscaler/vendor/github.com/onsi/gomega/gomega_dsl.go index ba082146a7e2..4f7ab2791b46 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.29.0" +const GOMEGA_VERSION = "1.31.0" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/internal/async_assertion.go b/cluster-autoscaler/vendor/github.com/onsi/gomega/internal/async_assertion.go index 1188b0bce37f..cde9e2ec8bd6 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/internal/async_assertion.go +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/internal/async_assertion.go @@ -553,7 +553,12 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch lock.Unlock() } case <-contextDone: - fail("Context was cancelled") + err := context.Cause(assertion.ctx) + if err != nil && err != context.Canceled { + fail(fmt.Sprintf("Context was cancelled (cause: %s)", err)) + } else { + fail("Context was cancelled") + } return false case <-timeout: if assertion.asyncType == AsyncAssertionTypeEventually { diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers.go b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers.go index cd3f431d2fba..8860d677fc8f 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers.go +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers.go @@ -1,6 +1,7 @@ package gomega import ( + "fmt" "time" "github.com/google/go-cmp/cmp" @@ -52,15 +53,31 @@ func BeNil() types.GomegaMatcher { } // BeTrue succeeds if actual is true +// +// In general, it's better to use `BeTrueBecause(reason)` to provide a more useful error message if a true check fails. func BeTrue() types.GomegaMatcher { return &matchers.BeTrueMatcher{} } // BeFalse succeeds if actual is false +// +// In general, it's better to use `BeFalseBecause(reason)` to provide a more useful error message if a false check fails. func BeFalse() types.GomegaMatcher { return &matchers.BeFalseMatcher{} } +// BeTrueBecause succeeds if actual is true and displays the provided reason if it is false +// fmt.Sprintf is used to render the reason +func BeTrueBecause(format string, args ...any) types.GomegaMatcher { + return &matchers.BeTrueMatcher{Reason: fmt.Sprintf(format, args...)} +} + +// BeFalseBecause succeeds if actual is false and displays the provided reason if it is true. +// fmt.Sprintf is used to render the reason +func BeFalseBecause(format string, args ...any) types.GomegaMatcher { + return &matchers.BeFalseMatcher{Reason: fmt.Sprintf(format, args...)} +} + // HaveOccurred succeeds if actual is a non-nil error // The typical Go error checking pattern looks like: // @@ -377,7 +394,7 @@ func ConsistOf(elements ...interface{}) types.GomegaMatcher { } } -// HaveExactElemets succeeds if actual contains elements that precisely match the elemets passed into the matcher. The ordering of the elements does matter. +// HaveExactElements succeeds if actual contains elements that precisely match the elemets passed into the matcher. The ordering of the elements does matter. // By default HaveExactElements() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples: // // Expect([]string{"Foo", "FooBar"}).Should(HaveExactElements("Foo", "FooBar")) diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go index e326c0157749..8ee2b1c51e79 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go @@ -9,6 +9,7 @@ import ( ) type BeFalseMatcher struct { + Reason string } func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { @@ -20,9 +21,17 @@ func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err erro } func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be false") + if matcher.Reason == "" { + return format.Message(actual, "to be false") + } else { + return matcher.Reason + } } func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be false") + if matcher.Reason == "" { + return format.Message(actual, "not to be false") + } else { + return fmt.Sprintf(`Expected not false but got false\nNegation of "%s" failed`, matcher.Reason) + } } diff --git a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go index 60bc1e3fa7e3..3576aac884e3 100644 --- a/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go +++ b/cluster-autoscaler/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go @@ -9,6 +9,7 @@ import ( ) type BeTrueMatcher struct { + Reason string } func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { @@ -20,9 +21,17 @@ func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error } func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be true") + if matcher.Reason == "" { + return format.Message(actual, "to be true") + } else { + return matcher.Reason + } } func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be true") + if matcher.Reason == "" { + return format.Message(actual, "not to be true") + } else { + return fmt.Sprintf(`Expected not true but got true\nNegation of "%s" failed`, matcher.Reason) + } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go index 0cdaf747849f..f6e1b73bd921 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go @@ -10,6 +10,7 @@ import ( "strings" "sync" + "github.com/opencontainers/runc/libcontainer/utils" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -76,16 +77,16 @@ var ( // TestMode is set to true by unit tests that need "fake" cgroupfs. TestMode bool - cgroupFd int = -1 - prepOnce sync.Once - prepErr error - resolveFlags uint64 + cgroupRootHandle *os.File + prepOnce sync.Once + prepErr error + resolveFlags uint64 ) func prepareOpenat2() error { prepOnce.Do(func() { fd, err := unix.Openat2(-1, cgroupfsDir, &unix.OpenHow{ - Flags: unix.O_DIRECTORY | unix.O_PATH, + Flags: unix.O_DIRECTORY | unix.O_PATH | unix.O_CLOEXEC, }) if err != nil { prepErr = &os.PathError{Op: "openat2", Path: cgroupfsDir, Err: err} @@ -96,15 +97,16 @@ func prepareOpenat2() error { } return } + file := os.NewFile(uintptr(fd), cgroupfsDir) + var st unix.Statfs_t - if err = unix.Fstatfs(fd, &st); err != nil { + if err := unix.Fstatfs(int(file.Fd()), &st); err != nil { prepErr = &os.PathError{Op: "statfs", Path: cgroupfsDir, Err: err} logrus.Warnf("falling back to securejoin: %s", prepErr) return } - cgroupFd = fd - + cgroupRootHandle = file resolveFlags = unix.RESOLVE_BENEATH | unix.RESOLVE_NO_MAGICLINKS if st.Type == unix.CGROUP2_SUPER_MAGIC { // cgroupv2 has a single mountpoint and no "cpu,cpuacct" symlinks @@ -122,7 +124,7 @@ func openFile(dir, file string, flags int) (*os.File, error) { flags |= os.O_TRUNC | os.O_CREATE mode = 0o600 } - path := path.Join(dir, file) + path := path.Join(dir, utils.CleanPath(file)) if prepareOpenat2() != nil { return openFallback(path, flags, mode) } @@ -131,7 +133,7 @@ func openFile(dir, file string, flags int) (*os.File, error) { return openFallback(path, flags, mode) } - fd, err := unix.Openat2(cgroupFd, relPath, + fd, err := unix.Openat2(int(cgroupRootHandle.Fd()), relPath, &unix.OpenHow{ Resolve: resolveFlags, Flags: uint64(flags) | unix.O_CLOEXEC, @@ -139,20 +141,20 @@ func openFile(dir, file string, flags int) (*os.File, error) { }) if err != nil { err = &os.PathError{Op: "openat2", Path: path, Err: err} - // Check if cgroupFd is still opened to cgroupfsDir + // Check if cgroupRootHandle is still opened to cgroupfsDir // (happens when this package is incorrectly used // across the chroot/pivot_root/mntns boundary, or // when /sys/fs/cgroup is remounted). // // TODO: if such usage will ever be common, amend this - // to reopen cgroupFd and retry openat2. - fdStr := strconv.Itoa(cgroupFd) + // to reopen cgroupRootHandle and retry openat2. + fdStr := strconv.Itoa(int(cgroupRootHandle.Fd())) fdDest, _ := os.Readlink("/proc/self/fd/" + fdStr) if fdDest != cgroupfsDir { - // Wrap the error so it is clear that cgroupFd + // Wrap the error so it is clear that cgroupRootHandle // is opened to an unexpected/wrong directory. - err = fmt.Errorf("cgroupFd %s unexpectedly opened to %s != %s: %w", - fdStr, fdDest, cgroupfsDir, err) + err = fmt.Errorf("cgroupRootHandle %d unexpectedly opened to %s != %s: %w", + cgroupRootHandle.Fd(), fdDest, cgroupfsDir, err) } return nil, err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go index 8ddd6fdd8370..50f8f30cd397 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go @@ -1,6 +1,8 @@ package fs import ( + "errors" + "os" "strconv" "github.com/opencontainers/runc/libcontainer/cgroups" @@ -19,8 +21,23 @@ func (s *HugetlbGroup) Apply(path string, _ *configs.Resources, pid int) error { } func (s *HugetlbGroup) Set(path string, r *configs.Resources) error { + const suffix = ".limit_in_bytes" + skipRsvd := false + for _, hugetlb := range r.HugetlbLimit { - if err := cgroups.WriteFile(path, "hugetlb."+hugetlb.Pagesize+".limit_in_bytes", strconv.FormatUint(hugetlb.Limit, 10)); err != nil { + prefix := "hugetlb." + hugetlb.Pagesize + val := strconv.FormatUint(hugetlb.Limit, 10) + if err := cgroups.WriteFile(path, prefix+suffix, val); err != nil { + return err + } + if skipRsvd { + continue + } + if err := cgroups.WriteFile(path, prefix+".rsvd"+suffix, val); err != nil { + if errors.Is(err, os.ErrNotExist) { + skipRsvd = true + continue + } return err } } @@ -32,24 +49,29 @@ func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error { if !cgroups.PathExists(path) { return nil } + rsvd := ".rsvd" hugetlbStats := cgroups.HugetlbStats{} for _, pageSize := range cgroups.HugePageSizes() { - usage := "hugetlb." + pageSize + ".usage_in_bytes" - value, err := fscommon.GetCgroupParamUint(path, usage) + again: + prefix := "hugetlb." + pageSize + rsvd + + value, err := fscommon.GetCgroupParamUint(path, prefix+".usage_in_bytes") if err != nil { + if rsvd != "" && errors.Is(err, os.ErrNotExist) { + rsvd = "" + goto again + } return err } hugetlbStats.Usage = value - maxUsage := "hugetlb." + pageSize + ".max_usage_in_bytes" - value, err = fscommon.GetCgroupParamUint(path, maxUsage) + value, err = fscommon.GetCgroupParamUint(path, prefix+".max_usage_in_bytes") if err != nil { return err } hugetlbStats.MaxUsage = value - failcnt := "hugetlb." + pageSize + ".failcnt" - value, err = fscommon.GetCgroupParamUint(path, failcnt) + value, err = fscommon.GetCgroupParamUint(path, prefix+".failcnt") if err != nil { return err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go index b7c75f941385..783566d68f0d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go @@ -170,6 +170,10 @@ func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error { return err } stats.MemoryStats.SwapUsage = swapUsage + stats.MemoryStats.SwapOnlyUsage = cgroups.MemoryData{ + Usage: swapUsage.Usage - memoryUsage.Usage, + Failcnt: swapUsage.Failcnt - memoryUsage.Failcnt, + } kernelUsage, err := getMemoryData(path, "kmem") if err != nil { return err @@ -234,6 +238,12 @@ func getMemoryData(path, name string) (cgroups.MemoryData, error) { memoryData.Failcnt = value value, err = fscommon.GetCgroupParamUint(path, limit) if err != nil { + if name == "kmem" && os.IsNotExist(err) { + // Ignore ENOENT as kmem.limit_in_bytes has + // been removed in newer kernels. + return memoryData, nil + } + return cgroups.MemoryData{}, err } memoryData.Limit = value diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go index 1092331b25d8..2cb970a3d55b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go @@ -83,6 +83,7 @@ func tryDefaultCgroupRoot() string { if err != nil { return "" } + defer dir.Close() names, err := dir.Readdirnames(1) if err != nil { return "" diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go index c92a7e64af02..2ce2631e1879 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go @@ -1,6 +1,8 @@ package fs2 import ( + "errors" + "os" "strconv" "github.com/opencontainers/runc/libcontainer/cgroups" @@ -16,8 +18,22 @@ func setHugeTlb(dirPath string, r *configs.Resources) error { if !isHugeTlbSet(r) { return nil } + const suffix = ".max" + skipRsvd := false for _, hugetlb := range r.HugetlbLimit { - if err := cgroups.WriteFile(dirPath, "hugetlb."+hugetlb.Pagesize+".max", strconv.FormatUint(hugetlb.Limit, 10)); err != nil { + prefix := "hugetlb." + hugetlb.Pagesize + val := strconv.FormatUint(hugetlb.Limit, 10) + if err := cgroups.WriteFile(dirPath, prefix+suffix, val); err != nil { + return err + } + if skipRsvd { + continue + } + if err := cgroups.WriteFile(dirPath, prefix+".rsvd"+suffix, val); err != nil { + if errors.Is(err, os.ErrNotExist) { + skipRsvd = true + continue + } return err } } @@ -27,15 +43,21 @@ func setHugeTlb(dirPath string, r *configs.Resources) error { func statHugeTlb(dirPath string, stats *cgroups.Stats) error { hugetlbStats := cgroups.HugetlbStats{} + rsvd := ".rsvd" for _, pagesize := range cgroups.HugePageSizes() { - value, err := fscommon.GetCgroupParamUint(dirPath, "hugetlb."+pagesize+".current") + again: + prefix := "hugetlb." + pagesize + rsvd + value, err := fscommon.GetCgroupParamUint(dirPath, prefix+".current") if err != nil { + if rsvd != "" && errors.Is(err, os.ErrNotExist) { + rsvd = "" + goto again + } return err } hugetlbStats.Usage = value - fileName := "hugetlb." + pagesize + ".events" - value, err = fscommon.GetValueByKey(dirPath, fileName, "max") + value, err = fscommon.GetValueByKey(dirPath, prefix+".events", "max") if err != nil { return err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go index 9cca98c4c0a2..01fe7d8e12d3 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go @@ -100,7 +100,7 @@ func statMemory(dirPath string, stats *cgroups.Stats) error { memoryUsage, err := getMemoryDataV2(dirPath, "") if err != nil { if errors.Is(err, unix.ENOENT) && dirPath == UnifiedMountpoint { - // The root cgroup does not have memory.{current,max} + // The root cgroup does not have memory.{current,max,peak} // so emulate those using data from /proc/meminfo and // /sys/fs/cgroup/memory.stat return rootStatsFromMeminfo(stats) @@ -108,10 +108,12 @@ func statMemory(dirPath string, stats *cgroups.Stats) error { return err } stats.MemoryStats.Usage = memoryUsage - swapUsage, err := getMemoryDataV2(dirPath, "swap") + swapOnlyUsage, err := getMemoryDataV2(dirPath, "swap") if err != nil { return err } + stats.MemoryStats.SwapOnlyUsage = swapOnlyUsage + swapUsage := swapOnlyUsage // As cgroup v1 reports SwapUsage values as mem+swap combined, // while in cgroup v2 swap values do not include memory, // report combined mem+swap for v1 compatibility. @@ -119,6 +121,9 @@ func statMemory(dirPath string, stats *cgroups.Stats) error { if swapUsage.Limit != math.MaxUint64 { swapUsage.Limit += memoryUsage.Limit } + // The `MaxUsage` of mem+swap cannot simply combine mem with + // swap. So set it to 0 for v1 compatibility. + swapUsage.MaxUsage = 0 stats.MemoryStats.SwapUsage = swapUsage return nil @@ -133,6 +138,7 @@ func getMemoryDataV2(path, name string) (cgroups.MemoryData, error) { } usage := moduleName + ".current" limit := moduleName + ".max" + maxUsage := moduleName + ".peak" value, err := fscommon.GetCgroupParamUint(path, usage) if err != nil { @@ -152,6 +158,14 @@ func getMemoryDataV2(path, name string) (cgroups.MemoryData, error) { } memoryData.Limit = value + // `memory.peak` since kernel 5.19 + // `memory.swap.peak` since kernel 6.5 + value, err = fscommon.GetCgroupParamUint(path, maxUsage) + if err != nil && !os.IsNotExist(err) { + return cgroups.MemoryData{}, err + } + memoryData.MaxUsage = value + return memoryData, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go index 40a81dd5a860..0d8371b05f13 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go @@ -78,6 +78,8 @@ type MemoryStats struct { Usage MemoryData `json:"usage,omitempty"` // usage of memory + swap SwapUsage MemoryData `json:"swap_usage,omitempty"` + // usage of swap only + SwapOnlyUsage MemoryData `json:"swap_only_usage,omitempty"` // usage of kernel memory KernelUsage MemoryData `json:"kernel_usage,omitempty"` // usage of kernel TCP memory diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go index c1b4a0041c20..6ebf5ec7b600 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go @@ -21,9 +21,9 @@ type Rlimit struct { // IDMap represents UID/GID Mappings for User Namespaces. type IDMap struct { - ContainerID int `json:"container_id"` - HostID int `json:"host_id"` - Size int `json:"size"` + ContainerID int64 `json:"container_id"` + HostID int64 `json:"host_id"` + Size int64 `json:"size"` } // Seccomp represents syscall restrictions diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go index 8c02848b70ab..51fe940748a3 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go @@ -1,6 +1,10 @@ package configs -import "errors" +import ( + "errors" + "fmt" + "math" +) var ( errNoUIDMap = errors.New("User namespaces enabled, but no uid mappings found.") @@ -16,11 +20,18 @@ func (c Config) HostUID(containerId int) (int, error) { if c.UidMappings == nil { return -1, errNoUIDMap } - id, found := c.hostIDFromMapping(containerId, c.UidMappings) + id, found := c.hostIDFromMapping(int64(containerId), c.UidMappings) if !found { return -1, errNoUserMap } - return id, nil + // If we are a 32-bit binary running on a 64-bit system, it's possible + // the mapped user is too large to store in an int, which means we + // cannot do the mapping. We can't just return an int64, because + // os.Setuid() takes an int. + if id > math.MaxInt { + return -1, fmt.Errorf("mapping for uid %d (host id %d) is larger than native integer size (%d)", containerId, id, math.MaxInt) + } + return int(id), nil } // Return unchanged id. return containerId, nil @@ -39,11 +50,18 @@ func (c Config) HostGID(containerId int) (int, error) { if c.GidMappings == nil { return -1, errNoGIDMap } - id, found := c.hostIDFromMapping(containerId, c.GidMappings) + id, found := c.hostIDFromMapping(int64(containerId), c.GidMappings) if !found { return -1, errNoGroupMap } - return id, nil + // If we are a 32-bit binary running on a 64-bit system, it's possible + // the mapped user is too large to store in an int, which means we + // cannot do the mapping. We can't just return an int64, because + // os.Setgid() takes an int. + if id > math.MaxInt { + return -1, fmt.Errorf("mapping for gid %d (host id %d) is larger than native integer size (%d)", containerId, id, math.MaxInt) + } + return int(id), nil } // Return unchanged id. return containerId, nil @@ -57,7 +75,7 @@ func (c Config) HostRootGID() (int, error) { // Utility function that gets a host ID for a container ID from user namespace map // if that ID is present in the map. -func (c Config) hostIDFromMapping(containerID int, uMap []IDMap) (int, bool) { +func (c Config) hostIDFromMapping(containerID int64, uMap []IDMap) (int64, bool) { for _, m := range uMap { if (containerID >= m.ContainerID) && (containerID <= (m.ContainerID + m.Size - 1)) { hostID := m.HostID + (containerID - m.ContainerID) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go index 9a6e5eb32a3c..37c383366fe0 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go @@ -28,25 +28,18 @@ func (v *ConfigValidator) rootlessEUID(config *configs.Config) error { return nil } -func hasIDMapping(id int, mappings []configs.IDMap) bool { - for _, m := range mappings { - if id >= m.ContainerID && id < m.ContainerID+m.Size { - return true - } - } - return false -} - func rootlessEUIDMappings(config *configs.Config) error { if !config.Namespaces.Contains(configs.NEWUSER) { return errors.New("rootless container requires user namespaces") } - - if len(config.UidMappings) == 0 { - return errors.New("rootless containers requires at least one UID mapping") - } - if len(config.GidMappings) == 0 { - return errors.New("rootless containers requires at least one GID mapping") + // We only require mappings if we are not joining another userns. + if path := config.Namespaces.PathOf(configs.NEWUSER); path == "" { + if len(config.UidMappings) == 0 { + return errors.New("rootless containers requires at least one UID mapping") + } + if len(config.GidMappings) == 0 { + return errors.New("rootless containers requires at least one GID mapping") + } } return nil } @@ -70,8 +63,8 @@ func rootlessEUIDMount(config *configs.Config) error { // Ignore unknown mount options. continue } - if !hasIDMapping(uid, config.UidMappings) { - return errors.New("cannot specify uid= mount options for unmapped uid in rootless containers") + if _, err := config.HostUID(uid); err != nil { + return fmt.Errorf("cannot specify uid=%d mount option for rootless container: %w", uid, err) } } @@ -82,8 +75,8 @@ func rootlessEUIDMount(config *configs.Config) error { // Ignore unknown mount options. continue } - if !hasIDMapping(gid, config.GidMappings) { - return errors.New("cannot specify gid= mount options for unmapped gid in rootless containers") + if _, err := config.HostGID(gid); err != nil { + return fmt.Errorf("cannot specify gid=%d mount option for rootless container: %w", gid, err) } } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go index 4fbd308dadd6..ece70a45d315 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go @@ -109,11 +109,19 @@ func (v *ConfigValidator) security(config *configs.Config) error { func (v *ConfigValidator) usernamespace(config *configs.Config) error { if config.Namespaces.Contains(configs.NEWUSER) { if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) { - return errors.New("USER namespaces aren't enabled in the kernel") + return errors.New("user namespaces aren't enabled in the kernel") } + hasPath := config.Namespaces.PathOf(configs.NEWUSER) != "" + hasMappings := config.UidMappings != nil || config.GidMappings != nil + if !hasPath && !hasMappings { + return errors.New("user namespaces enabled, but no namespace path to join nor mappings to apply specified") + } + // The hasPath && hasMappings validation case is handled in specconv -- + // we cache the mappings in Config during specconv in the hasPath case, + // so we cannot do that validation here. } else { if config.UidMappings != nil || config.GidMappings != nil { - return errors.New("User namespace mappings specified, but USER namespace isn't enabled in the config") + return errors.New("user namespace mappings specified, but user namespace isn't enabled in the config") } } return nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go index 2f17e37d43dc..40b332f98104 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go @@ -353,6 +353,15 @@ func (c *linuxContainer) start(process *Process) (retErr error) { }() } + // Before starting "runc init", mark all non-stdio open files as O_CLOEXEC + // to make sure we don't leak any files into "runc init". Any files to be + // passed to "runc init" through ExtraFiles will get dup2'd by the Go + // runtime and thus their O_CLOEXEC flag will be cleared. This is some + // additional protection against attacks like CVE-2024-21626, by making + // sure we never leak files to "runc init" we didn't intend to. + if err := utils.CloseExecFrom(3); err != nil { + return fmt.Errorf("unable to mark non-stdio fds as cloexec: %w", err) + } if err := parent.start(); err != nil { return fmt.Errorf("unable to start container process: %w", err) } @@ -2268,7 +2277,7 @@ func ignoreTerminateErrors(err error) error { func requiresRootOrMappingTool(c *configs.Config) bool { gidMap := []configs.IDMap{ - {ContainerID: 0, HostID: os.Getegid(), Size: 1}, + {ContainerID: 0, HostID: int64(os.Getegid()), Size: 1}, } return !reflect.DeepEqual(c.GidMappings, gidMap) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go index 5b88c71fc83a..d9f18139f54b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go @@ -8,6 +8,7 @@ import ( "io" "net" "os" + "path/filepath" "strings" "unsafe" @@ -135,6 +136,32 @@ func populateProcessEnvironment(env []string) error { return nil } +// verifyCwd ensures that the current directory is actually inside the mount +// namespace root of the current process. +func verifyCwd() error { + // getcwd(2) on Linux detects if cwd is outside of the rootfs of the + // current mount namespace root, and in that case prefixes "(unreachable)" + // to the returned string. glibc's getcwd(3) and Go's Getwd() both detect + // when this happens and return ENOENT rather than returning a non-absolute + // path. In both cases we can therefore easily detect if we have an invalid + // cwd by checking the return value of getcwd(3). See getcwd(3) for more + // details, and CVE-2024-21626 for the security issue that motivated this + // check. + // + // We have to use unix.Getwd() here because os.Getwd() has a workaround for + // $PWD which involves doing stat(.), which can fail if the current + // directory is inaccessible to the container process. + if wd, err := unix.Getwd(); errors.Is(err, unix.ENOENT) { + return errors.New("current working directory is outside of container mount namespace root -- possible container breakout detected") + } else if err != nil { + return fmt.Errorf("failed to verify if current working directory is safe: %w", err) + } else if !filepath.IsAbs(wd) { + // We shouldn't ever hit this, but check just in case. + return fmt.Errorf("current working directory is not absolute -- possible container breakout detected: cwd is %q", wd) + } + return nil +} + // finalizeNamespace drops the caps, sets the correct user // and working dir, and closes any leaked file descriptors // before executing the command inside the namespace @@ -193,6 +220,10 @@ func finalizeNamespace(config *initConfig) error { return fmt.Errorf("chdir to cwd (%q) set in config.json failed: %w", config.Cwd, err) } } + // Make sure our final working directory is inside the container. + if err := verifyCwd(); err != nil { + return err + } if err := system.ClearKeepCaps(); err != nil { return fmt.Errorf("unable to clear keep caps: %w", err) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go index 6376512b086f..efe6dca58b21 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go @@ -81,7 +81,7 @@ import "C" var retErrnoEnosys = uint32(C.C_ACT_ERRNO_ENOSYS) // This syscall is used for multiplexing "large" syscalls on s390(x). Unknown -// syscalls will end up with this syscall number, so we need to explcitly +// syscalls will end up with this syscall number, so we need to explicitly // return -ENOSYS for this syscall on those architectures. const s390xMultiplexSyscall libseccomp.ScmpSyscall = 0 diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go index 09ab552b3d12..d1bb12273c04 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "os" + "os/exec" "strconv" "github.com/opencontainers/selinux/go-selinux" @@ -14,6 +15,7 @@ import ( "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" + "github.com/opencontainers/runc/libcontainer/utils" ) // linuxSetnsInit performs the container's initialization for running a new process @@ -82,6 +84,21 @@ func (l *linuxSetnsInit) Init() error { if err := apparmor.ApplyProfile(l.config.AppArmorProfile); err != nil { return err } + + // Check for the arg before waiting to make sure it exists and it is + // returned as a create time error. + name, err := exec.LookPath(l.config.Args[0]) + if err != nil { + return err + } + // exec.LookPath in Go < 1.20 might return no error for an executable + // residing on a file system mounted with noexec flag, so perform this + // extra check now while we can still return a proper error. + // TODO: remove this once go < 1.20 is not supported. + if err := eaccess(name); err != nil { + return &os.PathError{Op: "eaccess", Path: name, Err: err} + } + // Set seccomp as close to execve as possible, so as few syscalls take // place afterward (reducing the amount of syscalls that users need to // enable in their seccomp profiles). @@ -101,5 +118,23 @@ func (l *linuxSetnsInit) Init() error { return &os.PathError{Op: "close log pipe", Path: "fd " + strconv.Itoa(l.logFd), Err: err} } - return system.Execv(l.config.Args[0], l.config.Args[0:], os.Environ()) + // Close all file descriptors we are not passing to the container. This is + // necessary because the execve target could use internal runc fds as the + // execve path, potentially giving access to binary files from the host + // (which can then be opened by container processes, leading to container + // escapes). Note that because this operation will close any open file + // descriptors that are referenced by (*os.File) handles from underneath + // the Go runtime, we must not do any file operations after this point + // (otherwise the (*os.File) finaliser could close the wrong file). See + // CVE-2024-21626 for more information as to why this protection is + // necessary. + // + // This is not needed for runc-dmz, because the extra execve(2) step means + // that all O_CLOEXEC file descriptors have already been closed and thus + // the second execve(2) from runc-dmz cannot access internal file + // descriptors from runc. + if err := utils.UnsafeCloseFrom(l.config.PassedFilesCount + 3); err != nil { + return err + } + return system.Exec(name, l.config.Args[0:], os.Environ()) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go index c09a7bed30ea..d1d94352f93d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go @@ -17,6 +17,7 @@ import ( "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" + "github.com/opencontainers/runc/libcontainer/utils" ) type linuxStandardInit struct { @@ -258,5 +259,23 @@ func (l *linuxStandardInit) Init() error { return err } + // Close all file descriptors we are not passing to the container. This is + // necessary because the execve target could use internal runc fds as the + // execve path, potentially giving access to binary files from the host + // (which can then be opened by container processes, leading to container + // escapes). Note that because this operation will close any open file + // descriptors that are referenced by (*os.File) handles from underneath + // the Go runtime, we must not do any file operations after this point + // (otherwise the (*os.File) finaliser could close the wrong file). See + // CVE-2024-21626 for more information as to why this protection is + // necessary. + // + // This is not needed for runc-dmz, because the extra execve(2) step means + // that all O_CLOEXEC file descriptors have already been closed and thus + // the second execve(2) from runc-dmz cannot access internal file + // descriptors from runc. + if err := utils.UnsafeCloseFrom(l.config.PassedFilesCount + 3); err != nil { + return err + } return system.Exec(name, l.config.Args[0:], os.Environ()) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps.c b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps.c new file mode 100644 index 000000000000..84f2c6188c30 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps.c @@ -0,0 +1,79 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +/* + * All of the code here is run inside an aync-signal-safe context, so we need + * to be careful to not call any functions that could cause issues. In theory, + * since we are a Go program, there are fewer restrictions in practice, it's + * better to be safe than sorry. + * + * The only exception is exit, which we need to call to make sure we don't + * return into runc. + */ + +void bail(int pipefd, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + vdprintf(pipefd, fmt, args); + va_end(args); + + exit(1); +} + +int spawn_userns_cat(char *userns_path, char *path, int outfd, int errfd) +{ + char buffer[4096] = { 0 }; + + pid_t child = fork(); + if (child != 0) + return child; + /* in child */ + + /* Join the target userns. */ + int nsfd = open(userns_path, O_RDONLY); + if (nsfd < 0) + bail(errfd, "open userns path %s failed: %m", userns_path); + + int err = setns(nsfd, CLONE_NEWUSER); + if (err < 0) + bail(errfd, "setns %s failed: %m", userns_path); + + close(nsfd); + + /* Pipe the requested file contents. */ + int fd = open(path, O_RDONLY); + if (fd < 0) + bail(errfd, "open %s in userns %s failed: %m", path, userns_path); + + int nread, ntotal = 0; + while ((nread = read(fd, buffer, sizeof(buffer))) != 0) { + if (nread < 0) + bail(errfd, "read bytes from %s failed (after %d total bytes read): %m", path, ntotal); + ntotal += nread; + + int nwritten = 0; + while (nwritten < nread) { + int n = write(outfd, buffer, nread - nwritten); + if (n < 0) + bail(errfd, "write %d bytes from %s failed (after %d bytes written): %m", + nread - nwritten, path, nwritten); + nwritten += n; + } + if (nread != nwritten) + bail(errfd, "mismatch for bytes read and written: %d read != %d written", nread, nwritten); + } + + close(fd); + close(outfd); + close(errfd); + + /* We must exit here, otherwise we would return into a forked runc. */ + exit(0); +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps_linux.go new file mode 100644 index 000000000000..7a8c2b023b31 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps_linux.go @@ -0,0 +1,186 @@ +//go:build linux + +package userns + +import ( + "bufio" + "bytes" + "fmt" + "io" + "os" + "unsafe" + + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/sirupsen/logrus" +) + +/* +#include +extern int spawn_userns_cat(char *userns_path, char *path, int outfd, int errfd); +*/ +import "C" + +func parseIdmapData(data []byte) (ms []configs.IDMap, err error) { + scanner := bufio.NewScanner(bytes.NewReader(data)) + for scanner.Scan() { + var m configs.IDMap + line := scanner.Text() + if _, err := fmt.Sscanf(line, "%d %d %d", &m.ContainerID, &m.HostID, &m.Size); err != nil { + return nil, fmt.Errorf("parsing id map failed: invalid format in line %q: %w", line, err) + } + ms = append(ms, m) + } + if err := scanner.Err(); err != nil { + return nil, fmt.Errorf("parsing id map failed: %w", err) + } + return ms, nil +} + +// Do something equivalent to nsenter --user= cat , but more +// efficiently. Returns the contents of the requested file from within the user +// namespace. +func spawnUserNamespaceCat(nsPath string, path string) ([]byte, error) { + rdr, wtr, err := os.Pipe() + if err != nil { + return nil, fmt.Errorf("create pipe for userns spawn failed: %w", err) + } + defer rdr.Close() + defer wtr.Close() + + errRdr, errWtr, err := os.Pipe() + if err != nil { + return nil, fmt.Errorf("create error pipe for userns spawn failed: %w", err) + } + defer errRdr.Close() + defer errWtr.Close() + + cNsPath := C.CString(nsPath) + defer C.free(unsafe.Pointer(cNsPath)) + cPath := C.CString(path) + defer C.free(unsafe.Pointer(cPath)) + + childPid := C.spawn_userns_cat(cNsPath, cPath, C.int(wtr.Fd()), C.int(errWtr.Fd())) + + if childPid < 0 { + return nil, fmt.Errorf("failed to spawn fork for userns") + } else if childPid == 0 { + // this should never happen + panic("runc executing inside fork child -- unsafe state!") + } + + // We are in the parent -- close the write end of the pipe before reading. + wtr.Close() + output, err := io.ReadAll(rdr) + rdr.Close() + if err != nil { + return nil, fmt.Errorf("reading from userns spawn failed: %w", err) + } + + // Ditto for the error pipe. + errWtr.Close() + errOutput, err := io.ReadAll(errRdr) + errRdr.Close() + if err != nil { + return nil, fmt.Errorf("reading from userns spawn error pipe failed: %w", err) + } + errOutput = bytes.TrimSpace(errOutput) + + // Clean up the child. + child, err := os.FindProcess(int(childPid)) + if err != nil { + return nil, fmt.Errorf("could not find userns spawn process: %w", err) + } + state, err := child.Wait() + if err != nil { + return nil, fmt.Errorf("failed to wait for userns spawn process: %w", err) + } + if !state.Success() { + errStr := string(errOutput) + if errStr == "" { + errStr = fmt.Sprintf("unknown error (status code %d)", state.ExitCode()) + } + return nil, fmt.Errorf("userns spawn: %s", errStr) + } else if len(errOutput) > 0 { + // We can just ignore weird output in the error pipe if the process + // didn't bail(), but for completeness output for debugging. + logrus.Debugf("userns spawn succeeded but unexpected error message found: %s", string(errOutput)) + } + // The subprocess succeeded, return whatever it wrote to the pipe. + return output, nil +} + +func GetUserNamespaceMappings(nsPath string) (uidMap, gidMap []configs.IDMap, err error) { + var ( + pid int + extra rune + tryFastPath bool + ) + + // nsPath is usually of the form /proc//ns/user, which means that we + // already have a pid that is part of the user namespace and thus we can + // just use the pid to read from /proc//*id_map. + // + // Note that Sscanf doesn't consume the whole input, so we check for any + // trailing data with %c. That way, we can be sure the pattern matched + // /proc/$pid/ns/user _exactly_ iff n === 1. + if n, _ := fmt.Sscanf(nsPath, "/proc/%d/ns/user%c", &pid, &extra); n == 1 { + tryFastPath = pid > 0 + } + + for _, mapType := range []struct { + name string + idMap *[]configs.IDMap + }{ + {"uid_map", &uidMap}, + {"gid_map", &gidMap}, + } { + var mapData []byte + + if tryFastPath { + path := fmt.Sprintf("/proc/%d/%s", pid, mapType.name) + data, err := os.ReadFile(path) + if err != nil { + // Do not error out here -- we need to try the slow path if the + // fast path failed. + logrus.Debugf("failed to use fast path to read %s from userns %s (error: %s), falling back to slow userns-join path", mapType.name, nsPath, err) + } else { + mapData = data + } + } else { + logrus.Debugf("cannot use fast path to read %s from userns %s, falling back to slow userns-join path", mapType.name, nsPath) + } + + if mapData == nil { + // We have to actually join the namespace if we cannot take the + // fast path. The path is resolved with respect to the child + // process, so just use /proc/self. + data, err := spawnUserNamespaceCat(nsPath, "/proc/self/"+mapType.name) + if err != nil { + return nil, nil, err + } + mapData = data + } + idMap, err := parseIdmapData(mapData) + if err != nil { + return nil, nil, fmt.Errorf("failed to parse %s of userns %s: %w", mapType.name, nsPath, err) + } + *mapType.idMap = idMap + } + + return uidMap, gidMap, nil +} + +// IsSameMapping returns whether or not the two id mappings are the same. Note +// that if the order of the mappings is different, or a mapping has been split, +// the mappings will be considered different. +func IsSameMapping(a, b []configs.IDMap) bool { + if len(a) != len(b) { + return false + } + for idx := range a { + if a[idx] != b[idx] { + return false + } + } + return true +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go index 220d0b439379..bf3237a29118 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go @@ -7,6 +7,7 @@ import ( "fmt" "os" "strconv" + _ "unsafe" // for go:linkname "golang.org/x/sys/unix" ) @@ -23,9 +24,11 @@ func EnsureProcHandle(fh *os.File) error { return nil } -// CloseExecFrom applies O_CLOEXEC to all file descriptors currently open for -// the process (except for those below the given fd value). -func CloseExecFrom(minFd int) error { +type fdFunc func(fd int) + +// fdRangeFrom calls the passed fdFunc for each file descriptor that is open in +// the current process. +func fdRangeFrom(minFd int, fn fdFunc) error { fdDir, err := os.Open("/proc/self/fd") if err != nil { return err @@ -50,15 +53,60 @@ func CloseExecFrom(minFd int) error { if fd < minFd { continue } - // Intentionally ignore errors from unix.CloseOnExec -- the cases where - // this might fail are basically file descriptors that have already - // been closed (including and especially the one that was created when - // os.ReadDir did the "opendir" syscall). - unix.CloseOnExec(fd) + // Ignore the file descriptor we used for readdir, as it will be closed + // when we return. + if uintptr(fd) == fdDir.Fd() { + continue + } + // Run the closure. + fn(fd) } return nil } +// CloseExecFrom sets the O_CLOEXEC flag on all file descriptors greater or +// equal to minFd in the current process. +func CloseExecFrom(minFd int) error { + return fdRangeFrom(minFd, unix.CloseOnExec) +} + +//go:linkname runtime_IsPollDescriptor internal/poll.IsPollDescriptor + +// In order to make sure we do not close the internal epoll descriptors the Go +// runtime uses, we need to ensure that we skip descriptors that match +// "internal/poll".IsPollDescriptor. Yes, this is a Go runtime internal thing, +// unfortunately there's no other way to be sure we're only keeping the file +// descriptors the Go runtime needs. Hopefully nothing blows up doing this... +func runtime_IsPollDescriptor(fd uintptr) bool //nolint:revive + +// UnsafeCloseFrom closes all file descriptors greater or equal to minFd in the +// current process, except for those critical to Go's runtime (such as the +// netpoll management descriptors). +// +// NOTE: That this function is incredibly dangerous to use in most Go code, as +// closing file descriptors from underneath *os.File handles can lead to very +// bad behaviour (the closed file descriptor can be re-used and then any +// *os.File operations would apply to the wrong file). This function is only +// intended to be called from the last stage of runc init. +func UnsafeCloseFrom(minFd int) error { + // We must not close some file descriptors. + return fdRangeFrom(minFd, func(fd int) { + if runtime_IsPollDescriptor(uintptr(fd)) { + // These are the Go runtimes internal netpoll file descriptors. + // These file descriptors are operated on deep in the Go scheduler, + // and closing those files from underneath Go can result in panics. + // There is no issue with keeping them because they are not + // executable and are not useful to an attacker anyway. Also we + // don't have any choice. + return + } + // There's nothing we can do about errors from close(2), and the + // only likely error to be seen is EBADF which indicates the fd was + // already closed (in which case, we got what we wanted). + _ = unix.Close(fd) + }) +} + // NewSockPair returns a new unix socket pair func NewSockPair(name string) (parent *os.File, child *os.File, err error) { fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM|unix.SOCK_CLOEXEC, 0) diff --git a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/LICENSE b/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/LICENSE deleted file mode 100644 index d1f09ff0f6d0..000000000000 --- a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Sergio Rubio - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/util.go b/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/util.go deleted file mode 100644 index 7dd717007779..000000000000 --- a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/util.go +++ /dev/null @@ -1,54 +0,0 @@ -package vhd - -import ( - "encoding/hex" - "fmt" - "os" - "strings" -) - -// https://groups.google.com/forum/#!msg/golang-nuts/d0nF_k4dSx4/rPGgfXv6QCoJ -func uuidgen() string { - b := uuidgenBytes() - return fmt.Sprintf("%x-%x-%x-%x-%x", - b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) -} - -func fmtField(name, value string) { - fmt.Printf("%-25s%s\n", name+":", value) -} - -func uuidgenBytes() []byte { - f, err := os.Open("/dev/urandom") - check(err) - b := make([]byte, 16) - f.Read(b) - return b -} - -func check(e error) { - if e != nil { - panic(e) - } -} - -func hexs(a []byte) string { - return "0x" + hex.EncodeToString(a[:]) -} - -func uuid(a []byte) string { - return fmt.Sprintf("%08x-%04x-%04x-%04x-%04x", - a[:4], - a[4:6], - a[6:8], - a[8:10], - a[10:16]) -} - -func uuidToBytes(uuid string) []byte { - s := strings.Replace(uuid, "-", "", -1) - h, err := hex.DecodeString(s) - check(err) - - return h -} diff --git a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go b/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go deleted file mode 100644 index 2c86e05e9a65..000000000000 --- a/cluster-autoscaler/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go +++ /dev/null @@ -1,489 +0,0 @@ -// Package to work with VHD images -// See https://technet.microsoft.com/en-us/virtualization/bb676673.aspx -package vhd - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "fmt" - "math" - "os" - "strconv" - "time" - - "golang.org/x/text/encoding/unicode" - "golang.org/x/text/transform" -) - -const VHD_COOKIE = "636f6e6563746978" // conectix -const VHD_DYN_COOKIE = "6378737061727365" // cxsparse -const VHD_CREATOR_APP = "676f2d766864" // go-vhd -const VHD_CREATOR_HOST_OS = "5769326B" // Win2k -const VHD_BLOCK_SIZE = 2 * 1024 * 1024 // 2MB -const VHD_HEADER_SIZE = 512 -const SECTOR_SIZE = 512 -const FOURK_SECTOR_SIZE = 4096 -const VHD_EXTRA_HEADER_SIZE = 1024 - -// A VDH file -type VHD struct { - Footer VHDHeader - ExtraHeader VHDExtraHeader -} - -// VHD Header -type VHDHeader struct { - Cookie [8]byte - Features [4]byte - FileFormatVersion [4]byte - DataOffset [8]byte - Timestamp [4]byte - CreatorApplication [4]byte - CreatorVersion [4]byte - CreatorHostOS [4]byte - OriginalSize [8]byte - CurrentSize [8]byte - DiskGeometry [4]byte - DiskType [4]byte - Checksum [4]byte - UniqueId [16]byte - SavedState [1]byte - Reserved [427]byte -} - -// VHD extra header, for dynamic and differential disks -type VHDExtraHeader struct { - Cookie [8]byte - DataOffset [8]byte - TableOffset [8]byte - HeaderVersion [4]byte - MaxTableEntries [4]byte - BlockSize [4]byte - Checksum [4]byte - ParentUUID [16]byte - ParentTimestamp [4]byte - Reserved [4]byte - ParentUnicodeName [512]byte - ParentLocatorEntry1 [24]byte - ParentLocatorEntry2 [24]byte - ParentLocatorEntry3 [24]byte - ParentLocatorEntry4 [24]byte - ParentLocatorEntry5 [24]byte - ParentLocatorEntry6 [24]byte - ParentLocatorEntry7 [24]byte - ParentLocatorEntry8 [24]byte - Reserved2 [256]byte -} - -// Options for the CreateSparseVHD function -type VHDOptions struct { - UUID string - Timestamp int64 -} - -/* - * VHDExtraHeader methods - */ - -func (header *VHDExtraHeader) CookieString() string { - return string(header.Cookie[:]) -} - -// Calculate and add the VHD dynamic/differential header checksum -func (h *VHDExtraHeader) addChecksum() { - buffer := new(bytes.Buffer) - binary.Write(buffer, binary.BigEndian, h) - checksum := 0 - bb := buffer.Bytes() - - for counter := 0; counter < VHD_EXTRA_HEADER_SIZE; counter++ { - checksum += int(bb[counter]) - } - - binary.BigEndian.PutUint32(h.Checksum[:], uint32(^checksum)) -} - -/* - * VHDHeader methods - */ - -func (h *VHDHeader) DiskTypeStr() (dt string) { - switch h.DiskType[3] { - case 0x00: - dt = "None" - case 0x01: - dt = "Deprecated" - case 0x02: - dt = "Fixed" - case 0x03: - dt = "Dynamic" - case 0x04: - dt = "Differential" - case 0x05: - dt = "Reserved" - case 0x06: - dt = "Reserved" - default: - panic("Invalid disk type detected!") - } - - return -} - -// Return the timestamp of the header -func (h *VHDHeader) TimestampTime() time.Time { - tstamp := binary.BigEndian.Uint32(h.Timestamp[:]) - return time.Unix(int64(946684800+tstamp), 0) -} - -// Calculate and add the VHD header checksum -func (h *VHDHeader) addChecksum() { - buffer := new(bytes.Buffer) - binary.Write(buffer, binary.BigEndian, h) - checksum := 0 - bb := buffer.Bytes() - - for counter := 0; counter < VHD_HEADER_SIZE; counter++ { - checksum += int(bb[counter]) - } - - binary.BigEndian.PutUint32(h.Checksum[:], uint32(^checksum)) -} - -func CreateFixedHeader(size uint64, options *VHDOptions) VHDHeader { - header := VHDHeader{} - hexToField(VHD_COOKIE, header.Cookie[:]) - hexToField("00000002", header.Features[:]) - hexToField("00010000", header.FileFormatVersion[:]) - hexToField("ffffffffffffffff", header.DataOffset[:]) - - // LOL Y2038 - if options.Timestamp != 0 { - binary.BigEndian.PutUint32(header.Timestamp[:], uint32(options.Timestamp)) - } else { - t := uint32(time.Now().Unix() - 946684800) - binary.BigEndian.PutUint32(header.Timestamp[:], t) - } - - hexToField(VHD_CREATOR_APP, header.CreatorApplication[:]) - hexToField(VHD_CREATOR_HOST_OS, header.CreatorHostOS[:]) - binary.BigEndian.PutUint64(header.OriginalSize[:], size) - binary.BigEndian.PutUint64(header.CurrentSize[:], size) - - // total sectors = disk size / 512b sector size - totalSectors := math.Floor(float64(size / 512)) - // [C, H, S] - geometry := calculateCHS(uint64(totalSectors)) - binary.BigEndian.PutUint16(header.DiskGeometry[:2], uint16(geometry[0])) - header.DiskGeometry[2] = uint8(geometry[1]) - header.DiskGeometry[3] = uint8(geometry[2]) - - hexToField("00000002", header.DiskType[:]) // Fixed 0x00000002 - hexToField("00000000", header.Checksum[:]) - - if options.UUID != "" { - copy(header.UniqueId[:], uuidToBytes(options.UUID)) - } else { - copy(header.UniqueId[:], uuidgenBytes()) - } - - header.addChecksum() - return header -} - -func RawToFixed(f *os.File, options *VHDOptions) { - info, err := f.Stat() - check(err) - size := uint64(info.Size()) - header := CreateFixedHeader(size, options) - binary.Write(f, binary.BigEndian, header) -} - -func VHDCreateSparse(size uint64, name string, options VHDOptions) VHD { - header := VHDHeader{} - hexToField(VHD_COOKIE, header.Cookie[:]) - hexToField("00000002", header.Features[:]) - hexToField("00010000", header.FileFormatVersion[:]) - hexToField("0000000000000200", header.DataOffset[:]) - - // LOL Y2038 - if options.Timestamp != 0 { - binary.BigEndian.PutUint32(header.Timestamp[:], uint32(options.Timestamp)) - } else { - t := uint32(time.Now().Unix() - 946684800) - binary.BigEndian.PutUint32(header.Timestamp[:], t) - } - - hexToField(VHD_CREATOR_APP, header.CreatorApplication[:]) - hexToField(VHD_CREATOR_HOST_OS, header.CreatorHostOS[:]) - binary.BigEndian.PutUint64(header.OriginalSize[:], size) - binary.BigEndian.PutUint64(header.CurrentSize[:], size) - - // total sectors = disk size / 512b sector size - totalSectors := math.Floor(float64(size / 512)) - // [C, H, S] - geometry := calculateCHS(uint64(totalSectors)) - binary.BigEndian.PutUint16(header.DiskGeometry[:2], uint16(geometry[0])) - header.DiskGeometry[2] = uint8(geometry[1]) - header.DiskGeometry[3] = uint8(geometry[2]) - - hexToField("00000003", header.DiskType[:]) // Sparse 0x00000003 - hexToField("00000000", header.Checksum[:]) - - if options.UUID != "" { - copy(header.UniqueId[:], uuidToBytes(options.UUID)) - } else { - copy(header.UniqueId[:], uuidgenBytes()) - } - - header.addChecksum() - - // Fill the sparse header - header2 := VHDExtraHeader{} - hexToField(VHD_DYN_COOKIE, header2.Cookie[:]) - hexToField("ffffffffffffffff", header2.DataOffset[:]) - // header size + sparse header size - binary.BigEndian.PutUint64(header2.TableOffset[:], uint64(VHD_EXTRA_HEADER_SIZE+VHD_HEADER_SIZE)) - hexToField("00010000", header2.HeaderVersion[:]) - - maxTableSize := uint32(size / (VHD_BLOCK_SIZE)) - binary.BigEndian.PutUint32(header2.MaxTableEntries[:], maxTableSize) - - binary.BigEndian.PutUint32(header2.BlockSize[:], VHD_BLOCK_SIZE) - binary.BigEndian.PutUint32(header2.ParentTimestamp[:], uint32(0)) - header2.addChecksum() - - f, err := os.Create(name) - check(err) - defer f.Close() - - binary.Write(f, binary.BigEndian, header) - binary.Write(f, binary.BigEndian, header2) - - /* - Write BAT entries - The BAT is always extended to a sector (4K) boundary - 1536 = 512 + 1024 (the VHD Header + VHD Sparse header size) - */ - for count := uint32(0); count < (FOURK_SECTOR_SIZE - 1536); count += 1 { - f.Write([]byte{0xff}) - } - - /* Windows creates 8K VHDs by default */ - for i := 0; i < (FOURK_SECTOR_SIZE - VHD_HEADER_SIZE); i += 1 { - f.Write([]byte{0x0}) - } - - binary.Write(f, binary.BigEndian, header) - - return VHD{ - Footer: header, - ExtraHeader: header2, - } -} - -/* - * VHD - */ - -func FromFile(f *os.File) (vhd VHD) { - vhd = VHD{} - vhd.Footer = readVHDFooter(f) - vhd.ExtraHeader = readVHDExtraHeader(f) - - return vhd -} - -func (vhd *VHD) PrintInfo() { - fmt.Println("\nVHD footer") - fmt.Println("==========") - vhd.PrintFooter() - - if vhd.Footer.DiskType[3] == 0x3 || vhd.Footer.DiskType[3] == 0x04 { - fmt.Println("\nVHD sparse/differential header") - fmt.Println("===============================") - vhd.PrintExtraHeader() - } -} - -func (vhd *VHD) PrintExtraHeader() { - header := vhd.ExtraHeader - - fmtField("Cookie", fmt.Sprintf("%s (%s)", - hexs(header.Cookie[:]), header.CookieString())) - fmtField("Data offset", hexs(header.DataOffset[:])) - fmtField("Table offset", hexs(header.TableOffset[:])) - fmtField("Header version", hexs(header.HeaderVersion[:])) - fmtField("Max table entries", hexs(header.MaxTableEntries[:])) - fmtField("Block size", hexs(header.BlockSize[:])) - fmtField("Checksum", hexs(header.Checksum[:])) - fmtField("Parent UUID", uuid(header.ParentUUID[:])) - - // Seconds since January 1, 1970 12:00:00 AM in UTC/GMT. - // 946684800 = January 1, 2000 12:00:00 AM in UTC/GMT. - tstamp := binary.BigEndian.Uint32(header.ParentTimestamp[:]) - t := time.Unix(int64(946684800+tstamp), 0) - fmtField("Parent timestamp", fmt.Sprintf("%s", t)) - - fmtField("Reserved", hexs(header.Reserved[:])) - parentNameBytes, _, err := transform.Bytes( - unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM).NewDecoder(), - header.ParentUnicodeName[:], - ) - if err != nil { - panic(err) - } - parentName := string(parentNameBytes) - fmtField("Parent Name", parentName) - // Parent locator entries ignored since it's a dynamic disk - sum := 0 - for _, b := range header.Reserved2 { - sum += int(b) - } - fmtField("Reserved2", strconv.Itoa(sum)) -} - -func (vhd *VHD) PrintFooter() { - header := vhd.Footer - - //fmtField("Cookie", string(header.Cookie[:])) - fmtField("Cookie", fmt.Sprintf("%s (%s)", - hexs(header.Cookie[:]), string(header.Cookie[:]))) - fmtField("Features", hexs(header.Features[:])) - fmtField("File format version", hexs(header.FileFormatVersion[:])) - - dataOffset := binary.BigEndian.Uint64(header.DataOffset[:]) - fmtField("Data offset", - fmt.Sprintf("%s (%d bytes)", hexs(header.DataOffset[:]), dataOffset)) - - //// Seconds since January 1, 1970 12:00:00 AM in UTC/GMT. - //// 946684800 = January 1, 2000 12:00:00 AM in UTC/GMT. - t := time.Unix(int64(946684800+binary.BigEndian.Uint32(header.Timestamp[:])), 0) - fmtField("Timestamp", fmt.Sprintf("%s", t)) - - fmtField("Creator application", string(header.CreatorApplication[:])) - fmtField("Creator version", hexs(header.CreatorVersion[:])) - fmtField("Creator OS", string(header.CreatorHostOS[:])) - - originalSize := binary.BigEndian.Uint64(header.OriginalSize[:]) - fmtField("Original size", - fmt.Sprintf("%s ( %d bytes )", hexs(header.OriginalSize[:]), originalSize)) - - currentSize := binary.BigEndian.Uint64(header.OriginalSize[:]) - fmtField("Current size", - fmt.Sprintf("%s ( %d bytes )", hexs(header.CurrentSize[:]), currentSize)) - - cilinders := int64(binary.BigEndian.Uint16(header.DiskGeometry[:2])) - heads := int64(header.DiskGeometry[2]) - sectors := int64(header.DiskGeometry[3]) - dsize := cilinders * heads * sectors * 512 - fmtField("Disk geometry", - fmt.Sprintf("%s (c: %d, h: %d, s: %d) (%d bytes)", - hexs(header.DiskGeometry[:]), - cilinders, - heads, - sectors, - dsize)) - - fmtField("Disk type", - fmt.Sprintf("%s (%s)", hexs(header.DiskType[:]), header.DiskTypeStr())) - - fmtField("Checksum", hexs(header.Checksum[:])) - fmtField("UUID", uuid(header.UniqueId[:])) - fmtField("Saved state", fmt.Sprintf("%d", header.SavedState[0])) -} - -/* - Utility functions -*/ -func calculateCHS(ts uint64) []uint { - var sectorsPerTrack, - heads, - cylinderTimesHeads, - cylinders float64 - totalSectors := float64(ts) - - ret := make([]uint, 3) - - if totalSectors > 65535*16*255 { - totalSectors = 65535 * 16 * 255 - } - - if totalSectors >= 65535*16*63 { - sectorsPerTrack = 255 - heads = 16 - cylinderTimesHeads = math.Floor(totalSectors / sectorsPerTrack) - } else { - sectorsPerTrack = 17 - cylinderTimesHeads = math.Floor(totalSectors / sectorsPerTrack) - heads = math.Floor((cylinderTimesHeads + 1023) / 1024) - if heads < 4 { - heads = 4 - } - if (cylinderTimesHeads >= (heads * 1024)) || heads > 16 { - sectorsPerTrack = 31 - heads = 16 - cylinderTimesHeads = math.Floor(totalSectors / sectorsPerTrack) - } - if cylinderTimesHeads >= (heads * 1024) { - sectorsPerTrack = 63 - heads = 16 - cylinderTimesHeads = math.Floor(totalSectors / sectorsPerTrack) - } - } - - cylinders = cylinderTimesHeads / heads - - // This will floor the values - ret[0] = uint(cylinders) - ret[1] = uint(heads) - ret[2] = uint(sectorsPerTrack) - - return ret -} - -func hexToField(hexs string, field []byte) { - h, err := hex.DecodeString(hexs) - check(err) - - copy(field, h) -} - -// Return the number of blocks in the disk, diskSize in bytes -func getMaxTableEntries(diskSize uint64) uint64 { - return diskSize * (2 * 1024 * 1024) // block size is 2M -} - -func readVHDExtraHeader(f *os.File) (header VHDExtraHeader) { - buff := make([]byte, 1024) - _, err := f.ReadAt(buff, 512) - check(err) - - binary.Read(bytes.NewBuffer(buff[:]), binary.BigEndian, &header) - - return header -} - -func readVHDFooter(f *os.File) (header VHDHeader) { - info, err := f.Stat() - check(err) - - buff := make([]byte, 512) - _, err = f.ReadAt(buff, info.Size()-512) - check(err) - - binary.Read(bytes.NewBuffer(buff[:]), binary.BigEndian, &header) - - return header -} - -func readVHDHeader(f *os.File) (header VHDHeader) { - buff := make([]byte, 512) - _, err := f.ReadAt(buff, 0) - check(err) - - binary.Read(bytes.NewBuffer(buff[:]), binary.BigEndian, &header) - - return header -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/CONTRIBUTORS b/cluster-autoscaler/vendor/github.com/vmware/govmomi/CONTRIBUTORS deleted file mode 100644 index ef8c56de8b27..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/CONTRIBUTORS +++ /dev/null @@ -1,256 +0,0 @@ -# People who can (and typically have) contributed to this repository. -# -# This script is generated by contributors.sh -# - -Abhijeet Kasurde -abrarshivani -Adam Chalkley -Adam Fowler -Adam Shannon -Akanksha Panse -Al Biheiri -Alessandro Cortiana -Alex -Alex Bozhenko -Alex Ellis (VMware) -Aligator <8278538+yet-another-aligator@users.noreply.github.com> -Alvaro Miranda -Amanda H. L. de Andrade -amanpaha -Amit Bathla -amit bezalel -Andrew -Andrew Chin -Andrew Kutz -Andrey Klimentyev -Anfernee Yongkun Gui -angystardust -aniketGslab -Ankit Vaidya -Ankur Huralikoppi -Anna Carrigan -Antony Saba -Ariel Chinn -Arran Walker -Artem Anisimov -Arunesh Pandey -Aryeh Weinreb -Augy StClair -Austin Parker -Balu Dontu -bastienbc -Ben Corrie -Ben Vickers -Benjamin Davini -Benjamin Peterson -Benjamin Vickers -Bhavya Choudhary -Bob Killen -Brad Fitzpatrick -Brian Rak -brian57860 -Bruce Downs -Bryan Venteicher -Cédric Blomart -Cheng Cheng -Chethan Venkatesh -Choudhury Sarada Prasanna Nanda -Chris Marchesi -Christian Höltje -Clint Greenwood -cpiment -CuiHaozhi -Dan Ilan -Dan Norris -Daniel Frederick Crisman -Daniel Mueller -Danny Lockard -Dave Gress -Dave Smith-Uchida -Dave Tucker -David Gress -David Stark -Davide Agnello -Davinder Kumar -Defa -demarey -dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> -Deric Crago -ditsuke -Divyen Patel -Dnyanesh Gate -Doug MacEachern -East <60801291+houfangdong@users.noreply.github.com> -Eloy Coto -embano1 -Eng Zer Jun -Eric Edens -Eric Graham <16710890+Pheric@users.noreply.github.com> -Eric Gray -Eric Yutao -Erik Hollensbe -Essodjolo KAHANAM -Ethan Kaley -Evan Chu -Fabio Rapposelli -Faiyaz Ahmed -Federico Pellegatta <12744504+federico-pellegatta@users.noreply.github.com> -forkbomber -François Rigault -freebsdly -Gavin Gray -Gavrie Philipson -George Hicken -Gerrit Renker -gthombare -HakanSunay -Hasan Mahmood -Haydon Ryan -Heiko Reese -Henrik Hodne -hkumar -Hrabur Stoyanov -hui luo -Ian Eyberg -Isaac Rodman -Ivan Mikushin -Ivan Porto Carrero -James King -James Peach -Jason Kincl -Jeremy Canady -jeremy-clerc -Jiatong Wang -jingyizPensando -João Pereira -Jonas Ausevicius -Jorge Sevilla -Julien PILLON -Justin J. Novack -kayrus -Keenan Brock -Kevin George -Knappek -Leslie Wang -leslie-qiwa -Lintong Jiang -Liping Xue -Louie Jiang -Luther Monson -Madanagopal Arunachalam -makelarisjr <8687447+makelarisjr@users.noreply.github.com> -maplain -Marc Carmier -Marcus Tan -Maria Ntalla -Marin Atanasov Nikolov -Mario Trangoni -Mark Dechiaro -Mark Peek -Mark Rexwinkel -martin -Matt Clay -Matt Moore -Matt Moriarity -Matthew Cosgrove -mbhadale -Merlijn Sebrechts -Mevan Samaratunga -Michael Gasch <15986659+embano1@users.noreply.github.com> -Michael Gasch -Michal Jankowski -Mike Schinkel -Mincho Tonev -mingwei -Nicolas Lamirault -Nikhil Kathare -Nikhil R Deshpande -Nikolas Grottendieck -Nils Elde -nirbhay -Nobuhiro MIKI -Om Kumar -Omar Kohl -Parham Alvani -Parveen Chahal -Paul Martin <25058109+rawstorage@users.noreply.github.com> -Pierre Gronlier -Pieter Noordhuis -pradeepj <50135054+pradeep288@users.noreply.github.com> -Pranshu Jain -prydin -rconde01 -rHermes -Rianto Wahyudi -Ricardo Katz -Robin Watkins -Rowan Jacobs -Roy Ling -rsikdar -runner.mei -Ryan Johnson -S R Ashrith -S.Çağlar Onur -Saad Malik -Sam Zhu -samzhu333 <45263849+samzhu333@users.noreply.github.com> -Sandeep Pissay Srinivasa Rao -Scott Holden -Sergey Ignatov -serokles -shahra -Shalini Bhaskara -Shaozhen Ding -Shawn Neal -shylasrinivas -sky-joker -smaftoul -smahadik -Sten Feldman -Stepan Mazurov -Steve Purcell -Sudhindra Aithal -SUMIT AGRAWAL -Sunny Carter -syuparn -Takaaki Furukawa -Tamas Eger -Tanay Kothari -tanishi -Ted Zlatanov -Thad Craft -Thibaut Ackermann -Tim McNamara -Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com> -Toomas Pelberg -Trevor Dawe -tshihad -Uwe Bessle -Vadim Egorov -Vikram Krishnamurthy -volanja -Volodymyr Bobyr -Waldek Maleska -William Lam -Witold Krecicki -xing-yang -xinyanw409 -Yang Yang -yangxi -Yann Hodique -Yash Nitin Desai -Yassine TIJANI -Yi Jiang -yiyingy -ykakarap -Yogesh Sobale <6104071+ysobale@users.noreply.github.com> -Yue Yin -Yun Zhou -Yuya Kusakabe -Zach G -Zach Tucker -Zacharias Taubert -Zee Yang -zyuxin -Кузаков Евгений diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/LICENSE.txt b/cluster-autoscaler/vendor/github.com/vmware/govmomi/LICENSE.txt deleted file mode 100644 index d64569567334..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/doc.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/doc.go deleted file mode 100644 index 0c8acee01638..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/doc.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright (c) 2014-2017 VMware, Inc. 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. -*/ - -/* -Package find implements inventory listing and searching. - -The Finder is an alternative to the object.SearchIndex FindByInventoryPath() and FindChild() methods. -SearchIndex.FindByInventoryPath requires an absolute path, whereas the Finder also supports relative paths -and patterns via path.Match. -SearchIndex.FindChild requires a parent to find the child, whereas the Finder also supports an ancestor via -recursive object traversal. - -The various Finder methods accept a "path" argument, which can absolute or relative to the Folder for the object type. -The Finder supports two modes, "list" and "find". The "list" mode behaves like the "ls" command, only searching within -the immediate path. The "find" mode behaves like the "find" command, with the search starting at the immediate path but -also recursing into sub Folders relative to the Datacenter. The default mode is "list" if the given path contains a "/", -otherwise "find" mode is used. - -The exception is to use a "..." wildcard with a path to find all objects recursively underneath any root object. -For example: VirtualMachineList("/DC1/...") - -See also: https://github.com/vmware/govmomi/blob/master/govc/README.md#usage -*/ -package find diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/error.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/error.go deleted file mode 100644 index 684526dab768..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/error.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package find - -import "fmt" - -type NotFoundError struct { - kind string - path string -} - -func (e *NotFoundError) Error() string { - return fmt.Sprintf("%s '%s' not found", e.kind, e.path) -} - -type MultipleFoundError struct { - kind string - path string -} - -func (e *MultipleFoundError) Error() string { - return fmt.Sprintf("path '%s' resolves to multiple %ss", e.path, e.kind) -} - -type DefaultNotFoundError struct { - kind string -} - -func (e *DefaultNotFoundError) Error() string { - return fmt.Sprintf("no default %s found", e.kind) -} - -type DefaultMultipleFoundError struct { - kind string -} - -func (e DefaultMultipleFoundError) Error() string { - return fmt.Sprintf("default %s resolves to multiple instances, please specify", e.kind) -} - -func toDefaultError(err error) error { - switch e := err.(type) { - case *NotFoundError: - return &DefaultNotFoundError{e.kind} - case *MultipleFoundError: - return &DefaultMultipleFoundError{e.kind} - default: - return err - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/finder.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/finder.go deleted file mode 100644 index 4830fc26ebcd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/finder.go +++ /dev/null @@ -1,1114 +0,0 @@ -/* -Copyright (c) 2014-2023 VMware, Inc. 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. -*/ - -package find - -import ( - "context" - "errors" - "path" - "strings" - - "github.com/vmware/govmomi/internal" - "github.com/vmware/govmomi/list" - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/view" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type Finder struct { - client *vim25.Client - r recurser - dc *object.Datacenter - si *object.SearchIndex - folders *object.DatacenterFolders -} - -func NewFinder(client *vim25.Client, all ...bool) *Finder { - props := false - if len(all) == 1 { - props = all[0] - } - - f := &Finder{ - client: client, - si: object.NewSearchIndex(client), - r: recurser{ - Collector: property.DefaultCollector(client), - All: props, - }, - } - - if len(all) == 0 { - // attempt to avoid SetDatacenter() requirement - f.dc, _ = f.DefaultDatacenter(context.Background()) - } - - return f -} - -func (f *Finder) SetDatacenter(dc *object.Datacenter) *Finder { - f.dc = dc - f.folders = nil - return f -} - -// InventoryPath composes the given object's inventory path. -// There is no vSphere property or method that provides an inventory path directly. -// This method uses the ManagedEntity.Parent field to determine the ancestry tree of the object and -// the ManagedEntity.Name field for each ancestor to compose the path. -func InventoryPath(ctx context.Context, client *vim25.Client, obj types.ManagedObjectReference) (string, error) { - entities, err := mo.Ancestors(ctx, client, client.ServiceContent.PropertyCollector, obj) - if err != nil { - return "", err - } - return internal.InventoryPath(entities), nil -} - -// findRoot makes it possible to use "find" mode with a different root path. -// Example: ResourcePoolList("/dc1/host/cluster1/...") -func (f *Finder) findRoot(ctx context.Context, root *list.Element, parts []string) bool { - if len(parts) == 0 { - return false - } - - ix := len(parts) - 1 - - if parts[ix] != "..." { - return false - } - - if ix == 0 { - return true // We already have the Object for root.Path - } - - // Lookup the Object for the new root.Path - rootPath := path.Join(root.Path, path.Join(parts[:ix]...)) - - ref, err := f.si.FindByInventoryPath(ctx, rootPath) - if err != nil || ref == nil { - // If we get an error or fail to match, fall through to find() with the original root and path - return false - } - - root.Path = rootPath - root.Object = ref - - return true -} - -func (f *Finder) find(ctx context.Context, arg string, s *spec) ([]list.Element, error) { - isPath := strings.Contains(arg, "/") - - root := list.Element{ - Object: object.NewRootFolder(f.client), - Path: "/", - } - - parts := list.ToParts(arg) - - if len(parts) > 0 { - switch parts[0] { - case "..": // Not supported; many edge case, little value - return nil, errors.New("cannot traverse up a tree") - case ".": // Relative to whatever - pivot, err := s.Relative(ctx) - if err != nil { - return nil, err - } - - root.Path, err = InventoryPath(ctx, f.client, pivot.Reference()) - if err != nil { - return nil, err - } - root.Object = pivot - parts = parts[1:] - } - } - - if s.listMode(isPath) { - if f.findRoot(ctx, &root, parts) { - parts = []string{"*"} - } else { - return f.r.List(ctx, s, root, parts) - } - } - - s.Parents = append(s.Parents, s.Nested...) - - return f.r.Find(ctx, s, root, parts) -} - -func (f *Finder) datacenter() (*object.Datacenter, error) { - if f.dc == nil { - return nil, errors.New("please specify a datacenter") - } - - return f.dc, nil -} - -// datacenterPath returns the absolute path to the Datacenter containing the given ref -func (f *Finder) datacenterPath(ctx context.Context, ref types.ManagedObjectReference) (string, error) { - mes, err := mo.Ancestors(ctx, f.client, f.client.ServiceContent.PropertyCollector, ref) - if err != nil { - return "", err - } - - // Chop leaves under the Datacenter - for i := len(mes) - 1; i > 0; i-- { - if mes[i].Self.Type == "Datacenter" { - break - } - mes = mes[:i] - } - - var p string - - for _, me := range mes { - // Skip root entity in building inventory path. - if me.Parent == nil { - continue - } - - p = p + "/" + me.Name - } - - return p, nil -} - -func (f *Finder) dcFolders(ctx context.Context) (*object.DatacenterFolders, error) { - if f.folders != nil { - return f.folders, nil - } - - dc, err := f.datacenter() - if err != nil { - return nil, err - } - - folders, err := dc.Folders(ctx) - if err != nil { - return nil, err - } - - f.folders = folders - - return f.folders, nil -} - -func (f *Finder) dcReference(_ context.Context) (object.Reference, error) { - dc, err := f.datacenter() - if err != nil { - return nil, err - } - - return dc, nil -} - -func (f *Finder) vmFolder(ctx context.Context) (object.Reference, error) { - folders, err := f.dcFolders(ctx) - if err != nil { - return nil, err - } - - return folders.VmFolder, nil -} - -func (f *Finder) hostFolder(ctx context.Context) (object.Reference, error) { - folders, err := f.dcFolders(ctx) - if err != nil { - return nil, err - } - - return folders.HostFolder, nil -} - -func (f *Finder) datastoreFolder(ctx context.Context) (object.Reference, error) { - folders, err := f.dcFolders(ctx) - if err != nil { - return nil, err - } - - return folders.DatastoreFolder, nil -} - -func (f *Finder) networkFolder(ctx context.Context) (object.Reference, error) { - folders, err := f.dcFolders(ctx) - if err != nil { - return nil, err - } - - return folders.NetworkFolder, nil -} - -func (f *Finder) rootFolder(_ context.Context) (object.Reference, error) { - return object.NewRootFolder(f.client), nil -} - -func (f *Finder) managedObjectList(ctx context.Context, path string, tl bool, include []string) ([]list.Element, error) { - fn := f.rootFolder - - if f.dc != nil { - fn = f.dcReference - } - - if path == "" { - path = "." - } - - s := &spec{ - Relative: fn, - Parents: []string{"ComputeResource", "ClusterComputeResource", "HostSystem", "VirtualApp", "StoragePod"}, - Include: include, - } - - if tl { - s.Contents = true - s.ListMode = types.NewBool(true) - } - - return f.find(ctx, path, s) -} - -// Element is deprecated, use InventoryPath() instead. -func (f *Finder) Element(ctx context.Context, ref types.ManagedObjectReference) (*list.Element, error) { - rl := func(_ context.Context) (object.Reference, error) { - return ref, nil - } - - s := &spec{ - Relative: rl, - } - - e, err := f.find(ctx, "./", s) - if err != nil { - return nil, err - } - - if len(e) == 0 { - return nil, &NotFoundError{ref.Type, ref.Value} - } - - if len(e) > 1 { - panic("ManagedObjectReference must be unique") - } - - return &e[0], nil -} - -// ObjectReference converts the given ManagedObjectReference to a type from the object package via object.NewReference -// with the object.Common.InventoryPath field set. -func (f *Finder) ObjectReference(ctx context.Context, ref types.ManagedObjectReference) (object.Reference, error) { - path, err := InventoryPath(ctx, f.client, ref) - if err != nil { - return nil, err - } - - r := object.NewReference(f.client, ref) - - type common interface { - SetInventoryPath(string) - } - - r.(common).SetInventoryPath(path) - - if f.dc != nil { - if ds, ok := r.(*object.Datastore); ok { - ds.DatacenterPath = f.dc.InventoryPath - } - } - - return r, nil -} - -func (f *Finder) ManagedObjectList(ctx context.Context, path string, include ...string) ([]list.Element, error) { - return f.managedObjectList(ctx, path, false, include) -} - -func (f *Finder) ManagedObjectListChildren(ctx context.Context, path string, include ...string) ([]list.Element, error) { - return f.managedObjectList(ctx, path, true, include) -} - -func (f *Finder) DatacenterList(ctx context.Context, path string) ([]*object.Datacenter, error) { - s := &spec{ - Relative: f.rootFolder, - Include: []string{"Datacenter"}, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var dcs []*object.Datacenter - for _, e := range es { - ref := e.Object.Reference() - if ref.Type == "Datacenter" { - dc := object.NewDatacenter(f.client, ref) - dc.InventoryPath = e.Path - dcs = append(dcs, dc) - } - } - - if len(dcs) == 0 { - return nil, &NotFoundError{"datacenter", path} - } - - return dcs, nil -} - -func (f *Finder) Datacenter(ctx context.Context, path string) (*object.Datacenter, error) { - dcs, err := f.DatacenterList(ctx, path) - if err != nil { - return nil, err - } - - if len(dcs) > 1 { - return nil, &MultipleFoundError{"datacenter", path} - } - - return dcs[0], nil -} - -func (f *Finder) DefaultDatacenter(ctx context.Context) (*object.Datacenter, error) { - dc, err := f.Datacenter(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return dc, nil -} - -func (f *Finder) DatacenterOrDefault(ctx context.Context, path string) (*object.Datacenter, error) { - if path != "" { - dc, err := f.Datacenter(ctx, path) - if err != nil { - return nil, err - } - return dc, nil - } - - return f.DefaultDatacenter(ctx) -} - -func (f *Finder) DatastoreList(ctx context.Context, path string) ([]*object.Datastore, error) { - s := &spec{ - Relative: f.datastoreFolder, - Parents: []string{"StoragePod"}, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var dss []*object.Datastore - for _, e := range es { - ref := e.Object.Reference() - if ref.Type == "Datastore" { - ds := object.NewDatastore(f.client, ref) - ds.InventoryPath = e.Path - - if f.dc == nil { - // In this case SetDatacenter was not called and path is absolute - ds.DatacenterPath, err = f.datacenterPath(ctx, ref) - if err != nil { - return nil, err - } - } else { - ds.DatacenterPath = f.dc.InventoryPath - } - - dss = append(dss, ds) - } - } - - if len(dss) == 0 { - return nil, &NotFoundError{"datastore", path} - } - - return dss, nil -} - -func (f *Finder) Datastore(ctx context.Context, path string) (*object.Datastore, error) { - dss, err := f.DatastoreList(ctx, path) - if err != nil { - return nil, err - } - - if len(dss) > 1 { - return nil, &MultipleFoundError{"datastore", path} - } - - return dss[0], nil -} - -func (f *Finder) DefaultDatastore(ctx context.Context) (*object.Datastore, error) { - ds, err := f.Datastore(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return ds, nil -} - -func (f *Finder) DatastoreOrDefault(ctx context.Context, path string) (*object.Datastore, error) { - if path != "" { - ds, err := f.Datastore(ctx, path) - if err != nil { - return nil, err - } - return ds, nil - } - - return f.DefaultDatastore(ctx) -} - -func (f *Finder) DatastoreClusterList(ctx context.Context, path string) ([]*object.StoragePod, error) { - s := &spec{ - Relative: f.datastoreFolder, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var sps []*object.StoragePod - for _, e := range es { - ref := e.Object.Reference() - if ref.Type == "StoragePod" { - sp := object.NewStoragePod(f.client, ref) - sp.InventoryPath = e.Path - sps = append(sps, sp) - } - } - - if len(sps) == 0 { - return nil, &NotFoundError{"datastore cluster", path} - } - - return sps, nil -} - -func (f *Finder) DatastoreCluster(ctx context.Context, path string) (*object.StoragePod, error) { - sps, err := f.DatastoreClusterList(ctx, path) - if err != nil { - return nil, err - } - - if len(sps) > 1 { - return nil, &MultipleFoundError{"datastore cluster", path} - } - - return sps[0], nil -} - -func (f *Finder) DefaultDatastoreCluster(ctx context.Context) (*object.StoragePod, error) { - sp, err := f.DatastoreCluster(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return sp, nil -} - -func (f *Finder) DatastoreClusterOrDefault(ctx context.Context, path string) (*object.StoragePod, error) { - if path != "" { - sp, err := f.DatastoreCluster(ctx, path) - if err != nil { - return nil, err - } - return sp, nil - } - - return f.DefaultDatastoreCluster(ctx) -} - -func (f *Finder) ComputeResourceList(ctx context.Context, path string) ([]*object.ComputeResource, error) { - s := &spec{ - Relative: f.hostFolder, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var crs []*object.ComputeResource - for _, e := range es { - var cr *object.ComputeResource - - switch o := e.Object.(type) { - case mo.ComputeResource, mo.ClusterComputeResource: - cr = object.NewComputeResource(f.client, o.Reference()) - default: - continue - } - - cr.InventoryPath = e.Path - crs = append(crs, cr) - } - - if len(crs) == 0 { - return nil, &NotFoundError{"compute resource", path} - } - - return crs, nil -} - -func (f *Finder) ComputeResource(ctx context.Context, path string) (*object.ComputeResource, error) { - crs, err := f.ComputeResourceList(ctx, path) - if err != nil { - return nil, err - } - - if len(crs) > 1 { - return nil, &MultipleFoundError{"compute resource", path} - } - - return crs[0], nil -} - -func (f *Finder) DefaultComputeResource(ctx context.Context) (*object.ComputeResource, error) { - cr, err := f.ComputeResource(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return cr, nil -} - -func (f *Finder) ComputeResourceOrDefault(ctx context.Context, path string) (*object.ComputeResource, error) { - if path != "" { - cr, err := f.ComputeResource(ctx, path) - if err != nil { - return nil, err - } - return cr, nil - } - - return f.DefaultComputeResource(ctx) -} - -func (f *Finder) ClusterComputeResourceList(ctx context.Context, path string) ([]*object.ClusterComputeResource, error) { - s := &spec{ - Relative: f.hostFolder, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var ccrs []*object.ClusterComputeResource - for _, e := range es { - var ccr *object.ClusterComputeResource - - switch o := e.Object.(type) { - case mo.ClusterComputeResource: - ccr = object.NewClusterComputeResource(f.client, o.Reference()) - default: - continue - } - - ccr.InventoryPath = e.Path - ccrs = append(ccrs, ccr) - } - - if len(ccrs) == 0 { - return nil, &NotFoundError{"cluster", path} - } - - return ccrs, nil -} - -func (f *Finder) DefaultClusterComputeResource(ctx context.Context) (*object.ClusterComputeResource, error) { - cr, err := f.ClusterComputeResource(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return cr, nil -} - -func (f *Finder) ClusterComputeResource(ctx context.Context, path string) (*object.ClusterComputeResource, error) { - ccrs, err := f.ClusterComputeResourceList(ctx, path) - if err != nil { - return nil, err - } - - if len(ccrs) > 1 { - return nil, &MultipleFoundError{"cluster", path} - } - - return ccrs[0], nil -} - -func (f *Finder) ClusterComputeResourceOrDefault(ctx context.Context, path string) (*object.ClusterComputeResource, error) { - if path != "" { - cr, err := f.ClusterComputeResource(ctx, path) - if err != nil { - return nil, err - } - return cr, nil - } - - return f.DefaultClusterComputeResource(ctx) -} - -func (f *Finder) HostSystemList(ctx context.Context, path string) ([]*object.HostSystem, error) { - s := &spec{ - Relative: f.hostFolder, - Parents: []string{"ComputeResource", "ClusterComputeResource"}, - Include: []string{"HostSystem"}, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var hss []*object.HostSystem - for _, e := range es { - var hs *object.HostSystem - - switch o := e.Object.(type) { - case mo.HostSystem: - hs = object.NewHostSystem(f.client, o.Reference()) - - hs.InventoryPath = e.Path - hss = append(hss, hs) - case mo.ComputeResource, mo.ClusterComputeResource: - cr := object.NewComputeResource(f.client, o.Reference()) - - cr.InventoryPath = e.Path - - hosts, err := cr.Hosts(ctx) - if err != nil { - return nil, err - } - - hss = append(hss, hosts...) - } - } - - if len(hss) == 0 { - return nil, &NotFoundError{"host", path} - } - - return hss, nil -} - -func (f *Finder) HostSystem(ctx context.Context, path string) (*object.HostSystem, error) { - hss, err := f.HostSystemList(ctx, path) - if err != nil { - return nil, err - } - - if len(hss) > 1 { - return nil, &MultipleFoundError{"host", path} - } - - return hss[0], nil -} - -func (f *Finder) DefaultHostSystem(ctx context.Context) (*object.HostSystem, error) { - hs, err := f.HostSystem(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return hs, nil -} - -func (f *Finder) HostSystemOrDefault(ctx context.Context, path string) (*object.HostSystem, error) { - if path != "" { - hs, err := f.HostSystem(ctx, path) - if err != nil { - return nil, err - } - return hs, nil - } - - return f.DefaultHostSystem(ctx) -} - -func (f *Finder) NetworkList(ctx context.Context, path string) ([]object.NetworkReference, error) { - s := &spec{ - Relative: f.networkFolder, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var ns []object.NetworkReference - for _, e := range es { - ref := e.Object.Reference() - switch ref.Type { - case "Network": - r := object.NewNetwork(f.client, ref) - r.InventoryPath = e.Path - ns = append(ns, r) - case "OpaqueNetwork": - r := object.NewOpaqueNetwork(f.client, ref) - r.InventoryPath = e.Path - ns = append(ns, r) - case "DistributedVirtualPortgroup": - r := object.NewDistributedVirtualPortgroup(f.client, ref) - r.InventoryPath = e.Path - ns = append(ns, r) - case "DistributedVirtualSwitch", "VmwareDistributedVirtualSwitch": - r := object.NewDistributedVirtualSwitch(f.client, ref) - r.InventoryPath = e.Path - ns = append(ns, r) - } - } - - if len(ns) == 0 { - net, nerr := f.networkByID(ctx, path) - if nerr == nil { - return []object.NetworkReference{net}, nil - } - - return nil, &NotFoundError{"network", path} - } - - return ns, nil -} - -// Network finds a NetworkReference using a Name, Inventory Path, ManagedObject ID, Logical Switch UUID or Segment ID. -// With standard vSphere networking, Portgroups cannot have the same name within the same network folder. -// With NSX, Portgroups can have the same name, even within the same Switch. In this case, using an inventory path -// results in a MultipleFoundError. A MOID, switch UUID or segment ID can be used instead, as both are unique. -// See also: https://kb.vmware.com/s/article/79872#Duplicate_names -// Examples: -// - Name: "dvpg-1" -// - Inventory Path: "vds-1/dvpg-1" -// - Cluster Path: "/dc-1/host/cluster-1/dvpg-1" -// - ManagedObject ID: "DistributedVirtualPortgroup:dvportgroup-53" -// - Logical Switch UUID: "da2a59b8-2450-4cb2-b5cc-79c4c1d2144c" -// - Segment ID: "/infra/segments/vnet_ce50e69b-1784-4a14-9206-ffd7f1f146f7" -func (f *Finder) Network(ctx context.Context, path string) (object.NetworkReference, error) { - networks, err := f.NetworkList(ctx, path) - if err != nil { - return nil, err - } - - if len(networks) > 1 { - return nil, &MultipleFoundError{"network", path} - } - - return networks[0], nil -} - -func (f *Finder) networkByID(ctx context.Context, path string) (object.NetworkReference, error) { - if ref := object.ReferenceFromString(path); ref != nil { - // This is a MOID - return object.NewReference(f.client, *ref).(object.NetworkReference), nil - } - - kind := []string{"DistributedVirtualPortgroup"} - - m := view.NewManager(f.client) - v, err := m.CreateContainerView(ctx, f.client.ServiceContent.RootFolder, kind, true) - if err != nil { - return nil, err - } - defer v.Destroy(ctx) - - filter := property.Filter{ - "config.logicalSwitchUuid": path, - "config.segmentId": path, - } - - refs, err := v.FindAny(ctx, kind, filter) - if err != nil { - return nil, err - } - - if len(refs) == 0 { - return nil, &NotFoundError{"network", path} - } - if len(refs) > 1 { - return nil, &MultipleFoundError{"network", path} - } - - return object.NewReference(f.client, refs[0]).(object.NetworkReference), nil -} - -func (f *Finder) DefaultNetwork(ctx context.Context) (object.NetworkReference, error) { - network, err := f.Network(ctx, "*") - if err != nil { - return nil, toDefaultError(err) - } - - return network, nil -} - -func (f *Finder) NetworkOrDefault(ctx context.Context, path string) (object.NetworkReference, error) { - if path != "" { - network, err := f.Network(ctx, path) - if err != nil { - return nil, err - } - return network, nil - } - - return f.DefaultNetwork(ctx) -} - -func (f *Finder) ResourcePoolList(ctx context.Context, path string) ([]*object.ResourcePool, error) { - s := &spec{ - Relative: f.hostFolder, - Parents: []string{"ComputeResource", "ClusterComputeResource", "VirtualApp"}, - Nested: []string{"ResourcePool"}, - Contents: true, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var rps []*object.ResourcePool - for _, e := range es { - var rp *object.ResourcePool - - switch o := e.Object.(type) { - case mo.ResourcePool: - rp = object.NewResourcePool(f.client, o.Reference()) - rp.InventoryPath = e.Path - rps = append(rps, rp) - } - } - - if len(rps) == 0 { - return nil, &NotFoundError{"resource pool", path} - } - - return rps, nil -} - -func (f *Finder) ResourcePool(ctx context.Context, path string) (*object.ResourcePool, error) { - rps, err := f.ResourcePoolList(ctx, path) - if err != nil { - return nil, err - } - - if len(rps) > 1 { - return nil, &MultipleFoundError{"resource pool", path} - } - - return rps[0], nil -} - -func (f *Finder) DefaultResourcePool(ctx context.Context) (*object.ResourcePool, error) { - rp, err := f.ResourcePool(ctx, "*/Resources") - if err != nil { - return nil, toDefaultError(err) - } - - return rp, nil -} - -func (f *Finder) ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error) { - if path != "" { - rp, err := f.ResourcePool(ctx, path) - if err != nil { - return nil, err - } - return rp, nil - } - - return f.DefaultResourcePool(ctx) -} - -// ResourcePoolListAll combines ResourcePoolList and VirtualAppList -// VirtualAppList is only called if ResourcePoolList does not find any pools with the given path. -func (f *Finder) ResourcePoolListAll(ctx context.Context, path string) ([]*object.ResourcePool, error) { - pools, err := f.ResourcePoolList(ctx, path) - if err != nil { - if _, ok := err.(*NotFoundError); !ok { - return nil, err - } - - vapps, _ := f.VirtualAppList(ctx, path) - - if len(vapps) == 0 { - return nil, err - } - - for _, vapp := range vapps { - pools = append(pools, vapp.ResourcePool) - } - } - - return pools, nil -} - -func (f *Finder) DefaultFolder(ctx context.Context) (*object.Folder, error) { - ref, err := f.vmFolder(ctx) - if err != nil { - return nil, toDefaultError(err) - } - folder := object.NewFolder(f.client, ref.Reference()) - - // Set the InventoryPath of the newly created folder object - // The default foler becomes the datacenter's "vm" folder. - // The "vm" folder always exists for a datacenter. It cannot be - // removed or replaced - folder.SetInventoryPath(path.Join(f.dc.InventoryPath, "vm")) - - return folder, nil -} - -func (f *Finder) FolderOrDefault(ctx context.Context, path string) (*object.Folder, error) { - if path != "" { - folder, err := f.Folder(ctx, path) - if err != nil { - return nil, err - } - return folder, nil - } - return f.DefaultFolder(ctx) -} - -func (f *Finder) VirtualMachineList(ctx context.Context, path string) ([]*object.VirtualMachine, error) { - s := &spec{ - Relative: f.vmFolder, - Parents: []string{"VirtualApp"}, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var vms []*object.VirtualMachine - for _, e := range es { - switch o := e.Object.(type) { - case mo.VirtualMachine: - vm := object.NewVirtualMachine(f.client, o.Reference()) - vm.InventoryPath = e.Path - vms = append(vms, vm) - } - } - - if len(vms) == 0 { - return nil, &NotFoundError{"vm", path} - } - - return vms, nil -} - -func (f *Finder) VirtualMachine(ctx context.Context, path string) (*object.VirtualMachine, error) { - vms, err := f.VirtualMachineList(ctx, path) - if err != nil { - return nil, err - } - - if len(vms) > 1 { - return nil, &MultipleFoundError{"vm", path} - } - - return vms[0], nil -} - -func (f *Finder) VirtualAppList(ctx context.Context, path string) ([]*object.VirtualApp, error) { - s := &spec{ - Relative: f.vmFolder, - } - - es, err := f.find(ctx, path, s) - if err != nil { - return nil, err - } - - var apps []*object.VirtualApp - for _, e := range es { - switch o := e.Object.(type) { - case mo.VirtualApp: - app := object.NewVirtualApp(f.client, o.Reference()) - app.InventoryPath = e.Path - apps = append(apps, app) - } - } - - if len(apps) == 0 { - return nil, &NotFoundError{"app", path} - } - - return apps, nil -} - -func (f *Finder) VirtualApp(ctx context.Context, path string) (*object.VirtualApp, error) { - apps, err := f.VirtualAppList(ctx, path) - if err != nil { - return nil, err - } - - if len(apps) > 1 { - return nil, &MultipleFoundError{"app", path} - } - - return apps[0], nil -} - -func (f *Finder) FolderList(ctx context.Context, path string) ([]*object.Folder, error) { - es, err := f.ManagedObjectList(ctx, path) - if err != nil { - return nil, err - } - - var folders []*object.Folder - - for _, e := range es { - switch o := e.Object.(type) { - case mo.Folder, mo.StoragePod: - folder := object.NewFolder(f.client, o.Reference()) - folder.InventoryPath = e.Path - folders = append(folders, folder) - case *object.Folder: - // RootFolder - folders = append(folders, o) - } - } - - if len(folders) == 0 { - return nil, &NotFoundError{"folder", path} - } - - return folders, nil -} - -func (f *Finder) Folder(ctx context.Context, path string) (*object.Folder, error) { - folders, err := f.FolderList(ctx, path) - if err != nil { - return nil, err - } - - if len(folders) > 1 { - return nil, &MultipleFoundError{"folder", path} - } - - return folders[0], nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/recurser.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/recurser.go deleted file mode 100644 index 80d958a264f4..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/find/recurser.go +++ /dev/null @@ -1,253 +0,0 @@ -/* -Copyright (c) 2014-2017 VMware, Inc. 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. -*/ - -package find - -import ( - "context" - "os" - "path" - "strings" - - "github.com/vmware/govmomi/list" - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25/mo" -) - -// spec is used to specify per-search configuration, independent of the Finder instance. -type spec struct { - // Relative returns the root object to resolve Relative paths (starts with ".") - Relative func(ctx context.Context) (object.Reference, error) - - // ListMode can be used to optionally force "ls" behavior, rather than "find" behavior - ListMode *bool - - // Contents configures the Recurser to list the Contents of traversable leaf nodes. - // This is typically set to true when used from the ls command, where listing - // a folder means listing its Contents. This is typically set to false for - // commands that take managed entities that are not folders as input. - Contents bool - - // Parents specifies the types which can contain the child types being searched for. - // for example, when searching for a HostSystem, parent types can be - // "ComputeResource" or "ClusterComputeResource". - Parents []string - - // Include specifies which types to be included in the results, used only in "find" mode. - Include []string - - // Nested should be set to types that can be Nested, used only in "find" mode. - Nested []string - - // ChildType avoids traversing into folders that can't contain the Include types, used only in "find" mode. - ChildType []string -} - -func (s *spec) traversable(o mo.Reference) bool { - ref := o.Reference() - - switch ref.Type { - case "Datacenter": - if len(s.Include) == 1 && s.Include[0] == "Datacenter" { - // No point in traversing deeper as Datacenters cannot be nested - return false - } - return true - case "Folder": - if f, ok := o.(mo.Folder); ok { - // TODO: Not making use of this yet, but here we can optimize when searching the entire - // inventory across Datacenters for specific types, for example: 'govc ls -t VirtualMachine /**' - // should not traverse into a Datacenter's host, network or datatore folders. - if !s.traversableChildType(f.ChildType) { - return false - } - } - - return true - } - - for _, kind := range s.Parents { - if kind == ref.Type { - return true - } - } - - return false -} - -func (s *spec) traversableChildType(ctypes []string) bool { - if len(s.ChildType) == 0 { - return true - } - - for _, t := range ctypes { - for _, c := range s.ChildType { - if t == c { - return true - } - } - } - - return false -} - -func (s *spec) wanted(e list.Element) bool { - if len(s.Include) == 0 { - return true - } - - w := e.Object.Reference().Type - - for _, kind := range s.Include { - if w == kind { - return true - } - } - - return false -} - -// listMode is a global option to revert to the original Finder behavior, -// disabling the newer "find" mode. -var listMode = os.Getenv("GOVMOMI_FINDER_LIST_MODE") == "true" - -func (s *spec) listMode(isPath bool) bool { - if listMode { - return true - } - - if s.ListMode != nil { - return *s.ListMode - } - - return isPath -} - -type recurser struct { - Collector *property.Collector - - // All configures the recurses to fetch complete objects for leaf nodes. - All bool -} - -func (r recurser) List(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) { - if len(parts) == 0 { - // Include non-traversable leaf elements in result. For example, consider - // the pattern "./vm/my-vm-*", where the pattern should match the VMs and - // not try to traverse them. - // - // Include traversable leaf elements in result, if the contents - // field is set to false. - // - if !s.Contents || !s.traversable(root.Object.Reference()) { - return []list.Element{root}, nil - } - } - - k := list.Lister{ - Collector: r.Collector, - Reference: root.Object.Reference(), - Prefix: root.Path, - } - - if r.All && len(parts) < 2 { - k.All = true - } - - in, err := k.List(ctx) - if err != nil { - return nil, err - } - - // This folder is a leaf as far as the glob goes. - if len(parts) == 0 { - return in, nil - } - - all := parts - pattern := parts[0] - parts = parts[1:] - - var out []list.Element - for _, e := range in { - matched, err := path.Match(pattern, path.Base(e.Path)) - if err != nil { - return nil, err - } - - if !matched { - matched = strings.HasSuffix(e.Path, "/"+path.Join(all...)) - if matched { - // name contains a '/' - out = append(out, e) - } - - continue - } - - nres, err := r.List(ctx, s, e, parts) - if err != nil { - return nil, err - } - - out = append(out, nres...) - } - - return out, nil -} - -func (r recurser) Find(ctx context.Context, s *spec, root list.Element, parts []string) ([]list.Element, error) { - var out []list.Element - - if len(parts) > 0 { - pattern := parts[0] - matched, err := path.Match(pattern, path.Base(root.Path)) - if err != nil { - return nil, err - } - - if matched && s.wanted(root) { - out = append(out, root) - } - } - - if !s.traversable(root.Object) { - return out, nil - } - - k := list.Lister{ - Collector: r.Collector, - Reference: root.Object.Reference(), - Prefix: root.Path, - } - - in, err := k.List(ctx) - if err != nil { - return nil, err - } - - for _, e := range in { - nres, err := r.Find(ctx, s, e, parts) - if err != nil { - return nil, err - } - - out = append(out, nres...) - } - - return out, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/history/collector.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/history/collector.go deleted file mode 100644 index 9b25ea85a14a..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/history/collector.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package history - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type Collector struct { - r types.ManagedObjectReference - c *vim25.Client -} - -func NewCollector(c *vim25.Client, ref types.ManagedObjectReference) *Collector { - return &Collector{ - r: ref, - c: c, - } -} - -// Reference returns the managed object reference of this collector -func (c Collector) Reference() types.ManagedObjectReference { - return c.r -} - -// Client returns the vim25 client used by this collector -func (c Collector) Client() *vim25.Client { - return c.c -} - -// Properties wraps property.DefaultCollector().RetrieveOne() and returns -// properties for the specified managed object reference -func (c Collector) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error { - return property.DefaultCollector(c.c).RetrieveOne(ctx, r, ps, dst) -} - -func (c Collector) Destroy(ctx context.Context) error { - req := types.DestroyCollector{ - This: c.r, - } - - _, err := methods.DestroyCollector(ctx, c.c, &req) - return err -} - -func (c Collector) Reset(ctx context.Context) error { - req := types.ResetCollector{ - This: c.r, - } - - _, err := methods.ResetCollector(ctx, c.c, &req) - return err -} - -func (c Collector) Rewind(ctx context.Context) error { - req := types.RewindCollector{ - This: c.r, - } - - _, err := methods.RewindCollector(ctx, c.c, &req) - return err -} - -func (c Collector) SetPageSize(ctx context.Context, maxCount int32) error { - req := types.SetCollectorPageSize{ - This: c.r, - MaxCount: maxCount, - } - - _, err := methods.SetCollectorPageSize(ctx, c.c, &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/helpers.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/helpers.go deleted file mode 100644 index b3eafeadfd92..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/helpers.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright (c) 2020 VMware, Inc. 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. -*/ - -package internal - -import ( - "net" - "path" - - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -// InventoryPath composed of entities by Name -func InventoryPath(entities []mo.ManagedEntity) string { - val := "/" - - for _, entity := range entities { - // Skip root folder in building inventory path. - if entity.Parent == nil { - continue - } - val = path.Join(val, entity.Name) - } - - return val -} - -func HostSystemManagementIPs(config []types.VirtualNicManagerNetConfig) []net.IP { - var ips []net.IP - - for _, nc := range config { - if nc.NicType != string(types.HostVirtualNicManagerNicTypeManagement) { - continue - } - for ix := range nc.CandidateVnic { - for _, selectedVnicKey := range nc.SelectedVnic { - if nc.CandidateVnic[ix].Key != selectedVnicKey { - continue - } - ip := net.ParseIP(nc.CandidateVnic[ix].Spec.Ip.IpAddress) - if ip != nil { - ips = append(ips, ip) - } - } - } - } - - return ips -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/methods.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/methods.go deleted file mode 100644 index 95ccee8d2471..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/methods.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright (c) 2014-2015 VMware, Inc. 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. -*/ - -package internal - -import ( - "context" - - "github.com/vmware/govmomi/vim25/soap" -) - -type RetrieveDynamicTypeManagerBody struct { - Req *RetrieveDynamicTypeManagerRequest `xml:"urn:vim25 RetrieveDynamicTypeManager"` - Res *RetrieveDynamicTypeManagerResponse `xml:"urn:vim25 RetrieveDynamicTypeManagerResponse"` - Fault_ *soap.Fault -} - -func (b *RetrieveDynamicTypeManagerBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveDynamicTypeManager(ctx context.Context, r soap.RoundTripper, req *RetrieveDynamicTypeManagerRequest) (*RetrieveDynamicTypeManagerResponse, error) { - var reqBody, resBody RetrieveDynamicTypeManagerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveManagedMethodExecuterBody struct { - Req *RetrieveManagedMethodExecuterRequest `xml:"urn:vim25 RetrieveManagedMethodExecuter"` - Res *RetrieveManagedMethodExecuterResponse `xml:"urn:vim25 RetrieveManagedMethodExecuterResponse"` - Fault_ *soap.Fault -} - -func (b *RetrieveManagedMethodExecuterBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveManagedMethodExecuter(ctx context.Context, r soap.RoundTripper, req *RetrieveManagedMethodExecuterRequest) (*RetrieveManagedMethodExecuterResponse, error) { - var reqBody, resBody RetrieveManagedMethodExecuterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DynamicTypeMgrQueryMoInstancesBody struct { - Req *DynamicTypeMgrQueryMoInstancesRequest `xml:"urn:vim25 DynamicTypeMgrQueryMoInstances"` - Res *DynamicTypeMgrQueryMoInstancesResponse `xml:"urn:vim25 DynamicTypeMgrQueryMoInstancesResponse"` - Fault_ *soap.Fault -} - -func (b *DynamicTypeMgrQueryMoInstancesBody) Fault() *soap.Fault { return b.Fault_ } - -func DynamicTypeMgrQueryMoInstances(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryMoInstancesRequest) (*DynamicTypeMgrQueryMoInstancesResponse, error) { - var reqBody, resBody DynamicTypeMgrQueryMoInstancesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DynamicTypeMgrQueryTypeInfoBody struct { - Req *DynamicTypeMgrQueryTypeInfoRequest `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfo"` - Res *DynamicTypeMgrQueryTypeInfoResponse `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfoResponse"` - Fault_ *soap.Fault -} - -func (b *DynamicTypeMgrQueryTypeInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func DynamicTypeMgrQueryTypeInfo(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryTypeInfoRequest) (*DynamicTypeMgrQueryTypeInfoResponse, error) { - var reqBody, resBody DynamicTypeMgrQueryTypeInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExecuteSoapBody struct { - Req *ExecuteSoapRequest `xml:"urn:vim25 ExecuteSoap"` - Res *ExecuteSoapResponse `xml:"urn:vim25 ExecuteSoapResponse"` - Fault_ *soap.Fault -} - -func (b *ExecuteSoapBody) Fault() *soap.Fault { return b.Fault_ } - -func ExecuteSoap(ctx context.Context, r soap.RoundTripper, req *ExecuteSoapRequest) (*ExecuteSoapResponse, error) { - var reqBody, resBody ExecuteSoapBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/types.go deleted file mode 100644 index b84103b89bb2..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/types.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package internal - -import ( - "reflect" - - "github.com/vmware/govmomi/vim25/types" -) - -type DynamicTypeMgrQueryMoInstancesRequest struct { - This types.ManagedObjectReference `xml:"_this"` - FilterSpec BaseDynamicTypeMgrFilterSpec `xml:"filterSpec,omitempty,typeattr"` -} - -type DynamicTypeMgrQueryMoInstancesResponse struct { - Returnval []DynamicTypeMgrMoInstance `xml:"urn:vim25 returnval"` -} - -type DynamicTypeEnumTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - WsdlName string `xml:"wsdlName"` - Version string `xml:"version"` - Value []string `xml:"value,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -func init() { - types.Add("DynamicTypeEnumTypeInfo", reflect.TypeOf((*DynamicTypeEnumTypeInfo)(nil)).Elem()) -} - -type DynamicTypeMgrAllTypeInfoRequest struct { - types.DynamicData - - ManagedTypeInfo []DynamicTypeMgrManagedTypeInfo `xml:"managedTypeInfo,omitempty"` - EnumTypeInfo []DynamicTypeEnumTypeInfo `xml:"enumTypeInfo,omitempty"` - DataTypeInfo []DynamicTypeMgrDataTypeInfo `xml:"dataTypeInfo,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrAllTypeInfo", reflect.TypeOf((*DynamicTypeMgrAllTypeInfoRequest)(nil)).Elem()) -} - -type DynamicTypeMgrAnnotation struct { - types.DynamicData - - Name string `xml:"name"` - Parameter []string `xml:"parameter,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrAnnotation", reflect.TypeOf((*DynamicTypeMgrAnnotation)(nil)).Elem()) -} - -type DynamicTypeMgrDataTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - WsdlName string `xml:"wsdlName"` - Version string `xml:"version"` - Base []string `xml:"base,omitempty"` - Property []DynamicTypeMgrPropertyTypeInfo `xml:"property,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrDataTypeInfo", reflect.TypeOf((*DynamicTypeMgrDataTypeInfo)(nil)).Elem()) -} - -func (b *DynamicTypeMgrFilterSpec) GetDynamicTypeMgrFilterSpec() *DynamicTypeMgrFilterSpec { return b } - -type BaseDynamicTypeMgrFilterSpec interface { - GetDynamicTypeMgrFilterSpec() *DynamicTypeMgrFilterSpec -} - -type DynamicTypeMgrFilterSpec struct { - types.DynamicData -} - -func init() { - types.Add("DynamicTypeMgrFilterSpec", reflect.TypeOf((*DynamicTypeMgrFilterSpec)(nil)).Elem()) -} - -type DynamicTypeMgrManagedTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - WsdlName string `xml:"wsdlName"` - Version string `xml:"version"` - Base []string `xml:"base,omitempty"` - Property []DynamicTypeMgrPropertyTypeInfo `xml:"property,omitempty"` - Method []DynamicTypeMgrMethodTypeInfo `xml:"method,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrManagedTypeInfo", reflect.TypeOf((*DynamicTypeMgrManagedTypeInfo)(nil)).Elem()) -} - -type DynamicTypeMgrMethodTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - WsdlName string `xml:"wsdlName"` - Version string `xml:"version"` - ParamTypeInfo []DynamicTypeMgrParamTypeInfo `xml:"paramTypeInfo,omitempty"` - ReturnTypeInfo *DynamicTypeMgrParamTypeInfo `xml:"returnTypeInfo,omitempty"` - Fault []string `xml:"fault,omitempty"` - PrivId string `xml:"privId,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrMethodTypeInfo", reflect.TypeOf((*DynamicTypeMgrMethodTypeInfo)(nil)).Elem()) -} - -type DynamicTypeMgrMoFilterSpec struct { - DynamicTypeMgrFilterSpec - - Id string `xml:"id,omitempty"` - TypeSubstr string `xml:"typeSubstr,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrMoFilterSpec", reflect.TypeOf((*DynamicTypeMgrMoFilterSpec)(nil)).Elem()) -} - -type DynamicTypeMgrMoInstance struct { - types.DynamicData - - Id string `xml:"id"` - MoType string `xml:"moType"` -} - -func init() { - types.Add("DynamicTypeMgrMoInstance", reflect.TypeOf((*DynamicTypeMgrMoInstance)(nil)).Elem()) -} - -type DynamicTypeMgrParamTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - Version string `xml:"version"` - Type string `xml:"type"` - PrivId string `xml:"privId,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrParamTypeInfo", reflect.TypeOf((*DynamicTypeMgrParamTypeInfo)(nil)).Elem()) -} - -type DynamicTypeMgrPropertyTypeInfo struct { - types.DynamicData - - Name string `xml:"name"` - Version string `xml:"version"` - Type string `xml:"type"` - PrivId string `xml:"privId,omitempty"` - MsgIdFormat string `xml:"msgIdFormat,omitempty"` - Annotation []DynamicTypeMgrAnnotation `xml:"annotation,omitempty"` -} - -type DynamicTypeMgrQueryTypeInfoRequest struct { - This types.ManagedObjectReference `xml:"_this"` - FilterSpec BaseDynamicTypeMgrFilterSpec `xml:"filterSpec,omitempty,typeattr"` -} - -type DynamicTypeMgrQueryTypeInfoResponse struct { - Returnval DynamicTypeMgrAllTypeInfoRequest `xml:"urn:vim25 returnval"` -} - -func init() { - types.Add("DynamicTypeMgrPropertyTypeInfo", reflect.TypeOf((*DynamicTypeMgrPropertyTypeInfo)(nil)).Elem()) -} - -type DynamicTypeMgrTypeFilterSpec struct { - DynamicTypeMgrFilterSpec - - TypeSubstr string `xml:"typeSubstr,omitempty"` -} - -func init() { - types.Add("DynamicTypeMgrTypeFilterSpec", reflect.TypeOf((*DynamicTypeMgrTypeFilterSpec)(nil)).Elem()) -} - -type ReflectManagedMethodExecuterSoapArgument struct { - types.DynamicData - - Name string `xml:"name"` - Val string `xml:"val"` -} - -func init() { - types.Add("ReflectManagedMethodExecuterSoapArgument", reflect.TypeOf((*ReflectManagedMethodExecuterSoapArgument)(nil)).Elem()) -} - -type ReflectManagedMethodExecuterSoapFault struct { - types.DynamicData - - FaultMsg string `xml:"faultMsg"` - FaultDetail string `xml:"faultDetail,omitempty"` -} - -func init() { - types.Add("ReflectManagedMethodExecuterSoapFault", reflect.TypeOf((*ReflectManagedMethodExecuterSoapFault)(nil)).Elem()) -} - -type ReflectManagedMethodExecuterSoapResult struct { - types.DynamicData - - Response string `xml:"response,omitempty"` - Fault *ReflectManagedMethodExecuterSoapFault `xml:"fault,omitempty"` -} - -type RetrieveDynamicTypeManagerRequest struct { - This types.ManagedObjectReference `xml:"_this"` -} - -type RetrieveDynamicTypeManagerResponse struct { - Returnval *InternalDynamicTypeManager `xml:"urn:vim25 returnval"` -} - -type RetrieveManagedMethodExecuterRequest struct { - This types.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("RetrieveManagedMethodExecuter", reflect.TypeOf((*RetrieveManagedMethodExecuterRequest)(nil)).Elem()) -} - -type RetrieveManagedMethodExecuterResponse struct { - Returnval *ReflectManagedMethodExecuter `xml:"urn:vim25 returnval"` -} - -type InternalDynamicTypeManager struct { - types.ManagedObjectReference -} - -type ReflectManagedMethodExecuter struct { - types.ManagedObjectReference -} - -type ExecuteSoapRequest struct { - This types.ManagedObjectReference `xml:"_this"` - Moid string `xml:"moid"` - Version string `xml:"version"` - Method string `xml:"method"` - Argument []ReflectManagedMethodExecuterSoapArgument `xml:"argument,omitempty"` -} - -type ExecuteSoapResponse struct { - Returnval *ReflectManagedMethodExecuterSoapResult `xml:"urn:vim25 returnval"` -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/version/version.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/version/version.go deleted file mode 100644 index dc29e12bf358..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/internal/version/version.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package version - -const ( - // ClientName is the name of this SDK - ClientName = "govmomi" - - // ClientVersion is the version of this SDK - ClientVersion = "0.30.6" -) diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/list/lister.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/list/lister.go deleted file mode 100644 index 92a40e8ba875..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/list/lister.go +++ /dev/null @@ -1,630 +0,0 @@ -/* -Copyright (c) 2014-2023 VMware, Inc. 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. -*/ - -package list - -import ( - "context" - "fmt" - "path" - "reflect" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -type Element struct { - Path string - Object mo.Reference -} - -func (e Element) String() string { - return fmt.Sprintf("%s @ %s", e.Object.Reference(), e.Path) -} - -func ToElement(r mo.Reference, prefix string) Element { - var name string - - // Comments about types to be expected in folders copied from the - // documentation of the Folder managed object: - // http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vim.Folder.html - switch m := r.(type) { - case mo.Folder: - name = m.Name - case mo.StoragePod: - name = m.Name - - // { "vim.Datacenter" } - Identifies the root folder and its descendant - // folders. Data center folders can contain child data center folders and - // Datacenter managed objects. Datacenter objects contain virtual machine, - // compute resource, network entity, and datastore folders. - case mo.Datacenter: - name = m.Name - - // { "vim.Virtualmachine", "vim.VirtualApp" } - Identifies a virtual machine - // folder. A virtual machine folder may contain child virtual machine - // folders. It also can contain VirtualMachine managed objects, templates, - // and VirtualApp managed objects. - case mo.VirtualMachine: - name = m.Name - case mo.VirtualApp: - name = m.Name - - // { "vim.ComputeResource" } - Identifies a compute resource - // folder, which contains child compute resource folders and ComputeResource - // hierarchies. - case mo.ComputeResource: - name = m.Name - case mo.ClusterComputeResource: - name = m.Name - case mo.HostSystem: - name = m.Name - case mo.ResourcePool: - name = m.Name - - // { "vim.Network" } - Identifies a network entity folder. - // Network entity folders on a vCenter Server can contain Network, - // DistributedVirtualSwitch, and DistributedVirtualPortgroup managed objects. - // Network entity folders on an ESXi host can contain only Network objects. - case mo.Network: - name = m.Name - case mo.OpaqueNetwork: - name = m.Name - case mo.DistributedVirtualSwitch: - name = m.Name - case mo.DistributedVirtualPortgroup: - name = m.Name - case mo.VmwareDistributedVirtualSwitch: - name = m.Name - - // { "vim.Datastore" } - Identifies a datastore folder. Datastore folders can - // contain child datastore folders and Datastore managed objects. - case mo.Datastore: - name = m.Name - - default: - panic("not implemented for type " + reflect.TypeOf(r).String()) - } - - e := Element{ - Path: path.Join(prefix, name), - Object: r, - } - - return e -} - -type Lister struct { - Collector *property.Collector - Reference types.ManagedObjectReference - Prefix string - All bool -} - -func (l Lister) retrieveProperties(ctx context.Context, req types.RetrieveProperties, dst *[]interface{}) error { - res, err := l.Collector.RetrieveProperties(ctx, req) - if err != nil { - return err - } - - // Instead of using mo.LoadRetrievePropertiesResponse, use a custom loop to - // iterate over the results and ignore entries that have properties that - // could not be retrieved (a non-empty `missingSet` property). Since the - // returned objects are enumerated by vSphere in the first place, any object - // that has a non-empty `missingSet` property is indicative of a race - // condition in vSphere where the object was enumerated initially, but was - // removed before its properties could be collected. - for _, p := range res.Returnval { - v, err := mo.ObjectContentToType(p) - if err != nil { - // Ignore fault if it is ManagedObjectNotFound - if soap.IsVimFault(err) { - switch soap.ToVimFault(err).(type) { - case *types.ManagedObjectNotFound: - continue - } - } - - return err - } - - *dst = append(*dst, v) - } - - return nil -} - -func (l Lister) List(ctx context.Context) ([]Element, error) { - switch l.Reference.Type { - case "Folder", "StoragePod": - return l.ListFolder(ctx) - case "Datacenter": - return l.ListDatacenter(ctx) - case "ComputeResource", "ClusterComputeResource": - // Treat ComputeResource and ClusterComputeResource as one and the same. - // It doesn't matter from the perspective of the lister. - return l.ListComputeResource(ctx) - case "ResourcePool": - return l.ListResourcePool(ctx) - case "HostSystem": - return l.ListHostSystem(ctx) - case "VirtualApp": - return l.ListVirtualApp(ctx) - case "VmwareDistributedVirtualSwitch", "DistributedVirtualSwitch": - return l.ListDistributedVirtualSwitch(ctx) - default: - return nil, fmt.Errorf("cannot traverse type " + l.Reference.Type) - } -} - -func (l Lister) ListFolder(ctx context.Context) ([]Element, error) { - spec := types.PropertyFilterSpec{ - ObjectSet: []types.ObjectSpec{ - { - Obj: l.Reference, - SelectSet: []types.BaseSelectionSpec{ - &types.TraversalSpec{ - Path: "childEntity", - Skip: types.NewBool(false), - Type: "Folder", - }, - }, - Skip: types.NewBool(true), - }, - }, - } - - // Retrieve all objects that we can deal with - childTypes := []string{ - "Folder", - "Datacenter", - "VirtualApp", - "VirtualMachine", - "Network", - "ComputeResource", - "ClusterComputeResource", - "Datastore", - "DistributedVirtualSwitch", - } - - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - - // Additional basic properties. - switch t { - case "Folder": - pspec.PathSet = append(pspec.PathSet, "childType") - case "ComputeResource", "ClusterComputeResource": - // The ComputeResource and ClusterComputeResource are dereferenced in - // the ResourcePoolFlag. Make sure they always have their resourcePool - // field populated. - pspec.PathSet = append(pspec.PathSet, "resourcePool") - } - } - - spec.PropSet = append(spec.PropSet, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{spec}, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListDatacenter(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - // Include every datastore folder in the select set - fields := []string{ - "vmFolder", - "hostFolder", - "datastoreFolder", - "networkFolder", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "Datacenter", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - pspec := types.PropertySpec{ - Type: "Folder", - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name", "childType"} - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: []types.PropertySpec{pspec}, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListComputeResource(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - fields := []string{ - "host", - "network", - "resourcePool", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "ComputeResource", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - childTypes := []string{ - "HostSystem", - "Network", - "ResourcePool", - } - - var pspecs []types.PropertySpec - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - } - - pspecs = append(pspecs, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspecs, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListResourcePool(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - fields := []string{ - "resourcePool", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "ResourcePool", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - childTypes := []string{ - "ResourcePool", - } - - var pspecs []types.PropertySpec - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - } - - pspecs = append(pspecs, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspecs, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListHostSystem(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - fields := []string{ - "datastore", - "network", - "vm", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "HostSystem", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - childTypes := []string{ - "Datastore", - "Network", - "VirtualMachine", - } - - var pspecs []types.PropertySpec - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - } - - pspecs = append(pspecs, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspecs, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListDistributedVirtualSwitch(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - fields := []string{ - "portgroup", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "DistributedVirtualSwitch", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - childTypes := []string{ - "DistributedVirtualPortgroup", - } - - var pspecs []types.PropertySpec - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - } - - pspecs = append(pspecs, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspecs, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} - -func (l Lister) ListVirtualApp(ctx context.Context) ([]Element, error) { - ospec := types.ObjectSpec{ - Obj: l.Reference, - Skip: types.NewBool(true), - } - - fields := []string{ - "resourcePool", - "vm", - } - - for _, f := range fields { - tspec := types.TraversalSpec{ - Path: f, - Skip: types.NewBool(false), - Type: "VirtualApp", - } - - ospec.SelectSet = append(ospec.SelectSet, &tspec) - } - - childTypes := []string{ - "ResourcePool", - "VirtualMachine", - } - - var pspecs []types.PropertySpec - for _, t := range childTypes { - pspec := types.PropertySpec{ - Type: t, - } - - if l.All { - pspec.All = types.NewBool(true) - } else { - pspec.PathSet = []string{"name"} - } - - pspecs = append(pspecs, pspec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspecs, - }, - }, - } - - var dst []interface{} - - err := l.retrieveProperties(ctx, req, &dst) - if err != nil { - return nil, err - } - - es := []Element{} - for _, v := range dst { - es = append(es, ToElement(v.(mo.Reference), l.Prefix)) - } - - return es, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/client.go deleted file mode 100644 index 4cc73e0d338e..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/client.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package lookup - -import ( - "context" - "crypto/x509" - "encoding/base64" - "log" - "net/url" - - "github.com/vmware/govmomi/lookup/methods" - "github.com/vmware/govmomi/lookup/types" - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/soap" - vim "github.com/vmware/govmomi/vim25/types" -) - -const ( - Namespace = "lookup" - Version = "2.0" - Path = "/lookupservice" + vim25.Path -) - -var ( - ServiceInstance = vim.ManagedObjectReference{ - Type: "LookupServiceInstance", - Value: "ServiceInstance", - } -) - -// Client is a soap.Client targeting the SSO Lookup Service API endpoint. -type Client struct { - *soap.Client - - RoundTripper soap.RoundTripper - - ServiceContent types.LookupServiceContent -} - -// NewClient returns a client targeting the SSO Lookup Service API endpoint. -func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) { - // PSC may be external, attempt to derive from sts.uri - path := &url.URL{Path: Path} - if c.ServiceContent.Setting != nil { - m := object.NewOptionManager(c, *c.ServiceContent.Setting) - opts, err := m.Query(ctx, "config.vpxd.sso.sts.uri") - if err == nil && len(opts) == 1 { - u, err := url.Parse(opts[0].GetOptionValue().Value.(string)) - if err == nil { - path.Scheme = u.Scheme - path.Host = u.Host - } - } - } - - sc := c.Client.NewServiceClient(path.String(), Namespace) - sc.Version = Version - - req := types.RetrieveServiceContent{ - This: ServiceInstance, - } - - res, err := methods.RetrieveServiceContent(ctx, sc, &req) - if err != nil { - return nil, err - } - - return &Client{sc, sc, res.Returnval}, nil -} - -// RoundTrip dispatches to the RoundTripper field. -func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - return c.RoundTripper.RoundTrip(ctx, req, res) -} - -func (c *Client) List(ctx context.Context, filter *types.LookupServiceRegistrationFilter) ([]types.LookupServiceRegistrationInfo, error) { - req := types.List{ - This: *c.ServiceContent.ServiceRegistration, - FilterCriteria: filter, - } - - res, err := methods.List(ctx, c, &req) - if err != nil { - return nil, err - } - return res.Returnval, nil -} - -func (c *Client) SiteID(ctx context.Context) (string, error) { - req := types.GetSiteId{ - This: *c.ServiceContent.ServiceRegistration, - } - - res, err := methods.GetSiteId(ctx, c, &req) - if err != nil { - return "", err - } - return res.Returnval, nil -} - -// EndpointURL uses the Lookup Service to find the endpoint URL and thumbprint for the given filter. -// If the endpoint is found, its TLS certificate is also added to the vim25.Client's trusted host thumbprints. -// If the Lookup Service is not available, the given path is returned as the default. -func EndpointURL(ctx context.Context, c *vim25.Client, path string, filter *types.LookupServiceRegistrationFilter) string { - if lu, err := NewClient(ctx, c); err == nil { - info, _ := lu.List(ctx, filter) - if len(info) != 0 && len(info[0].ServiceEndpoints) != 0 { - endpoint := &info[0].ServiceEndpoints[0] - path = endpoint.Url - - if u, err := url.Parse(path); err == nil { - // Set thumbprint only for endpoints on hosts outside this vCenter. - // Platform Services may live on multiple hosts. - if c.URL().Host != u.Host && c.Thumbprint(u.Host) == "" { - c.SetThumbprint(u.Host, endpointThumbprint(endpoint)) - } - } - } - } - return path -} - -// endpointThumbprint converts the base64 encoded endpoint certificate to a SHA1 thumbprint. -func endpointThumbprint(endpoint *types.LookupServiceRegistrationEndpoint) string { - if len(endpoint.SslTrust) == 0 { - return "" - } - enc := endpoint.SslTrust[0] - - b, err := base64.StdEncoding.DecodeString(enc) - if err != nil { - log.Printf("base64.Decode(%q): %s", enc, err) - return "" - } - - cert, err := x509.ParseCertificate(b) - if err != nil { - log.Printf("x509.ParseCertificate(%q): %s", enc, err) - return "" - } - - return soap.ThumbprintSHA1(cert) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/methods/methods.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/methods/methods.go deleted file mode 100644 index 794dfc84b2c6..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/methods/methods.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -Copyright (c) 2014-2018 VMware, Inc. 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. -*/ - -package methods - -import ( - "context" - - "github.com/vmware/govmomi/lookup/types" - "github.com/vmware/govmomi/vim25/soap" -) - -type CreateBody struct { - Req *types.Create `xml:"urn:lookup Create,omitempty"` - Res *types.CreateResponse `xml:"urn:lookup CreateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateBody) Fault() *soap.Fault { return b.Fault_ } - -func Create(ctx context.Context, r soap.RoundTripper, req *types.Create) (*types.CreateResponse, error) { - var reqBody, resBody CreateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteBody struct { - Req *types.Delete `xml:"urn:lookup Delete,omitempty"` - Res *types.DeleteResponse `xml:"urn:lookup DeleteResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteBody) Fault() *soap.Fault { return b.Fault_ } - -func Delete(ctx context.Context, r soap.RoundTripper, req *types.Delete) (*types.DeleteResponse, error) { - var reqBody, resBody DeleteBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetBody struct { - Req *types.Get `xml:"urn:lookup Get,omitempty"` - Res *types.GetResponse `xml:"urn:lookup GetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetBody) Fault() *soap.Fault { return b.Fault_ } - -func Get(ctx context.Context, r soap.RoundTripper, req *types.Get) (*types.GetResponse, error) { - var reqBody, resBody GetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetLocaleBody struct { - Req *types.GetLocale `xml:"urn:lookup GetLocale,omitempty"` - Res *types.GetLocaleResponse `xml:"urn:lookup GetLocaleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetLocaleBody) Fault() *soap.Fault { return b.Fault_ } - -func GetLocale(ctx context.Context, r soap.RoundTripper, req *types.GetLocale) (*types.GetLocaleResponse, error) { - var reqBody, resBody GetLocaleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetSiteIdBody struct { - Req *types.GetSiteId `xml:"urn:lookup GetSiteId,omitempty"` - Res *types.GetSiteIdResponse `xml:"urn:lookup GetSiteIdResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetSiteIdBody) Fault() *soap.Fault { return b.Fault_ } - -func GetSiteId(ctx context.Context, r soap.RoundTripper, req *types.GetSiteId) (*types.GetSiteIdResponse, error) { - var reqBody, resBody GetSiteIdBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListBody struct { - Req *types.List `xml:"urn:lookup List,omitempty"` - Res *types.ListResponse `xml:"urn:lookup ListResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListBody) Fault() *soap.Fault { return b.Fault_ } - -func List(ctx context.Context, r soap.RoundTripper, req *types.List) (*types.ListResponse, error) { - var reqBody, resBody ListBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHaBackupConfigurationBody struct { - Req *types.RetrieveHaBackupConfiguration `xml:"urn:lookup RetrieveHaBackupConfiguration,omitempty"` - Res *types.RetrieveHaBackupConfigurationResponse `xml:"urn:lookup RetrieveHaBackupConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHaBackupConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHaBackupConfiguration(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHaBackupConfiguration) (*types.RetrieveHaBackupConfigurationResponse, error) { - var reqBody, resBody RetrieveHaBackupConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveServiceContentBody struct { - Req *types.RetrieveServiceContent `xml:"urn:lookup RetrieveServiceContent,omitempty"` - Res *types.RetrieveServiceContentResponse `xml:"urn:lookup RetrieveServiceContentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.RetrieveServiceContent) (*types.RetrieveServiceContentResponse, error) { - var reqBody, resBody RetrieveServiceContentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetBody struct { - Req *types.Set `xml:"urn:lookup Set,omitempty"` - Res *types.SetResponse `xml:"urn:lookup SetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetBody) Fault() *soap.Fault { return b.Fault_ } - -func Set(ctx context.Context, r soap.RoundTripper, req *types.Set) (*types.SetResponse, error) { - var reqBody, resBody SetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetLocaleBody struct { - Req *types.SetLocale `xml:"urn:lookup SetLocale,omitempty"` - Res *types.SetLocaleResponse `xml:"urn:lookup SetLocaleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetLocaleBody) Fault() *soap.Fault { return b.Fault_ } - -func SetLocale(ctx context.Context, r soap.RoundTripper, req *types.SetLocale) (*types.SetLocaleResponse, error) { - var reqBody, resBody SetLocaleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/types/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/types/types.go deleted file mode 100644 index d70289dd1039..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/lookup/types/types.go +++ /dev/null @@ -1,412 +0,0 @@ -/* -Copyright (c) 2014-2018 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - - "github.com/vmware/govmomi/vim25/types" - vim "github.com/vmware/govmomi/vim25/types" -) - -type Create CreateRequestType - -func init() { - types.Add("lookup:Create", reflect.TypeOf((*Create)(nil)).Elem()) -} - -type CreateRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - ServiceId string `xml:"serviceId"` - CreateSpec LookupServiceRegistrationCreateSpec `xml:"createSpec"` -} - -func init() { - types.Add("lookup:CreateRequestType", reflect.TypeOf((*CreateRequestType)(nil)).Elem()) -} - -type CreateResponse struct { -} - -type Delete DeleteRequestType - -func init() { - types.Add("lookup:Delete", reflect.TypeOf((*Delete)(nil)).Elem()) -} - -type DeleteRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - ServiceId string `xml:"serviceId"` -} - -func init() { - types.Add("lookup:DeleteRequestType", reflect.TypeOf((*DeleteRequestType)(nil)).Elem()) -} - -type DeleteResponse struct { -} - -type Get GetRequestType - -func init() { - types.Add("lookup:Get", reflect.TypeOf((*Get)(nil)).Elem()) -} - -type GetLocale GetLocaleRequestType - -func init() { - types.Add("lookup:GetLocale", reflect.TypeOf((*GetLocale)(nil)).Elem()) -} - -type GetLocaleRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("lookup:GetLocaleRequestType", reflect.TypeOf((*GetLocaleRequestType)(nil)).Elem()) -} - -type GetLocaleResponse struct { - Returnval string `xml:"returnval"` -} - -type GetRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - ServiceId string `xml:"serviceId"` -} - -func init() { - types.Add("lookup:GetRequestType", reflect.TypeOf((*GetRequestType)(nil)).Elem()) -} - -type GetResponse struct { - Returnval LookupServiceRegistrationInfo `xml:"returnval"` -} - -type GetSiteId GetSiteIdRequestType - -func init() { - types.Add("lookup:GetSiteId", reflect.TypeOf((*GetSiteId)(nil)).Elem()) -} - -type GetSiteIdRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("lookup:GetSiteIdRequestType", reflect.TypeOf((*GetSiteIdRequestType)(nil)).Elem()) -} - -type GetSiteIdResponse struct { - Returnval string `xml:"returnval"` -} - -type List ListRequestType - -func init() { - types.Add("lookup:List", reflect.TypeOf((*List)(nil)).Elem()) -} - -type ListRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - FilterCriteria *LookupServiceRegistrationFilter `xml:"filterCriteria,omitempty"` -} - -func init() { - types.Add("lookup:ListRequestType", reflect.TypeOf((*ListRequestType)(nil)).Elem()) -} - -type ListResponse struct { - Returnval []LookupServiceRegistrationInfo `xml:"returnval,omitempty"` -} - -type LookupFaultEntryExistsFault struct { - LookupFaultServiceFault - - Name string `xml:"name"` -} - -func init() { - types.Add("lookup:LookupFaultEntryExistsFault", reflect.TypeOf((*LookupFaultEntryExistsFault)(nil)).Elem()) -} - -type LookupFaultEntryExistsFaultFault LookupFaultEntryExistsFault - -func init() { - types.Add("lookup:LookupFaultEntryExistsFaultFault", reflect.TypeOf((*LookupFaultEntryExistsFaultFault)(nil)).Elem()) -} - -type LookupFaultEntryNotFoundFault struct { - LookupFaultServiceFault - - Name string `xml:"name"` -} - -func init() { - types.Add("lookup:LookupFaultEntryNotFoundFault", reflect.TypeOf((*LookupFaultEntryNotFoundFault)(nil)).Elem()) -} - -type LookupFaultEntryNotFoundFaultFault LookupFaultEntryNotFoundFault - -func init() { - types.Add("lookup:LookupFaultEntryNotFoundFaultFault", reflect.TypeOf((*LookupFaultEntryNotFoundFaultFault)(nil)).Elem()) -} - -type LookupFaultServiceFault struct { - vim.MethodFault - - ErrorMessage string `xml:"errorMessage,omitempty"` -} - -func init() { - types.Add("lookup:LookupFaultServiceFault", reflect.TypeOf((*LookupFaultServiceFault)(nil)).Elem()) -} - -type LookupFaultUnsupportedSiteFault struct { - LookupFaultServiceFault - - OperatingSite string `xml:"operatingSite"` - RequestedSite string `xml:"requestedSite"` -} - -func init() { - types.Add("lookup:LookupFaultUnsupportedSiteFault", reflect.TypeOf((*LookupFaultUnsupportedSiteFault)(nil)).Elem()) -} - -type LookupFaultUnsupportedSiteFaultFault LookupFaultUnsupportedSiteFault - -func init() { - types.Add("lookup:LookupFaultUnsupportedSiteFaultFault", reflect.TypeOf((*LookupFaultUnsupportedSiteFaultFault)(nil)).Elem()) -} - -type LookupHaBackupNodeConfiguration struct { - vim.DynamicData - - DbType string `xml:"dbType"` - DbJdbcUrl string `xml:"dbJdbcUrl"` - DbUser string `xml:"dbUser"` - DbPass string `xml:"dbPass"` -} - -func init() { - types.Add("lookup:LookupHaBackupNodeConfiguration", reflect.TypeOf((*LookupHaBackupNodeConfiguration)(nil)).Elem()) -} - -type LookupServiceContent struct { - vim.DynamicData - - LookupService vim.ManagedObjectReference `xml:"lookupService"` - ServiceRegistration *vim.ManagedObjectReference `xml:"serviceRegistration,omitempty"` - DeploymentInformationService vim.ManagedObjectReference `xml:"deploymentInformationService"` - L10n vim.ManagedObjectReference `xml:"l10n"` -} - -func init() { - types.Add("lookup:LookupServiceContent", reflect.TypeOf((*LookupServiceContent)(nil)).Elem()) -} - -type LookupServiceRegistrationAttribute struct { - vim.DynamicData - - Key string `xml:"key"` - Value string `xml:"value"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationAttribute", reflect.TypeOf((*LookupServiceRegistrationAttribute)(nil)).Elem()) -} - -type LookupServiceRegistrationCommonServiceInfo struct { - LookupServiceRegistrationMutableServiceInfo - - OwnerId string `xml:"ownerId"` - ServiceType LookupServiceRegistrationServiceType `xml:"serviceType"` - NodeId string `xml:"nodeId,omitempty"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationCommonServiceInfo", reflect.TypeOf((*LookupServiceRegistrationCommonServiceInfo)(nil)).Elem()) -} - -type LookupServiceRegistrationCreateSpec struct { - LookupServiceRegistrationCommonServiceInfo -} - -func init() { - types.Add("lookup:LookupServiceRegistrationCreateSpec", reflect.TypeOf((*LookupServiceRegistrationCreateSpec)(nil)).Elem()) -} - -type LookupServiceRegistrationEndpoint struct { - vim.DynamicData - - Url string `xml:"url"` - EndpointType LookupServiceRegistrationEndpointType `xml:"endpointType"` - SslTrust []string `xml:"sslTrust,omitempty"` - EndpointAttributes []LookupServiceRegistrationAttribute `xml:"endpointAttributes,omitempty"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationEndpoint", reflect.TypeOf((*LookupServiceRegistrationEndpoint)(nil)).Elem()) -} - -type LookupServiceRegistrationEndpointType struct { - vim.DynamicData - - Protocol string `xml:"protocol,omitempty"` - Type string `xml:"type,omitempty"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationEndpointType", reflect.TypeOf((*LookupServiceRegistrationEndpointType)(nil)).Elem()) -} - -type LookupServiceRegistrationFilter struct { - vim.DynamicData - - SiteId string `xml:"siteId,omitempty"` - NodeId string `xml:"nodeId,omitempty"` - ServiceType *LookupServiceRegistrationServiceType `xml:"serviceType,omitempty"` - EndpointType *LookupServiceRegistrationEndpointType `xml:"endpointType,omitempty"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationFilter", reflect.TypeOf((*LookupServiceRegistrationFilter)(nil)).Elem()) -} - -type LookupServiceRegistrationInfo struct { - LookupServiceRegistrationCommonServiceInfo - - ServiceId string `xml:"serviceId"` - SiteId string `xml:"siteId"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationInfo", reflect.TypeOf((*LookupServiceRegistrationInfo)(nil)).Elem()) -} - -type LookupServiceRegistrationMutableServiceInfo struct { - vim.DynamicData - - ServiceVersion string `xml:"serviceVersion"` - VendorNameResourceKey string `xml:"vendorNameResourceKey,omitempty"` - VendorNameDefault string `xml:"vendorNameDefault,omitempty"` - VendorProductInfoResourceKey string `xml:"vendorProductInfoResourceKey,omitempty"` - VendorProductInfoDefault string `xml:"vendorProductInfoDefault,omitempty"` - ServiceEndpoints []LookupServiceRegistrationEndpoint `xml:"serviceEndpoints,omitempty"` - ServiceAttributes []LookupServiceRegistrationAttribute `xml:"serviceAttributes,omitempty"` - ServiceNameResourceKey string `xml:"serviceNameResourceKey,omitempty"` - ServiceNameDefault string `xml:"serviceNameDefault,omitempty"` - ServiceDescriptionResourceKey string `xml:"serviceDescriptionResourceKey,omitempty"` - ServiceDescriptionDefault string `xml:"serviceDescriptionDefault,omitempty"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationMutableServiceInfo", reflect.TypeOf((*LookupServiceRegistrationMutableServiceInfo)(nil)).Elem()) -} - -type LookupServiceRegistrationServiceType struct { - vim.DynamicData - - Product string `xml:"product"` - Type string `xml:"type"` -} - -func init() { - types.Add("lookup:LookupServiceRegistrationServiceType", reflect.TypeOf((*LookupServiceRegistrationServiceType)(nil)).Elem()) -} - -type LookupServiceRegistrationSetSpec struct { - LookupServiceRegistrationMutableServiceInfo -} - -func init() { - types.Add("lookup:LookupServiceRegistrationSetSpec", reflect.TypeOf((*LookupServiceRegistrationSetSpec)(nil)).Elem()) -} - -type RetrieveHaBackupConfiguration RetrieveHaBackupConfigurationRequestType - -func init() { - types.Add("lookup:RetrieveHaBackupConfiguration", reflect.TypeOf((*RetrieveHaBackupConfiguration)(nil)).Elem()) -} - -type RetrieveHaBackupConfigurationRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("lookup:RetrieveHaBackupConfigurationRequestType", reflect.TypeOf((*RetrieveHaBackupConfigurationRequestType)(nil)).Elem()) -} - -type RetrieveHaBackupConfigurationResponse struct { - Returnval LookupHaBackupNodeConfiguration `xml:"returnval"` -} - -type RetrieveServiceContent RetrieveServiceContentRequestType - -func init() { - types.Add("lookup:RetrieveServiceContent", reflect.TypeOf((*RetrieveServiceContent)(nil)).Elem()) -} - -type RetrieveServiceContentRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("lookup:RetrieveServiceContentRequestType", reflect.TypeOf((*RetrieveServiceContentRequestType)(nil)).Elem()) -} - -type RetrieveServiceContentResponse struct { - Returnval LookupServiceContent `xml:"returnval"` -} - -type Set SetRequestType - -func init() { - types.Add("lookup:Set", reflect.TypeOf((*Set)(nil)).Elem()) -} - -type SetLocale SetLocaleRequestType - -func init() { - types.Add("lookup:SetLocale", reflect.TypeOf((*SetLocale)(nil)).Elem()) -} - -type SetLocaleRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - Locale string `xml:"locale"` -} - -func init() { - types.Add("lookup:SetLocaleRequestType", reflect.TypeOf((*SetLocaleRequestType)(nil)).Elem()) -} - -type SetLocaleResponse struct { - Returnval string `xml:"returnval"` -} - -type SetRequestType struct { - This vim.ManagedObjectReference `xml:"_this"` - ServiceId string `xml:"serviceId"` - ServiceSpec LookupServiceRegistrationSetSpec `xml:"serviceSpec"` -} - -func init() { - types.Add("lookup:SetRequestType", reflect.TypeOf((*SetRequestType)(nil)).Elem()) -} - -type SetResponse struct { -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease.go deleted file mode 100644 index 457568033624..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease.go +++ /dev/null @@ -1,233 +0,0 @@ -/* -Copyright (c) 2015-2017 VMware, Inc. 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. -*/ - -package nfc - -import ( - "context" - "fmt" - "io" - "path" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/task" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -type Lease struct { - types.ManagedObjectReference - - c *vim25.Client -} - -func NewLease(c *vim25.Client, ref types.ManagedObjectReference) *Lease { - return &Lease{ref, c} -} - -// Abort wraps methods.Abort -func (l *Lease) Abort(ctx context.Context, fault *types.LocalizedMethodFault) error { - req := types.HttpNfcLeaseAbort{ - This: l.Reference(), - Fault: fault, - } - - _, err := methods.HttpNfcLeaseAbort(ctx, l.c, &req) - if err != nil { - return err - } - - return nil -} - -// Complete wraps methods.Complete -func (l *Lease) Complete(ctx context.Context) error { - req := types.HttpNfcLeaseComplete{ - This: l.Reference(), - } - - _, err := methods.HttpNfcLeaseComplete(ctx, l.c, &req) - if err != nil { - return err - } - - return nil -} - -// GetManifest wraps methods.GetManifest -func (l *Lease) GetManifest(ctx context.Context) error { - req := types.HttpNfcLeaseGetManifest{ - This: l.Reference(), - } - - _, err := methods.HttpNfcLeaseGetManifest(ctx, l.c, &req) - if err != nil { - return err - } - - return nil -} - -// Progress wraps methods.Progress -func (l *Lease) Progress(ctx context.Context, percent int32) error { - req := types.HttpNfcLeaseProgress{ - This: l.Reference(), - Percent: percent, - } - - _, err := methods.HttpNfcLeaseProgress(ctx, l.c, &req) - if err != nil { - return err - } - - return nil -} - -type LeaseInfo struct { - types.HttpNfcLeaseInfo - - Items []FileItem -} - -func (l *Lease) newLeaseInfo(li *types.HttpNfcLeaseInfo, items []types.OvfFileItem) (*LeaseInfo, error) { - info := &LeaseInfo{ - HttpNfcLeaseInfo: *li, - } - - for _, device := range li.DeviceUrl { - u, err := l.c.ParseURL(device.Url) - if err != nil { - return nil, err - } - - if device.SslThumbprint != "" { - // TODO: prefer host management IP - l.c.SetThumbprint(u.Host, device.SslThumbprint) - } - - if len(items) == 0 { - // this is an export - item := types.OvfFileItem{ - DeviceId: device.Key, - Path: device.TargetId, - Size: device.FileSize, - } - - if item.Size == 0 { - item.Size = li.TotalDiskCapacityInKB * 1024 - } - - if item.Path == "" { - item.Path = path.Base(device.Url) - } - - info.Items = append(info.Items, NewFileItem(u, item)) - - continue - } - - // this is an import - for _, item := range items { - if device.ImportKey == item.DeviceId { - info.Items = append(info.Items, NewFileItem(u, item)) - break - } - } - } - - return info, nil -} - -func (l *Lease) Wait(ctx context.Context, items []types.OvfFileItem) (*LeaseInfo, error) { - var lease mo.HttpNfcLease - - pc := property.DefaultCollector(l.c) - err := property.Wait(ctx, pc, l.Reference(), []string{"state", "info", "error"}, func(pc []types.PropertyChange) bool { - done := false - - for _, c := range pc { - if c.Val == nil { - continue - } - - switch c.Name { - case "error": - val := c.Val.(types.LocalizedMethodFault) - lease.Error = &val - done = true - case "info": - val := c.Val.(types.HttpNfcLeaseInfo) - lease.Info = &val - case "state": - lease.State = c.Val.(types.HttpNfcLeaseState) - if lease.State != types.HttpNfcLeaseStateInitializing { - done = true - } - } - } - - return done - }) - - if err != nil { - return nil, err - } - - if lease.State == types.HttpNfcLeaseStateReady { - return l.newLeaseInfo(lease.Info, items) - } - - if lease.Error != nil { - return nil, &task.Error{LocalizedMethodFault: lease.Error} - } - - return nil, fmt.Errorf("unexpected nfc lease state: %s", lease.State) -} - -func (l *Lease) StartUpdater(ctx context.Context, info *LeaseInfo) *LeaseUpdater { - return newLeaseUpdater(ctx, l, info) -} - -func (l *Lease) Upload(ctx context.Context, item FileItem, f io.Reader, opts soap.Upload) error { - if opts.Progress == nil { - opts.Progress = item - } - - // Non-disk files (such as .iso) use the PUT method. - // Overwrite: t header is also required in this case (ovftool does the same) - if item.Create { - opts.Method = "PUT" - opts.Headers = map[string]string{ - "Overwrite": "t", - } - } else { - opts.Method = "POST" - opts.Type = "application/x-vnd.vmware-streamVmdk" - } - - return l.c.Upload(ctx, f, item.URL, &opts) -} - -func (l *Lease) DownloadFile(ctx context.Context, file string, item FileItem, opts soap.Download) error { - if opts.Progress == nil { - opts.Progress = item - } - - return l.c.DownloadFile(ctx, file, item.URL, &opts) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease_updater.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease_updater.go deleted file mode 100644 index 02ce9cf5372c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/nfc/lease_updater.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright (c) 2014-2015 VMware, Inc. 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. -*/ - -package nfc - -import ( - "context" - "log" - "net/url" - "sync" - "sync/atomic" - "time" - - "github.com/vmware/govmomi/vim25/progress" - "github.com/vmware/govmomi/vim25/types" -) - -type FileItem struct { - types.OvfFileItem - URL *url.URL - - ch chan progress.Report -} - -func NewFileItem(u *url.URL, item types.OvfFileItem) FileItem { - return FileItem{ - OvfFileItem: item, - URL: u, - ch: make(chan progress.Report), - } -} - -func (o FileItem) Sink() chan<- progress.Report { - return o.ch -} - -// File converts the FileItem.OvfFileItem to an OvfFile -func (o FileItem) File() types.OvfFile { - return types.OvfFile{ - DeviceId: o.DeviceId, - Path: o.Path, - Size: o.Size, - } -} - -type LeaseUpdater struct { - pos int64 // Number of bytes (keep first to ensure 64 bit alignment) - total int64 // Total number of bytes (keep first to ensure 64 bit alignment) - - lease *Lease - - done chan struct{} // When lease updater should stop - - wg sync.WaitGroup // Track when update loop is done -} - -func newLeaseUpdater(ctx context.Context, lease *Lease, info *LeaseInfo) *LeaseUpdater { - l := LeaseUpdater{ - lease: lease, - - done: make(chan struct{}), - } - - for _, item := range info.Items { - l.total += item.Size - go l.waitForProgress(item) - } - - // Kickstart update loop - l.wg.Add(1) - go l.run() - - return &l -} - -func (l *LeaseUpdater) waitForProgress(item FileItem) { - var pos, total int64 - - total = item.Size - - for { - select { - case <-l.done: - return - case p, ok := <-item.ch: - // Return in case of error - if ok && p.Error() != nil { - return - } - - if !ok { - // Last element on the channel, add to total - atomic.AddInt64(&l.pos, total-pos) - return - } - - // Approximate progress in number of bytes - x := int64(float32(total) * (p.Percentage() / 100.0)) - atomic.AddInt64(&l.pos, x-pos) - pos = x - } - } -} - -func (l *LeaseUpdater) run() { - defer l.wg.Done() - - tick := time.NewTicker(2 * time.Second) - defer tick.Stop() - - for { - select { - case <-l.done: - return - case <-tick.C: - // From the vim api HttpNfcLeaseProgress(percent) doc, percent == - // "Completion status represented as an integer in the 0-100 range." - // Always report the current value of percent, as it will renew the - // lease even if the value hasn't changed or is 0. - percent := int32(float32(100*atomic.LoadInt64(&l.pos)) / float32(l.total)) - err := l.lease.Progress(context.TODO(), percent) - if err != nil { - log.Printf("NFC lease progress: %s", err) - return - } - } - } -} - -func (l *LeaseUpdater) Done() { - close(l.done) - l.wg.Wait() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager.go deleted file mode 100644 index 5cd6851a87dc..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type AuthorizationManager struct { - Common -} - -func NewAuthorizationManager(c *vim25.Client) *AuthorizationManager { - m := AuthorizationManager{ - Common: NewCommon(c, *c.ServiceContent.AuthorizationManager), - } - - return &m -} - -type AuthorizationRoleList []types.AuthorizationRole - -func (l AuthorizationRoleList) ById(id int32) *types.AuthorizationRole { - for _, role := range l { - if role.RoleId == id { - return &role - } - } - - return nil -} - -func (l AuthorizationRoleList) ByName(name string) *types.AuthorizationRole { - for _, role := range l { - if role.Name == name { - return &role - } - } - - return nil -} - -func (m AuthorizationManager) RoleList(ctx context.Context) (AuthorizationRoleList, error) { - var am mo.AuthorizationManager - - err := m.Properties(ctx, m.Reference(), []string{"roleList"}, &am) - if err != nil { - return nil, err - } - - return AuthorizationRoleList(am.RoleList), nil -} - -func (m AuthorizationManager) RetrieveEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, inherited bool) ([]types.Permission, error) { - req := types.RetrieveEntityPermissions{ - This: m.Reference(), - Entity: entity, - Inherited: inherited, - } - - res, err := methods.RetrieveEntityPermissions(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) RemoveEntityPermission(ctx context.Context, entity types.ManagedObjectReference, user string, isGroup bool) error { - req := types.RemoveEntityPermission{ - This: m.Reference(), - Entity: entity, - User: user, - IsGroup: isGroup, - } - - _, err := methods.RemoveEntityPermission(ctx, m.Client(), &req) - return err -} - -func (m AuthorizationManager) SetEntityPermissions(ctx context.Context, entity types.ManagedObjectReference, permission []types.Permission) error { - req := types.SetEntityPermissions{ - This: m.Reference(), - Entity: entity, - Permission: permission, - } - - _, err := methods.SetEntityPermissions(ctx, m.Client(), &req) - return err -} - -func (m AuthorizationManager) RetrieveRolePermissions(ctx context.Context, id int32) ([]types.Permission, error) { - req := types.RetrieveRolePermissions{ - This: m.Reference(), - RoleId: id, - } - - res, err := methods.RetrieveRolePermissions(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) RetrieveAllPermissions(ctx context.Context) ([]types.Permission, error) { - req := types.RetrieveAllPermissions{ - This: m.Reference(), - } - - res, err := methods.RetrieveAllPermissions(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) AddRole(ctx context.Context, name string, ids []string) (int32, error) { - req := types.AddAuthorizationRole{ - This: m.Reference(), - Name: name, - PrivIds: ids, - } - - res, err := methods.AddAuthorizationRole(ctx, m.Client(), &req) - if err != nil { - return -1, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) RemoveRole(ctx context.Context, id int32, failIfUsed bool) error { - req := types.RemoveAuthorizationRole{ - This: m.Reference(), - RoleId: id, - FailIfUsed: failIfUsed, - } - - _, err := methods.RemoveAuthorizationRole(ctx, m.Client(), &req) - return err -} - -func (m AuthorizationManager) UpdateRole(ctx context.Context, id int32, name string, ids []string) error { - req := types.UpdateAuthorizationRole{ - This: m.Reference(), - RoleId: id, - NewName: name, - PrivIds: ids, - } - - _, err := methods.UpdateAuthorizationRole(ctx, m.Client(), &req) - return err -} - -func (m AuthorizationManager) HasUserPrivilegeOnEntities(ctx context.Context, entities []types.ManagedObjectReference, userName string, privID []string) ([]types.EntityPrivilege, error) { - req := types.HasUserPrivilegeOnEntities{ - This: m.Reference(), - Entities: entities, - UserName: userName, - PrivId: privID, - } - - res, err := methods.HasUserPrivilegeOnEntities(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) HasPrivilegeOnEntity(ctx context.Context, entity types.ManagedObjectReference, sessionID string, privID []string) ([]bool, error) { - req := types.HasPrivilegeOnEntity{ - This: m.Reference(), - Entity: entity, - SessionId: sessionID, - PrivId: privID, - } - - res, err := methods.HasPrivilegeOnEntity(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m AuthorizationManager) FetchUserPrivilegeOnEntities(ctx context.Context, entities []types.ManagedObjectReference, userName string) ([]types.UserPrivilegeResult, error) { - req := types.FetchUserPrivilegeOnEntities{ - This: m.Reference(), - Entities: entities, - UserName: userName, - } - - res, err := methods.FetchUserPrivilegeOnEntities(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go deleted file mode 100644 index 4fa520f5add2..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/authorization_manager_internal.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -type DisabledMethodRequest struct { - Method string `xml:"method"` - Reason string `xml:"reasonId"` -} - -type disableMethodsRequest struct { - This types.ManagedObjectReference `xml:"_this"` - Entity []types.ManagedObjectReference `xml:"entity"` - Method []DisabledMethodRequest `xml:"method"` - Source string `xml:"sourceId"` - Scope bool `xml:"sessionScope,omitempty"` -} - -type disableMethodsBody struct { - Req *disableMethodsRequest `xml:"urn:internalvim25 DisableMethods,omitempty"` - Res interface{} `xml:"urn:vim25 DisableMethodsResponse,omitempty"` - Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *disableMethodsBody) Fault() *soap.Fault { return b.Err } - -func (m AuthorizationManager) DisableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []DisabledMethodRequest, source string) error { - var reqBody, resBody disableMethodsBody - - reqBody.Req = &disableMethodsRequest{ - This: m.Reference(), - Entity: entity, - Method: method, - Source: source, - } - - return m.Client().RoundTrip(ctx, &reqBody, &resBody) -} - -type enableMethodsRequest struct { - This types.ManagedObjectReference `xml:"_this"` - Entity []types.ManagedObjectReference `xml:"entity"` - Method []string `xml:"method"` - Source string `xml:"sourceId"` -} - -type enableMethodsBody struct { - Req *enableMethodsRequest `xml:"urn:internalvim25 EnableMethods,omitempty"` - Res interface{} `xml:"urn:vim25 EnableMethodsResponse,omitempty"` - Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *enableMethodsBody) Fault() *soap.Fault { return b.Err } - -func (m AuthorizationManager) EnableMethods(ctx context.Context, entity []types.ManagedObjectReference, method []string, source string) error { - var reqBody, resBody enableMethodsBody - - reqBody.Req = &enableMethodsRequest{ - This: m.Reference(), - Entity: entity, - Method: method, - Source: source, - } - - return m.Client().RoundTrip(ctx, &reqBody, &resBody) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go deleted file mode 100644 index 018372dfe080..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/cluster_compute_resource.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type ClusterComputeResource struct { - ComputeResource -} - -func NewClusterComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ClusterComputeResource { - return &ClusterComputeResource{ - ComputeResource: *NewComputeResource(c, ref), - } -} - -func (c ClusterComputeResource) Configuration(ctx context.Context) (*types.ClusterConfigInfoEx, error) { - var obj mo.ClusterComputeResource - - err := c.Properties(ctx, c.Reference(), []string{"configurationEx"}, &obj) - if err != nil { - return nil, err - } - - return obj.ConfigurationEx.(*types.ClusterConfigInfoEx), nil -} - -func (c ClusterComputeResource) AddHost(ctx context.Context, spec types.HostConnectSpec, asConnected bool, license *string, resourcePool *types.ManagedObjectReference) (*Task, error) { - req := types.AddHost_Task{ - This: c.Reference(), - Spec: spec, - AsConnected: asConnected, - } - - if license != nil { - req.License = *license - } - - if resourcePool != nil { - req.ResourcePool = resourcePool - } - - res, err := methods.AddHost_Task(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return NewTask(c.c, res.Returnval), nil -} - -func (c ClusterComputeResource) MoveInto(ctx context.Context, hosts ...*HostSystem) (*Task, error) { - req := types.MoveInto_Task{ - This: c.Reference(), - } - - hostReferences := make([]types.ManagedObjectReference, len(hosts)) - for i, host := range hosts { - hostReferences[i] = host.Reference() - } - req.Host = hostReferences - - res, err := methods.MoveInto_Task(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return NewTask(c.c, res.Returnval), nil -} - -func (c ClusterComputeResource) PlaceVm(ctx context.Context, spec types.PlacementSpec) (*types.PlacementResult, error) { - req := types.PlaceVm{ - This: c.Reference(), - PlacementSpec: spec, - } - - res, err := methods.PlaceVm(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/common.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/common.go deleted file mode 100644 index 88ce78fce524..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/common.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "errors" - "fmt" - "path" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -var ( - ErrNotSupported = errors.New("product/version specific feature not supported by target") -) - -// Common contains the fields and functions common to all objects. -type Common struct { - InventoryPath string - - c *vim25.Client - r types.ManagedObjectReference -} - -func (c Common) String() string { - ref := fmt.Sprintf("%v", c.Reference()) - - if c.InventoryPath == "" { - return ref - } - - return fmt.Sprintf("%s @ %s", ref, c.InventoryPath) -} - -func NewCommon(c *vim25.Client, r types.ManagedObjectReference) Common { - return Common{c: c, r: r} -} - -func (c Common) Reference() types.ManagedObjectReference { - return c.r -} - -func (c Common) Client() *vim25.Client { - return c.c -} - -// Name returns the base name of the InventoryPath field -func (c Common) Name() string { - if c.InventoryPath == "" { - return "" - } - return path.Base(c.InventoryPath) -} - -func (c *Common) SetInventoryPath(p string) { - c.InventoryPath = p -} - -// ObjectName fetches the mo.ManagedEntity.Name field via the property collector. -func (c Common) ObjectName(ctx context.Context) (string, error) { - var content []types.ObjectContent - - err := c.Properties(ctx, c.Reference(), []string{"name"}, &content) - if err != nil { - return "", err - } - - for i := range content { - for _, prop := range content[i].PropSet { - return prop.Val.(string), nil - } - } - - return "", nil -} - -// Properties is a wrapper for property.DefaultCollector().RetrieveOne() -func (c Common) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error { - return property.DefaultCollector(c.c).RetrieveOne(ctx, r, ps, dst) -} - -func (c Common) Destroy(ctx context.Context) (*Task, error) { - req := types.Destroy_Task{ - This: c.Reference(), - } - - res, err := methods.Destroy_Task(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return NewTask(c.c, res.Returnval), nil -} - -func (c Common) Rename(ctx context.Context, name string) (*Task, error) { - req := types.Rename_Task{ - This: c.Reference(), - NewName: name, - } - - res, err := methods.Rename_Task(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return NewTask(c.c, res.Returnval), nil -} - -func (c Common) SetCustomValue(ctx context.Context, key string, value string) error { - req := types.SetCustomValue{ - This: c.Reference(), - Key: key, - Value: value, - } - - _, err := methods.SetCustomValue(ctx, c.c, &req) - return err -} - -func ReferenceFromString(s string) *types.ManagedObjectReference { - var ref types.ManagedObjectReference - if !ref.FromString(s) { - return nil - } - if mo.IsManagedObjectType(ref.Type) { - return &ref - } - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/compute_resource.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/compute_resource.go deleted file mode 100644 index 7645fddaf313..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/compute_resource.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "path" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type ComputeResource struct { - Common -} - -func NewComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ComputeResource { - return &ComputeResource{ - Common: NewCommon(c, ref), - } -} - -func (c ComputeResource) Hosts(ctx context.Context) ([]*HostSystem, error) { - var cr mo.ComputeResource - - err := c.Properties(ctx, c.Reference(), []string{"host"}, &cr) - if err != nil { - return nil, err - } - - if len(cr.Host) == 0 { - return nil, nil - } - - var hs []mo.HostSystem - pc := property.DefaultCollector(c.Client()) - err = pc.Retrieve(ctx, cr.Host, []string{"name"}, &hs) - if err != nil { - return nil, err - } - - var hosts []*HostSystem - - for _, h := range hs { - host := NewHostSystem(c.Client(), h.Reference()) - host.InventoryPath = path.Join(c.InventoryPath, h.Name) - hosts = append(hosts, host) - } - - return hosts, nil -} - -func (c ComputeResource) Datastores(ctx context.Context) ([]*Datastore, error) { - var cr mo.ComputeResource - - err := c.Properties(ctx, c.Reference(), []string{"datastore"}, &cr) - if err != nil { - return nil, err - } - - var dss []*Datastore - for _, ref := range cr.Datastore { - ds := NewDatastore(c.c, ref) - dss = append(dss, ds) - } - - return dss, nil -} - -func (c ComputeResource) ResourcePool(ctx context.Context) (*ResourcePool, error) { - var cr mo.ComputeResource - - err := c.Properties(ctx, c.Reference(), []string{"resourcePool"}, &cr) - if err != nil { - return nil, err - } - - return NewResourcePool(c.c, *cr.ResourcePool), nil -} - -func (c ComputeResource) Reconfigure(ctx context.Context, spec types.BaseComputeResourceConfigSpec, modify bool) (*Task, error) { - req := types.ReconfigureComputeResource_Task{ - This: c.Reference(), - Spec: spec, - Modify: modify, - } - - res, err := methods.ReconfigureComputeResource_Task(ctx, c.c, &req) - if err != nil { - return nil, err - } - - return NewTask(c.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go deleted file mode 100644 index ef748ef2c131..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/custom_fields_manager.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "errors" - "strconv" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -var ( - ErrKeyNameNotFound = errors.New("key name not found") -) - -type CustomFieldsManager struct { - Common -} - -// GetCustomFieldsManager wraps NewCustomFieldsManager, returning ErrNotSupported -// when the client is not connected to a vCenter instance. -func GetCustomFieldsManager(c *vim25.Client) (*CustomFieldsManager, error) { - if c.ServiceContent.CustomFieldsManager == nil { - return nil, ErrNotSupported - } - return NewCustomFieldsManager(c), nil -} - -func NewCustomFieldsManager(c *vim25.Client) *CustomFieldsManager { - m := CustomFieldsManager{ - Common: NewCommon(c, *c.ServiceContent.CustomFieldsManager), - } - - return &m -} - -func (m CustomFieldsManager) Add(ctx context.Context, name string, moType string, fieldDefPolicy *types.PrivilegePolicyDef, fieldPolicy *types.PrivilegePolicyDef) (*types.CustomFieldDef, error) { - req := types.AddCustomFieldDef{ - This: m.Reference(), - Name: name, - MoType: moType, - FieldDefPolicy: fieldDefPolicy, - FieldPolicy: fieldPolicy, - } - - res, err := methods.AddCustomFieldDef(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (m CustomFieldsManager) Remove(ctx context.Context, key int32) error { - req := types.RemoveCustomFieldDef{ - This: m.Reference(), - Key: key, - } - - _, err := methods.RemoveCustomFieldDef(ctx, m.c, &req) - return err -} - -func (m CustomFieldsManager) Rename(ctx context.Context, key int32, name string) error { - req := types.RenameCustomFieldDef{ - This: m.Reference(), - Key: key, - Name: name, - } - - _, err := methods.RenameCustomFieldDef(ctx, m.c, &req) - return err -} - -func (m CustomFieldsManager) Set(ctx context.Context, entity types.ManagedObjectReference, key int32, value string) error { - req := types.SetField{ - This: m.Reference(), - Entity: entity, - Key: key, - Value: value, - } - - _, err := methods.SetField(ctx, m.c, &req) - return err -} - -type CustomFieldDefList []types.CustomFieldDef - -func (m CustomFieldsManager) Field(ctx context.Context) (CustomFieldDefList, error) { - var fm mo.CustomFieldsManager - - err := m.Properties(ctx, m.Reference(), []string{"field"}, &fm) - if err != nil { - return nil, err - } - - return fm.Field, nil -} - -func (m CustomFieldsManager) FindKey(ctx context.Context, name string) (int32, error) { - field, err := m.Field(ctx) - if err != nil { - return -1, err - } - - for _, def := range field { - if def.Name == name { - return def.Key, nil - } - } - - k, err := strconv.Atoi(name) - if err == nil { - // assume literal int key - return int32(k), nil - } - - return -1, ErrKeyNameNotFound -} - -func (l CustomFieldDefList) ByKey(key int32) *types.CustomFieldDef { - for _, def := range l { - if def.Key == key { - return &def - } - } - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go deleted file mode 100644 index e9a3914d9da9..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/customization_spec_manager.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type CustomizationSpecManager struct { - Common -} - -func NewCustomizationSpecManager(c *vim25.Client) *CustomizationSpecManager { - cs := CustomizationSpecManager{ - Common: NewCommon(c, *c.ServiceContent.CustomizationSpecManager), - } - - return &cs -} - -func (cs CustomizationSpecManager) Info(ctx context.Context) ([]types.CustomizationSpecInfo, error) { - var m mo.CustomizationSpecManager - err := cs.Properties(ctx, cs.Reference(), []string{"info"}, &m) - return m.Info, err -} - -func (cs CustomizationSpecManager) DoesCustomizationSpecExist(ctx context.Context, name string) (bool, error) { - req := types.DoesCustomizationSpecExist{ - This: cs.Reference(), - Name: name, - } - - res, err := methods.DoesCustomizationSpecExist(ctx, cs.c, &req) - - if err != nil { - return false, err - } - - return res.Returnval, nil -} - -func (cs CustomizationSpecManager) GetCustomizationSpec(ctx context.Context, name string) (*types.CustomizationSpecItem, error) { - req := types.GetCustomizationSpec{ - This: cs.Reference(), - Name: name, - } - - res, err := methods.GetCustomizationSpec(ctx, cs.c, &req) - - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (cs CustomizationSpecManager) CreateCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error { - req := types.CreateCustomizationSpec{ - This: cs.Reference(), - Item: item, - } - - _, err := methods.CreateCustomizationSpec(ctx, cs.c, &req) - if err != nil { - return err - } - - return nil -} - -func (cs CustomizationSpecManager) OverwriteCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error { - req := types.OverwriteCustomizationSpec{ - This: cs.Reference(), - Item: item, - } - - _, err := methods.OverwriteCustomizationSpec(ctx, cs.c, &req) - if err != nil { - return err - } - - return nil -} - -func (cs CustomizationSpecManager) DeleteCustomizationSpec(ctx context.Context, name string) error { - req := types.DeleteCustomizationSpec{ - This: cs.Reference(), - Name: name, - } - - _, err := methods.DeleteCustomizationSpec(ctx, cs.c, &req) - if err != nil { - return err - } - - return nil -} - -func (cs CustomizationSpecManager) DuplicateCustomizationSpec(ctx context.Context, name string, newName string) error { - req := types.DuplicateCustomizationSpec{ - This: cs.Reference(), - Name: name, - NewName: newName, - } - - _, err := methods.DuplicateCustomizationSpec(ctx, cs.c, &req) - if err != nil { - return err - } - - return nil -} - -func (cs CustomizationSpecManager) RenameCustomizationSpec(ctx context.Context, name string, newName string) error { - req := types.RenameCustomizationSpec{ - This: cs.Reference(), - Name: name, - NewName: newName, - } - - _, err := methods.RenameCustomizationSpec(ctx, cs.c, &req) - if err != nil { - return err - } - - return nil -} - -func (cs CustomizationSpecManager) CustomizationSpecItemToXml(ctx context.Context, item types.CustomizationSpecItem) (string, error) { - req := types.CustomizationSpecItemToXml{ - This: cs.Reference(), - Item: item, - } - - res, err := methods.CustomizationSpecItemToXml(ctx, cs.c, &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -func (cs CustomizationSpecManager) XmlToCustomizationSpecItem(ctx context.Context, xml string) (*types.CustomizationSpecItem, error) { - req := types.XmlToCustomizationSpecItem{ - This: cs.Reference(), - SpecItemXml: xml, - } - - res, err := methods.XmlToCustomizationSpecItem(ctx, cs.c, &req) - if err != nil { - return nil, err - } - return &res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datacenter.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datacenter.go deleted file mode 100644 index 41fa3526571b..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datacenter.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type DatacenterFolders struct { - VmFolder *Folder - HostFolder *Folder - DatastoreFolder *Folder - NetworkFolder *Folder -} - -type Datacenter struct { - Common -} - -func NewDatacenter(c *vim25.Client, ref types.ManagedObjectReference) *Datacenter { - return &Datacenter{ - Common: NewCommon(c, ref), - } -} - -func (d *Datacenter) Folders(ctx context.Context) (*DatacenterFolders, error) { - var md mo.Datacenter - - ps := []string{"name", "vmFolder", "hostFolder", "datastoreFolder", "networkFolder"} - err := d.Properties(ctx, d.Reference(), ps, &md) - if err != nil { - return nil, err - } - - df := &DatacenterFolders{ - VmFolder: NewFolder(d.c, md.VmFolder), - HostFolder: NewFolder(d.c, md.HostFolder), - DatastoreFolder: NewFolder(d.c, md.DatastoreFolder), - NetworkFolder: NewFolder(d.c, md.NetworkFolder), - } - - paths := []struct { - name string - path *string - }{ - {"vm", &df.VmFolder.InventoryPath}, - {"host", &df.HostFolder.InventoryPath}, - {"datastore", &df.DatastoreFolder.InventoryPath}, - {"network", &df.NetworkFolder.InventoryPath}, - } - - for _, p := range paths { - *p.path = fmt.Sprintf("/%s/%s", md.Name, p.name) - } - - return df, nil -} - -func (d Datacenter) Destroy(ctx context.Context) (*Task, error) { - req := types.Destroy_Task{ - This: d.Reference(), - } - - res, err := methods.Destroy_Task(ctx, d.c, &req) - if err != nil { - return nil, err - } - - return NewTask(d.c, res.Returnval), nil -} - -// PowerOnVM powers on multiple virtual machines with a single vCenter call. -// If called against ESX, serially powers on the list of VMs and the returned *Task will always be nil. -func (d Datacenter) PowerOnVM(ctx context.Context, vm []types.ManagedObjectReference, option ...types.BaseOptionValue) (*Task, error) { - if d.Client().IsVC() { - req := types.PowerOnMultiVM_Task{ - This: d.Reference(), - Vm: vm, - Option: option, - } - - res, err := methods.PowerOnMultiVM_Task(ctx, d.c, &req) - if err != nil { - return nil, err - } - - return NewTask(d.c, res.Returnval), nil - } - - for _, ref := range vm { - obj := NewVirtualMachine(d.Client(), ref) - task, err := obj.PowerOn(ctx) - if err != nil { - return nil, err - } - - err = task.Wait(ctx) - if err != nil { - // Ignore any InvalidPowerState fault, as it indicates the VM is already powered on - if f, ok := err.(types.HasFault); ok { - if _, ok = f.Fault().(*types.InvalidPowerState); !ok { - return nil, err - } - } - } - } - - return nil, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore.go deleted file mode 100644 index 65264ae152dd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore.go +++ /dev/null @@ -1,439 +0,0 @@ -/* -Copyright (c) 2015-2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - "io" - "math/rand" - "net/http" - "net/url" - "os" - "path" - "strings" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/session" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// DatastoreNoSuchDirectoryError is returned when a directory could not be found. -type DatastoreNoSuchDirectoryError struct { - verb string - subject string -} - -func (e DatastoreNoSuchDirectoryError) Error() string { - return fmt.Sprintf("cannot %s '%s': No such directory", e.verb, e.subject) -} - -// DatastoreNoSuchFileError is returned when a file could not be found. -type DatastoreNoSuchFileError struct { - verb string - subject string -} - -func (e DatastoreNoSuchFileError) Error() string { - return fmt.Sprintf("cannot %s '%s': No such file", e.verb, e.subject) -} - -type Datastore struct { - Common - - DatacenterPath string -} - -func NewDatastore(c *vim25.Client, ref types.ManagedObjectReference) *Datastore { - return &Datastore{ - Common: NewCommon(c, ref), - } -} - -func (d Datastore) Path(path string) string { - var p DatastorePath - if p.FromString(path) { - return p.String() // already in "[datastore] path" format - } - - return (&DatastorePath{ - Datastore: d.Name(), - Path: path, - }).String() -} - -// NewURL constructs a url.URL with the given file path for datastore access over HTTP. -func (d Datastore) NewURL(path string) *url.URL { - u := d.c.URL() - - return &url.URL{ - Scheme: u.Scheme, - Host: u.Host, - Path: fmt.Sprintf("/folder/%s", path), - RawQuery: url.Values{ - "dcPath": []string{d.DatacenterPath}, - "dsName": []string{d.Name()}, - }.Encode(), - } -} - -// URL is deprecated, use NewURL instead. -func (d Datastore) URL(ctx context.Context, dc *Datacenter, path string) (*url.URL, error) { - return d.NewURL(path), nil -} - -func (d Datastore) Browser(ctx context.Context) (*HostDatastoreBrowser, error) { - var do mo.Datastore - - err := d.Properties(ctx, d.Reference(), []string{"browser"}, &do) - if err != nil { - return nil, err - } - - return NewHostDatastoreBrowser(d.c, do.Browser), nil -} - -func (d Datastore) useServiceTicket() bool { - // If connected to workstation, service ticketing not supported - // If connected to ESX, service ticketing not needed - if !d.c.IsVC() { - return false - } - - key := "GOVMOMI_USE_SERVICE_TICKET" - - val := d.c.URL().Query().Get(key) - if val == "" { - val = os.Getenv(key) - } - - if val == "1" || val == "true" { - return true - } - - return false -} - -func (d Datastore) useServiceTicketHostName(name string) bool { - // No need if talking directly to ESX. - if !d.c.IsVC() { - return false - } - - // If version happens to be < 5.1 - if name == "" { - return false - } - - // If the HostSystem is using DHCP on a network without dynamic DNS, - // HostSystem.Config.Network.DnsConfig.HostName is set to "localhost" by default. - // This resolves to "localhost.localdomain" by default via /etc/hosts on ESX. - // In that case, we will stick with the HostSystem.Name which is the IP address that - // was used to connect the host to VC. - if name == "localhost.localdomain" { - return false - } - - // Still possible to have HostName that don't resolve via DNS, - // so we default to false. - key := "GOVMOMI_USE_SERVICE_TICKET_HOSTNAME" - - val := d.c.URL().Query().Get(key) - if val == "" { - val = os.Getenv(key) - } - - if val == "1" || val == "true" { - return true - } - - return false -} - -type datastoreServiceTicketHostKey struct{} - -// HostContext returns a Context where the given host will be used for datastore HTTP access -// via the ServiceTicket method. -func (d Datastore) HostContext(ctx context.Context, host *HostSystem) context.Context { - return context.WithValue(ctx, datastoreServiceTicketHostKey{}, host) -} - -// ServiceTicket obtains a ticket via AcquireGenericServiceTicket and returns it an http.Cookie with the url.URL -// that can be used along with the ticket cookie to access the given path. An host is chosen at random unless the -// the given Context was created with a specific host via the HostContext method. -func (d Datastore) ServiceTicket(ctx context.Context, path string, method string) (*url.URL, *http.Cookie, error) { - u := d.NewURL(path) - - host, ok := ctx.Value(datastoreServiceTicketHostKey{}).(*HostSystem) - - if !ok { - if !d.useServiceTicket() { - return u, nil, nil - } - - hosts, err := d.AttachedHosts(ctx) - if err != nil { - return nil, nil, err - } - - if len(hosts) == 0 { - // Fallback to letting vCenter choose a host - return u, nil, nil - } - - // Pick a random attached host - host = hosts[rand.Intn(len(hosts))] - } - - ips, err := host.ManagementIPs(ctx) - if err != nil { - return nil, nil, err - } - - if len(ips) > 0 { - // prefer a ManagementIP - u.Host = ips[0].String() - } else { - // fallback to inventory name - u.Host, err = host.ObjectName(ctx) - if err != nil { - return nil, nil, err - } - } - - // VC datacenter path will not be valid against ESX - q := u.Query() - delete(q, "dcPath") - u.RawQuery = q.Encode() - - spec := types.SessionManagerHttpServiceRequestSpec{ - Url: u.String(), - // See SessionManagerHttpServiceRequestSpecMethod enum - Method: fmt.Sprintf("http%s%s", method[0:1], strings.ToLower(method[1:])), - } - - sm := session.NewManager(d.Client()) - - ticket, err := sm.AcquireGenericServiceTicket(ctx, &spec) - if err != nil { - return nil, nil, err - } - - cookie := &http.Cookie{ - Name: "vmware_cgi_ticket", - Value: ticket.Id, - } - - if d.useServiceTicketHostName(ticket.HostName) { - u.Host = ticket.HostName - } - - d.Client().SetThumbprint(u.Host, ticket.SslThumbprint) - - return u, cookie, nil -} - -func (d Datastore) uploadTicket(ctx context.Context, path string, param *soap.Upload) (*url.URL, *soap.Upload, error) { - p := soap.DefaultUpload - if param != nil { - p = *param // copy - } - - u, ticket, err := d.ServiceTicket(ctx, path, p.Method) - if err != nil { - return nil, nil, err - } - - p.Ticket = ticket - - return u, &p, nil -} - -func (d Datastore) downloadTicket(ctx context.Context, path string, param *soap.Download) (*url.URL, *soap.Download, error) { - p := soap.DefaultDownload - if param != nil { - p = *param // copy - } - - u, ticket, err := d.ServiceTicket(ctx, path, p.Method) - if err != nil { - return nil, nil, err - } - - p.Ticket = ticket - - return u, &p, nil -} - -// Upload via soap.Upload with an http service ticket -func (d Datastore) Upload(ctx context.Context, f io.Reader, path string, param *soap.Upload) error { - u, p, err := d.uploadTicket(ctx, path, param) - if err != nil { - return err - } - return d.Client().Upload(ctx, f, u, p) -} - -// UploadFile via soap.Upload with an http service ticket -func (d Datastore) UploadFile(ctx context.Context, file string, path string, param *soap.Upload) error { - u, p, err := d.uploadTicket(ctx, path, param) - if err != nil { - return err - } - return d.Client().UploadFile(ctx, file, u, p) -} - -// Download via soap.Download with an http service ticket -func (d Datastore) Download(ctx context.Context, path string, param *soap.Download) (io.ReadCloser, int64, error) { - u, p, err := d.downloadTicket(ctx, path, param) - if err != nil { - return nil, 0, err - } - return d.Client().Download(ctx, u, p) -} - -// DownloadFile via soap.Download with an http service ticket -func (d Datastore) DownloadFile(ctx context.Context, path string, file string, param *soap.Download) error { - u, p, err := d.downloadTicket(ctx, path, param) - if err != nil { - return err - } - return d.Client().DownloadFile(ctx, file, u, p) -} - -// AttachedHosts returns hosts that have this Datastore attached, accessible and writable. -func (d Datastore) AttachedHosts(ctx context.Context) ([]*HostSystem, error) { - var ds mo.Datastore - var hosts []*HostSystem - - pc := property.DefaultCollector(d.Client()) - err := pc.RetrieveOne(ctx, d.Reference(), []string{"host"}, &ds) - if err != nil { - return nil, err - } - - mounts := make(map[types.ManagedObjectReference]types.DatastoreHostMount) - var refs []types.ManagedObjectReference - for _, host := range ds.Host { - refs = append(refs, host.Key) - mounts[host.Key] = host - } - - var hs []mo.HostSystem - err = pc.Retrieve(ctx, refs, []string{"runtime.connectionState", "runtime.powerState"}, &hs) - if err != nil { - return nil, err - } - - for _, host := range hs { - if host.Runtime.ConnectionState == types.HostSystemConnectionStateConnected && - host.Runtime.PowerState == types.HostSystemPowerStatePoweredOn { - - mount := mounts[host.Reference()] - info := mount.MountInfo - - if *info.Mounted && *info.Accessible && info.AccessMode == string(types.HostMountModeReadWrite) { - hosts = append(hosts, NewHostSystem(d.Client(), mount.Key)) - } - } - } - - return hosts, nil -} - -// AttachedClusterHosts returns hosts that have this Datastore attached, accessible and writable and are members of the given cluster. -func (d Datastore) AttachedClusterHosts(ctx context.Context, cluster *ComputeResource) ([]*HostSystem, error) { - var hosts []*HostSystem - - clusterHosts, err := cluster.Hosts(ctx) - if err != nil { - return nil, err - } - - attachedHosts, err := d.AttachedHosts(ctx) - if err != nil { - return nil, err - } - - refs := make(map[types.ManagedObjectReference]bool) - for _, host := range attachedHosts { - refs[host.Reference()] = true - } - - for _, host := range clusterHosts { - if refs[host.Reference()] { - hosts = append(hosts, host) - } - } - - return hosts, nil -} - -func (d Datastore) Stat(ctx context.Context, file string) (types.BaseFileInfo, error) { - b, err := d.Browser(ctx) - if err != nil { - return nil, err - } - - spec := types.HostDatastoreBrowserSearchSpec{ - Details: &types.FileQueryFlags{ - FileType: true, - FileSize: true, - Modification: true, - FileOwner: types.NewBool(true), - }, - MatchPattern: []string{path.Base(file)}, - } - - dsPath := d.Path(path.Dir(file)) - task, err := b.SearchDatastore(ctx, dsPath, &spec) - if err != nil { - return nil, err - } - - info, err := task.WaitForResult(ctx, nil) - if err != nil { - if types.IsFileNotFound(err) { - // FileNotFound means the base path doesn't exist. - return nil, DatastoreNoSuchDirectoryError{"stat", dsPath} - } - - return nil, err - } - - res := info.Result.(types.HostDatastoreBrowserSearchResults) - if len(res.File) == 0 { - // File doesn't exist - return nil, DatastoreNoSuchFileError{"stat", d.Path(file)} - } - - return res.File[0], nil - -} - -// Type returns the type of file system volume. -func (d Datastore) Type(ctx context.Context) (types.HostFileSystemVolumeFileSystemType, error) { - var mds mo.Datastore - - if err := d.Properties(ctx, d.Reference(), []string{"summary.type"}, &mds); err != nil { - return types.HostFileSystemVolumeFileSystemType(""), err - } - return types.HostFileSystemVolumeFileSystemType(mds.Summary.Type), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file.go deleted file mode 100644 index 86d7d9c728f5..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file.go +++ /dev/null @@ -1,412 +0,0 @@ -/* -Copyright (c) 2016-2017 VMware, Inc. 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. -*/ - -package object - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "net/http" - "os" - "path" - "sync" - "time" - - "github.com/vmware/govmomi/vim25/soap" -) - -// DatastoreFile implements io.Reader, io.Seeker and io.Closer interfaces for datastore file access. -type DatastoreFile struct { - d Datastore - ctx context.Context - name string - - buf io.Reader - body io.ReadCloser - length int64 - offset struct { - read, seek int64 - } -} - -// Open opens the named file relative to the Datastore. -func (d Datastore) Open(ctx context.Context, name string) (*DatastoreFile, error) { - return &DatastoreFile{ - d: d, - name: name, - length: -1, - ctx: ctx, - }, nil -} - -// Read reads up to len(b) bytes from the DatastoreFile. -func (f *DatastoreFile) Read(b []byte) (int, error) { - if f.offset.read != f.offset.seek { - // A Seek() call changed the offset, we need to issue a new GET - _ = f.Close() - - f.offset.read = f.offset.seek - } else if f.buf != nil { - // f.buf + f behaves like an io.MultiReader - n, err := f.buf.Read(b) - if err == io.EOF { - f.buf = nil // buffer has been drained - } - if n > 0 { - return n, nil - } - } - - body, err := f.get() - if err != nil { - return 0, err - } - - n, err := body.Read(b) - - f.offset.read += int64(n) - f.offset.seek += int64(n) - - return n, err -} - -// Close closes the DatastoreFile. -func (f *DatastoreFile) Close() error { - var err error - - if f.body != nil { - err = f.body.Close() - f.body = nil - } - - f.buf = nil - - return err -} - -// Seek sets the offset for the next Read on the DatastoreFile. -func (f *DatastoreFile) Seek(offset int64, whence int) (int64, error) { - switch whence { - case io.SeekStart: - case io.SeekCurrent: - offset += f.offset.seek - case io.SeekEnd: - if f.length < 0 { - _, err := f.Stat() - if err != nil { - return 0, err - } - } - offset += f.length - default: - return 0, errors.New("Seek: invalid whence") - } - - // allow negative SeekStart for initial Range request - if offset < 0 { - return 0, errors.New("Seek: invalid offset") - } - - f.offset.seek = offset - - return offset, nil -} - -type fileStat struct { - file *DatastoreFile - header http.Header -} - -func (s *fileStat) Name() string { - return path.Base(s.file.name) -} - -func (s *fileStat) Size() int64 { - return s.file.length -} - -func (s *fileStat) Mode() os.FileMode { - return 0 -} - -func (s *fileStat) ModTime() time.Time { - return time.Now() // no Last-Modified -} - -func (s *fileStat) IsDir() bool { - return false -} - -func (s *fileStat) Sys() interface{} { - return s.header -} - -func statusError(res *http.Response) error { - if res.StatusCode == http.StatusNotFound { - return os.ErrNotExist - } - return errors.New(res.Status) -} - -// Stat returns the os.FileInfo interface describing file. -func (f *DatastoreFile) Stat() (os.FileInfo, error) { - // TODO: consider using Datastore.Stat() instead - u, p, err := f.d.downloadTicket(f.ctx, f.name, &soap.Download{Method: "HEAD"}) - if err != nil { - return nil, err - } - - res, err := f.d.Client().DownloadRequest(f.ctx, u, p) - if err != nil { - return nil, err - } - - if res.StatusCode != http.StatusOK { - return nil, statusError(res) - } - - f.length = res.ContentLength - - return &fileStat{f, res.Header}, nil -} - -func (f *DatastoreFile) get() (io.Reader, error) { - if f.body != nil { - return f.body, nil - } - - u, p, err := f.d.downloadTicket(f.ctx, f.name, nil) - if err != nil { - return nil, err - } - - if f.offset.read != 0 { - p.Headers = map[string]string{ - "Range": fmt.Sprintf("bytes=%d-", f.offset.read), - } - } - - res, err := f.d.Client().DownloadRequest(f.ctx, u, p) - if err != nil { - return nil, err - } - - switch res.StatusCode { - case http.StatusOK: - f.length = res.ContentLength - case http.StatusPartialContent: - var start, end int - cr := res.Header.Get("Content-Range") - _, err = fmt.Sscanf(cr, "bytes %d-%d/%d", &start, &end, &f.length) - if err != nil { - f.length = -1 - } - case http.StatusRequestedRangeNotSatisfiable: - // ok: Read() will return io.EOF - default: - return nil, statusError(res) - } - - if f.length < 0 { - _ = res.Body.Close() - return nil, errors.New("unable to determine file size") - } - - f.body = res.Body - - return f.body, nil -} - -func lastIndexLines(s []byte, line *int, include func(l int, m string) bool) (int64, bool) { - i := len(s) - 1 - done := false - - for i > 0 { - o := bytes.LastIndexByte(s[:i], '\n') - if o < 0 { - break - } - - msg := string(s[o+1 : i+1]) - if !include(*line, msg) { - done = true - break - } else { - i = o - *line++ - } - } - - return int64(i), done -} - -// Tail seeks to the position of the last N lines of the file. -func (f *DatastoreFile) Tail(n int) error { - return f.TailFunc(n, func(line int, _ string) bool { return n > line }) -} - -// TailFunc will seek backwards in the datastore file until it hits a line that does -// not satisfy the supplied `include` function. -func (f *DatastoreFile) TailFunc(lines int, include func(line int, message string) bool) error { - // Read the file in reverse using bsize chunks - const bsize = int64(1024 * 16) - - fsize, err := f.Seek(0, io.SeekEnd) - if err != nil { - return err - } - - if lines == 0 { - return nil - } - - chunk := int64(-1) - - buf := bytes.NewBuffer(make([]byte, 0, bsize)) - line := 0 - - for { - var eof bool - var pos int64 - - nread := bsize - - offset := chunk * bsize - remain := fsize + offset - - if remain < 0 { - if pos, err = f.Seek(0, io.SeekStart); err != nil { - return err - } - - nread = bsize + remain - eof = true - } else if pos, err = f.Seek(offset, io.SeekEnd); err != nil { - return err - } - - if _, err = io.CopyN(buf, f, nread); err != nil { - if err != io.EOF { - return err - } - } - - b := buf.Bytes() - idx, done := lastIndexLines(b, &line, include) - - if done { - if chunk == -1 { - // We found all N lines in the last chunk of the file. - // The seek offset is also now at the current end of file. - // Save this buffer to avoid another GET request when Read() is called. - buf.Next(int(idx + 1)) - f.buf = buf - return nil - } - - if _, err = f.Seek(pos+idx+1, io.SeekStart); err != nil { - return err - } - - break - } - - if eof { - if remain < 0 { - // We found < N lines in the entire file, so seek to the start. - _, _ = f.Seek(0, io.SeekStart) - } - break - } - - chunk-- - buf.Reset() - } - - return nil -} - -type followDatastoreFile struct { - r *DatastoreFile - c chan struct{} - i time.Duration - o sync.Once -} - -// Read reads up to len(b) bytes from the DatastoreFile being followed. -// This method will block until data is read, an error other than io.EOF is returned or Close() is called. -func (f *followDatastoreFile) Read(p []byte) (int, error) { - offset := f.r.offset.seek - stop := false - - for { - n, err := f.r.Read(p) - if err != nil && err == io.EOF { - _ = f.r.Close() // GET request body has been drained. - if stop { - return n, err - } - err = nil - } - - if n > 0 { - return n, err - } - - select { - case <-f.c: - // Wake up and stop polling once the body has been drained - stop = true - case <-time.After(f.i): - } - - info, serr := f.r.Stat() - if serr != nil { - // Return EOF rather than 404 if the file goes away - if serr == os.ErrNotExist { - _ = f.r.Close() - return 0, io.EOF - } - return 0, serr - } - - if info.Size() < offset { - // assume file has be truncated - offset, err = f.r.Seek(0, io.SeekStart) - if err != nil { - return 0, err - } - } - } -} - -// Close will stop Follow polling and close the underlying DatastoreFile. -func (f *followDatastoreFile) Close() error { - f.o.Do(func() { close(f.c) }) - return nil -} - -// Follow returns an io.ReadCloser to stream the file contents as data is appended. -func (f *DatastoreFile) Follow(interval time.Duration) io.ReadCloser { - return &followDatastoreFile{ - r: f, - c: make(chan struct{}), - i: interval, - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go deleted file mode 100644 index a6e29c2c5634..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_file_manager.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -Copyright (c) 2017-2018 VMware, Inc. 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. -*/ - -package object - -import ( - "bufio" - "bytes" - "context" - "fmt" - "io" - "log" - "path" - "strings" - - "github.com/vmware/govmomi/vim25/progress" - "github.com/vmware/govmomi/vim25/soap" -) - -// DatastoreFileManager combines FileManager and VirtualDiskManager to manage files on a Datastore -type DatastoreFileManager struct { - Datacenter *Datacenter - Datastore *Datastore - FileManager *FileManager - VirtualDiskManager *VirtualDiskManager - - Force bool - DatacenterTarget *Datacenter -} - -// NewFileManager creates a new instance of DatastoreFileManager -func (d Datastore) NewFileManager(dc *Datacenter, force bool) *DatastoreFileManager { - c := d.Client() - - m := &DatastoreFileManager{ - Datacenter: dc, - Datastore: &d, - FileManager: NewFileManager(c), - VirtualDiskManager: NewVirtualDiskManager(c), - Force: force, - DatacenterTarget: dc, - } - - return m -} - -func (m *DatastoreFileManager) WithProgress(ctx context.Context, s progress.Sinker) context.Context { - return context.WithValue(ctx, m, s) -} - -func (m *DatastoreFileManager) wait(ctx context.Context, task *Task) error { - var logger progress.Sinker - if s, ok := ctx.Value(m).(progress.Sinker); ok { - logger = s - } - _, err := task.WaitForResult(ctx, logger) - return err -} - -// Delete dispatches to the appropriate Delete method based on file name extension -func (m *DatastoreFileManager) Delete(ctx context.Context, name string) error { - switch path.Ext(name) { - case ".vmdk": - return m.DeleteVirtualDisk(ctx, name) - default: - return m.DeleteFile(ctx, name) - } -} - -// DeleteFile calls FileManager.DeleteDatastoreFile -func (m *DatastoreFileManager) DeleteFile(ctx context.Context, name string) error { - p := m.Path(name) - - task, err := m.FileManager.DeleteDatastoreFile(ctx, p.String(), m.Datacenter) - if err != nil { - return err - } - - return m.wait(ctx, task) -} - -// DeleteVirtualDisk calls VirtualDiskManager.DeleteVirtualDisk -// Regardless of the Datastore type, DeleteVirtualDisk will fail if 'ddb.deletable=false', -// so if Force=true this method attempts to set 'ddb.deletable=true' before starting the delete task. -func (m *DatastoreFileManager) DeleteVirtualDisk(ctx context.Context, name string) error { - p := m.Path(name) - - var merr error - - if m.Force { - merr = m.markDiskAsDeletable(ctx, p) - } - - task, err := m.VirtualDiskManager.DeleteVirtualDisk(ctx, p.String(), m.Datacenter) - if err != nil { - log.Printf("markDiskAsDeletable(%s): %s", p, merr) - return err - } - - return m.wait(ctx, task) -} - -// CopyFile calls FileManager.CopyDatastoreFile -func (m *DatastoreFileManager) CopyFile(ctx context.Context, src string, dst string) error { - srcp := m.Path(src) - dstp := m.Path(dst) - - task, err := m.FileManager.CopyDatastoreFile(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force) - if err != nil { - return err - } - - return m.wait(ctx, task) -} - -// Copy dispatches to the appropriate FileManager or VirtualDiskManager Copy method based on file name extension -func (m *DatastoreFileManager) Copy(ctx context.Context, src string, dst string) error { - srcp := m.Path(src) - dstp := m.Path(dst) - - f := m.FileManager.CopyDatastoreFile - - if srcp.IsVMDK() { - // types.VirtualDiskSpec=nil as it is not implemented by vCenter - f = func(ctx context.Context, src string, srcDC *Datacenter, dst string, dstDC *Datacenter, force bool) (*Task, error) { - return m.VirtualDiskManager.CopyVirtualDisk(ctx, src, srcDC, dst, dstDC, nil, force) - } - } - - task, err := f(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force) - if err != nil { - return err - } - - return m.wait(ctx, task) -} - -// MoveFile calls FileManager.MoveDatastoreFile -func (m *DatastoreFileManager) MoveFile(ctx context.Context, src string, dst string) error { - srcp := m.Path(src) - dstp := m.Path(dst) - - task, err := m.FileManager.MoveDatastoreFile(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force) - if err != nil { - return err - } - - return m.wait(ctx, task) -} - -// Move dispatches to the appropriate FileManager or VirtualDiskManager Move method based on file name extension -func (m *DatastoreFileManager) Move(ctx context.Context, src string, dst string) error { - srcp := m.Path(src) - dstp := m.Path(dst) - - f := m.FileManager.MoveDatastoreFile - - if srcp.IsVMDK() { - f = m.VirtualDiskManager.MoveVirtualDisk - } - - task, err := f(ctx, srcp.String(), m.Datacenter, dstp.String(), m.DatacenterTarget, m.Force) - if err != nil { - return err - } - - return m.wait(ctx, task) -} - -// Path converts path name to a DatastorePath -func (m *DatastoreFileManager) Path(name string) *DatastorePath { - var p DatastorePath - - if !p.FromString(name) { - p.Path = name - p.Datastore = m.Datastore.Name() - } - - return &p -} - -func (m *DatastoreFileManager) markDiskAsDeletable(ctx context.Context, path *DatastorePath) error { - r, _, err := m.Datastore.Download(ctx, path.Path, &soap.DefaultDownload) - if err != nil { - return err - } - - defer r.Close() - - hasFlag := false - buf := new(bytes.Buffer) - - s := bufio.NewScanner(&io.LimitedReader{R: r, N: 2048}) // should be only a few hundred bytes, limit to be sure - - for s.Scan() { - line := s.Text() - if strings.HasPrefix(line, "ddb.deletable") { - hasFlag = true - continue - } - - fmt.Fprintln(buf, line) - } - - if err := s.Err(); err != nil { - return err // any error other than EOF - } - - if !hasFlag { - return nil // already deletable, so leave as-is - } - - // rewrite the .vmdk with ddb.deletable flag removed (the default is true) - return m.Datastore.Upload(ctx, buf, path.Path, &soap.DefaultUpload) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_path.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_path.go deleted file mode 100644 index 104c7dfe35e6..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/datastore_path.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "fmt" - "path" - "strings" -) - -// DatastorePath contains the components of a datastore path. -type DatastorePath struct { - Datastore string - Path string -} - -// FromString parses a datastore path. -// Returns true if the path could be parsed, false otherwise. -func (p *DatastorePath) FromString(s string) bool { - if s == "" { - return false - } - - s = strings.TrimSpace(s) - - if !strings.HasPrefix(s, "[") { - return false - } - - s = s[1:] - - ix := strings.Index(s, "]") - if ix < 0 { - return false - } - - p.Datastore = s[:ix] - p.Path = strings.TrimSpace(s[ix+1:]) - - return true -} - -// String formats a datastore path. -func (p *DatastorePath) String() string { - s := fmt.Sprintf("[%s]", p.Datastore) - - if p.Path == "" { - return s - } - - return strings.Join([]string{s, p.Path}, " ") -} - -// IsVMDK returns true if Path has a ".vmdk" extension -func (p *DatastorePath) IsVMDK() bool { - return path.Ext(p.Path) == ".vmdk" -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_log.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_log.go deleted file mode 100644 index 466d0ee915be..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_log.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - "io" - "math" -) - -// DiagnosticLog wraps DiagnosticManager.BrowseLog -type DiagnosticLog struct { - m DiagnosticManager - - Key string - Host *HostSystem - - Start int32 -} - -// Seek to log position starting at the last nlines of the log -func (l *DiagnosticLog) Seek(ctx context.Context, nlines int32) error { - h, err := l.m.BrowseLog(ctx, l.Host, l.Key, math.MaxInt32, 0) - if err != nil { - return err - } - - l.Start = h.LineEnd - nlines - - return nil -} - -// Copy log starting from l.Start to the given io.Writer -// Returns on error or when end of log is reached. -func (l *DiagnosticLog) Copy(ctx context.Context, w io.Writer) (int, error) { - const max = 500 // VC max == 500, ESX max == 1000 - written := 0 - - for { - h, err := l.m.BrowseLog(ctx, l.Host, l.Key, l.Start, max) - if err != nil { - return 0, err - } - - for _, line := range h.LineText { - n, err := fmt.Fprintln(w, line) - written += n - if err != nil { - return written, err - } - } - - l.Start += int32(len(h.LineText)) - - if l.Start >= h.LineEnd { - break - } - } - - return written, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go deleted file mode 100644 index 026dc1cb5e6f..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/diagnostic_manager.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type DiagnosticManager struct { - Common -} - -func NewDiagnosticManager(c *vim25.Client) *DiagnosticManager { - m := DiagnosticManager{ - Common: NewCommon(c, *c.ServiceContent.DiagnosticManager), - } - - return &m -} - -func (m DiagnosticManager) Log(ctx context.Context, host *HostSystem, key string) *DiagnosticLog { - return &DiagnosticLog{ - m: m, - Key: key, - Host: host, - } -} - -func (m DiagnosticManager) BrowseLog(ctx context.Context, host *HostSystem, key string, start, lines int32) (*types.DiagnosticManagerLogHeader, error) { - req := types.BrowseDiagnosticLog{ - This: m.Reference(), - Key: key, - Start: start, - Lines: lines, - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.BrowseDiagnosticLog(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (m DiagnosticManager) GenerateLogBundles(ctx context.Context, includeDefault bool, host []*HostSystem) (*Task, error) { - req := types.GenerateLogBundles_Task{ - This: m.Reference(), - IncludeDefault: includeDefault, - } - - for _, h := range host { - req.Host = append(req.Host, h.Reference()) - } - - res, err := methods.GenerateLogBundles_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -func (m DiagnosticManager) QueryDescriptions(ctx context.Context, host *HostSystem) ([]types.DiagnosticManagerLogDescriptor, error) { - req := types.QueryDescriptions{ - This: m.Reference(), - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.QueryDescriptions(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go deleted file mode 100644 index c2abb8fabde7..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type DistributedVirtualPortgroup struct { - Common -} - -func NewDistributedVirtualPortgroup(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualPortgroup { - return &DistributedVirtualPortgroup{ - Common: NewCommon(c, ref), - } -} - -func (p DistributedVirtualPortgroup) GetInventoryPath() string { - return p.InventoryPath -} - -// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this DistributedVirtualPortgroup -func (p DistributedVirtualPortgroup) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { - var dvp mo.DistributedVirtualPortgroup - var dvs mo.DistributedVirtualSwitch - prop := "config.distributedVirtualSwitch" - - if err := p.Properties(ctx, p.Reference(), []string{"key", prop}, &dvp); err != nil { - return nil, err - } - - // From the docs at https://code.vmware.com/apis/196/vsphere/doc/vim.dvs.DistributedVirtualPortgroup.ConfigInfo.html: - // "This property should always be set unless the user's setting does not have System.Read privilege on the object referred to by this property." - // Note that "the object" refers to the Switch, not the PortGroup. - if dvp.Config.DistributedVirtualSwitch == nil { - name := p.InventoryPath - if name == "" { - name = p.Reference().String() - } - return nil, fmt.Errorf("failed to create EthernetCardBackingInfo for %s: System.Read privilege required for %s", name, prop) - } - - if err := p.Properties(ctx, *dvp.Config.DistributedVirtualSwitch, []string{"uuid"}, &dvs); err != nil { - return nil, err - } - - backing := &types.VirtualEthernetCardDistributedVirtualPortBackingInfo{ - Port: types.DistributedVirtualSwitchPortConnection{ - PortgroupKey: dvp.Key, - SwitchUuid: dvs.Uuid, - }, - } - - return backing, nil -} - -func (p DistributedVirtualPortgroup) Reconfigure(ctx context.Context, spec types.DVPortgroupConfigSpec) (*Task, error) { - req := types.ReconfigureDVPortgroup_Task{ - This: p.Reference(), - Spec: spec, - } - - res, err := methods.ReconfigureDVPortgroup_Task(ctx, p.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(p.Client(), res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go deleted file mode 100644 index 66650e1d06b6..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/distributed_virtual_switch.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type DistributedVirtualSwitch struct { - Common -} - -func NewDistributedVirtualSwitch(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualSwitch { - return &DistributedVirtualSwitch{ - Common: NewCommon(c, ref), - } -} - -func (s DistributedVirtualSwitch) GetInventoryPath() string { - return s.InventoryPath -} - -func (s DistributedVirtualSwitch) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { - ref := s.Reference() - name := s.InventoryPath - if name == "" { - name = ref.String() - } - return nil, fmt.Errorf("type %s (%s) cannot be used for EthernetCardBackingInfo", ref.Type, name) -} - -func (s DistributedVirtualSwitch) Reconfigure(ctx context.Context, spec types.BaseDVSConfigSpec) (*Task, error) { - req := types.ReconfigureDvs_Task{ - This: s.Reference(), - Spec: spec, - } - - res, err := methods.ReconfigureDvs_Task(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(s.Client(), res.Returnval), nil -} - -func (s DistributedVirtualSwitch) AddPortgroup(ctx context.Context, spec []types.DVPortgroupConfigSpec) (*Task, error) { - req := types.AddDVPortgroup_Task{ - This: s.Reference(), - Spec: spec, - } - - res, err := methods.AddDVPortgroup_Task(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(s.Client(), res.Returnval), nil -} - -func (s DistributedVirtualSwitch) FetchDVPorts(ctx context.Context, criteria *types.DistributedVirtualSwitchPortCriteria) ([]types.DistributedVirtualPort, error) { - req := &types.FetchDVPorts{ - This: s.Reference(), - Criteria: criteria, - } - - res, err := methods.FetchDVPorts(ctx, s.Client(), req) - if err != nil { - return nil, err - } - return res.Returnval, nil -} - -func (s DistributedVirtualSwitch) ReconfigureDVPort(ctx context.Context, spec []types.DVPortConfigSpec) (*Task, error) { - req := types.ReconfigureDVPort_Task{ - This: s.Reference(), - Port: spec, - } - - res, err := methods.ReconfigureDVPort_Task(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(s.Client(), res.Returnval), nil -} - -func (s DistributedVirtualSwitch) ReconfigureLACP(ctx context.Context, spec []types.VMwareDvsLacpGroupSpec) (*Task, error) { - req := types.UpdateDVSLacpGroupConfig_Task{ - This: s.Reference(), - LacpGroupSpec: spec, - } - - res, err := methods.UpdateDVSLacpGroupConfig_Task(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(s.Client(), res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/extension_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/extension_manager.go deleted file mode 100644 index 94ade017c2ad..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/extension_manager.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type ExtensionManager struct { - Common -} - -// GetExtensionManager wraps NewExtensionManager, returning ErrNotSupported -// when the client is not connected to a vCenter instance. -func GetExtensionManager(c *vim25.Client) (*ExtensionManager, error) { - if c.ServiceContent.ExtensionManager == nil { - return nil, ErrNotSupported - } - return NewExtensionManager(c), nil -} - -func NewExtensionManager(c *vim25.Client) *ExtensionManager { - o := ExtensionManager{ - Common: NewCommon(c, *c.ServiceContent.ExtensionManager), - } - - return &o -} - -func (m ExtensionManager) List(ctx context.Context) ([]types.Extension, error) { - var em mo.ExtensionManager - - err := m.Properties(ctx, m.Reference(), []string{"extensionList"}, &em) - if err != nil { - return nil, err - } - - return em.ExtensionList, nil -} - -func (m ExtensionManager) Find(ctx context.Context, key string) (*types.Extension, error) { - req := types.FindExtension{ - This: m.Reference(), - ExtensionKey: key, - } - - res, err := methods.FindExtension(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m ExtensionManager) Register(ctx context.Context, extension types.Extension) error { - req := types.RegisterExtension{ - This: m.Reference(), - Extension: extension, - } - - _, err := methods.RegisterExtension(ctx, m.c, &req) - return err -} - -func (m ExtensionManager) SetCertificate(ctx context.Context, key string, certificatePem string) error { - req := types.SetExtensionCertificate{ - This: m.Reference(), - ExtensionKey: key, - CertificatePem: certificatePem, - } - - _, err := methods.SetExtensionCertificate(ctx, m.c, &req) - return err -} - -func (m ExtensionManager) Unregister(ctx context.Context, key string) error { - req := types.UnregisterExtension{ - This: m.Reference(), - ExtensionKey: key, - } - - _, err := methods.UnregisterExtension(ctx, m.c, &req) - return err -} - -func (m ExtensionManager) Update(ctx context.Context, extension types.Extension) error { - req := types.UpdateExtension{ - This: m.Reference(), - Extension: extension, - } - - _, err := methods.UpdateExtension(ctx, m.c, &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/file_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/file_manager.go deleted file mode 100644 index 8e8f5d3b0cea..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/file_manager.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type FileManager struct { - Common -} - -func NewFileManager(c *vim25.Client) *FileManager { - f := FileManager{ - Common: NewCommon(c, *c.ServiceContent.FileManager), - } - - return &f -} - -func (f FileManager) CopyDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) { - req := types.CopyDatastoreFile_Task{ - This: f.Reference(), - SourceName: sourceName, - DestinationName: destinationName, - Force: types.NewBool(force), - } - - if sourceDatacenter != nil { - ref := sourceDatacenter.Reference() - req.SourceDatacenter = &ref - } - - if destinationDatacenter != nil { - ref := destinationDatacenter.Reference() - req.DestinationDatacenter = &ref - } - - res, err := methods.CopyDatastoreFile_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -// DeleteDatastoreFile deletes the specified file or folder from the datastore. -func (f FileManager) DeleteDatastoreFile(ctx context.Context, name string, dc *Datacenter) (*Task, error) { - req := types.DeleteDatastoreFile_Task{ - This: f.Reference(), - Name: name, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.DeleteDatastoreFile_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -// MakeDirectory creates a folder using the specified name. -func (f FileManager) MakeDirectory(ctx context.Context, name string, dc *Datacenter, createParentDirectories bool) error { - req := types.MakeDirectory{ - This: f.Reference(), - Name: name, - CreateParentDirectories: types.NewBool(createParentDirectories), - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - _, err := methods.MakeDirectory(ctx, f.c, &req) - return err -} - -func (f FileManager) MoveDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, destinationName string, destinationDatacenter *Datacenter, force bool) (*Task, error) { - req := types.MoveDatastoreFile_Task{ - This: f.Reference(), - SourceName: sourceName, - DestinationName: destinationName, - Force: types.NewBool(force), - } - - if sourceDatacenter != nil { - ref := sourceDatacenter.Reference() - req.SourceDatacenter = &ref - } - - if destinationDatacenter != nil { - ref := destinationDatacenter.Reference() - req.DestinationDatacenter = &ref - } - - res, err := methods.MoveDatastoreFile_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/folder.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/folder.go deleted file mode 100644 index 6e0a7649b9da..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/folder.go +++ /dev/null @@ -1,241 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type Folder struct { - Common -} - -func NewFolder(c *vim25.Client, ref types.ManagedObjectReference) *Folder { - return &Folder{ - Common: NewCommon(c, ref), - } -} - -func NewRootFolder(c *vim25.Client) *Folder { - f := NewFolder(c, c.ServiceContent.RootFolder) - f.InventoryPath = "/" - return f -} - -func (f Folder) Children(ctx context.Context) ([]Reference, error) { - var mf mo.Folder - - err := f.Properties(ctx, f.Reference(), []string{"childEntity"}, &mf) - if err != nil { - return nil, err - } - - var rs []Reference - for _, e := range mf.ChildEntity { - if r := NewReference(f.c, e); r != nil { - rs = append(rs, r) - } - } - - return rs, nil -} - -func (f Folder) CreateDatacenter(ctx context.Context, datacenter string) (*Datacenter, error) { - req := types.CreateDatacenter{ - This: f.Reference(), - Name: datacenter, - } - - res, err := methods.CreateDatacenter(ctx, f.c, &req) - if err != nil { - return nil, err - } - - // Response will be nil if this is an ESX host that does not belong to a vCenter - if res == nil { - return nil, nil - } - - return NewDatacenter(f.c, res.Returnval), nil -} - -func (f Folder) CreateCluster(ctx context.Context, cluster string, spec types.ClusterConfigSpecEx) (*ClusterComputeResource, error) { - req := types.CreateClusterEx{ - This: f.Reference(), - Name: cluster, - Spec: spec, - } - - res, err := methods.CreateClusterEx(ctx, f.c, &req) - if err != nil { - return nil, err - } - - // Response will be nil if this is an ESX host that does not belong to a vCenter - if res == nil { - return nil, nil - } - - return NewClusterComputeResource(f.c, res.Returnval), nil -} - -func (f Folder) CreateFolder(ctx context.Context, name string) (*Folder, error) { - req := types.CreateFolder{ - This: f.Reference(), - Name: name, - } - - res, err := methods.CreateFolder(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewFolder(f.c, res.Returnval), err -} - -func (f Folder) CreateStoragePod(ctx context.Context, name string) (*StoragePod, error) { - req := types.CreateStoragePod{ - This: f.Reference(), - Name: name, - } - - res, err := methods.CreateStoragePod(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewStoragePod(f.c, res.Returnval), err -} - -func (f Folder) AddStandaloneHost(ctx context.Context, spec types.HostConnectSpec, addConnected bool, license *string, compResSpec *types.BaseComputeResourceConfigSpec) (*Task, error) { - req := types.AddStandaloneHost_Task{ - This: f.Reference(), - Spec: spec, - AddConnected: addConnected, - } - - if license != nil { - req.License = *license - } - - if compResSpec != nil { - req.CompResSpec = *compResSpec - } - - res, err := methods.AddStandaloneHost_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -func (f Folder) CreateVM(ctx context.Context, config types.VirtualMachineConfigSpec, pool *ResourcePool, host *HostSystem) (*Task, error) { - req := types.CreateVM_Task{ - This: f.Reference(), - Config: config, - Pool: pool.Reference(), - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.CreateVM_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -func (f Folder) RegisterVM(ctx context.Context, path string, name string, asTemplate bool, pool *ResourcePool, host *HostSystem) (*Task, error) { - req := types.RegisterVM_Task{ - This: f.Reference(), - Path: path, - AsTemplate: asTemplate, - } - - if name != "" { - req.Name = name - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - if pool != nil { - ref := pool.Reference() - req.Pool = &ref - } - - res, err := methods.RegisterVM_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -func (f Folder) CreateDVS(ctx context.Context, spec types.DVSCreateSpec) (*Task, error) { - req := types.CreateDVS_Task{ - This: f.Reference(), - Spec: spec, - } - - res, err := methods.CreateDVS_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -func (f Folder) MoveInto(ctx context.Context, list []types.ManagedObjectReference) (*Task, error) { - req := types.MoveIntoFolder_Task{ - This: f.Reference(), - List: list, - } - - res, err := methods.MoveIntoFolder_Task(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return NewTask(f.c, res.Returnval), nil -} - -func (f Folder) PlaceVmsXCluster(ctx context.Context, spec types.PlaceVmsXClusterSpec) (*types.PlaceVmsXClusterResult, error) { - req := types.PlaceVmsXCluster{ - This: f.Reference(), - PlacementSpec: spec, - } - - res, err := methods.PlaceVmsXCluster(ctx, f.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_account_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_account_manager.go deleted file mode 100644 index 640aff860319..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_account_manager.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostAccountManager struct { - Common -} - -func NewHostAccountManager(c *vim25.Client, ref types.ManagedObjectReference) *HostAccountManager { - return &HostAccountManager{ - Common: NewCommon(c, ref), - } -} - -func (m HostAccountManager) Create(ctx context.Context, user *types.HostAccountSpec) error { - req := types.CreateUser{ - This: m.Reference(), - User: user, - } - - _, err := methods.CreateUser(ctx, m.Client(), &req) - return err -} - -func (m HostAccountManager) Update(ctx context.Context, user *types.HostAccountSpec) error { - req := types.UpdateUser{ - This: m.Reference(), - User: user, - } - - _, err := methods.UpdateUser(ctx, m.Client(), &req) - return err -} - -func (m HostAccountManager) Remove(ctx context.Context, userName string) error { - req := types.RemoveUser{ - This: m.Reference(), - UserName: userName, - } - - _, err := methods.RemoveUser(ctx, m.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_info.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_info.go deleted file mode 100644 index bb5ee9c91612..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_info.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "crypto/sha256" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "fmt" - "io" - "net/url" - "strings" - "text/tabwriter" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// HostCertificateInfo provides helpers for types.HostCertificateManagerCertificateInfo -type HostCertificateInfo struct { - types.HostCertificateManagerCertificateInfo - - ThumbprintSHA1 string - ThumbprintSHA256 string - - Err error - Certificate *x509.Certificate `json:"-"` - - subjectName *pkix.Name - issuerName *pkix.Name -} - -// FromCertificate converts x509.Certificate to HostCertificateInfo -func (info *HostCertificateInfo) FromCertificate(cert *x509.Certificate) *HostCertificateInfo { - info.Certificate = cert - info.subjectName = &cert.Subject - info.issuerName = &cert.Issuer - - info.Issuer = info.fromName(info.issuerName) - info.NotBefore = &cert.NotBefore - info.NotAfter = &cert.NotAfter - info.Subject = info.fromName(info.subjectName) - - info.ThumbprintSHA1 = soap.ThumbprintSHA1(cert) - - // SHA-256 for info purposes only, API fields all use SHA-1 - sum := sha256.Sum256(cert.Raw) - hex := make([]string, len(sum)) - for i, b := range sum { - hex[i] = fmt.Sprintf("%02X", b) - } - info.ThumbprintSHA256 = strings.Join(hex, ":") - - if info.Status == "" { - info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusUnknown) - } - - return info -} - -// FromURL connects to the given URL.Host via tls.Dial with the given tls.Config and populates the HostCertificateInfo -// via tls.ConnectionState. If the certificate was verified with the given tls.Config, the Err field will be nil. -// Otherwise, Err will be set to the x509.UnknownAuthorityError or x509.HostnameError. -// If tls.Dial returns an error of any other type, that error is returned. -func (info *HostCertificateInfo) FromURL(u *url.URL, config *tls.Config) error { - addr := u.Host - if !(strings.LastIndex(addr, ":") > strings.LastIndex(addr, "]")) { - addr += ":443" - } - - conn, err := tls.Dial("tcp", addr, config) - if err != nil { - if !soap.IsCertificateUntrusted(err) { - return err - } - - info.Err = err - - conn, err = tls.Dial("tcp", addr, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err - } - } else { - info.Status = string(types.HostCertificateManagerCertificateInfoCertificateStatusGood) - } - - state := conn.ConnectionState() - _ = conn.Close() - info.FromCertificate(state.PeerCertificates[0]) - - return nil -} - -var emailAddressOID = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1} - -func (info *HostCertificateInfo) fromName(name *pkix.Name) string { - var attrs []string - - oids := map[string]string{ - emailAddressOID.String(): "emailAddress", - } - - for _, attr := range name.Names { - if key, ok := oids[attr.Type.String()]; ok { - attrs = append(attrs, fmt.Sprintf("%s=%s", key, attr.Value)) - } - } - - attrs = append(attrs, fmt.Sprintf("CN=%s", name.CommonName)) - - add := func(key string, vals []string) { - for _, val := range vals { - attrs = append(attrs, fmt.Sprintf("%s=%s", key, val)) - } - } - - elts := []struct { - key string - val []string - }{ - {"OU", name.OrganizationalUnit}, - {"O", name.Organization}, - {"L", name.Locality}, - {"ST", name.Province}, - {"C", name.Country}, - } - - for _, elt := range elts { - add(elt.key, elt.val) - } - - return strings.Join(attrs, ",") -} - -func (info *HostCertificateInfo) toName(s string) *pkix.Name { - var name pkix.Name - - for _, pair := range strings.Split(s, ",") { - attr := strings.SplitN(pair, "=", 2) - if len(attr) != 2 { - continue - } - - v := attr[1] - - switch strings.ToLower(attr[0]) { - case "cn": - name.CommonName = v - case "ou": - name.OrganizationalUnit = append(name.OrganizationalUnit, v) - case "o": - name.Organization = append(name.Organization, v) - case "l": - name.Locality = append(name.Locality, v) - case "st": - name.Province = append(name.Province, v) - case "c": - name.Country = append(name.Country, v) - case "emailaddress": - name.Names = append(name.Names, pkix.AttributeTypeAndValue{Type: emailAddressOID, Value: v}) - } - } - - return &name -} - -// SubjectName parses Subject into a pkix.Name -func (info *HostCertificateInfo) SubjectName() *pkix.Name { - if info.subjectName != nil { - return info.subjectName - } - - return info.toName(info.Subject) -} - -// IssuerName parses Issuer into a pkix.Name -func (info *HostCertificateInfo) IssuerName() *pkix.Name { - if info.issuerName != nil { - return info.issuerName - } - - return info.toName(info.Issuer) -} - -// Write outputs info similar to the Chrome Certificate Viewer. -func (info *HostCertificateInfo) Write(w io.Writer) error { - tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0) - - s := func(val string) string { - if val != "" { - return val - } - return "" - } - - ss := func(val []string) string { - return s(strings.Join(val, ",")) - } - - name := func(n *pkix.Name) { - fmt.Fprintf(tw, " Common Name (CN):\t%s\n", s(n.CommonName)) - fmt.Fprintf(tw, " Organization (O):\t%s\n", ss(n.Organization)) - fmt.Fprintf(tw, " Organizational Unit (OU):\t%s\n", ss(n.OrganizationalUnit)) - } - - status := info.Status - if info.Err != nil { - status = fmt.Sprintf("ERROR %s", info.Err) - } - fmt.Fprintf(tw, "Certificate Status:\t%s\n", status) - - fmt.Fprintln(tw, "Issued To:\t") - name(info.SubjectName()) - - fmt.Fprintln(tw, "Issued By:\t") - name(info.IssuerName()) - - fmt.Fprintln(tw, "Validity Period:\t") - fmt.Fprintf(tw, " Issued On:\t%s\n", info.NotBefore) - fmt.Fprintf(tw, " Expires On:\t%s\n", info.NotAfter) - - if info.ThumbprintSHA1 != "" { - fmt.Fprintln(tw, "Thumbprints:\t") - if info.ThumbprintSHA256 != "" { - fmt.Fprintf(tw, " SHA-256 Thumbprint:\t%s\n", info.ThumbprintSHA256) - } - fmt.Fprintf(tw, " SHA-1 Thumbprint:\t%s\n", info.ThumbprintSHA1) - } - - return tw.Flush() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go deleted file mode 100644 index ddf1d8c592d9..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_certificate_manager.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -// HostCertificateManager provides helper methods around the HostSystem.ConfigManager.CertificateManager -type HostCertificateManager struct { - Common - Host *HostSystem -} - -// NewHostCertificateManager creates a new HostCertificateManager helper -func NewHostCertificateManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostCertificateManager { - return &HostCertificateManager{ - Common: NewCommon(c, ref), - Host: NewHostSystem(c, host), - } -} - -// CertificateInfo wraps the host CertificateManager certificateInfo property with the HostCertificateInfo helper. -// The ThumbprintSHA1 field is set to HostSystem.Summary.Config.SslThumbprint if the host system is managed by a vCenter. -func (m HostCertificateManager) CertificateInfo(ctx context.Context) (*HostCertificateInfo, error) { - var hs mo.HostSystem - var cm mo.HostCertificateManager - - pc := property.DefaultCollector(m.Client()) - - err := pc.RetrieveOne(ctx, m.Reference(), []string{"certificateInfo"}, &cm) - if err != nil { - return nil, err - } - - _ = pc.RetrieveOne(ctx, m.Host.Reference(), []string{"summary.config.sslThumbprint"}, &hs) - - return &HostCertificateInfo{ - HostCertificateManagerCertificateInfo: cm.CertificateInfo, - ThumbprintSHA1: hs.Summary.Config.SslThumbprint, - }, nil -} - -// GenerateCertificateSigningRequest requests the host system to generate a certificate-signing request (CSR) for itself. -// The CSR is then typically provided to a Certificate Authority to sign and issue the SSL certificate for the host system. -// Use InstallServerCertificate to import this certificate. -func (m HostCertificateManager) GenerateCertificateSigningRequest(ctx context.Context, useIPAddressAsCommonName bool) (string, error) { - req := types.GenerateCertificateSigningRequest{ - This: m.Reference(), - UseIpAddressAsCommonName: useIPAddressAsCommonName, - } - - res, err := methods.GenerateCertificateSigningRequest(ctx, m.Client(), &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -// GenerateCertificateSigningRequestByDn requests the host system to generate a certificate-signing request (CSR) for itself. -// Alternative version similar to GenerateCertificateSigningRequest but takes a Distinguished Name (DN) as a parameter. -func (m HostCertificateManager) GenerateCertificateSigningRequestByDn(ctx context.Context, distinguishedName string) (string, error) { - req := types.GenerateCertificateSigningRequestByDn{ - This: m.Reference(), - DistinguishedName: distinguishedName, - } - - res, err := methods.GenerateCertificateSigningRequestByDn(ctx, m.Client(), &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -// InstallServerCertificate imports the given SSL certificate to the host system. -func (m HostCertificateManager) InstallServerCertificate(ctx context.Context, cert string) error { - req := types.InstallServerCertificate{ - This: m.Reference(), - Cert: cert, - } - - _, err := methods.InstallServerCertificate(ctx, m.Client(), &req) - if err != nil { - return err - } - - // NotifyAffectedService is internal, not exposing as we don't have a use case other than with InstallServerCertificate - // Without this call, hostd needs to be restarted to use the updated certificate - // Note: using Refresh as it has the same struct/signature, we just need to use different xml name tags - body := struct { - Req *types.Refresh `xml:"urn:vim25 NotifyAffectedServices,omitempty"` - Res *types.RefreshResponse `xml:"urn:vim25 NotifyAffectedServicesResponse,omitempty"` - methods.RefreshBody - }{ - Req: &types.Refresh{This: m.Reference()}, - } - - return m.Client().RoundTrip(ctx, &body, &body) -} - -// ListCACertificateRevocationLists returns the SSL CRLs of Certificate Authorities that are trusted by the host system. -func (m HostCertificateManager) ListCACertificateRevocationLists(ctx context.Context) ([]string, error) { - req := types.ListCACertificateRevocationLists{ - This: m.Reference(), - } - - res, err := methods.ListCACertificateRevocationLists(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -// ListCACertificates returns the SSL certificates of Certificate Authorities that are trusted by the host system. -func (m HostCertificateManager) ListCACertificates(ctx context.Context) ([]string, error) { - req := types.ListCACertificates{ - This: m.Reference(), - } - - res, err := methods.ListCACertificates(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -// ReplaceCACertificatesAndCRLs replaces the trusted CA certificates and CRL used by the host system. -// These determine whether the server can verify the identity of an external entity. -func (m HostCertificateManager) ReplaceCACertificatesAndCRLs(ctx context.Context, caCert []string, caCrl []string) error { - req := types.ReplaceCACertificatesAndCRLs{ - This: m.Reference(), - CaCert: caCert, - CaCrl: caCrl, - } - - _, err := methods.ReplaceCACertificatesAndCRLs(ctx, m.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_config_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_config_manager.go deleted file mode 100644 index eac59a32eb44..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_config_manager.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/types" -) - -type HostConfigManager struct { - Common -} - -func NewHostConfigManager(c *vim25.Client, ref types.ManagedObjectReference) *HostConfigManager { - return &HostConfigManager{ - Common: NewCommon(c, ref), - } -} - -// reference returns the ManagedObjectReference for the given HostConfigManager property name. -// An error is returned if the field is nil, of type ErrNotSupported if versioned is true. -func (m HostConfigManager) reference(ctx context.Context, name string, versioned ...bool) (types.ManagedObjectReference, error) { - prop := "configManager." + name - var content []types.ObjectContent - - err := m.Properties(ctx, m.Reference(), []string{prop}, &content) - if err != nil { - return types.ManagedObjectReference{}, err - } - - for _, c := range content { - for _, p := range c.PropSet { - if p.Name != prop { - continue - } - if ref, ok := p.Val.(types.ManagedObjectReference); ok { - return ref, nil - } - } - } - - err = fmt.Errorf("%s %s is nil", m.Reference(), prop) - if len(versioned) == 1 && versioned[0] { - err = ErrNotSupported - } - return types.ManagedObjectReference{}, err -} - -func (m HostConfigManager) DatastoreSystem(ctx context.Context) (*HostDatastoreSystem, error) { - ref, err := m.reference(ctx, "datastoreSystem") - if err != nil { - return nil, err - } - return NewHostDatastoreSystem(m.c, ref), nil -} - -func (m HostConfigManager) NetworkSystem(ctx context.Context) (*HostNetworkSystem, error) { - ref, err := m.reference(ctx, "networkSystem") - if err != nil { - return nil, err - } - return NewHostNetworkSystem(m.c, ref), nil -} - -func (m HostConfigManager) FirewallSystem(ctx context.Context) (*HostFirewallSystem, error) { - ref, err := m.reference(ctx, "firewallSystem") - if err != nil { - return nil, err - } - - return NewHostFirewallSystem(m.c, ref), nil -} - -func (m HostConfigManager) StorageSystem(ctx context.Context) (*HostStorageSystem, error) { - ref, err := m.reference(ctx, "storageSystem") - if err != nil { - return nil, err - } - return NewHostStorageSystem(m.c, ref), nil -} - -func (m HostConfigManager) VirtualNicManager(ctx context.Context) (*HostVirtualNicManager, error) { - ref, err := m.reference(ctx, "virtualNicManager") - if err != nil { - return nil, err - } - return NewHostVirtualNicManager(m.c, ref, m.Reference()), nil -} - -func (m HostConfigManager) VsanSystem(ctx context.Context) (*HostVsanSystem, error) { - ref, err := m.reference(ctx, "vsanSystem", true) // Added in 5.5 - if err != nil { - return nil, err - } - return NewHostVsanSystem(m.c, ref), nil -} - -func (m HostConfigManager) VsanInternalSystem(ctx context.Context) (*HostVsanInternalSystem, error) { - ref, err := m.reference(ctx, "vsanInternalSystem", true) // Added in 5.5 - if err != nil { - return nil, err - } - return NewHostVsanInternalSystem(m.c, ref), nil -} - -func (m HostConfigManager) AccountManager(ctx context.Context) (*HostAccountManager, error) { - ref, err := m.reference(ctx, "accountManager", true) // Added in 5.5 - if err != nil { - if err == ErrNotSupported { - // Versions < 5.5 can use the ServiceContent ref, - // but only when connected directly to ESX. - if m.c.ServiceContent.AccountManager == nil { - return nil, err - } - ref = *m.c.ServiceContent.AccountManager - } else { - return nil, err - } - } - - return NewHostAccountManager(m.c, ref), nil -} - -func (m HostConfigManager) OptionManager(ctx context.Context) (*OptionManager, error) { - ref, err := m.reference(ctx, "advancedOption") - if err != nil { - return nil, err - } - return NewOptionManager(m.c, ref), nil -} - -func (m HostConfigManager) ServiceSystem(ctx context.Context) (*HostServiceSystem, error) { - ref, err := m.reference(ctx, "serviceSystem") - if err != nil { - return nil, err - } - return NewHostServiceSystem(m.c, ref), nil -} - -func (m HostConfigManager) CertificateManager(ctx context.Context) (*HostCertificateManager, error) { - ref, err := m.reference(ctx, "certificateManager", true) // Added in 6.0 - if err != nil { - return nil, err - } - return NewHostCertificateManager(m.c, ref, m.Reference()), nil -} - -func (m HostConfigManager) DateTimeSystem(ctx context.Context) (*HostDateTimeSystem, error) { - ref, err := m.reference(ctx, "dateTimeSystem") - if err != nil { - return nil, err - } - return NewHostDateTimeSystem(m.c, ref), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go deleted file mode 100644 index b0c9e08a12ef..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_browser.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostDatastoreBrowser struct { - Common -} - -func NewHostDatastoreBrowser(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreBrowser { - return &HostDatastoreBrowser{ - Common: NewCommon(c, ref), - } -} - -func (b HostDatastoreBrowser) SearchDatastore(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) { - req := types.SearchDatastore_Task{ - This: b.Reference(), - DatastorePath: datastorePath, - SearchSpec: searchSpec, - } - - res, err := methods.SearchDatastore_Task(ctx, b.c, &req) - if err != nil { - return nil, err - } - - return NewTask(b.c, res.Returnval), nil -} - -func (b HostDatastoreBrowser) SearchDatastoreSubFolders(ctx context.Context, datastorePath string, searchSpec *types.HostDatastoreBrowserSearchSpec) (*Task, error) { - req := types.SearchDatastoreSubFolders_Task{ - This: b.Reference(), - DatastorePath: datastorePath, - SearchSpec: searchSpec, - } - - res, err := methods.SearchDatastoreSubFolders_Task(ctx, b.c, &req) - if err != nil { - return nil, err - } - - return NewTask(b.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_system.go deleted file mode 100644 index 64f3add917e9..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_datastore_system.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostDatastoreSystem struct { - Common -} - -func NewHostDatastoreSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreSystem { - return &HostDatastoreSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostDatastoreSystem) CreateLocalDatastore(ctx context.Context, name string, path string) (*Datastore, error) { - req := types.CreateLocalDatastore{ - This: s.Reference(), - Name: name, - Path: path, - } - - res, err := methods.CreateLocalDatastore(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewDatastore(s.Client(), res.Returnval), nil -} - -func (s HostDatastoreSystem) CreateNasDatastore(ctx context.Context, spec types.HostNasVolumeSpec) (*Datastore, error) { - req := types.CreateNasDatastore{ - This: s.Reference(), - Spec: spec, - } - - res, err := methods.CreateNasDatastore(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewDatastore(s.Client(), res.Returnval), nil -} - -func (s HostDatastoreSystem) CreateVmfsDatastore(ctx context.Context, spec types.VmfsDatastoreCreateSpec) (*Datastore, error) { - req := types.CreateVmfsDatastore{ - This: s.Reference(), - Spec: spec, - } - - res, err := methods.CreateVmfsDatastore(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewDatastore(s.Client(), res.Returnval), nil -} - -func (s HostDatastoreSystem) Remove(ctx context.Context, ds *Datastore) error { - req := types.RemoveDatastore{ - This: s.Reference(), - Datastore: ds.Reference(), - } - - _, err := methods.RemoveDatastore(ctx, s.Client(), &req) - if err != nil { - return err - } - - return nil -} - -func (s HostDatastoreSystem) QueryAvailableDisksForVmfs(ctx context.Context) ([]types.HostScsiDisk, error) { - req := types.QueryAvailableDisksForVmfs{ - This: s.Reference(), - } - - res, err := methods.QueryAvailableDisksForVmfs(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (s HostDatastoreSystem) QueryVmfsDatastoreCreateOptions(ctx context.Context, devicePath string) ([]types.VmfsDatastoreOption, error) { - req := types.QueryVmfsDatastoreCreateOptions{ - This: s.Reference(), - DevicePath: devicePath, - } - - res, err := methods.QueryVmfsDatastoreCreateOptions(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (s HostDatastoreSystem) ResignatureUnresolvedVmfsVolumes(ctx context.Context, devicePaths []string) (*Task, error) { - req := &types.ResignatureUnresolvedVmfsVolume_Task{ - This: s.Reference(), - ResolutionSpec: types.HostUnresolvedVmfsResignatureSpec{ - ExtentDevicePath: devicePaths, - }, - } - - res, err := methods.ResignatureUnresolvedVmfsVolume_Task(ctx, s.Client(), req) - if err != nil { - return nil, err - } - - return NewTask(s.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_date_time_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_date_time_system.go deleted file mode 100644 index 7c9203d7b67e..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_date_time_system.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "time" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostDateTimeSystem struct { - Common -} - -func NewHostDateTimeSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostDateTimeSystem { - return &HostDateTimeSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostDateTimeSystem) UpdateConfig(ctx context.Context, config types.HostDateTimeConfig) error { - req := types.UpdateDateTimeConfig{ - This: s.Reference(), - Config: config, - } - - _, err := methods.UpdateDateTimeConfig(ctx, s.c, &req) - return err -} - -func (s HostDateTimeSystem) Update(ctx context.Context, date time.Time) error { - req := types.UpdateDateTime{ - This: s.Reference(), - DateTime: date, - } - - _, err := methods.UpdateDateTime(ctx, s.c, &req) - return err -} - -func (s HostDateTimeSystem) Query(ctx context.Context) (*time.Time, error) { - req := types.QueryDateTime{ - This: s.Reference(), - } - - res, err := methods.QueryDateTime(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_firewall_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_firewall_system.go deleted file mode 100644 index 0b14402531cb..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_firewall_system.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "errors" - "fmt" - "strings" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type HostFirewallSystem struct { - Common -} - -func NewHostFirewallSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostFirewallSystem { - return &HostFirewallSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostFirewallSystem) DisableRuleset(ctx context.Context, id string) error { - req := types.DisableRuleset{ - This: s.Reference(), - Id: id, - } - - _, err := methods.DisableRuleset(ctx, s.c, &req) - return err -} - -func (s HostFirewallSystem) EnableRuleset(ctx context.Context, id string) error { - req := types.EnableRuleset{ - This: s.Reference(), - Id: id, - } - - _, err := methods.EnableRuleset(ctx, s.c, &req) - return err -} - -func (s HostFirewallSystem) Refresh(ctx context.Context) error { - req := types.RefreshFirewall{ - This: s.Reference(), - } - - _, err := methods.RefreshFirewall(ctx, s.c, &req) - return err -} - -func (s HostFirewallSystem) Info(ctx context.Context) (*types.HostFirewallInfo, error) { - var fs mo.HostFirewallSystem - - err := s.Properties(ctx, s.Reference(), []string{"firewallInfo"}, &fs) - if err != nil { - return nil, err - } - - return fs.FirewallInfo, nil -} - -// HostFirewallRulesetList provides helpers for a slice of types.HostFirewallRuleset -type HostFirewallRulesetList []types.HostFirewallRuleset - -// ByRule returns a HostFirewallRulesetList where Direction, PortType and Protocol are equal and Port is within range -func (l HostFirewallRulesetList) ByRule(rule types.HostFirewallRule) HostFirewallRulesetList { - var matches HostFirewallRulesetList - - for _, rs := range l { - for _, r := range rs.Rule { - if r.PortType != rule.PortType || - r.Protocol != rule.Protocol || - r.Direction != rule.Direction { - continue - } - - if r.EndPort == 0 && rule.Port == r.Port || - rule.Port >= r.Port && rule.Port <= r.EndPort { - matches = append(matches, rs) - break - } - } - } - - return matches -} - -// EnabledByRule returns a HostFirewallRulesetList with Match(rule) applied and filtered via Enabled() -// if enabled param is true, otherwise filtered via Disabled(). -// An error is returned if the resulting list is empty. -func (l HostFirewallRulesetList) EnabledByRule(rule types.HostFirewallRule, enabled bool) (HostFirewallRulesetList, error) { - var matched, skipped HostFirewallRulesetList - var matchedKind, skippedKind string - - l = l.ByRule(rule) - - if enabled { - matched = l.Enabled() - matchedKind = "enabled" - - skipped = l.Disabled() - skippedKind = "disabled" - } else { - matched = l.Disabled() - matchedKind = "disabled" - - skipped = l.Enabled() - skippedKind = "enabled" - } - - if len(matched) == 0 { - msg := fmt.Sprintf("%d %s firewall rulesets match %s %s %s %d, %d %s rulesets match", - len(matched), matchedKind, - rule.Direction, rule.Protocol, rule.PortType, rule.Port, - len(skipped), skippedKind) - - if len(skipped) != 0 { - msg += fmt.Sprintf(": %s", strings.Join(skipped.Keys(), ", ")) - } - - return nil, errors.New(msg) - } - - return matched, nil -} - -// Enabled returns a HostFirewallRulesetList with enabled rules -func (l HostFirewallRulesetList) Enabled() HostFirewallRulesetList { - var matches HostFirewallRulesetList - - for _, rs := range l { - if rs.Enabled { - matches = append(matches, rs) - } - } - - return matches -} - -// Disabled returns a HostFirewallRulesetList with disabled rules -func (l HostFirewallRulesetList) Disabled() HostFirewallRulesetList { - var matches HostFirewallRulesetList - - for _, rs := range l { - if !rs.Enabled { - matches = append(matches, rs) - } - } - - return matches -} - -// Keys returns the HostFirewallRuleset.Key for each ruleset in the list -func (l HostFirewallRulesetList) Keys() []string { - var keys []string - - for _, rs := range l { - keys = append(keys, rs.Key) - } - - return keys -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_network_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_network_system.go deleted file mode 100644 index 340b764a5144..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_network_system.go +++ /dev/null @@ -1,358 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostNetworkSystem struct { - Common -} - -func NewHostNetworkSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostNetworkSystem { - return &HostNetworkSystem{ - Common: NewCommon(c, ref), - } -} - -// AddPortGroup wraps methods.AddPortGroup -func (o HostNetworkSystem) AddPortGroup(ctx context.Context, portgrp types.HostPortGroupSpec) error { - req := types.AddPortGroup{ - This: o.Reference(), - Portgrp: portgrp, - } - - _, err := methods.AddPortGroup(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// AddServiceConsoleVirtualNic wraps methods.AddServiceConsoleVirtualNic -func (o HostNetworkSystem) AddServiceConsoleVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) { - req := types.AddServiceConsoleVirtualNic{ - This: o.Reference(), - Portgroup: portgroup, - Nic: nic, - } - - res, err := methods.AddServiceConsoleVirtualNic(ctx, o.c, &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -// AddVirtualNic wraps methods.AddVirtualNic -func (o HostNetworkSystem) AddVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) { - req := types.AddVirtualNic{ - This: o.Reference(), - Portgroup: portgroup, - Nic: nic, - } - - res, err := methods.AddVirtualNic(ctx, o.c, &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -// AddVirtualSwitch wraps methods.AddVirtualSwitch -func (o HostNetworkSystem) AddVirtualSwitch(ctx context.Context, vswitchName string, spec *types.HostVirtualSwitchSpec) error { - req := types.AddVirtualSwitch{ - This: o.Reference(), - VswitchName: vswitchName, - Spec: spec, - } - - _, err := methods.AddVirtualSwitch(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// QueryNetworkHint wraps methods.QueryNetworkHint -func (o HostNetworkSystem) QueryNetworkHint(ctx context.Context, device []string) ([]types.PhysicalNicHintInfo, error) { - req := types.QueryNetworkHint{ - This: o.Reference(), - Device: device, - } - - res, err := methods.QueryNetworkHint(ctx, o.c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, err -} - -// RefreshNetworkSystem wraps methods.RefreshNetworkSystem -func (o HostNetworkSystem) RefreshNetworkSystem(ctx context.Context) error { - req := types.RefreshNetworkSystem{ - This: o.Reference(), - } - - _, err := methods.RefreshNetworkSystem(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// RemovePortGroup wraps methods.RemovePortGroup -func (o HostNetworkSystem) RemovePortGroup(ctx context.Context, pgName string) error { - req := types.RemovePortGroup{ - This: o.Reference(), - PgName: pgName, - } - - _, err := methods.RemovePortGroup(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// RemoveServiceConsoleVirtualNic wraps methods.RemoveServiceConsoleVirtualNic -func (o HostNetworkSystem) RemoveServiceConsoleVirtualNic(ctx context.Context, device string) error { - req := types.RemoveServiceConsoleVirtualNic{ - This: o.Reference(), - Device: device, - } - - _, err := methods.RemoveServiceConsoleVirtualNic(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// RemoveVirtualNic wraps methods.RemoveVirtualNic -func (o HostNetworkSystem) RemoveVirtualNic(ctx context.Context, device string) error { - req := types.RemoveVirtualNic{ - This: o.Reference(), - Device: device, - } - - _, err := methods.RemoveVirtualNic(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// RemoveVirtualSwitch wraps methods.RemoveVirtualSwitch -func (o HostNetworkSystem) RemoveVirtualSwitch(ctx context.Context, vswitchName string) error { - req := types.RemoveVirtualSwitch{ - This: o.Reference(), - VswitchName: vswitchName, - } - - _, err := methods.RemoveVirtualSwitch(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// RestartServiceConsoleVirtualNic wraps methods.RestartServiceConsoleVirtualNic -func (o HostNetworkSystem) RestartServiceConsoleVirtualNic(ctx context.Context, device string) error { - req := types.RestartServiceConsoleVirtualNic{ - This: o.Reference(), - Device: device, - } - - _, err := methods.RestartServiceConsoleVirtualNic(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateConsoleIpRouteConfig wraps methods.UpdateConsoleIpRouteConfig -func (o HostNetworkSystem) UpdateConsoleIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error { - req := types.UpdateConsoleIpRouteConfig{ - This: o.Reference(), - Config: config, - } - - _, err := methods.UpdateConsoleIpRouteConfig(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateDnsConfig wraps methods.UpdateDnsConfig -func (o HostNetworkSystem) UpdateDnsConfig(ctx context.Context, config types.BaseHostDnsConfig) error { - req := types.UpdateDnsConfig{ - This: o.Reference(), - Config: config, - } - - _, err := methods.UpdateDnsConfig(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateIpRouteConfig wraps methods.UpdateIpRouteConfig -func (o HostNetworkSystem) UpdateIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error { - req := types.UpdateIpRouteConfig{ - This: o.Reference(), - Config: config, - } - - _, err := methods.UpdateIpRouteConfig(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateIpRouteTableConfig wraps methods.UpdateIpRouteTableConfig -func (o HostNetworkSystem) UpdateIpRouteTableConfig(ctx context.Context, config types.HostIpRouteTableConfig) error { - req := types.UpdateIpRouteTableConfig{ - This: o.Reference(), - Config: config, - } - - _, err := methods.UpdateIpRouteTableConfig(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateNetworkConfig wraps methods.UpdateNetworkConfig -func (o HostNetworkSystem) UpdateNetworkConfig(ctx context.Context, config types.HostNetworkConfig, changeMode string) (*types.HostNetworkConfigResult, error) { - req := types.UpdateNetworkConfig{ - This: o.Reference(), - Config: config, - ChangeMode: changeMode, - } - - res, err := methods.UpdateNetworkConfig(ctx, o.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -// UpdatePhysicalNicLinkSpeed wraps methods.UpdatePhysicalNicLinkSpeed -func (o HostNetworkSystem) UpdatePhysicalNicLinkSpeed(ctx context.Context, device string, linkSpeed *types.PhysicalNicLinkInfo) error { - req := types.UpdatePhysicalNicLinkSpeed{ - This: o.Reference(), - Device: device, - LinkSpeed: linkSpeed, - } - - _, err := methods.UpdatePhysicalNicLinkSpeed(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdatePortGroup wraps methods.UpdatePortGroup -func (o HostNetworkSystem) UpdatePortGroup(ctx context.Context, pgName string, portgrp types.HostPortGroupSpec) error { - req := types.UpdatePortGroup{ - This: o.Reference(), - PgName: pgName, - Portgrp: portgrp, - } - - _, err := methods.UpdatePortGroup(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateServiceConsoleVirtualNic wraps methods.UpdateServiceConsoleVirtualNic -func (o HostNetworkSystem) UpdateServiceConsoleVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error { - req := types.UpdateServiceConsoleVirtualNic{ - This: o.Reference(), - Device: device, - Nic: nic, - } - - _, err := methods.UpdateServiceConsoleVirtualNic(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateVirtualNic wraps methods.UpdateVirtualNic -func (o HostNetworkSystem) UpdateVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error { - req := types.UpdateVirtualNic{ - This: o.Reference(), - Device: device, - Nic: nic, - } - - _, err := methods.UpdateVirtualNic(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} - -// UpdateVirtualSwitch wraps methods.UpdateVirtualSwitch -func (o HostNetworkSystem) UpdateVirtualSwitch(ctx context.Context, vswitchName string, spec types.HostVirtualSwitchSpec) error { - req := types.UpdateVirtualSwitch{ - This: o.Reference(), - VswitchName: vswitchName, - Spec: spec, - } - - _, err := methods.UpdateVirtualSwitch(ctx, o.c, &req) - if err != nil { - return err - } - - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_service_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_service_system.go deleted file mode 100644 index a66b32c17c1d..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_service_system.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type HostServiceSystem struct { - Common -} - -func NewHostServiceSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostServiceSystem { - return &HostServiceSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostServiceSystem) Service(ctx context.Context) ([]types.HostService, error) { - var ss mo.HostServiceSystem - - err := s.Properties(ctx, s.Reference(), []string{"serviceInfo.service"}, &ss) - if err != nil { - return nil, err - } - - return ss.ServiceInfo.Service, nil -} - -func (s HostServiceSystem) Start(ctx context.Context, id string) error { - req := types.StartService{ - This: s.Reference(), - Id: id, - } - - _, err := methods.StartService(ctx, s.Client(), &req) - return err -} - -func (s HostServiceSystem) Stop(ctx context.Context, id string) error { - req := types.StopService{ - This: s.Reference(), - Id: id, - } - - _, err := methods.StopService(ctx, s.Client(), &req) - return err -} - -func (s HostServiceSystem) Restart(ctx context.Context, id string) error { - req := types.RestartService{ - This: s.Reference(), - Id: id, - } - - _, err := methods.RestartService(ctx, s.Client(), &req) - return err -} - -func (s HostServiceSystem) UpdatePolicy(ctx context.Context, id string, policy string) error { - req := types.UpdateServicePolicy{ - This: s.Reference(), - Id: id, - Policy: policy, - } - - _, err := methods.UpdateServicePolicy(ctx, s.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_storage_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_storage_system.go deleted file mode 100644 index 5c9f08eee12a..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_storage_system.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "errors" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostStorageSystem struct { - Common -} - -func NewHostStorageSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostStorageSystem { - return &HostStorageSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostStorageSystem) RetrieveDiskPartitionInfo(ctx context.Context, devicePath string) (*types.HostDiskPartitionInfo, error) { - req := types.RetrieveDiskPartitionInfo{ - This: s.Reference(), - DevicePath: []string{devicePath}, - } - - res, err := methods.RetrieveDiskPartitionInfo(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil || len(res.Returnval) == 0 { - return nil, errors.New("no partition info") - } - - return &res.Returnval[0], nil -} - -func (s HostStorageSystem) ComputeDiskPartitionInfo(ctx context.Context, devicePath string, layout types.HostDiskPartitionLayout) (*types.HostDiskPartitionInfo, error) { - req := types.ComputeDiskPartitionInfo{ - This: s.Reference(), - DevicePath: devicePath, - Layout: layout, - } - - res, err := methods.ComputeDiskPartitionInfo(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (s HostStorageSystem) UpdateDiskPartitionInfo(ctx context.Context, devicePath string, spec types.HostDiskPartitionSpec) error { - req := types.UpdateDiskPartitions{ - This: s.Reference(), - DevicePath: devicePath, - Spec: spec, - } - - _, err := methods.UpdateDiskPartitions(ctx, s.c, &req) - return err -} - -func (s HostStorageSystem) RescanAllHba(ctx context.Context) error { - req := types.RescanAllHba{ - This: s.Reference(), - } - - _, err := methods.RescanAllHba(ctx, s.c, &req) - return err -} - -func (s HostStorageSystem) Refresh(ctx context.Context) error { - req := types.RefreshStorageSystem{ - This: s.Reference(), - } - - _, err := methods.RefreshStorageSystem(ctx, s.c, &req) - return err -} - -func (s HostStorageSystem) RescanVmfs(ctx context.Context) error { - req := types.RescanVmfs{ - This: s.Reference(), - } - - _, err := methods.RescanVmfs(ctx, s.c, &req) - return err -} - -func (s HostStorageSystem) MarkAsSsd(ctx context.Context, uuid string) (*Task, error) { - req := types.MarkAsSsd_Task{ - This: s.Reference(), - ScsiDiskUuid: uuid, - } - - res, err := methods.MarkAsSsd_Task(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return NewTask(s.c, res.Returnval), nil -} - -func (s HostStorageSystem) MarkAsNonSsd(ctx context.Context, uuid string) (*Task, error) { - req := types.MarkAsNonSsd_Task{ - This: s.Reference(), - ScsiDiskUuid: uuid, - } - - res, err := methods.MarkAsNonSsd_Task(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return NewTask(s.c, res.Returnval), nil -} - -func (s HostStorageSystem) MarkAsLocal(ctx context.Context, uuid string) (*Task, error) { - req := types.MarkAsLocal_Task{ - This: s.Reference(), - ScsiDiskUuid: uuid, - } - - res, err := methods.MarkAsLocal_Task(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return NewTask(s.c, res.Returnval), nil -} - -func (s HostStorageSystem) MarkAsNonLocal(ctx context.Context, uuid string) (*Task, error) { - req := types.MarkAsNonLocal_Task{ - This: s.Reference(), - ScsiDiskUuid: uuid, - } - - res, err := methods.MarkAsNonLocal_Task(ctx, s.c, &req) - if err != nil { - return nil, err - } - - return NewTask(s.c, res.Returnval), nil -} - -func (s HostStorageSystem) AttachScsiLun(ctx context.Context, uuid string) error { - req := types.AttachScsiLun{ - This: s.Reference(), - LunUuid: uuid, - } - - _, err := methods.AttachScsiLun(ctx, s.c, &req) - - return err -} - -func (s HostStorageSystem) QueryUnresolvedVmfsVolumes(ctx context.Context) ([]types.HostUnresolvedVmfsVolume, error) { - req := &types.QueryUnresolvedVmfsVolume{ - This: s.Reference(), - } - - res, err := methods.QueryUnresolvedVmfsVolume(ctx, s.Client(), req) - if err != nil { - return nil, err - } - return res.Returnval, nil -} - -func (s HostStorageSystem) UnmountVmfsVolume(ctx context.Context, vmfsUuid string) error { - req := &types.UnmountVmfsVolume{ - This: s.Reference(), - VmfsUuid: vmfsUuid, - } - - _, err := methods.UnmountVmfsVolume(ctx, s.Client(), req) - if err != nil { - return err - } - - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_system.go deleted file mode 100644 index ddf6cb8f11ac..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_system.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - "net" - - "github.com/vmware/govmomi/internal" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type HostSystem struct { - Common -} - -func NewHostSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostSystem { - return &HostSystem{ - Common: NewCommon(c, ref), - } -} - -func (h HostSystem) ConfigManager() *HostConfigManager { - return NewHostConfigManager(h.c, h.Reference()) -} - -func (h HostSystem) ResourcePool(ctx context.Context) (*ResourcePool, error) { - var mh mo.HostSystem - - err := h.Properties(ctx, h.Reference(), []string{"parent"}, &mh) - if err != nil { - return nil, err - } - - var mcr *mo.ComputeResource - var parent interface{} - - switch mh.Parent.Type { - case "ComputeResource": - mcr = new(mo.ComputeResource) - parent = mcr - case "ClusterComputeResource": - mcc := new(mo.ClusterComputeResource) - mcr = &mcc.ComputeResource - parent = mcc - default: - return nil, fmt.Errorf("unknown host parent type: %s", mh.Parent.Type) - } - - err = h.Properties(ctx, *mh.Parent, []string{"resourcePool"}, parent) - if err != nil { - return nil, err - } - - pool := NewResourcePool(h.c, *mcr.ResourcePool) - return pool, nil -} - -func (h HostSystem) ManagementIPs(ctx context.Context) ([]net.IP, error) { - var mh mo.HostSystem - - err := h.Properties(ctx, h.Reference(), []string{"config.virtualNicManagerInfo.netConfig"}, &mh) - if err != nil { - return nil, err - } - - config := mh.Config - if config == nil { - return nil, nil - } - - info := config.VirtualNicManagerInfo - if info == nil { - return nil, nil - } - - return internal.HostSystemManagementIPs(info.NetConfig), nil -} - -func (h HostSystem) Disconnect(ctx context.Context) (*Task, error) { - req := types.DisconnectHost_Task{ - This: h.Reference(), - } - - res, err := methods.DisconnectHost_Task(ctx, h.c, &req) - if err != nil { - return nil, err - } - - return NewTask(h.c, res.Returnval), nil -} - -func (h HostSystem) Reconnect(ctx context.Context, cnxSpec *types.HostConnectSpec, reconnectSpec *types.HostSystemReconnectSpec) (*Task, error) { - req := types.ReconnectHost_Task{ - This: h.Reference(), - CnxSpec: cnxSpec, - ReconnectSpec: reconnectSpec, - } - - res, err := methods.ReconnectHost_Task(ctx, h.c, &req) - if err != nil { - return nil, err - } - - return NewTask(h.c, res.Returnval), nil -} - -func (h HostSystem) EnterMaintenanceMode(ctx context.Context, timeout int32, evacuate bool, spec *types.HostMaintenanceSpec) (*Task, error) { - req := types.EnterMaintenanceMode_Task{ - This: h.Reference(), - Timeout: timeout, - EvacuatePoweredOffVms: types.NewBool(evacuate), - MaintenanceSpec: spec, - } - - res, err := methods.EnterMaintenanceMode_Task(ctx, h.c, &req) - if err != nil { - return nil, err - } - - return NewTask(h.c, res.Returnval), nil -} - -func (h HostSystem) ExitMaintenanceMode(ctx context.Context, timeout int32) (*Task, error) { - req := types.ExitMaintenanceMode_Task{ - This: h.Reference(), - Timeout: timeout, - } - - res, err := methods.ExitMaintenanceMode_Task(ctx, h.c, &req) - if err != nil { - return nil, err - } - - return NewTask(h.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go deleted file mode 100644 index 01e7e9cd4b0c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_virtual_nic_manager.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type HostVirtualNicManager struct { - Common - Host *HostSystem -} - -func NewHostVirtualNicManager(c *vim25.Client, ref types.ManagedObjectReference, host types.ManagedObjectReference) *HostVirtualNicManager { - return &HostVirtualNicManager{ - Common: NewCommon(c, ref), - Host: NewHostSystem(c, host), - } -} - -func (m HostVirtualNicManager) Info(ctx context.Context) (*types.HostVirtualNicManagerInfo, error) { - var vnm mo.HostVirtualNicManager - - err := m.Properties(ctx, m.Reference(), []string{"info"}, &vnm) - if err != nil { - return nil, err - } - - return &vnm.Info, nil -} - -func (m HostVirtualNicManager) DeselectVnic(ctx context.Context, nicType string, device string) error { - if nicType == string(types.HostVirtualNicManagerNicTypeVsan) { - // Avoid fault.NotSupported: - // "Error deselecting device '$device': VSAN interfaces must be deselected using vim.host.VsanSystem" - s, err := m.Host.ConfigManager().VsanSystem(ctx) - if err != nil { - return err - } - - return s.updateVnic(ctx, device, false) - } - - req := types.DeselectVnicForNicType{ - This: m.Reference(), - NicType: nicType, - Device: device, - } - - _, err := methods.DeselectVnicForNicType(ctx, m.Client(), &req) - return err -} - -func (m HostVirtualNicManager) SelectVnic(ctx context.Context, nicType string, device string) error { - if nicType == string(types.HostVirtualNicManagerNicTypeVsan) { - // Avoid fault.NotSupported: - // "Error selecting device '$device': VSAN interfaces must be selected using vim.host.VsanSystem" - s, err := m.Host.ConfigManager().VsanSystem(ctx) - if err != nil { - return err - } - - return s.updateVnic(ctx, device, true) - } - - req := types.SelectVnicForNicType{ - This: m.Reference(), - NicType: nicType, - Device: device, - } - - _, err := methods.SelectVnicForNicType(ctx, m.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go deleted file mode 100644 index 1430e8a88221..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_internal_system.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "encoding/json" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type HostVsanInternalSystem struct { - Common -} - -func NewHostVsanInternalSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanInternalSystem { - m := HostVsanInternalSystem{ - Common: NewCommon(c, ref), - } - - return &m -} - -// QueryVsanObjectUuidsByFilter returns vSAN DOM object uuids by filter. -func (m HostVsanInternalSystem) QueryVsanObjectUuidsByFilter(ctx context.Context, uuids []string, limit int32, version int32) ([]string, error) { - req := types.QueryVsanObjectUuidsByFilter{ - This: m.Reference(), - Uuids: uuids, - Limit: &limit, - Version: version, - } - - res, err := methods.QueryVsanObjectUuidsByFilter(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -type VsanObjExtAttrs struct { - Type string `json:"Object type"` - Class string `json:"Object class"` - Size string `json:"Object size"` - Path string `json:"Object path"` - Name string `json:"User friendly name"` -} - -func (a *VsanObjExtAttrs) DatastorePath(dir string) string { - l := len(dir) - path := a.Path - - if len(path) >= l { - path = a.Path[l:] - } - - if path != "" { - return path - } - - return a.Name // vmnamespace -} - -// GetVsanObjExtAttrs is internal and intended for troubleshooting/debugging situations in the field. -// WARNING: This API can be slow because we do IOs (reads) to all the objects. -func (m HostVsanInternalSystem) GetVsanObjExtAttrs(ctx context.Context, uuids []string) (map[string]VsanObjExtAttrs, error) { - req := types.GetVsanObjExtAttrs{ - This: m.Reference(), - Uuids: uuids, - } - - res, err := methods.GetVsanObjExtAttrs(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - var attrs map[string]VsanObjExtAttrs - - err = json.Unmarshal([]byte(res.Returnval), &attrs) - - return attrs, err -} - -// DeleteVsanObjects is internal and intended for troubleshooting/debugging only. -// WARNING: This API can be slow because we do IOs to all the objects. -// DOM won't allow access to objects which have lost quorum. Such objects can be deleted with the optional "force" flag. -// These objects may however re-appear with quorum if the absent components come back (network partition gets resolved, etc.) -func (m HostVsanInternalSystem) DeleteVsanObjects(ctx context.Context, uuids []string, force *bool) ([]types.HostVsanInternalSystemDeleteVsanObjectsResult, error) { - req := types.DeleteVsanObjects{ - This: m.Reference(), - Uuids: uuids, - Force: force, - } - - res, err := methods.DeleteVsanObjects(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_system.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_system.go deleted file mode 100644 index 5ab234d5e53a..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/host_vsan_system.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type HostVsanSystem struct { - Common -} - -func NewHostVsanSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostVsanSystem { - return &HostVsanSystem{ - Common: NewCommon(c, ref), - } -} - -func (s HostVsanSystem) Update(ctx context.Context, config types.VsanHostConfigInfo) (*Task, error) { - req := types.UpdateVsan_Task{ - This: s.Reference(), - Config: config, - } - - res, err := methods.UpdateVsan_Task(ctx, s.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(s.Client(), res.Returnval), nil -} - -// updateVnic in support of the HostVirtualNicManager.{SelectVnic,DeselectVnic} methods -func (s HostVsanSystem) updateVnic(ctx context.Context, device string, enable bool) error { - var vsan mo.HostVsanSystem - - err := s.Properties(ctx, s.Reference(), []string{"config.networkInfo.port"}, &vsan) - if err != nil { - return err - } - - info := vsan.Config - - var port []types.VsanHostConfigInfoNetworkInfoPortConfig - - for _, p := range info.NetworkInfo.Port { - if p.Device == device { - continue - } - - port = append(port, p) - } - - if enable { - port = append(port, types.VsanHostConfigInfoNetworkInfoPortConfig{ - Device: device, - }) - } - - info.NetworkInfo.Port = port - - task, err := s.Update(ctx, info) - if err != nil { - return err - } - - _, err = task.WaitForResult(ctx, nil) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/namespace_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/namespace_manager.go deleted file mode 100644 index f463b368cdea..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/namespace_manager.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type DatastoreNamespaceManager struct { - Common -} - -func NewDatastoreNamespaceManager(c *vim25.Client) *DatastoreNamespaceManager { - n := DatastoreNamespaceManager{ - Common: NewCommon(c, *c.ServiceContent.DatastoreNamespaceManager), - } - - return &n -} - -// CreateDirectory creates a top-level directory on the given vsan datastore, using -// the given user display name hint and opaque storage policy. -func (nm DatastoreNamespaceManager) CreateDirectory(ctx context.Context, ds *Datastore, displayName string, policy string) (string, error) { - - req := &types.CreateDirectory{ - This: nm.Reference(), - Datastore: ds.Reference(), - DisplayName: displayName, - Policy: policy, - } - - resp, err := methods.CreateDirectory(ctx, nm.c, req) - if err != nil { - return "", err - } - - return resp.Returnval, nil -} - -// DeleteDirectory deletes the given top-level directory from a vsan datastore. -func (nm DatastoreNamespaceManager) DeleteDirectory(ctx context.Context, dc *Datacenter, datastorePath string) error { - - req := &types.DeleteDirectory{ - This: nm.Reference(), - DatastorePath: datastorePath, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - if _, err := methods.DeleteDirectory(ctx, nm.c, req); err != nil { - return err - } - - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network.go deleted file mode 100644 index f209a7ac4c92..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/types" -) - -type Network struct { - Common -} - -func NewNetwork(c *vim25.Client, ref types.ManagedObjectReference) *Network { - return &Network{ - Common: NewCommon(c, ref), - } -} - -func (n Network) GetInventoryPath() string { - return n.InventoryPath -} - -// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network -func (n Network) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { - name, err := n.ObjectName(ctx) - if err != nil { - return nil, err - } - - backing := &types.VirtualEthernetCardNetworkBackingInfo{ - VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ - DeviceName: name, - }, - } - - return backing, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network_reference.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network_reference.go deleted file mode 100644 index f1a41cd59b66..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/network_reference.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25/types" -) - -// The NetworkReference interface is implemented by managed objects -// which can be used as the backing for a VirtualEthernetCard. -type NetworkReference interface { - Reference - GetInventoryPath() string - EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/opaque_network.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/opaque_network.go deleted file mode 100644 index 6797d325de7c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/opaque_network.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type OpaqueNetwork struct { - Common -} - -func NewOpaqueNetwork(c *vim25.Client, ref types.ManagedObjectReference) *OpaqueNetwork { - return &OpaqueNetwork{ - Common: NewCommon(c, ref), - } -} - -func (n OpaqueNetwork) GetInventoryPath() string { - return n.InventoryPath -} - -// EthernetCardBackingInfo returns the VirtualDeviceBackingInfo for this Network -func (n OpaqueNetwork) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) { - summary, err := n.Summary(ctx) - if err != nil { - return nil, err - } - - backing := &types.VirtualEthernetCardOpaqueNetworkBackingInfo{ - OpaqueNetworkId: summary.OpaqueNetworkId, - OpaqueNetworkType: summary.OpaqueNetworkType, - } - - return backing, nil -} - -// Summary returns the mo.OpaqueNetwork.Summary property -func (n OpaqueNetwork) Summary(ctx context.Context) (*types.OpaqueNetworkSummary, error) { - var props mo.OpaqueNetwork - - err := n.Properties(ctx, n.Reference(), []string{"summary"}, &props) - if err != nil { - return nil, err - } - - summary, ok := props.Summary.(*types.OpaqueNetworkSummary) - if !ok { - return nil, fmt.Errorf("%s unsupported network summary type: %T", n, props.Summary) - } - - return summary, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/option_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/option_manager.go deleted file mode 100644 index 7f93273aac37..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/option_manager.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type OptionManager struct { - Common -} - -func NewOptionManager(c *vim25.Client, ref types.ManagedObjectReference) *OptionManager { - return &OptionManager{ - Common: NewCommon(c, ref), - } -} - -func (m OptionManager) Query(ctx context.Context, name string) ([]types.BaseOptionValue, error) { - req := types.QueryOptions{ - This: m.Reference(), - Name: name, - } - - res, err := methods.QueryOptions(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (m OptionManager) Update(ctx context.Context, value []types.BaseOptionValue) error { - req := types.UpdateOptions{ - This: m.Reference(), - ChangedValue: value, - } - - _, err := methods.UpdateOptions(ctx, m.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/resource_pool.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/resource_pool.go deleted file mode 100644 index e510006b4007..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/resource_pool.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/nfc" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type ResourcePool struct { - Common -} - -func NewResourcePool(c *vim25.Client, ref types.ManagedObjectReference) *ResourcePool { - return &ResourcePool{ - Common: NewCommon(c, ref), - } -} - -// Owner returns the ResourcePool owner as a ClusterComputeResource or ComputeResource. -func (p ResourcePool) Owner(ctx context.Context) (Reference, error) { - var pool mo.ResourcePool - - err := p.Properties(ctx, p.Reference(), []string{"owner"}, &pool) - if err != nil { - return nil, err - } - - return NewReference(p.Client(), pool.Owner), nil -} - -func (p ResourcePool) ImportVApp(ctx context.Context, spec types.BaseImportSpec, folder *Folder, host *HostSystem) (*nfc.Lease, error) { - req := types.ImportVApp{ - This: p.Reference(), - Spec: spec, - } - - if folder != nil { - ref := folder.Reference() - req.Folder = &ref - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.ImportVApp(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return nfc.NewLease(p.c, res.Returnval), nil -} - -func (p ResourcePool) Create(ctx context.Context, name string, spec types.ResourceConfigSpec) (*ResourcePool, error) { - req := types.CreateResourcePool{ - This: p.Reference(), - Name: name, - Spec: spec, - } - - res, err := methods.CreateResourcePool(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewResourcePool(p.c, res.Returnval), nil -} - -func (p ResourcePool) CreateVApp(ctx context.Context, name string, resSpec types.ResourceConfigSpec, configSpec types.VAppConfigSpec, folder *Folder) (*VirtualApp, error) { - req := types.CreateVApp{ - This: p.Reference(), - Name: name, - ResSpec: resSpec, - ConfigSpec: configSpec, - } - - if folder != nil { - ref := folder.Reference() - req.VmFolder = &ref - } - - res, err := methods.CreateVApp(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewVirtualApp(p.c, res.Returnval), nil -} - -func (p ResourcePool) UpdateConfig(ctx context.Context, name string, config *types.ResourceConfigSpec) error { - req := types.UpdateConfig{ - This: p.Reference(), - Name: name, - Config: config, - } - - if config != nil && config.Entity == nil { - ref := p.Reference() - - // Create copy of config so changes won't leak back to the caller - newConfig := *config - newConfig.Entity = &ref - req.Config = &newConfig - } - - _, err := methods.UpdateConfig(ctx, p.c, &req) - return err -} - -func (p ResourcePool) DestroyChildren(ctx context.Context) error { - req := types.DestroyChildren{ - This: p.Reference(), - } - - _, err := methods.DestroyChildren(ctx, p.c, &req) - return err -} - -func (p ResourcePool) Destroy(ctx context.Context) (*Task, error) { - req := types.Destroy_Task{ - This: p.Reference(), - } - - res, err := methods.Destroy_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/search_index.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/search_index.go deleted file mode 100644 index 288f78097cf4..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/search_index.go +++ /dev/null @@ -1,259 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type SearchIndex struct { - Common -} - -func NewSearchIndex(c *vim25.Client) *SearchIndex { - s := SearchIndex{ - Common: NewCommon(c, *c.ServiceContent.SearchIndex), - } - - return &s -} - -// FindByDatastorePath finds a virtual machine by its location on a datastore. -func (s SearchIndex) FindByDatastorePath(ctx context.Context, dc *Datacenter, path string) (Reference, error) { - req := types.FindByDatastorePath{ - This: s.Reference(), - Datacenter: dc.Reference(), - Path: path, - } - - res, err := methods.FindByDatastorePath(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - return NewReference(s.c, *res.Returnval), nil -} - -// FindByDnsName finds a virtual machine or host by DNS name. -func (s SearchIndex) FindByDnsName(ctx context.Context, dc *Datacenter, dnsName string, vmSearch bool) (Reference, error) { - req := types.FindByDnsName{ - This: s.Reference(), - DnsName: dnsName, - VmSearch: vmSearch, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindByDnsName(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - return NewReference(s.c, *res.Returnval), nil -} - -// FindByInventoryPath finds a managed entity based on its location in the inventory. -func (s SearchIndex) FindByInventoryPath(ctx context.Context, path string) (Reference, error) { - req := types.FindByInventoryPath{ - This: s.Reference(), - InventoryPath: path, - } - - res, err := methods.FindByInventoryPath(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - - r := NewReference(s.c, *res.Returnval) - - type common interface { - SetInventoryPath(string) - } - - if c, ok := r.(common); ok { - c.SetInventoryPath(path) - } - - return r, nil -} - -// FindByIp finds a virtual machine or host by IP address. -func (s SearchIndex) FindByIp(ctx context.Context, dc *Datacenter, ip string, vmSearch bool) (Reference, error) { - req := types.FindByIp{ - This: s.Reference(), - Ip: ip, - VmSearch: vmSearch, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindByIp(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - return NewReference(s.c, *res.Returnval), nil -} - -// FindByUuid finds a virtual machine or host by UUID. -func (s SearchIndex) FindByUuid(ctx context.Context, dc *Datacenter, uuid string, vmSearch bool, instanceUuid *bool) (Reference, error) { - req := types.FindByUuid{ - This: s.Reference(), - Uuid: uuid, - VmSearch: vmSearch, - InstanceUuid: instanceUuid, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindByUuid(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - return NewReference(s.c, *res.Returnval), nil -} - -// FindChild finds a particular child based on a managed entity name. -func (s SearchIndex) FindChild(ctx context.Context, entity Reference, name string) (Reference, error) { - req := types.FindChild{ - This: s.Reference(), - Entity: entity.Reference(), - Name: name, - } - - res, err := methods.FindChild(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if res.Returnval == nil { - return nil, nil - } - return NewReference(s.c, *res.Returnval), nil -} - -// FindAllByDnsName finds all virtual machines or hosts by DNS name. -func (s SearchIndex) FindAllByDnsName(ctx context.Context, dc *Datacenter, dnsName string, vmSearch bool) ([]Reference, error) { - req := types.FindAllByDnsName{ - This: s.Reference(), - DnsName: dnsName, - VmSearch: vmSearch, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindAllByDnsName(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if len(res.Returnval) == 0 { - return nil, nil - } - - var references []Reference - for _, returnval := range res.Returnval { - references = append(references, NewReference(s.c, returnval)) - } - return references, nil -} - -// FindAllByIp finds all virtual machines or hosts by IP address. -func (s SearchIndex) FindAllByIp(ctx context.Context, dc *Datacenter, ip string, vmSearch bool) ([]Reference, error) { - req := types.FindAllByIp{ - This: s.Reference(), - Ip: ip, - VmSearch: vmSearch, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindAllByIp(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if len(res.Returnval) == 0 { - return nil, nil - } - - var references []Reference - for _, returnval := range res.Returnval { - references = append(references, NewReference(s.c, returnval)) - } - return references, nil -} - -// FindAllByUuid finds all virtual machines or hosts by UUID. -func (s SearchIndex) FindAllByUuid(ctx context.Context, dc *Datacenter, uuid string, vmSearch bool, instanceUuid *bool) ([]Reference, error) { - req := types.FindAllByUuid{ - This: s.Reference(), - Uuid: uuid, - VmSearch: vmSearch, - InstanceUuid: instanceUuid, - } - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.FindAllByUuid(ctx, s.c, &req) - if err != nil { - return nil, err - } - - if len(res.Returnval) == 0 { - return nil, nil - } - - var references []Reference - for _, returnval := range res.Returnval { - references = append(references, NewReference(s.c, returnval)) - } - return references, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_pod.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_pod.go deleted file mode 100644 index 188b91a002e9..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_pod.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/types" -) - -type StoragePod struct { - *Folder -} - -func NewStoragePod(c *vim25.Client, ref types.ManagedObjectReference) *StoragePod { - return &StoragePod{ - Folder: &Folder{ - Common: NewCommon(c, ref), - }, - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go deleted file mode 100644 index 579bcd4d7ee0..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/storage_resource_manager.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type StorageResourceManager struct { - Common -} - -func NewStorageResourceManager(c *vim25.Client) *StorageResourceManager { - sr := StorageResourceManager{ - Common: NewCommon(c, *c.ServiceContent.StorageResourceManager), - } - - return &sr -} - -func (sr StorageResourceManager) ApplyStorageDrsRecommendation(ctx context.Context, key []string) (*Task, error) { - req := types.ApplyStorageDrsRecommendation_Task{ - This: sr.Reference(), - Key: key, - } - - res, err := methods.ApplyStorageDrsRecommendation_Task(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return NewTask(sr.c, res.Returnval), nil -} - -func (sr StorageResourceManager) ApplyStorageDrsRecommendationToPod(ctx context.Context, pod *StoragePod, key string) (*Task, error) { - req := types.ApplyStorageDrsRecommendationToPod_Task{ - This: sr.Reference(), - Key: key, - } - - if pod != nil { - req.Pod = pod.Reference() - } - - res, err := methods.ApplyStorageDrsRecommendationToPod_Task(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return NewTask(sr.c, res.Returnval), nil -} - -func (sr StorageResourceManager) CancelStorageDrsRecommendation(ctx context.Context, key []string) error { - req := types.CancelStorageDrsRecommendation{ - This: sr.Reference(), - Key: key, - } - - _, err := methods.CancelStorageDrsRecommendation(ctx, sr.c, &req) - - return err -} - -func (sr StorageResourceManager) ConfigureDatastoreIORM(ctx context.Context, datastore *Datastore, spec types.StorageIORMConfigSpec, key string) (*Task, error) { - req := types.ConfigureDatastoreIORM_Task{ - This: sr.Reference(), - Spec: spec, - } - - if datastore != nil { - req.Datastore = datastore.Reference() - } - - res, err := methods.ConfigureDatastoreIORM_Task(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return NewTask(sr.c, res.Returnval), nil -} - -func (sr StorageResourceManager) ConfigureStorageDrsForPod(ctx context.Context, pod *StoragePod, spec types.StorageDrsConfigSpec, modify bool) (*Task, error) { - req := types.ConfigureStorageDrsForPod_Task{ - This: sr.Reference(), - Spec: spec, - Modify: modify, - } - - if pod != nil { - req.Pod = pod.Reference() - } - - res, err := methods.ConfigureStorageDrsForPod_Task(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return NewTask(sr.c, res.Returnval), nil -} - -func (sr StorageResourceManager) QueryDatastorePerformanceSummary(ctx context.Context, datastore *Datastore) ([]types.StoragePerformanceSummary, error) { - req := types.QueryDatastorePerformanceSummary{ - This: sr.Reference(), - } - - if datastore != nil { - req.Datastore = datastore.Reference() - } - - res, err := methods.QueryDatastorePerformanceSummary(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (sr StorageResourceManager) QueryIORMConfigOption(ctx context.Context, host *HostSystem) (*types.StorageIORMConfigOption, error) { - req := types.QueryIORMConfigOption{ - This: sr.Reference(), - } - - if host != nil { - req.Host = host.Reference() - } - - res, err := methods.QueryIORMConfigOption(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (sr StorageResourceManager) RecommendDatastores(ctx context.Context, storageSpec types.StoragePlacementSpec) (*types.StoragePlacementResult, error) { - req := types.RecommendDatastores{ - This: sr.Reference(), - StorageSpec: storageSpec, - } - - res, err := methods.RecommendDatastores(ctx, sr.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (sr StorageResourceManager) RefreshStorageDrsRecommendation(ctx context.Context, pod *StoragePod) error { - req := types.RefreshStorageDrsRecommendation{ - This: sr.Reference(), - } - - if pod != nil { - req.Pod = pod.Reference() - } - - _, err := methods.RefreshStorageDrsRecommendation(ctx, sr.c, &req) - - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/task.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/task.go deleted file mode 100644 index 088dd7f56bed..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/task.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/task" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/progress" - "github.com/vmware/govmomi/vim25/types" -) - -// Task is a convenience wrapper around task.Task that keeps a reference to -// the client that was used to create it. This allows users to call the Wait() -// function with only a context parameter, instead of a context parameter, a -// soap.RoundTripper, and reference to the root property collector. -type Task struct { - Common -} - -func NewTask(c *vim25.Client, ref types.ManagedObjectReference) *Task { - t := Task{ - Common: NewCommon(c, ref), - } - - return &t -} - -func (t *Task) Wait(ctx context.Context) error { - _, err := t.WaitForResult(ctx, nil) - return err -} - -func (t *Task) WaitForResult(ctx context.Context, s ...progress.Sinker) (*types.TaskInfo, error) { - var pr progress.Sinker - if len(s) == 1 { - pr = s[0] - } - p := property.DefaultCollector(t.c) - return task.Wait(ctx, t.Reference(), p, pr) -} - -func (t *Task) Cancel(ctx context.Context) error { - _, err := methods.CancelTask(ctx, t.Client(), &types.CancelTask{ - This: t.Reference(), - }) - - return err -} - -// SetState sets task state and optionally sets results or fault, as appropriate for state. -func (t *Task) SetState(ctx context.Context, state types.TaskInfoState, result types.AnyType, fault *types.LocalizedMethodFault) error { - req := types.SetTaskState{ - This: t.Reference(), - State: state, - Result: result, - Fault: fault, - } - _, err := methods.SetTaskState(ctx, t.Common.Client(), &req) - return err -} - -// SetDescription updates task description to describe the current phase of the task. -func (t *Task) SetDescription(ctx context.Context, description types.LocalizableMessage) error { - req := types.SetTaskDescription{ - This: t.Reference(), - Description: description, - } - _, err := methods.SetTaskDescription(ctx, t.Common.Client(), &req) - return err -} - -// UpdateProgress Sets percentage done for this task and recalculates overall percentage done. -// If a percentDone value of less than zero or greater than 100 is specified, -// a value of zero or 100 respectively is used. -func (t *Task) UpdateProgress(ctx context.Context, percentDone int) error { - req := types.UpdateProgress{ - This: t.Reference(), - PercentDone: int32(percentDone), - } - _, err := methods.UpdateProgress(ctx, t.Common.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/tenant_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/tenant_manager.go deleted file mode 100644 index 4dda196e35ee..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/tenant_manager.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright (c) 2021 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type TenantManager struct { - Common -} - -func NewTenantManager(c *vim25.Client) *TenantManager { - t := TenantManager{ - Common: NewCommon(c, *c.ServiceContent.TenantManager), - } - - return &t -} - -func (t TenantManager) MarkServiceProviderEntities(ctx context.Context, entities []types.ManagedObjectReference) error { - req := types.MarkServiceProviderEntities{ - This: t.Reference(), - Entity: entities, - } - - _, err := methods.MarkServiceProviderEntities(ctx, t.Client(), &req) - if err != nil { - return err - } - - return nil -} - -func (t TenantManager) UnmarkServiceProviderEntities(ctx context.Context, entities []types.ManagedObjectReference) error { - req := types.UnmarkServiceProviderEntities{ - This: t.Reference(), - Entity: entities, - } - - _, err := methods.UnmarkServiceProviderEntities(ctx, t.Client(), &req) - if err != nil { - return err - } - - return nil -} - -func (t TenantManager) RetrieveServiceProviderEntities(ctx context.Context) ([]types.ManagedObjectReference, error) { - req := types.RetrieveServiceProviderEntities{ - This: t.Reference(), - } - - res, err := methods.RetrieveServiceProviderEntities(ctx, t.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/types.go deleted file mode 100644 index 4eb8d1b8bbf7..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/types.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/types" -) - -type Reference interface { - Reference() types.ManagedObjectReference -} - -func NewReference(c *vim25.Client, e types.ManagedObjectReference) Reference { - switch e.Type { - case "Folder": - return NewFolder(c, e) - case "StoragePod": - return &StoragePod{ - NewFolder(c, e), - } - case "Datacenter": - return NewDatacenter(c, e) - case "VirtualMachine": - return NewVirtualMachine(c, e) - case "VirtualApp": - return &VirtualApp{ - NewResourcePool(c, e), - } - case "ComputeResource": - return NewComputeResource(c, e) - case "ClusterComputeResource": - return NewClusterComputeResource(c, e) - case "HostSystem": - return NewHostSystem(c, e) - case "Network": - return NewNetwork(c, e) - case "OpaqueNetwork": - return NewOpaqueNetwork(c, e) - case "ResourcePool": - return NewResourcePool(c, e) - case "DistributedVirtualSwitch": - return NewDistributedVirtualSwitch(c, e) - case "VmwareDistributedVirtualSwitch": - return &VmwareDistributedVirtualSwitch{*NewDistributedVirtualSwitch(c, e)} - case "DistributedVirtualPortgroup": - return NewDistributedVirtualPortgroup(c, e) - case "Datastore": - return NewDatastore(c, e) - default: - panic("Unknown managed entity: " + e.Type) - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_app.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_app.go deleted file mode 100644 index b7311b3e39dd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_app.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type VirtualApp struct { - *ResourcePool -} - -func NewVirtualApp(c *vim25.Client, ref types.ManagedObjectReference) *VirtualApp { - return &VirtualApp{ - ResourcePool: NewResourcePool(c, ref), - } -} - -func (p VirtualApp) CreateChildVM(ctx context.Context, config types.VirtualMachineConfigSpec, host *HostSystem) (*Task, error) { - req := types.CreateChildVM_Task{ - This: p.Reference(), - Config: config, - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.CreateChildVM_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil -} - -func (p VirtualApp) UpdateConfig(ctx context.Context, spec types.VAppConfigSpec) error { - req := types.UpdateVAppConfig{ - This: p.Reference(), - Spec: spec, - } - - _, err := methods.UpdateVAppConfig(ctx, p.c, &req) - return err -} - -func (p VirtualApp) PowerOn(ctx context.Context) (*Task, error) { - req := types.PowerOnVApp_Task{ - This: p.Reference(), - } - - res, err := methods.PowerOnVApp_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil -} - -func (p VirtualApp) PowerOff(ctx context.Context, force bool) (*Task, error) { - req := types.PowerOffVApp_Task{ - This: p.Reference(), - Force: force, - } - - res, err := methods.PowerOffVApp_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil - -} - -func (p VirtualApp) Suspend(ctx context.Context) (*Task, error) { - req := types.SuspendVApp_Task{ - This: p.Reference(), - } - - res, err := methods.SuspendVApp_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil -} - -func (p VirtualApp) Clone(ctx context.Context, name string, target types.ManagedObjectReference, spec types.VAppCloneSpec) (*Task, error) { - req := types.CloneVApp_Task{ - This: p.Reference(), - Name: name, - Target: target, - Spec: spec, - } - - res, err := methods.CloneVApp_Task(ctx, p.c, &req) - if err != nil { - return nil, err - } - - return NewTask(p.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_device_list.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_device_list.go deleted file mode 100644 index 3765506532e8..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_device_list.go +++ /dev/null @@ -1,965 +0,0 @@ -/* -Copyright (c) 2015-2017 VMware, Inc. 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. -*/ - -package object - -import ( - "errors" - "fmt" - "math/rand" - "path/filepath" - "reflect" - "regexp" - "sort" - "strings" - - "github.com/vmware/govmomi/vim25/types" -) - -// Type values for use in BootOrder -const ( - DeviceTypeNone = "-" - DeviceTypeCdrom = "cdrom" - DeviceTypeDisk = "disk" - DeviceTypeEthernet = "ethernet" - DeviceTypeFloppy = "floppy" -) - -// VirtualDeviceList provides helper methods for working with a list of virtual devices. -type VirtualDeviceList []types.BaseVirtualDevice - -// SCSIControllerTypes are used for adding a new SCSI controller to a VM. -func SCSIControllerTypes() VirtualDeviceList { - // Return a mutable list of SCSI controller types, initialized with defaults. - return VirtualDeviceList([]types.BaseVirtualDevice{ - &types.VirtualLsiLogicController{}, - &types.VirtualBusLogicController{}, - &types.ParaVirtualSCSIController{}, - &types.VirtualLsiLogicSASController{}, - }).Select(func(device types.BaseVirtualDevice) bool { - c := device.(types.BaseVirtualSCSIController).GetVirtualSCSIController() - c.SharedBus = types.VirtualSCSISharingNoSharing - c.BusNumber = -1 - return true - }) -} - -// EthernetCardTypes are used for adding a new ethernet card to a VM. -func EthernetCardTypes() VirtualDeviceList { - return VirtualDeviceList([]types.BaseVirtualDevice{ - &types.VirtualE1000{}, - &types.VirtualE1000e{}, - &types.VirtualVmxnet2{}, - &types.VirtualVmxnet3{}, - &types.VirtualVmxnet3Vrdma{}, - &types.VirtualPCNet32{}, - &types.VirtualSriovEthernetCard{}, - }).Select(func(device types.BaseVirtualDevice) bool { - c := device.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() - c.GetVirtualDevice().Key = VirtualDeviceList{}.newRandomKey() - return true - }) -} - -// Select returns a new list containing all elements of the list for which the given func returns true. -func (l VirtualDeviceList) Select(f func(device types.BaseVirtualDevice) bool) VirtualDeviceList { - var found VirtualDeviceList - - for _, device := range l { - if f(device) { - found = append(found, device) - } - } - - return found -} - -// SelectByType returns a new list with devices that are equal to or extend the given type. -func (l VirtualDeviceList) SelectByType(deviceType types.BaseVirtualDevice) VirtualDeviceList { - dtype := reflect.TypeOf(deviceType) - if dtype == nil { - return nil - } - dname := dtype.Elem().Name() - - return l.Select(func(device types.BaseVirtualDevice) bool { - t := reflect.TypeOf(device) - - if t == dtype { - return true - } - - _, ok := t.Elem().FieldByName(dname) - - return ok - }) -} - -// SelectByBackingInfo returns a new list with devices matching the given backing info. -// If the value of backing is nil, any device with a backing of the same type will be returned. -func (l VirtualDeviceList) SelectByBackingInfo(backing types.BaseVirtualDeviceBackingInfo) VirtualDeviceList { - t := reflect.TypeOf(backing) - - return l.Select(func(device types.BaseVirtualDevice) bool { - db := device.GetVirtualDevice().Backing - if db == nil { - return false - } - - if reflect.TypeOf(db) != t { - return false - } - - if reflect.ValueOf(backing).IsNil() { - // selecting by backing type - return true - } - - switch a := db.(type) { - case *types.VirtualEthernetCardNetworkBackingInfo: - b := backing.(*types.VirtualEthernetCardNetworkBackingInfo) - return a.DeviceName == b.DeviceName - case *types.VirtualEthernetCardDistributedVirtualPortBackingInfo: - b := backing.(*types.VirtualEthernetCardDistributedVirtualPortBackingInfo) - return a.Port.SwitchUuid == b.Port.SwitchUuid && - a.Port.PortgroupKey == b.Port.PortgroupKey - case *types.VirtualEthernetCardOpaqueNetworkBackingInfo: - b := backing.(*types.VirtualEthernetCardOpaqueNetworkBackingInfo) - return a.OpaqueNetworkId == b.OpaqueNetworkId - case *types.VirtualDiskFlatVer2BackingInfo: - b := backing.(*types.VirtualDiskFlatVer2BackingInfo) - if a.Parent != nil && b.Parent != nil { - return a.Parent.FileName == b.Parent.FileName - } - return a.FileName == b.FileName - case *types.VirtualSerialPortURIBackingInfo: - b := backing.(*types.VirtualSerialPortURIBackingInfo) - return a.ServiceURI == b.ServiceURI - case types.BaseVirtualDeviceFileBackingInfo: - b := backing.(types.BaseVirtualDeviceFileBackingInfo) - return a.GetVirtualDeviceFileBackingInfo().FileName == b.GetVirtualDeviceFileBackingInfo().FileName - case *types.VirtualPCIPassthroughVmiopBackingInfo: - b := backing.(*types.VirtualPCIPassthroughVmiopBackingInfo) - return a.Vgpu == b.Vgpu - case *types.VirtualPCIPassthroughDynamicBackingInfo: - b := backing.(*types.VirtualPCIPassthroughDynamicBackingInfo) - if b.CustomLabel != "" && b.CustomLabel != a.CustomLabel { - return false - } - if len(b.AllowedDevice) == 0 { - return true - } - for _, x := range a.AllowedDevice { - for _, y := range b.AllowedDevice { - if x.DeviceId == y.DeviceId && x.VendorId == y.VendorId { - return true - } - } - } - return false - default: - return false - } - }) -} - -// Find returns the device matching the given name. -func (l VirtualDeviceList) Find(name string) types.BaseVirtualDevice { - for _, device := range l { - if l.Name(device) == name { - return device - } - } - return nil -} - -// FindByKey returns the device matching the given key. -func (l VirtualDeviceList) FindByKey(key int32) types.BaseVirtualDevice { - for _, device := range l { - if device.GetVirtualDevice().Key == key { - return device - } - } - return nil -} - -// FindIDEController will find the named IDE controller if given, otherwise will pick an available controller. -// An error is returned if the named controller is not found or not an IDE controller. Or, if name is not -// given and no available controller can be found. -func (l VirtualDeviceList) FindIDEController(name string) (*types.VirtualIDEController, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(*types.VirtualIDEController); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not an IDE controller", name) - } - - c := l.PickController((*types.VirtualIDEController)(nil)) - if c == nil { - return nil, errors.New("no available IDE controller") - } - - return c.(*types.VirtualIDEController), nil -} - -// CreateIDEController creates a new IDE controller. -func (l VirtualDeviceList) CreateIDEController() (types.BaseVirtualDevice, error) { - ide := &types.VirtualIDEController{} - ide.Key = l.NewKey() - return ide, nil -} - -// FindSCSIController will find the named SCSI controller if given, otherwise will pick an available controller. -// An error is returned if the named controller is not found or not an SCSI controller. Or, if name is not -// given and no available controller can be found. -func (l VirtualDeviceList) FindSCSIController(name string) (*types.VirtualSCSIController, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(types.BaseVirtualSCSIController); ok { - return c.GetVirtualSCSIController(), nil - } - return nil, fmt.Errorf("%s is not an SCSI controller", name) - } - - c := l.PickController((*types.VirtualSCSIController)(nil)) - if c == nil { - return nil, errors.New("no available SCSI controller") - } - - return c.(types.BaseVirtualSCSIController).GetVirtualSCSIController(), nil -} - -// CreateSCSIController creates a new SCSI controller of type name if given, otherwise defaults to lsilogic. -func (l VirtualDeviceList) CreateSCSIController(name string) (types.BaseVirtualDevice, error) { - ctypes := SCSIControllerTypes() - - if name == "" || name == "scsi" { - name = ctypes.Type(ctypes[0]) - } else if name == "virtualscsi" { - name = "pvscsi" // ovf VirtualSCSI mapping - } - - found := ctypes.Select(func(device types.BaseVirtualDevice) bool { - return l.Type(device) == name - }) - - if len(found) == 0 { - return nil, fmt.Errorf("unknown SCSI controller type '%s'", name) - } - - c, ok := found[0].(types.BaseVirtualSCSIController) - if !ok { - return nil, fmt.Errorf("invalid SCSI controller type '%s'", name) - } - - scsi := c.GetVirtualSCSIController() - scsi.BusNumber = l.newSCSIBusNumber() - scsi.Key = l.NewKey() - scsi.ScsiCtlrUnitNumber = 7 - return c.(types.BaseVirtualDevice), nil -} - -var scsiBusNumbers = []int{0, 1, 2, 3} - -// newSCSIBusNumber returns the bus number to use for adding a new SCSI bus device. -// -1 is returned if there are no bus numbers available. -func (l VirtualDeviceList) newSCSIBusNumber() int32 { - var used []int - - for _, d := range l.SelectByType((*types.VirtualSCSIController)(nil)) { - num := d.(types.BaseVirtualSCSIController).GetVirtualSCSIController().BusNumber - if num >= 0 { - used = append(used, int(num)) - } // else caller is creating a new vm using SCSIControllerTypes - } - - sort.Ints(used) - - for i, n := range scsiBusNumbers { - if i == len(used) || n != used[i] { - return int32(n) - } - } - - return -1 -} - -// FindNVMEController will find the named NVME controller if given, otherwise will pick an available controller. -// An error is returned if the named controller is not found or not an NVME controller. Or, if name is not -// given and no available controller can be found. -func (l VirtualDeviceList) FindNVMEController(name string) (*types.VirtualNVMEController, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(*types.VirtualNVMEController); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not an NVME controller", name) - } - - c := l.PickController((*types.VirtualNVMEController)(nil)) - if c == nil { - return nil, errors.New("no available NVME controller") - } - - return c.(*types.VirtualNVMEController), nil -} - -// CreateNVMEController creates a new NVMWE controller. -func (l VirtualDeviceList) CreateNVMEController() (types.BaseVirtualDevice, error) { - nvme := &types.VirtualNVMEController{} - nvme.BusNumber = l.newNVMEBusNumber() - nvme.Key = l.NewKey() - - return nvme, nil -} - -var nvmeBusNumbers = []int{0, 1, 2, 3} - -// newNVMEBusNumber returns the bus number to use for adding a new NVME bus device. -// -1 is returned if there are no bus numbers available. -func (l VirtualDeviceList) newNVMEBusNumber() int32 { - var used []int - - for _, d := range l.SelectByType((*types.VirtualNVMEController)(nil)) { - num := d.(types.BaseVirtualController).GetVirtualController().BusNumber - if num >= 0 { - used = append(used, int(num)) - } // else caller is creating a new vm using NVMEControllerTypes - } - - sort.Ints(used) - - for i, n := range nvmeBusNumbers { - if i == len(used) || n != used[i] { - return int32(n) - } - } - - return -1 -} - -// FindDiskController will find an existing ide or scsi disk controller. -func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualController, error) { - switch { - case name == "ide": - return l.FindIDEController("") - case name == "scsi" || name == "": - return l.FindSCSIController("") - case name == "nvme": - return l.FindNVMEController("") - default: - if c, ok := l.Find(name).(types.BaseVirtualController); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not a valid controller", name) - } -} - -// PickController returns a controller of the given type(s). -// If no controllers are found or have no available slots, then nil is returned. -func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) types.BaseVirtualController { - l = l.SelectByType(kind.(types.BaseVirtualDevice)).Select(func(device types.BaseVirtualDevice) bool { - num := len(device.(types.BaseVirtualController).GetVirtualController().Device) - - switch device.(type) { - case types.BaseVirtualSCSIController: - return num < 15 - case *types.VirtualIDEController: - return num < 2 - case *types.VirtualNVMEController: - return num < 8 - default: - return true - } - }) - - if len(l) == 0 { - return nil - } - - return l[0].(types.BaseVirtualController) -} - -// newUnitNumber returns the unit number to use for attaching a new device to the given controller. -func (l VirtualDeviceList) newUnitNumber(c types.BaseVirtualController) int32 { - units := make([]bool, 30) - - switch sc := c.(type) { - case types.BaseVirtualSCSIController: - // The SCSI controller sits on its own bus - units[sc.GetVirtualSCSIController().ScsiCtlrUnitNumber] = true - } - - key := c.GetVirtualController().Key - - for _, device := range l { - d := device.GetVirtualDevice() - - if d.ControllerKey == key && d.UnitNumber != nil { - units[int(*d.UnitNumber)] = true - } - } - - for unit, used := range units { - if !used { - return int32(unit) - } - } - - return -1 -} - -// NewKey returns the key to use for adding a new device to the device list. -// The device list we're working with here may not be complete (e.g. when -// we're only adding new devices), so any positive keys could conflict with device keys -// that are already in use. To avoid this type of conflict, we can use negative keys -// here, which will be resolved to positive keys by vSphere as the reconfiguration is done. -func (l VirtualDeviceList) NewKey() int32 { - var key int32 = -200 - - for _, device := range l { - d := device.GetVirtualDevice() - if d.Key < key { - key = d.Key - } - } - - return key - 1 -} - -// AssignController assigns a device to a controller. -func (l VirtualDeviceList) AssignController(device types.BaseVirtualDevice, c types.BaseVirtualController) { - d := device.GetVirtualDevice() - d.ControllerKey = c.GetVirtualController().Key - d.UnitNumber = new(int32) - *d.UnitNumber = l.newUnitNumber(c) - if d.Key == 0 { - d.Key = l.newRandomKey() - } -} - -// newRandomKey returns a random negative device key. -// The generated key can be used for devices you want to add so that it does not collide with existing ones. -func (l VirtualDeviceList) newRandomKey() int32 { - // NOTE: rand.Uint32 cannot be used here because conversion from uint32 to int32 may change the sign - key := rand.Int31() * -1 - if key == 0 { - return -1 - } - - return key -} - -// CreateDisk creates a new VirtualDisk device which can be added to a VM. -func (l VirtualDeviceList) CreateDisk(c types.BaseVirtualController, ds types.ManagedObjectReference, name string) *types.VirtualDisk { - // If name is not specified, one will be chosen for you. - // But if when given, make sure it ends in .vmdk, otherwise it will be treated as a directory. - if len(name) > 0 && filepath.Ext(name) != ".vmdk" { - name += ".vmdk" - } - - device := &types.VirtualDisk{ - VirtualDevice: types.VirtualDevice{ - Backing: &types.VirtualDiskFlatVer2BackingInfo{ - DiskMode: string(types.VirtualDiskModePersistent), - ThinProvisioned: types.NewBool(true), - VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ - FileName: name, - Datastore: &ds, - }, - }, - }, - } - - l.AssignController(device, c) - return device -} - -// ChildDisk creates a new VirtualDisk device, linked to the given parent disk, which can be added to a VM. -func (l VirtualDeviceList) ChildDisk(parent *types.VirtualDisk) *types.VirtualDisk { - disk := *parent - backing := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) - p := new(DatastorePath) - p.FromString(backing.FileName) - p.Path = "" - - // Use specified disk as parent backing to a new disk. - disk.Backing = &types.VirtualDiskFlatVer2BackingInfo{ - VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ - FileName: p.String(), - Datastore: backing.Datastore, - }, - Parent: backing, - DiskMode: backing.DiskMode, - ThinProvisioned: backing.ThinProvisioned, - } - - return &disk -} - -func (l VirtualDeviceList) connectivity(device types.BaseVirtualDevice, v bool) error { - c := device.GetVirtualDevice().Connectable - if c == nil { - return fmt.Errorf("%s is not connectable", l.Name(device)) - } - - c.Connected = v - c.StartConnected = v - - return nil -} - -// Connect changes the device to connected, returns an error if the device is not connectable. -func (l VirtualDeviceList) Connect(device types.BaseVirtualDevice) error { - return l.connectivity(device, true) -} - -// Disconnect changes the device to disconnected, returns an error if the device is not connectable. -func (l VirtualDeviceList) Disconnect(device types.BaseVirtualDevice) error { - return l.connectivity(device, false) -} - -// FindCdrom finds a cdrom device with the given name, defaulting to the first cdrom device if any. -func (l VirtualDeviceList) FindCdrom(name string) (*types.VirtualCdrom, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(*types.VirtualCdrom); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not a cdrom device", name) - } - - c := l.SelectByType((*types.VirtualCdrom)(nil)) - if len(c) == 0 { - return nil, errors.New("no cdrom device found") - } - - return c[0].(*types.VirtualCdrom), nil -} - -// CreateCdrom creates a new VirtualCdrom device which can be added to a VM. -func (l VirtualDeviceList) CreateCdrom(c *types.VirtualIDEController) (*types.VirtualCdrom, error) { - device := &types.VirtualCdrom{} - - l.AssignController(device, c) - - l.setDefaultCdromBacking(device) - - device.Connectable = &types.VirtualDeviceConnectInfo{ - AllowGuestControl: true, - Connected: true, - StartConnected: true, - } - - return device, nil -} - -// InsertIso changes the cdrom device backing to use the given iso file. -func (l VirtualDeviceList) InsertIso(device *types.VirtualCdrom, iso string) *types.VirtualCdrom { - device.Backing = &types.VirtualCdromIsoBackingInfo{ - VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ - FileName: iso, - }, - } - - return device -} - -// EjectIso removes the iso file based backing and replaces with the default cdrom backing. -func (l VirtualDeviceList) EjectIso(device *types.VirtualCdrom) *types.VirtualCdrom { - l.setDefaultCdromBacking(device) - return device -} - -func (l VirtualDeviceList) setDefaultCdromBacking(device *types.VirtualCdrom) { - device.Backing = &types.VirtualCdromAtapiBackingInfo{ - VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ - DeviceName: fmt.Sprintf("%s-%d-%d", DeviceTypeCdrom, device.ControllerKey, device.UnitNumber), - UseAutoDetect: types.NewBool(false), - }, - } -} - -// FindFloppy finds a floppy device with the given name, defaulting to the first floppy device if any. -func (l VirtualDeviceList) FindFloppy(name string) (*types.VirtualFloppy, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(*types.VirtualFloppy); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not a floppy device", name) - } - - c := l.SelectByType((*types.VirtualFloppy)(nil)) - if len(c) == 0 { - return nil, errors.New("no floppy device found") - } - - return c[0].(*types.VirtualFloppy), nil -} - -// CreateFloppy creates a new VirtualFloppy device which can be added to a VM. -func (l VirtualDeviceList) CreateFloppy() (*types.VirtualFloppy, error) { - device := &types.VirtualFloppy{} - - c := l.PickController((*types.VirtualSIOController)(nil)) - if c == nil { - return nil, errors.New("no available SIO controller") - } - - l.AssignController(device, c) - - l.setDefaultFloppyBacking(device) - - device.Connectable = &types.VirtualDeviceConnectInfo{ - AllowGuestControl: true, - Connected: true, - StartConnected: true, - } - - return device, nil -} - -// InsertImg changes the floppy device backing to use the given img file. -func (l VirtualDeviceList) InsertImg(device *types.VirtualFloppy, img string) *types.VirtualFloppy { - device.Backing = &types.VirtualFloppyImageBackingInfo{ - VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ - FileName: img, - }, - } - - return device -} - -// EjectImg removes the img file based backing and replaces with the default floppy backing. -func (l VirtualDeviceList) EjectImg(device *types.VirtualFloppy) *types.VirtualFloppy { - l.setDefaultFloppyBacking(device) - return device -} - -func (l VirtualDeviceList) setDefaultFloppyBacking(device *types.VirtualFloppy) { - device.Backing = &types.VirtualFloppyDeviceBackingInfo{ - VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ - DeviceName: fmt.Sprintf("%s-%d", DeviceTypeFloppy, device.UnitNumber), - UseAutoDetect: types.NewBool(false), - }, - } -} - -// FindSerialPort finds a serial port device with the given name, defaulting to the first serial port device if any. -func (l VirtualDeviceList) FindSerialPort(name string) (*types.VirtualSerialPort, error) { - if name != "" { - d := l.Find(name) - if d == nil { - return nil, fmt.Errorf("device '%s' not found", name) - } - if c, ok := d.(*types.VirtualSerialPort); ok { - return c, nil - } - return nil, fmt.Errorf("%s is not a serial port device", name) - } - - c := l.SelectByType((*types.VirtualSerialPort)(nil)) - if len(c) == 0 { - return nil, errors.New("no serial port device found") - } - - return c[0].(*types.VirtualSerialPort), nil -} - -// CreateSerialPort creates a new VirtualSerialPort device which can be added to a VM. -func (l VirtualDeviceList) CreateSerialPort() (*types.VirtualSerialPort, error) { - device := &types.VirtualSerialPort{ - YieldOnPoll: true, - } - - c := l.PickController((*types.VirtualSIOController)(nil)) - if c == nil { - return nil, errors.New("no available SIO controller") - } - - l.AssignController(device, c) - - l.setDefaultSerialPortBacking(device) - - return device, nil -} - -// ConnectSerialPort connects a serial port to a server or client uri. -func (l VirtualDeviceList) ConnectSerialPort(device *types.VirtualSerialPort, uri string, client bool, proxyuri string) *types.VirtualSerialPort { - if strings.HasPrefix(uri, "[") { - device.Backing = &types.VirtualSerialPortFileBackingInfo{ - VirtualDeviceFileBackingInfo: types.VirtualDeviceFileBackingInfo{ - FileName: uri, - }, - } - - return device - } - - direction := types.VirtualDeviceURIBackingOptionDirectionServer - if client { - direction = types.VirtualDeviceURIBackingOptionDirectionClient - } - - device.Backing = &types.VirtualSerialPortURIBackingInfo{ - VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ - Direction: string(direction), - ServiceURI: uri, - ProxyURI: proxyuri, - }, - } - - return device -} - -// DisconnectSerialPort disconnects the serial port backing. -func (l VirtualDeviceList) DisconnectSerialPort(device *types.VirtualSerialPort) *types.VirtualSerialPort { - l.setDefaultSerialPortBacking(device) - return device -} - -func (l VirtualDeviceList) setDefaultSerialPortBacking(device *types.VirtualSerialPort) { - device.Backing = &types.VirtualSerialPortURIBackingInfo{ - VirtualDeviceURIBackingInfo: types.VirtualDeviceURIBackingInfo{ - Direction: "client", - ServiceURI: "localhost:0", - }, - } -} - -// CreateEthernetCard creates a new VirtualEthernetCard of the given name name and initialized with the given backing. -func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVirtualDeviceBackingInfo) (types.BaseVirtualDevice, error) { - ctypes := EthernetCardTypes() - - if name == "" { - name = ctypes.deviceName(ctypes[0]) - } - - found := ctypes.Select(func(device types.BaseVirtualDevice) bool { - return l.deviceName(device) == name - }) - - if len(found) == 0 { - return nil, fmt.Errorf("unknown ethernet card type '%s'", name) - } - - c, ok := found[0].(types.BaseVirtualEthernetCard) - if !ok { - return nil, fmt.Errorf("invalid ethernet card type '%s'", name) - } - - c.GetVirtualEthernetCard().Backing = backing - - return c.(types.BaseVirtualDevice), nil -} - -// PrimaryMacAddress returns the MacAddress field of the primary VirtualEthernetCard -func (l VirtualDeviceList) PrimaryMacAddress() string { - eth0 := l.Find("ethernet-0") - - if eth0 == nil { - return "" - } - - return eth0.(types.BaseVirtualEthernetCard).GetVirtualEthernetCard().MacAddress -} - -// convert a BaseVirtualDevice to a BaseVirtualMachineBootOptionsBootableDevice -var bootableDevices = map[string]func(device types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice{ - DeviceTypeNone: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { - return &types.VirtualMachineBootOptionsBootableDevice{} - }, - DeviceTypeCdrom: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { - return &types.VirtualMachineBootOptionsBootableCdromDevice{} - }, - DeviceTypeDisk: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { - return &types.VirtualMachineBootOptionsBootableDiskDevice{ - DeviceKey: d.GetVirtualDevice().Key, - } - }, - DeviceTypeEthernet: func(d types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { - return &types.VirtualMachineBootOptionsBootableEthernetDevice{ - DeviceKey: d.GetVirtualDevice().Key, - } - }, - DeviceTypeFloppy: func(types.BaseVirtualDevice) types.BaseVirtualMachineBootOptionsBootableDevice { - return &types.VirtualMachineBootOptionsBootableFloppyDevice{} - }, -} - -// BootOrder returns a list of devices which can be used to set boot order via VirtualMachine.SetBootOptions. -// The order can be any of "ethernet", "cdrom", "floppy" or "disk" or by specific device name. -// A value of "-" will clear the existing boot order on the VC/ESX side. -func (l VirtualDeviceList) BootOrder(order []string) []types.BaseVirtualMachineBootOptionsBootableDevice { - var devices []types.BaseVirtualMachineBootOptionsBootableDevice - - for _, name := range order { - if kind, ok := bootableDevices[name]; ok { - if name == DeviceTypeNone { - // Not covered in the API docs, nor obvious, but this clears the boot order on the VC/ESX side. - devices = append(devices, new(types.VirtualMachineBootOptionsBootableDevice)) - continue - } - - for _, device := range l { - if l.Type(device) == name { - devices = append(devices, kind(device)) - } - } - continue - } - - if d := l.Find(name); d != nil { - if kind, ok := bootableDevices[l.Type(d)]; ok { - devices = append(devices, kind(d)) - } - } - } - - return devices -} - -// SelectBootOrder returns an ordered list of devices matching the given bootable device order -func (l VirtualDeviceList) SelectBootOrder(order []types.BaseVirtualMachineBootOptionsBootableDevice) VirtualDeviceList { - var devices VirtualDeviceList - - for _, bd := range order { - for _, device := range l { - if kind, ok := bootableDevices[l.Type(device)]; ok { - if reflect.DeepEqual(kind(device), bd) { - devices = append(devices, device) - } - } - } - } - - return devices -} - -// TypeName returns the vmodl type name of the device -func (l VirtualDeviceList) TypeName(device types.BaseVirtualDevice) string { - dtype := reflect.TypeOf(device) - if dtype == nil { - return "" - } - return dtype.Elem().Name() -} - -var deviceNameRegexp = regexp.MustCompile(`(?:Virtual)?(?:Machine)?(\w+?)(?:Card|EthernetCard|Device|Controller)?$`) - -func (l VirtualDeviceList) deviceName(device types.BaseVirtualDevice) string { - name := "device" - typeName := l.TypeName(device) - - m := deviceNameRegexp.FindStringSubmatch(typeName) - if len(m) == 2 { - name = strings.ToLower(m[1]) - } - - return name -} - -// Type returns a human-readable name for the given device -func (l VirtualDeviceList) Type(device types.BaseVirtualDevice) string { - switch device.(type) { - case types.BaseVirtualEthernetCard: - return DeviceTypeEthernet - case *types.ParaVirtualSCSIController: - return "pvscsi" - case *types.VirtualLsiLogicSASController: - return "lsilogic-sas" - case *types.VirtualNVMEController: - return "nvme" - case *types.VirtualPrecisionClock: - return "clock" - default: - return l.deviceName(device) - } -} - -// Name returns a stable, human-readable name for the given device -func (l VirtualDeviceList) Name(device types.BaseVirtualDevice) string { - var key string - var UnitNumber int32 - d := device.GetVirtualDevice() - if d.UnitNumber != nil { - UnitNumber = *d.UnitNumber - } - - dtype := l.Type(device) - switch dtype { - case DeviceTypeEthernet: - // Ethernet devices of UnitNumber 7-19 are non-SRIOV. Ethernet devices of - // UnitNumber 45-36 descending are SRIOV - if UnitNumber <= 45 && UnitNumber >= 36 { - key = fmt.Sprintf("sriov-%d", 45-UnitNumber) - } else { - key = fmt.Sprintf("%d", UnitNumber-7) - } - case DeviceTypeDisk: - key = fmt.Sprintf("%d-%d", d.ControllerKey, UnitNumber) - default: - key = fmt.Sprintf("%d", d.Key) - } - - return fmt.Sprintf("%s-%s", dtype, key) -} - -// ConfigSpec creates a virtual machine configuration spec for -// the specified operation, for the list of devices in the device list. -func (l VirtualDeviceList) ConfigSpec(op types.VirtualDeviceConfigSpecOperation) ([]types.BaseVirtualDeviceConfigSpec, error) { - var fop types.VirtualDeviceConfigSpecFileOperation - switch op { - case types.VirtualDeviceConfigSpecOperationAdd: - fop = types.VirtualDeviceConfigSpecFileOperationCreate - case types.VirtualDeviceConfigSpecOperationEdit: - fop = types.VirtualDeviceConfigSpecFileOperationReplace - case types.VirtualDeviceConfigSpecOperationRemove: - fop = types.VirtualDeviceConfigSpecFileOperationDestroy - default: - panic("unknown op") - } - - var res []types.BaseVirtualDeviceConfigSpec - for _, device := range l { - config := &types.VirtualDeviceConfigSpec{ - Device: device, - Operation: op, - FileOperation: diskFileOperation(op, fop, device), - } - - res = append(res, config) - } - - return res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go deleted file mode 100644 index 72439caf9c0c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type VirtualDiskManager struct { - Common -} - -func NewVirtualDiskManager(c *vim25.Client) *VirtualDiskManager { - m := VirtualDiskManager{ - Common: NewCommon(c, *c.ServiceContent.VirtualDiskManager), - } - - return &m -} - -// CopyVirtualDisk copies a virtual disk, performing conversions as specified in the spec. -func (m VirtualDiskManager) CopyVirtualDisk( - ctx context.Context, - sourceName string, sourceDatacenter *Datacenter, - destName string, destDatacenter *Datacenter, - destSpec *types.VirtualDiskSpec, force bool) (*Task, error) { - - req := types.CopyVirtualDisk_Task{ - This: m.Reference(), - SourceName: sourceName, - DestName: destName, - DestSpec: destSpec, - Force: types.NewBool(force), - } - - if sourceDatacenter != nil { - ref := sourceDatacenter.Reference() - req.SourceDatacenter = &ref - } - - if destDatacenter != nil { - ref := destDatacenter.Reference() - req.DestDatacenter = &ref - } - - res, err := methods.CopyVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// CreateVirtualDisk creates a new virtual disk. -func (m VirtualDiskManager) CreateVirtualDisk( - ctx context.Context, - name string, datacenter *Datacenter, - spec types.BaseVirtualDiskSpec) (*Task, error) { - - req := types.CreateVirtualDisk_Task{ - This: m.Reference(), - Name: name, - Spec: spec, - } - - if datacenter != nil { - ref := datacenter.Reference() - req.Datacenter = &ref - } - - res, err := methods.CreateVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// MoveVirtualDisk moves a virtual disk. -func (m VirtualDiskManager) MoveVirtualDisk( - ctx context.Context, - sourceName string, sourceDatacenter *Datacenter, - destName string, destDatacenter *Datacenter, - force bool) (*Task, error) { - req := types.MoveVirtualDisk_Task{ - This: m.Reference(), - SourceName: sourceName, - DestName: destName, - Force: types.NewBool(force), - } - - if sourceDatacenter != nil { - ref := sourceDatacenter.Reference() - req.SourceDatacenter = &ref - } - - if destDatacenter != nil { - ref := destDatacenter.Reference() - req.DestDatacenter = &ref - } - - res, err := methods.MoveVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// DeleteVirtualDisk deletes a virtual disk. -func (m VirtualDiskManager) DeleteVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) { - req := types.DeleteVirtualDisk_Task{ - This: m.Reference(), - Name: name, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.DeleteVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// InflateVirtualDisk inflates a virtual disk. -func (m VirtualDiskManager) InflateVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) { - req := types.InflateVirtualDisk_Task{ - This: m.Reference(), - Name: name, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.InflateVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// ShrinkVirtualDisk shrinks a virtual disk. -func (m VirtualDiskManager) ShrinkVirtualDisk(ctx context.Context, name string, dc *Datacenter, copy *bool) (*Task, error) { - req := types.ShrinkVirtualDisk_Task{ - This: m.Reference(), - Name: name, - Copy: copy, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.ShrinkVirtualDisk_Task(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return NewTask(m.c, res.Returnval), nil -} - -// Queries virtual disk uuid -func (m VirtualDiskManager) QueryVirtualDiskUuid(ctx context.Context, name string, dc *Datacenter) (string, error) { - req := types.QueryVirtualDiskUuid{ - This: m.Reference(), - Name: name, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := methods.QueryVirtualDiskUuid(ctx, m.c, &req) - if err != nil { - return "", err - } - - if res == nil { - return "", nil - } - - return res.Returnval, nil -} - -func (m VirtualDiskManager) SetVirtualDiskUuid(ctx context.Context, name string, dc *Datacenter, uuid string) error { - req := types.SetVirtualDiskUuid{ - This: m.Reference(), - Name: name, - Uuid: uuid, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - _, err := methods.SetVirtualDiskUuid(ctx, m.c, &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go deleted file mode 100644 index faa9ecad5c3c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_disk_manager_internal.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "reflect" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -func init() { - types.Add("ArrayOfVirtualDiskInfo", reflect.TypeOf((*arrayOfVirtualDiskInfo)(nil)).Elem()) - - types.Add("VirtualDiskInfo", reflect.TypeOf((*VirtualDiskInfo)(nil)).Elem()) -} - -type arrayOfVirtualDiskInfo struct { - VirtualDiskInfo []VirtualDiskInfo `xml:"VirtualDiskInfo,omitempty"` -} - -type queryVirtualDiskInfoTaskRequest struct { - This types.ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *types.ManagedObjectReference `xml:"datacenter,omitempty"` - IncludeParents bool `xml:"includeParents"` -} - -type queryVirtualDiskInfoTaskResponse struct { - Returnval types.ManagedObjectReference `xml:"returnval"` -} - -type queryVirtualDiskInfoTaskBody struct { - Req *queryVirtualDiskInfoTaskRequest `xml:"urn:internalvim25 QueryVirtualDiskInfo_Task,omitempty"` - Res *queryVirtualDiskInfoTaskResponse `xml:"urn:vim25 QueryVirtualDiskInfo_TaskResponse,omitempty"` - InternalRes *queryVirtualDiskInfoTaskResponse `xml:"urn:internalvim25 QueryVirtualDiskInfo_TaskResponse,omitempty"` - Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *queryVirtualDiskInfoTaskBody) Fault() *soap.Fault { return b.Err } - -func queryVirtualDiskInfoTask(ctx context.Context, r soap.RoundTripper, req *queryVirtualDiskInfoTaskRequest) (*queryVirtualDiskInfoTaskResponse, error) { - var reqBody, resBody queryVirtualDiskInfoTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - if resBody.Res != nil { - return resBody.Res, nil - } - - return resBody.InternalRes, nil -} - -type VirtualDiskInfo struct { - Name string `xml:"unit>name"` - DiskType string `xml:"diskType"` - Parent string `xml:"parent,omitempty"` -} - -func (m VirtualDiskManager) QueryVirtualDiskInfo(ctx context.Context, name string, dc *Datacenter, includeParents bool) ([]VirtualDiskInfo, error) { - req := queryVirtualDiskInfoTaskRequest{ - This: m.Reference(), - Name: name, - IncludeParents: includeParents, - } - - if dc != nil { - ref := dc.Reference() - req.Datacenter = &ref - } - - res, err := queryVirtualDiskInfoTask(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - info, err := NewTask(m.Client(), res.Returnval).WaitForResult(ctx, nil) - if err != nil { - return nil, err - } - - return info.Result.(arrayOfVirtualDiskInfo).VirtualDiskInfo, nil -} - -type createChildDiskTaskRequest struct { - This types.ManagedObjectReference `xml:"_this"` - ChildName string `xml:"childName"` - ChildDatacenter *types.ManagedObjectReference `xml:"childDatacenter,omitempty"` - ParentName string `xml:"parentName"` - ParentDatacenter *types.ManagedObjectReference `xml:"parentDatacenter,omitempty"` - IsLinkedClone bool `xml:"isLinkedClone"` -} - -type createChildDiskTaskResponse struct { - Returnval types.ManagedObjectReference `xml:"returnval"` -} - -type createChildDiskTaskBody struct { - Req *createChildDiskTaskRequest `xml:"urn:internalvim25 CreateChildDisk_Task,omitempty"` - Res *createChildDiskTaskResponse `xml:"urn:vim25 CreateChildDisk_TaskResponse,omitempty"` - InternalRes *createChildDiskTaskResponse `xml:"urn:internalvim25 CreateChildDisk_TaskResponse,omitempty"` - Err *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *createChildDiskTaskBody) Fault() *soap.Fault { return b.Err } - -func createChildDiskTask(ctx context.Context, r soap.RoundTripper, req *createChildDiskTaskRequest) (*createChildDiskTaskResponse, error) { - var reqBody, resBody createChildDiskTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - if resBody.Res != nil { - return resBody.Res, nil // vim-version <= 6.5 - } - - return resBody.InternalRes, nil // vim-version >= 6.7 -} - -func (m VirtualDiskManager) CreateChildDisk(ctx context.Context, parent string, pdc *Datacenter, name string, dc *Datacenter, linked bool) (*Task, error) { - req := createChildDiskTaskRequest{ - This: m.Reference(), - ChildName: name, - ParentName: parent, - IsLinkedClone: linked, - } - - if dc != nil { - ref := dc.Reference() - req.ChildDatacenter = &ref - } - - if pdc != nil { - ref := pdc.Reference() - req.ParentDatacenter = &ref - } - - res, err := createChildDiskTask(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(m.Client(), res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_machine.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_machine.go deleted file mode 100644 index eeffc19fd3c5..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/virtual_machine.go +++ /dev/null @@ -1,1082 +0,0 @@ -/* -Copyright (c) 2015-2021 VMware, Inc. 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. -*/ - -package object - -import ( - "context" - "errors" - "fmt" - "net" - "path" - "strings" - - "github.com/vmware/govmomi/nfc" - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -const ( - PropRuntimePowerState = "summary.runtime.powerState" - PropConfigTemplate = "summary.config.template" -) - -type VirtualMachine struct { - Common -} - -// extractDiskLayoutFiles is a helper function used to extract file keys for -// all disk files attached to the virtual machine at the current point of -// running. -func extractDiskLayoutFiles(diskLayoutList []types.VirtualMachineFileLayoutExDiskLayout) []int { - var result []int - - for _, layoutExDisk := range diskLayoutList { - for _, link := range layoutExDisk.Chain { - for i := range link.FileKey { // diskDescriptor, diskExtent pairs - result = append(result, int(link.FileKey[i])) - } - } - } - - return result -} - -// removeKey is a helper function for removing a specific file key from a list -// of keys associated with disks attached to a virtual machine. -func removeKey(l *[]int, key int) { - for i, k := range *l { - if k == key { - *l = append((*l)[:i], (*l)[i+1:]...) - break - } - } -} - -func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *VirtualMachine { - return &VirtualMachine{ - Common: NewCommon(c, ref), - } -} - -func (v VirtualMachine) PowerState(ctx context.Context) (types.VirtualMachinePowerState, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{PropRuntimePowerState}, &o) - if err != nil { - return "", err - } - - return o.Summary.Runtime.PowerState, nil -} - -func (v VirtualMachine) IsTemplate(ctx context.Context) (bool, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{PropConfigTemplate}, &o) - if err != nil { - return false, err - } - - return o.Summary.Config.Template, nil -} - -func (v VirtualMachine) PowerOn(ctx context.Context) (*Task, error) { - req := types.PowerOnVM_Task{ - This: v.Reference(), - } - - res, err := methods.PowerOnVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) PowerOff(ctx context.Context) (*Task, error) { - req := types.PowerOffVM_Task{ - This: v.Reference(), - } - - res, err := methods.PowerOffVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) PutUsbScanCodes(ctx context.Context, spec types.UsbScanCodeSpec) (int32, error) { - req := types.PutUsbScanCodes{ - This: v.Reference(), - Spec: spec, - } - - res, err := methods.PutUsbScanCodes(ctx, v.c, &req) - if err != nil { - return 0, err - } - - return res.Returnval, nil -} - -func (v VirtualMachine) Reset(ctx context.Context) (*Task, error) { - req := types.ResetVM_Task{ - This: v.Reference(), - } - - res, err := methods.ResetVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Suspend(ctx context.Context) (*Task, error) { - req := types.SuspendVM_Task{ - This: v.Reference(), - } - - res, err := methods.SuspendVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) ShutdownGuest(ctx context.Context) error { - req := types.ShutdownGuest{ - This: v.Reference(), - } - - _, err := methods.ShutdownGuest(ctx, v.c, &req) - return err -} - -func (v VirtualMachine) RebootGuest(ctx context.Context) error { - req := types.RebootGuest{ - This: v.Reference(), - } - - _, err := methods.RebootGuest(ctx, v.c, &req) - return err -} - -func (v VirtualMachine) Destroy(ctx context.Context) (*Task, error) { - req := types.Destroy_Task{ - This: v.Reference(), - } - - res, err := methods.Destroy_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Clone(ctx context.Context, folder *Folder, name string, config types.VirtualMachineCloneSpec) (*Task, error) { - req := types.CloneVM_Task{ - This: v.Reference(), - Folder: folder.Reference(), - Name: name, - Spec: config, - } - - res, err := methods.CloneVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) InstantClone(ctx context.Context, config types.VirtualMachineInstantCloneSpec) (*Task, error) { - req := types.InstantClone_Task{ - This: v.Reference(), - Spec: config, - } - - res, err := methods.InstantClone_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Customize(ctx context.Context, spec types.CustomizationSpec) (*Task, error) { - req := types.CustomizeVM_Task{ - This: v.Reference(), - Spec: spec, - } - - res, err := methods.CustomizeVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Relocate(ctx context.Context, config types.VirtualMachineRelocateSpec, priority types.VirtualMachineMovePriority) (*Task, error) { - req := types.RelocateVM_Task{ - This: v.Reference(), - Spec: config, - Priority: priority, - } - - res, err := methods.RelocateVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Reconfigure(ctx context.Context, config types.VirtualMachineConfigSpec) (*Task, error) { - req := types.ReconfigVM_Task{ - This: v.Reference(), - Spec: config, - } - - res, err := methods.ReconfigVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) RefreshStorageInfo(ctx context.Context) error { - req := types.RefreshStorageInfo{ - This: v.Reference(), - } - - _, err := methods.RefreshStorageInfo(ctx, v.c, &req) - return err -} - -// WaitForIP waits for the VM guest.ipAddress property to report an IP address. -// Waits for an IPv4 address if the v4 param is true. -func (v VirtualMachine) WaitForIP(ctx context.Context, v4 ...bool) (string, error) { - var ip string - - p := property.DefaultCollector(v.c) - err := property.Wait(ctx, p, v.Reference(), []string{"guest.ipAddress"}, func(pc []types.PropertyChange) bool { - for _, c := range pc { - if c.Name != "guest.ipAddress" { - continue - } - if c.Op != types.PropertyChangeOpAssign { - continue - } - if c.Val == nil { - continue - } - - ip = c.Val.(string) - if len(v4) == 1 && v4[0] { - if net.ParseIP(ip).To4() == nil { - return false - } - } - return true - } - - return false - }) - - if err != nil { - return "", err - } - - return ip, nil -} - -// WaitForNetIP waits for the VM guest.net property to report an IP address for all VM NICs. -// Only consider IPv4 addresses if the v4 param is true. -// By default, wait for all NICs to get an IP address, unless 1 or more device is given. -// A device can be specified by the MAC address or the device name, e.g. "ethernet-0". -// Returns a map with MAC address as the key and IP address list as the value. -func (v VirtualMachine) WaitForNetIP(ctx context.Context, v4 bool, device ...string) (map[string][]string, error) { - macs := make(map[string][]string) - eths := make(map[string]string) - - p := property.DefaultCollector(v.c) - - // Wait for all NICs to have a MacAddress, which may not be generated yet. - err := property.Wait(ctx, p, v.Reference(), []string{"config.hardware.device"}, func(pc []types.PropertyChange) bool { - for _, c := range pc { - if c.Op != types.PropertyChangeOpAssign { - continue - } - - devices := VirtualDeviceList(c.Val.(types.ArrayOfVirtualDevice).VirtualDevice) - for _, d := range devices { - if nic, ok := d.(types.BaseVirtualEthernetCard); ok { - // Convert to lower so that e.g. 00:50:56:83:3A:5D is treated the - // same as 00:50:56:83:3a:5d - mac := strings.ToLower(nic.GetVirtualEthernetCard().MacAddress) - if mac == "" { - return false - } - macs[mac] = nil - eths[devices.Name(d)] = mac - } - } - } - - return true - }) - - if err != nil { - return nil, err - } - - if len(device) != 0 { - // Only wait for specific NIC(s) - macs = make(map[string][]string) - for _, mac := range device { - if eth, ok := eths[mac]; ok { - mac = eth // device name, e.g. "ethernet-0" - } - macs[mac] = nil - } - } - - err = property.Wait(ctx, p, v.Reference(), []string{"guest.net"}, func(pc []types.PropertyChange) bool { - for _, c := range pc { - if c.Op != types.PropertyChangeOpAssign { - continue - } - - nics := c.Val.(types.ArrayOfGuestNicInfo).GuestNicInfo - for _, nic := range nics { - // Convert to lower so that e.g. 00:50:56:83:3A:5D is treated the - // same as 00:50:56:83:3a:5d - mac := strings.ToLower(nic.MacAddress) - if mac == "" || nic.IpConfig == nil { - continue - } - - for _, ip := range nic.IpConfig.IpAddress { - if _, ok := macs[mac]; !ok { - continue // Ignore any that don't correspond to a VM device - } - if v4 && net.ParseIP(ip.IpAddress).To4() == nil { - continue // Ignore non IPv4 address - } - macs[mac] = append(macs[mac], ip.IpAddress) - } - } - } - - for _, ips := range macs { - if len(ips) == 0 { - return false - } - } - - return true - }) - - if err != nil { - return nil, err - } - - return macs, nil -} - -// Device returns the VirtualMachine's config.hardware.device property. -func (v VirtualMachine) Device(ctx context.Context) (VirtualDeviceList, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"config.hardware.device", "summary.runtime.connectionState"}, &o) - if err != nil { - return nil, err - } - - // Quoting the SDK doc: - // The virtual machine configuration is not guaranteed to be available. - // For example, the configuration information would be unavailable if the server - // is unable to access the virtual machine files on disk, and is often also unavailable - // during the initial phases of virtual machine creation. - if o.Config == nil { - return nil, fmt.Errorf("%s Config is not available, connectionState=%s", - v.Reference(), o.Summary.Runtime.ConnectionState) - } - - return VirtualDeviceList(o.Config.Hardware.Device), nil -} - -func (v VirtualMachine) HostSystem(ctx context.Context) (*HostSystem, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"summary.runtime.host"}, &o) - if err != nil { - return nil, err - } - - host := o.Summary.Runtime.Host - if host == nil { - return nil, errors.New("VM doesn't have a HostSystem") - } - - return NewHostSystem(v.c, *host), nil -} - -func (v VirtualMachine) ResourcePool(ctx context.Context) (*ResourcePool, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"resourcePool"}, &o) - if err != nil { - return nil, err - } - - rp := o.ResourcePool - if rp == nil { - return nil, errors.New("VM doesn't have a resourcePool") - } - - return NewResourcePool(v.c, *rp), nil -} - -func diskFileOperation(op types.VirtualDeviceConfigSpecOperation, fop types.VirtualDeviceConfigSpecFileOperation, device types.BaseVirtualDevice) types.VirtualDeviceConfigSpecFileOperation { - if disk, ok := device.(*types.VirtualDisk); ok { - // Special case to attach an existing disk - if op == types.VirtualDeviceConfigSpecOperationAdd && disk.CapacityInKB == 0 && disk.CapacityInBytes == 0 { - childDisk := false - if b, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok { - childDisk = b.Parent != nil - } - - if !childDisk { - fop = "" // existing disk - } - } - return fop - } - - return "" -} - -func (v VirtualMachine) configureDevice(ctx context.Context, op types.VirtualDeviceConfigSpecOperation, fop types.VirtualDeviceConfigSpecFileOperation, devices ...types.BaseVirtualDevice) error { - spec := types.VirtualMachineConfigSpec{} - - for _, device := range devices { - config := &types.VirtualDeviceConfigSpec{ - Device: device, - Operation: op, - FileOperation: diskFileOperation(op, fop, device), - } - - spec.DeviceChange = append(spec.DeviceChange, config) - } - - task, err := v.Reconfigure(ctx, spec) - if err != nil { - return err - } - - return task.Wait(ctx) -} - -// AddDevice adds the given devices to the VirtualMachine -func (v VirtualMachine) AddDevice(ctx context.Context, device ...types.BaseVirtualDevice) error { - return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationAdd, types.VirtualDeviceConfigSpecFileOperationCreate, device...) -} - -// EditDevice edits the given (existing) devices on the VirtualMachine -func (v VirtualMachine) EditDevice(ctx context.Context, device ...types.BaseVirtualDevice) error { - return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationEdit, types.VirtualDeviceConfigSpecFileOperationReplace, device...) -} - -// RemoveDevice removes the given devices on the VirtualMachine -func (v VirtualMachine) RemoveDevice(ctx context.Context, keepFiles bool, device ...types.BaseVirtualDevice) error { - fop := types.VirtualDeviceConfigSpecFileOperationDestroy - if keepFiles { - fop = "" - } - return v.configureDevice(ctx, types.VirtualDeviceConfigSpecOperationRemove, fop, device...) -} - -// AttachDisk attaches the given disk to the VirtualMachine -func (v VirtualMachine) AttachDisk(ctx context.Context, id string, datastore *Datastore, controllerKey int32, unitNumber int32) error { - req := types.AttachDisk_Task{ - This: v.Reference(), - DiskId: types.ID{Id: id}, - Datastore: datastore.Reference(), - ControllerKey: controllerKey, - UnitNumber: &unitNumber, - } - - res, err := methods.AttachDisk_Task(ctx, v.c, &req) - if err != nil { - return err - } - - task := NewTask(v.c, res.Returnval) - return task.Wait(ctx) -} - -// DetachDisk detaches the given disk from the VirtualMachine -func (v VirtualMachine) DetachDisk(ctx context.Context, id string) error { - req := types.DetachDisk_Task{ - This: v.Reference(), - DiskId: types.ID{Id: id}, - } - - res, err := methods.DetachDisk_Task(ctx, v.c, &req) - if err != nil { - return err - } - - task := NewTask(v.c, res.Returnval) - return task.Wait(ctx) -} - -// BootOptions returns the VirtualMachine's config.bootOptions property. -func (v VirtualMachine) BootOptions(ctx context.Context) (*types.VirtualMachineBootOptions, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"config.bootOptions"}, &o) - if err != nil { - return nil, err - } - - return o.Config.BootOptions, nil -} - -// SetBootOptions reconfigures the VirtualMachine with the given options. -func (v VirtualMachine) SetBootOptions(ctx context.Context, options *types.VirtualMachineBootOptions) error { - spec := types.VirtualMachineConfigSpec{} - - spec.BootOptions = options - - task, err := v.Reconfigure(ctx, spec) - if err != nil { - return err - } - - return task.Wait(ctx) -} - -// Answer answers a pending question. -func (v VirtualMachine) Answer(ctx context.Context, id, answer string) error { - req := types.AnswerVM{ - This: v.Reference(), - QuestionId: id, - AnswerChoice: answer, - } - - _, err := methods.AnswerVM(ctx, v.c, &req) - if err != nil { - return err - } - - return nil -} - -func (v VirtualMachine) AcquireTicket(ctx context.Context, kind string) (*types.VirtualMachineTicket, error) { - req := types.AcquireTicket{ - This: v.Reference(), - TicketType: kind, - } - - res, err := methods.AcquireTicket(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -// CreateSnapshot creates a new snapshot of a virtual machine. -func (v VirtualMachine) CreateSnapshot(ctx context.Context, name string, description string, memory bool, quiesce bool) (*Task, error) { - req := types.CreateSnapshot_Task{ - This: v.Reference(), - Name: name, - Description: description, - Memory: memory, - Quiesce: quiesce, - } - - res, err := methods.CreateSnapshot_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -// RemoveAllSnapshot removes all snapshots of a virtual machine -func (v VirtualMachine) RemoveAllSnapshot(ctx context.Context, consolidate *bool) (*Task, error) { - req := types.RemoveAllSnapshots_Task{ - This: v.Reference(), - Consolidate: consolidate, - } - - res, err := methods.RemoveAllSnapshots_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -type snapshotMap map[string][]types.ManagedObjectReference - -func (m snapshotMap) add(parent string, tree []types.VirtualMachineSnapshotTree) { - for i, st := range tree { - sname := st.Name - names := []string{sname, st.Snapshot.Value} - - if parent != "" { - sname = path.Join(parent, sname) - // Add full path as an option to resolve duplicate names - names = append(names, sname) - } - - for _, name := range names { - m[name] = append(m[name], tree[i].Snapshot) - } - - m.add(sname, st.ChildSnapshotList) - } -} - -// SnapshotSize calculates the size of a given snapshot in bytes. If the -// snapshot is current, disk files not associated with any parent snapshot are -// included in size calculations. This allows for measuring and including the -// growth from the last fixed snapshot to the present state. -func SnapshotSize(info types.ManagedObjectReference, parent *types.ManagedObjectReference, vmlayout *types.VirtualMachineFileLayoutEx, isCurrent bool) int { - var fileKeyList []int - var parentFiles []int - var allSnapshotFiles []int - - diskFiles := extractDiskLayoutFiles(vmlayout.Disk) - - for _, layout := range vmlayout.Snapshot { - diskLayout := extractDiskLayoutFiles(layout.Disk) - allSnapshotFiles = append(allSnapshotFiles, diskLayout...) - - if layout.Key.Value == info.Value { - fileKeyList = append(fileKeyList, int(layout.DataKey)) // The .vmsn file - fileKeyList = append(fileKeyList, diskLayout...) // The .vmdk files - } else if parent != nil && layout.Key.Value == parent.Value { - parentFiles = append(parentFiles, diskLayout...) - } - } - - for _, parentFile := range parentFiles { - removeKey(&fileKeyList, parentFile) - } - - for _, file := range allSnapshotFiles { - removeKey(&diskFiles, file) - } - - fileKeyMap := make(map[int]types.VirtualMachineFileLayoutExFileInfo) - for _, file := range vmlayout.File { - fileKeyMap[int(file.Key)] = file - } - - size := 0 - - for _, fileKey := range fileKeyList { - file := fileKeyMap[fileKey] - if parent != nil || - (file.Type != string(types.VirtualMachineFileLayoutExFileTypeDiskDescriptor) && - file.Type != string(types.VirtualMachineFileLayoutExFileTypeDiskExtent)) { - size += int(file.Size) - } - } - - if isCurrent { - for _, diskFile := range diskFiles { - file := fileKeyMap[diskFile] - size += int(file.Size) - } - } - - return size -} - -// FindSnapshot supports snapshot lookup by name, where name can be: -// 1) snapshot ManagedObjectReference.Value (unique) -// 2) snapshot name (may not be unique) -// 3) snapshot tree path (may not be unique) -func (v VirtualMachine) FindSnapshot(ctx context.Context, name string) (*types.ManagedObjectReference, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"snapshot"}, &o) - if err != nil { - return nil, err - } - - if o.Snapshot == nil || len(o.Snapshot.RootSnapshotList) == 0 { - return nil, errors.New("no snapshots for this VM") - } - - m := make(snapshotMap) - m.add("", o.Snapshot.RootSnapshotList) - - s := m[name] - switch len(s) { - case 0: - return nil, fmt.Errorf("snapshot %q not found", name) - case 1: - return &s[0], nil - default: - return nil, fmt.Errorf("%q resolves to %d snapshots", name, len(s)) - } -} - -// RemoveSnapshot removes a named snapshot -func (v VirtualMachine) RemoveSnapshot(ctx context.Context, name string, removeChildren bool, consolidate *bool) (*Task, error) { - snapshot, err := v.FindSnapshot(ctx, name) - if err != nil { - return nil, err - } - - req := types.RemoveSnapshot_Task{ - This: snapshot.Reference(), - RemoveChildren: removeChildren, - Consolidate: consolidate, - } - - res, err := methods.RemoveSnapshot_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -// RevertToCurrentSnapshot reverts to the current snapshot -func (v VirtualMachine) RevertToCurrentSnapshot(ctx context.Context, suppressPowerOn bool) (*Task, error) { - req := types.RevertToCurrentSnapshot_Task{ - This: v.Reference(), - SuppressPowerOn: types.NewBool(suppressPowerOn), - } - - res, err := methods.RevertToCurrentSnapshot_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -// RevertToSnapshot reverts to a named snapshot -func (v VirtualMachine) RevertToSnapshot(ctx context.Context, name string, suppressPowerOn bool) (*Task, error) { - snapshot, err := v.FindSnapshot(ctx, name) - if err != nil { - return nil, err - } - - req := types.RevertToSnapshot_Task{ - This: snapshot.Reference(), - SuppressPowerOn: types.NewBool(suppressPowerOn), - } - - res, err := methods.RevertToSnapshot_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -// IsToolsRunning returns true if VMware Tools is currently running in the guest OS, and false otherwise. -func (v VirtualMachine) IsToolsRunning(ctx context.Context) (bool, error) { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"guest.toolsRunningStatus"}, &o) - if err != nil { - return false, err - } - - return o.Guest.ToolsRunningStatus == string(types.VirtualMachineToolsRunningStatusGuestToolsRunning), nil -} - -// Wait for the VirtualMachine to change to the desired power state. -func (v VirtualMachine) WaitForPowerState(ctx context.Context, state types.VirtualMachinePowerState) error { - p := property.DefaultCollector(v.c) - err := property.Wait(ctx, p, v.Reference(), []string{PropRuntimePowerState}, func(pc []types.PropertyChange) bool { - for _, c := range pc { - if c.Name != PropRuntimePowerState { - continue - } - if c.Val == nil { - continue - } - - ps := c.Val.(types.VirtualMachinePowerState) - if ps == state { - return true - } - } - return false - }) - - return err -} - -func (v VirtualMachine) MarkAsTemplate(ctx context.Context) error { - req := types.MarkAsTemplate{ - This: v.Reference(), - } - - _, err := methods.MarkAsTemplate(ctx, v.c, &req) - if err != nil { - return err - } - - return nil -} - -func (v VirtualMachine) MarkAsVirtualMachine(ctx context.Context, pool ResourcePool, host *HostSystem) error { - req := types.MarkAsVirtualMachine{ - This: v.Reference(), - Pool: pool.Reference(), - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - _, err := methods.MarkAsVirtualMachine(ctx, v.c, &req) - if err != nil { - return err - } - - return nil -} - -func (v VirtualMachine) Migrate(ctx context.Context, pool *ResourcePool, host *HostSystem, priority types.VirtualMachineMovePriority, state types.VirtualMachinePowerState) (*Task, error) { - req := types.MigrateVM_Task{ - This: v.Reference(), - Priority: priority, - State: state, - } - - if pool != nil { - ref := pool.Reference() - req.Pool = &ref - } - - if host != nil { - ref := host.Reference() - req.Host = &ref - } - - res, err := methods.MigrateVM_Task(ctx, v.c, &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Unregister(ctx context.Context) error { - req := types.UnregisterVM{ - This: v.Reference(), - } - - _, err := methods.UnregisterVM(ctx, v.Client(), &req) - return err -} - -// QueryEnvironmentBrowser is a helper to get the environmentBrowser property. -func (v VirtualMachine) QueryConfigTarget(ctx context.Context) (*types.ConfigTarget, error) { - var vm mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"environmentBrowser"}, &vm) - if err != nil { - return nil, err - } - - req := types.QueryConfigTarget{ - This: vm.EnvironmentBrowser, - } - - res, err := methods.QueryConfigTarget(ctx, v.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (v VirtualMachine) MountToolsInstaller(ctx context.Context) error { - req := types.MountToolsInstaller{ - This: v.Reference(), - } - - _, err := methods.MountToolsInstaller(ctx, v.Client(), &req) - return err -} - -func (v VirtualMachine) UnmountToolsInstaller(ctx context.Context) error { - req := types.UnmountToolsInstaller{ - This: v.Reference(), - } - - _, err := methods.UnmountToolsInstaller(ctx, v.Client(), &req) - return err -} - -func (v VirtualMachine) UpgradeTools(ctx context.Context, options string) (*Task, error) { - req := types.UpgradeTools_Task{ - This: v.Reference(), - InstallerOptions: options, - } - - res, err := methods.UpgradeTools_Task(ctx, v.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -func (v VirtualMachine) Export(ctx context.Context) (*nfc.Lease, error) { - req := types.ExportVm{ - This: v.Reference(), - } - - res, err := methods.ExportVm(ctx, v.Client(), &req) - if err != nil { - return nil, err - } - - return nfc.NewLease(v.c, res.Returnval), nil -} - -func (v VirtualMachine) UpgradeVM(ctx context.Context, version string) (*Task, error) { - req := types.UpgradeVM_Task{ - This: v.Reference(), - Version: version, - } - - res, err := methods.UpgradeVM_Task(ctx, v.Client(), &req) - if err != nil { - return nil, err - } - - return NewTask(v.c, res.Returnval), nil -} - -// UUID is a helper to get the UUID of the VirtualMachine managed object. -// This method returns an empty string if an error occurs when retrieving UUID from the VirtualMachine object. -func (v VirtualMachine) UUID(ctx context.Context) string { - var o mo.VirtualMachine - - err := v.Properties(ctx, v.Reference(), []string{"config.uuid"}, &o) - if err != nil { - return "" - } - if o.Config != nil { - return o.Config.Uuid - } - return "" -} - -func (v VirtualMachine) QueryChangedDiskAreas(ctx context.Context, baseSnapshot, curSnapshot *types.ManagedObjectReference, disk *types.VirtualDisk, offset int64) (types.DiskChangeInfo, error) { - var noChange types.DiskChangeInfo - var err error - - if offset > disk.CapacityInBytes { - return noChange, fmt.Errorf("offset is greater than the disk size (%#x and %#x)", offset, disk.CapacityInBytes) - } else if offset == disk.CapacityInBytes { - return types.DiskChangeInfo{StartOffset: offset, Length: 0}, nil - } - - var b mo.VirtualMachineSnapshot - err = v.Properties(ctx, baseSnapshot.Reference(), []string{"config.hardware"}, &b) - if err != nil { - return noChange, fmt.Errorf("failed to fetch config.hardware of snapshot %s: %s", baseSnapshot, err) - } - - var changeId *string - for _, vd := range b.Config.Hardware.Device { - d := vd.GetVirtualDevice() - if d.Key != disk.Key { - continue - } - - // As per VDDK programming guide, these are the four types of disks - // that support CBT, see "Gathering Changed Block Information". - if b, ok := d.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok { - changeId = &b.ChangeId - break - } - if b, ok := d.Backing.(*types.VirtualDiskSparseVer2BackingInfo); ok { - changeId = &b.ChangeId - break - } - if b, ok := d.Backing.(*types.VirtualDiskRawDiskMappingVer1BackingInfo); ok { - changeId = &b.ChangeId - break - } - if b, ok := d.Backing.(*types.VirtualDiskRawDiskVer2BackingInfo); ok { - changeId = &b.ChangeId - break - } - - return noChange, fmt.Errorf("disk %d has backing info without .ChangeId: %t", disk.Key, d.Backing) - } - if changeId == nil || *changeId == "" { - return noChange, fmt.Errorf("CBT is not enabled on disk %d", disk.Key) - } - - req := types.QueryChangedDiskAreas{ - This: v.Reference(), - Snapshot: curSnapshot, - DeviceKey: disk.Key, - StartOffset: offset, - ChangeId: *changeId, - } - - res, err := methods.QueryChangedDiskAreas(ctx, v.Client(), &req) - if err != nil { - return noChange, err - } - - return res.Returnval, nil -} - -// ExportSnapshot exports all VMDK-files up to (but not including) a specified snapshot. This -// is useful when exporting a running VM. -func (v *VirtualMachine) ExportSnapshot(ctx context.Context, snapshot *types.ManagedObjectReference) (*nfc.Lease, error) { - req := types.ExportSnapshot{ - This: *snapshot, - } - resp, err := methods.ExportSnapshot(ctx, v.Client(), &req) - if err != nil { - return nil, err - } - return nfc.NewLease(v.c, resp.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go deleted file mode 100644 index 8eccba19b1e5..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package object - -type VmwareDistributedVirtualSwitch struct { - DistributedVirtualSwitch -} - -func (s VmwareDistributedVirtualSwitch) GetInventoryPath() string { - return s.InventoryPath -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/client.go deleted file mode 100644 index ba2531ec966c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/client.go +++ /dev/null @@ -1,287 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package pbm - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/pbm/methods" - "github.com/vmware/govmomi/pbm/types" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/soap" - vim "github.com/vmware/govmomi/vim25/types" -) - -const ( - Namespace = "pbm" - Path = "/pbm" -) - -var ( - ServiceInstance = vim.ManagedObjectReference{ - Type: "PbmServiceInstance", - Value: "ServiceInstance", - } -) - -type Client struct { - *soap.Client - - ServiceContent types.PbmServiceInstanceContent - - RoundTripper soap.RoundTripper -} - -func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) { - sc := c.Client.NewServiceClient(Path, Namespace) - - req := types.PbmRetrieveServiceContent{ - This: ServiceInstance, - } - - res, err := methods.PbmRetrieveServiceContent(ctx, sc, &req) - if err != nil { - return nil, err - } - - return &Client{sc, res.Returnval, sc}, nil -} - -// RoundTrip dispatches to the RoundTripper field. -func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - return c.RoundTripper.RoundTrip(ctx, req, res) -} - -func (c *Client) QueryProfile(ctx context.Context, rtype types.PbmProfileResourceType, category string) ([]types.PbmProfileId, error) { - req := types.PbmQueryProfile{ - This: c.ServiceContent.ProfileManager, - ResourceType: rtype, - ProfileCategory: category, - } - - res, err := methods.PbmQueryProfile(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (c *Client) RetrieveContent(ctx context.Context, ids []types.PbmProfileId) ([]types.BasePbmProfile, error) { - req := types.PbmRetrieveContent{ - This: c.ServiceContent.ProfileManager, - ProfileIds: ids, - } - - res, err := methods.PbmRetrieveContent(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -type PlacementCompatibilityResult []types.PbmPlacementCompatibilityResult - -func (c *Client) CheckRequirements(ctx context.Context, hubs []types.PbmPlacementHub, ref *types.PbmServerObjectRef, preq []types.BasePbmPlacementRequirement) (PlacementCompatibilityResult, error) { - req := types.PbmCheckRequirements{ - This: c.ServiceContent.PlacementSolver, - HubsToSearch: hubs, - PlacementSubjectRef: ref, - PlacementSubjectRequirement: preq, - } - - res, err := methods.PbmCheckRequirements(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (l PlacementCompatibilityResult) CompatibleDatastores() []types.PbmPlacementHub { - var compatibleDatastores []types.PbmPlacementHub - - for _, res := range l { - if len(res.Error) == 0 { - compatibleDatastores = append(compatibleDatastores, res.Hub) - } - } - return compatibleDatastores -} - -func (l PlacementCompatibilityResult) NonCompatibleDatastores() []types.PbmPlacementHub { - var nonCompatibleDatastores []types.PbmPlacementHub - - for _, res := range l { - if len(res.Error) > 0 { - nonCompatibleDatastores = append(nonCompatibleDatastores, res.Hub) - } - } - return nonCompatibleDatastores -} - -func (c *Client) CreateProfile(ctx context.Context, capabilityProfileCreateSpec types.PbmCapabilityProfileCreateSpec) (*types.PbmProfileId, error) { - req := types.PbmCreate{ - This: c.ServiceContent.ProfileManager, - CreateSpec: capabilityProfileCreateSpec, - } - - res, err := methods.PbmCreate(ctx, c, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (c *Client) UpdateProfile(ctx context.Context, id types.PbmProfileId, updateSpec types.PbmCapabilityProfileUpdateSpec) error { - req := types.PbmUpdate{ - This: c.ServiceContent.ProfileManager, - ProfileId: id, - UpdateSpec: updateSpec, - } - - _, err := methods.PbmUpdate(ctx, c, &req) - if err != nil { - return err - } - - return nil -} - -func (c *Client) DeleteProfile(ctx context.Context, ids []types.PbmProfileId) ([]types.PbmProfileOperationOutcome, error) { - req := types.PbmDelete{ - This: c.ServiceContent.ProfileManager, - ProfileId: ids, - } - - res, err := methods.PbmDelete(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (c *Client) QueryAssociatedEntity(ctx context.Context, id types.PbmProfileId, entityType string) ([]types.PbmServerObjectRef, error) { - req := types.PbmQueryAssociatedEntity{ - This: c.ServiceContent.ProfileManager, - Profile: id, - EntityType: entityType, - } - - res, err := methods.PbmQueryAssociatedEntity(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (c *Client) QueryAssociatedEntities(ctx context.Context, ids []types.PbmProfileId) ([]types.PbmQueryProfileResult, error) { - req := types.PbmQueryAssociatedEntities{ - This: c.ServiceContent.ProfileManager, - Profiles: ids, - } - - res, err := methods.PbmQueryAssociatedEntities(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (c *Client) ProfileIDByName(ctx context.Context, profileName string) (string, error) { - resourceType := types.PbmProfileResourceType{ - ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), - } - category := types.PbmProfileCategoryEnumREQUIREMENT - ids, err := c.QueryProfile(ctx, resourceType, string(category)) - if err != nil { - return "", err - } - - profiles, err := c.RetrieveContent(ctx, ids) - if err != nil { - return "", err - } - - for i := range profiles { - profile := profiles[i].GetPbmProfile() - if profile.Name == profileName { - return profile.ProfileId.UniqueId, nil - } - } - return "", fmt.Errorf("no pbm profile found with name: %q", profileName) -} - -func (c *Client) FetchCapabilityMetadata(ctx context.Context, rtype *types.PbmProfileResourceType, vendorUuid string) ([]types.PbmCapabilityMetadataPerCategory, error) { - req := types.PbmFetchCapabilityMetadata{ - This: c.ServiceContent.ProfileManager, - ResourceType: rtype, - VendorUuid: vendorUuid, - } - - res, err := methods.PbmFetchCapabilityMetadata(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (c *Client) FetchComplianceResult(ctx context.Context, entities []types.PbmServerObjectRef) ([]types.PbmComplianceResult, error) { - req := types.PbmFetchComplianceResult{ - This: c.ServiceContent.ComplianceManager, - Entities: entities, - } - - res, err := methods.PbmFetchComplianceResult(ctx, c, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -// GetProfileNameByID gets storage profile name by ID -func (c *Client) GetProfileNameByID(ctx context.Context, profileID string) (string, error) { - resourceType := types.PbmProfileResourceType{ - ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), - } - category := types.PbmProfileCategoryEnumREQUIREMENT - ids, err := c.QueryProfile(ctx, resourceType, string(category)) - if err != nil { - return "", err - } - - profiles, err := c.RetrieveContent(ctx, ids) - if err != nil { - return "", err - } - - for i := range profiles { - profile := profiles[i].GetPbmProfile() - if profile.ProfileId.UniqueId == profileID { - return profile.Name, nil - } - } - return "", fmt.Errorf("no pbm profile found with id: %q", profileID) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/methods/methods.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/methods/methods.go deleted file mode 100644 index fa7f2b200ffc..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/methods/methods.go +++ /dev/null @@ -1,664 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package methods - -import ( - "context" - - "github.com/vmware/govmomi/pbm/types" - "github.com/vmware/govmomi/vim25/soap" -) - -type PbmAssignDefaultRequirementProfileBody struct { - Req *types.PbmAssignDefaultRequirementProfile `xml:"urn:pbm PbmAssignDefaultRequirementProfile,omitempty"` - Res *types.PbmAssignDefaultRequirementProfileResponse `xml:"urn:pbm PbmAssignDefaultRequirementProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmAssignDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmAssignDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmAssignDefaultRequirementProfile) (*types.PbmAssignDefaultRequirementProfileResponse, error) { - var reqBody, resBody PbmAssignDefaultRequirementProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCheckCompatibilityBody struct { - Req *types.PbmCheckCompatibility `xml:"urn:pbm PbmCheckCompatibility,omitempty"` - Res *types.PbmCheckCompatibilityResponse `xml:"urn:pbm PbmCheckCompatibilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCheckCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCheckCompatibility(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompatibility) (*types.PbmCheckCompatibilityResponse, error) { - var reqBody, resBody PbmCheckCompatibilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCheckCompatibilityWithSpecBody struct { - Req *types.PbmCheckCompatibilityWithSpec `xml:"urn:pbm PbmCheckCompatibilityWithSpec,omitempty"` - Res *types.PbmCheckCompatibilityWithSpecResponse `xml:"urn:pbm PbmCheckCompatibilityWithSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCheckCompatibilityWithSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCheckCompatibilityWithSpec(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompatibilityWithSpec) (*types.PbmCheckCompatibilityWithSpecResponse, error) { - var reqBody, resBody PbmCheckCompatibilityWithSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCheckComplianceBody struct { - Req *types.PbmCheckCompliance `xml:"urn:pbm PbmCheckCompliance,omitempty"` - Res *types.PbmCheckComplianceResponse `xml:"urn:pbm PbmCheckComplianceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCheckComplianceBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCheckCompliance(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckCompliance) (*types.PbmCheckComplianceResponse, error) { - var reqBody, resBody PbmCheckComplianceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCheckRequirementsBody struct { - Req *types.PbmCheckRequirements `xml:"urn:pbm PbmCheckRequirements,omitempty"` - Res *types.PbmCheckRequirementsResponse `xml:"urn:pbm PbmCheckRequirementsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCheckRequirementsBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCheckRequirements(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckRequirements) (*types.PbmCheckRequirementsResponse, error) { - var reqBody, resBody PbmCheckRequirementsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCheckRollupComplianceBody struct { - Req *types.PbmCheckRollupCompliance `xml:"urn:pbm PbmCheckRollupCompliance,omitempty"` - Res *types.PbmCheckRollupComplianceResponse `xml:"urn:pbm PbmCheckRollupComplianceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCheckRollupComplianceBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCheckRollupCompliance(ctx context.Context, r soap.RoundTripper, req *types.PbmCheckRollupCompliance) (*types.PbmCheckRollupComplianceResponse, error) { - var reqBody, resBody PbmCheckRollupComplianceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmCreateBody struct { - Req *types.PbmCreate `xml:"urn:pbm PbmCreate,omitempty"` - Res *types.PbmCreateResponse `xml:"urn:pbm PbmCreateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmCreateBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmCreate(ctx context.Context, r soap.RoundTripper, req *types.PbmCreate) (*types.PbmCreateResponse, error) { - var reqBody, resBody PbmCreateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmDeleteBody struct { - Req *types.PbmDelete `xml:"urn:pbm PbmDelete,omitempty"` - Res *types.PbmDeleteResponse `xml:"urn:pbm PbmDeleteResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmDeleteBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmDelete(ctx context.Context, r soap.RoundTripper, req *types.PbmDelete) (*types.PbmDeleteResponse, error) { - var reqBody, resBody PbmDeleteBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchCapabilityMetadataBody struct { - Req *types.PbmFetchCapabilityMetadata `xml:"urn:pbm PbmFetchCapabilityMetadata,omitempty"` - Res *types.PbmFetchCapabilityMetadataResponse `xml:"urn:pbm PbmFetchCapabilityMetadataResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchCapabilityMetadataBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchCapabilityMetadata(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchCapabilityMetadata) (*types.PbmFetchCapabilityMetadataResponse, error) { - var reqBody, resBody PbmFetchCapabilityMetadataBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchCapabilitySchemaBody struct { - Req *types.PbmFetchCapabilitySchema `xml:"urn:pbm PbmFetchCapabilitySchema,omitempty"` - Res *types.PbmFetchCapabilitySchemaResponse `xml:"urn:pbm PbmFetchCapabilitySchemaResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchCapabilitySchemaBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchCapabilitySchema(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchCapabilitySchema) (*types.PbmFetchCapabilitySchemaResponse, error) { - var reqBody, resBody PbmFetchCapabilitySchemaBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchComplianceResultBody struct { - Req *types.PbmFetchComplianceResult `xml:"urn:pbm PbmFetchComplianceResult,omitempty"` - Res *types.PbmFetchComplianceResultResponse `xml:"urn:pbm PbmFetchComplianceResultResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchComplianceResultBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchComplianceResult(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchComplianceResult) (*types.PbmFetchComplianceResultResponse, error) { - var reqBody, resBody PbmFetchComplianceResultBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchResourceTypeBody struct { - Req *types.PbmFetchResourceType `xml:"urn:pbm PbmFetchResourceType,omitempty"` - Res *types.PbmFetchResourceTypeResponse `xml:"urn:pbm PbmFetchResourceTypeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchResourceTypeBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchResourceType(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchResourceType) (*types.PbmFetchResourceTypeResponse, error) { - var reqBody, resBody PbmFetchResourceTypeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchRollupComplianceResultBody struct { - Req *types.PbmFetchRollupComplianceResult `xml:"urn:pbm PbmFetchRollupComplianceResult,omitempty"` - Res *types.PbmFetchRollupComplianceResultResponse `xml:"urn:pbm PbmFetchRollupComplianceResultResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchRollupComplianceResultBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchRollupComplianceResult(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchRollupComplianceResult) (*types.PbmFetchRollupComplianceResultResponse, error) { - var reqBody, resBody PbmFetchRollupComplianceResultBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFetchVendorInfoBody struct { - Req *types.PbmFetchVendorInfo `xml:"urn:pbm PbmFetchVendorInfo,omitempty"` - Res *types.PbmFetchVendorInfoResponse `xml:"urn:pbm PbmFetchVendorInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFetchVendorInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFetchVendorInfo(ctx context.Context, r soap.RoundTripper, req *types.PbmFetchVendorInfo) (*types.PbmFetchVendorInfoResponse, error) { - var reqBody, resBody PbmFetchVendorInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmFindApplicableDefaultProfileBody struct { - Req *types.PbmFindApplicableDefaultProfile `xml:"urn:pbm PbmFindApplicableDefaultProfile,omitempty"` - Res *types.PbmFindApplicableDefaultProfileResponse `xml:"urn:pbm PbmFindApplicableDefaultProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmFindApplicableDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmFindApplicableDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmFindApplicableDefaultProfile) (*types.PbmFindApplicableDefaultProfileResponse, error) { - var reqBody, resBody PbmFindApplicableDefaultProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryAssociatedEntitiesBody struct { - Req *types.PbmQueryAssociatedEntities `xml:"urn:pbm PbmQueryAssociatedEntities,omitempty"` - Res *types.PbmQueryAssociatedEntitiesResponse `xml:"urn:pbm PbmQueryAssociatedEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryAssociatedEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryAssociatedEntities(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedEntities) (*types.PbmQueryAssociatedEntitiesResponse, error) { - var reqBody, resBody PbmQueryAssociatedEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryAssociatedEntityBody struct { - Req *types.PbmQueryAssociatedEntity `xml:"urn:pbm PbmQueryAssociatedEntity,omitempty"` - Res *types.PbmQueryAssociatedEntityResponse `xml:"urn:pbm PbmQueryAssociatedEntityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryAssociatedEntityBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryAssociatedEntity(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedEntity) (*types.PbmQueryAssociatedEntityResponse, error) { - var reqBody, resBody PbmQueryAssociatedEntityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryAssociatedProfileBody struct { - Req *types.PbmQueryAssociatedProfile `xml:"urn:pbm PbmQueryAssociatedProfile,omitempty"` - Res *types.PbmQueryAssociatedProfileResponse `xml:"urn:pbm PbmQueryAssociatedProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryAssociatedProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryAssociatedProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedProfile) (*types.PbmQueryAssociatedProfileResponse, error) { - var reqBody, resBody PbmQueryAssociatedProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryAssociatedProfilesBody struct { - Req *types.PbmQueryAssociatedProfiles `xml:"urn:pbm PbmQueryAssociatedProfiles,omitempty"` - Res *types.PbmQueryAssociatedProfilesResponse `xml:"urn:pbm PbmQueryAssociatedProfilesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryAssociatedProfilesBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryAssociatedProfiles(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryAssociatedProfiles) (*types.PbmQueryAssociatedProfilesResponse, error) { - var reqBody, resBody PbmQueryAssociatedProfilesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryByRollupComplianceStatusBody struct { - Req *types.PbmQueryByRollupComplianceStatus `xml:"urn:pbm PbmQueryByRollupComplianceStatus,omitempty"` - Res *types.PbmQueryByRollupComplianceStatusResponse `xml:"urn:pbm PbmQueryByRollupComplianceStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryByRollupComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryByRollupComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryByRollupComplianceStatus) (*types.PbmQueryByRollupComplianceStatusResponse, error) { - var reqBody, resBody PbmQueryByRollupComplianceStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryDefaultRequirementProfileBody struct { - Req *types.PbmQueryDefaultRequirementProfile `xml:"urn:pbm PbmQueryDefaultRequirementProfile,omitempty"` - Res *types.PbmQueryDefaultRequirementProfileResponse `xml:"urn:pbm PbmQueryDefaultRequirementProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryDefaultRequirementProfile) (*types.PbmQueryDefaultRequirementProfileResponse, error) { - var reqBody, resBody PbmQueryDefaultRequirementProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryDefaultRequirementProfilesBody struct { - Req *types.PbmQueryDefaultRequirementProfiles `xml:"urn:pbm PbmQueryDefaultRequirementProfiles,omitempty"` - Res *types.PbmQueryDefaultRequirementProfilesResponse `xml:"urn:pbm PbmQueryDefaultRequirementProfilesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryDefaultRequirementProfilesBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryDefaultRequirementProfiles(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryDefaultRequirementProfiles) (*types.PbmQueryDefaultRequirementProfilesResponse, error) { - var reqBody, resBody PbmQueryDefaultRequirementProfilesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryMatchingHubBody struct { - Req *types.PbmQueryMatchingHub `xml:"urn:pbm PbmQueryMatchingHub,omitempty"` - Res *types.PbmQueryMatchingHubResponse `xml:"urn:pbm PbmQueryMatchingHubResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryMatchingHubBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryMatchingHub(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryMatchingHub) (*types.PbmQueryMatchingHubResponse, error) { - var reqBody, resBody PbmQueryMatchingHubBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryMatchingHubWithSpecBody struct { - Req *types.PbmQueryMatchingHubWithSpec `xml:"urn:pbm PbmQueryMatchingHubWithSpec,omitempty"` - Res *types.PbmQueryMatchingHubWithSpecResponse `xml:"urn:pbm PbmQueryMatchingHubWithSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryMatchingHubWithSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryMatchingHubWithSpec(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryMatchingHubWithSpec) (*types.PbmQueryMatchingHubWithSpecResponse, error) { - var reqBody, resBody PbmQueryMatchingHubWithSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryProfileBody struct { - Req *types.PbmQueryProfile `xml:"urn:pbm PbmQueryProfile,omitempty"` - Res *types.PbmQueryProfileResponse `xml:"urn:pbm PbmQueryProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryProfile) (*types.PbmQueryProfileResponse, error) { - var reqBody, resBody PbmQueryProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQueryReplicationGroupsBody struct { - Req *types.PbmQueryReplicationGroups `xml:"urn:pbm PbmQueryReplicationGroups,omitempty"` - Res *types.PbmQueryReplicationGroupsResponse `xml:"urn:pbm PbmQueryReplicationGroupsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQueryReplicationGroupsBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQueryReplicationGroups(ctx context.Context, r soap.RoundTripper, req *types.PbmQueryReplicationGroups) (*types.PbmQueryReplicationGroupsResponse, error) { - var reqBody, resBody PbmQueryReplicationGroupsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmQuerySpaceStatsForStorageContainerBody struct { - Req *types.PbmQuerySpaceStatsForStorageContainer `xml:"urn:pbm PbmQuerySpaceStatsForStorageContainer,omitempty"` - Res *types.PbmQuerySpaceStatsForStorageContainerResponse `xml:"urn:pbm PbmQuerySpaceStatsForStorageContainerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmQuerySpaceStatsForStorageContainerBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmQuerySpaceStatsForStorageContainer(ctx context.Context, r soap.RoundTripper, req *types.PbmQuerySpaceStatsForStorageContainer) (*types.PbmQuerySpaceStatsForStorageContainerResponse, error) { - var reqBody, resBody PbmQuerySpaceStatsForStorageContainerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmResetDefaultRequirementProfileBody struct { - Req *types.PbmResetDefaultRequirementProfile `xml:"urn:pbm PbmResetDefaultRequirementProfile,omitempty"` - Res *types.PbmResetDefaultRequirementProfileResponse `xml:"urn:pbm PbmResetDefaultRequirementProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmResetDefaultRequirementProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmResetDefaultRequirementProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmResetDefaultRequirementProfile) (*types.PbmResetDefaultRequirementProfileResponse, error) { - var reqBody, resBody PbmResetDefaultRequirementProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmResetVSanDefaultProfileBody struct { - Req *types.PbmResetVSanDefaultProfile `xml:"urn:pbm PbmResetVSanDefaultProfile,omitempty"` - Res *types.PbmResetVSanDefaultProfileResponse `xml:"urn:pbm PbmResetVSanDefaultProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmResetVSanDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmResetVSanDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.PbmResetVSanDefaultProfile) (*types.PbmResetVSanDefaultProfileResponse, error) { - var reqBody, resBody PbmResetVSanDefaultProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmRetrieveContentBody struct { - Req *types.PbmRetrieveContent `xml:"urn:pbm PbmRetrieveContent,omitempty"` - Res *types.PbmRetrieveContentResponse `xml:"urn:pbm PbmRetrieveContentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmRetrieveContentBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmRetrieveContent(ctx context.Context, r soap.RoundTripper, req *types.PbmRetrieveContent) (*types.PbmRetrieveContentResponse, error) { - var reqBody, resBody PbmRetrieveContentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmRetrieveServiceContentBody struct { - Req *types.PbmRetrieveServiceContent `xml:"urn:pbm PbmRetrieveServiceContent,omitempty"` - Res *types.PbmRetrieveServiceContentResponse `xml:"urn:pbm PbmRetrieveServiceContentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmRetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmRetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.PbmRetrieveServiceContent) (*types.PbmRetrieveServiceContentResponse, error) { - var reqBody, resBody PbmRetrieveServiceContentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PbmUpdateBody struct { - Req *types.PbmUpdate `xml:"urn:pbm PbmUpdate,omitempty"` - Res *types.PbmUpdateResponse `xml:"urn:pbm PbmUpdateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PbmUpdateBody) Fault() *soap.Fault { return b.Fault_ } - -func PbmUpdate(ctx context.Context, r soap.RoundTripper, req *types.PbmUpdate) (*types.PbmUpdateResponse, error) { - var reqBody, resBody PbmUpdateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/pbm_util.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/pbm_util.go deleted file mode 100644 index d773b8dbb776..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/pbm_util.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package pbm - -import ( - "fmt" - "strconv" - "strings" - - "github.com/vmware/govmomi/pbm/types" -) - -// A struct to capture pbm create spec details. -type CapabilityProfileCreateSpec struct { - Name string - SubProfileName string - Description string - Category string - CapabilityList []Capability -} - -// A struct to capture pbm capability instance details. -type Capability struct { - ID string - Namespace string - PropertyList []Property -} - -// A struct to capture pbm property instance details. -type Property struct { - ID string - Operator string - Value string - DataType string -} - -func CreateCapabilityProfileSpec(pbmCreateSpec CapabilityProfileCreateSpec) (*types.PbmCapabilityProfileCreateSpec, error) { - capabilities, err := createCapabilityInstances(pbmCreateSpec.CapabilityList) - if err != nil { - return nil, err - } - - pbmCapabilityProfileSpec := types.PbmCapabilityProfileCreateSpec{ - Name: pbmCreateSpec.Name, - Description: pbmCreateSpec.Description, - Category: pbmCreateSpec.Category, - ResourceType: types.PbmProfileResourceType{ - ResourceType: string(types.PbmProfileResourceTypeEnumSTORAGE), - }, - Constraints: &types.PbmCapabilitySubProfileConstraints{ - SubProfiles: []types.PbmCapabilitySubProfile{ - types.PbmCapabilitySubProfile{ - Capability: capabilities, - Name: pbmCreateSpec.SubProfileName, - }, - }, - }, - } - return &pbmCapabilityProfileSpec, nil -} - -func createCapabilityInstances(rules []Capability) ([]types.PbmCapabilityInstance, error) { - var capabilityInstances []types.PbmCapabilityInstance - for _, capabilityRule := range rules { - capability := types.PbmCapabilityInstance{ - Id: types.PbmCapabilityMetadataUniqueId{ - Namespace: capabilityRule.Namespace, - Id: capabilityRule.ID, - }, - } - - var propertyInstances []types.PbmCapabilityPropertyInstance - for _, propertyRule := range capabilityRule.PropertyList { - property := types.PbmCapabilityPropertyInstance{ - Id: propertyRule.ID, - } - if propertyRule.Operator != "" { - property.Operator = propertyRule.Operator - } - var err error - switch strings.ToLower(propertyRule.DataType) { - case "int": - // Go int32 is marshalled to xsi:int whereas Go int is marshalled to xsi:long when sending down the wire. - var val int32 - val, err = verifyPropertyValueIsInt(propertyRule.Value, propertyRule.DataType) - property.Value = val - case "bool": - var val bool - val, err = verifyPropertyValueIsBoolean(propertyRule.Value, propertyRule.DataType) - property.Value = val - case "string": - property.Value = propertyRule.Value - case "set": - set := types.PbmCapabilityDiscreteSet{} - for _, val := range strings.Split(propertyRule.Value, ",") { - set.Values = append(set.Values, val) - } - property.Value = set - default: - return nil, fmt.Errorf("invalid value: %q with datatype: %q", propertyRule.Value, propertyRule.Value) - } - if err != nil { - return nil, fmt.Errorf("invalid value: %q with datatype: %q", propertyRule.Value, propertyRule.Value) - } - propertyInstances = append(propertyInstances, property) - } - constraintInstances := []types.PbmCapabilityConstraintInstance{ - types.PbmCapabilityConstraintInstance{ - PropertyInstance: propertyInstances, - }, - } - capability.Constraint = constraintInstances - capabilityInstances = append(capabilityInstances, capability) - } - return capabilityInstances, nil -} - -// Verify if the capability value is of type integer. -func verifyPropertyValueIsInt(propertyValue string, dataType string) (int32, error) { - val, err := strconv.ParseInt(propertyValue, 10, 32) - if err != nil { - return -1, err - } - return int32(val), nil -} - -// Verify if the capability value is of type integer. -func verifyPropertyValueIsBoolean(propertyValue string, dataType string) (bool, error) { - val, err := strconv.ParseBool(propertyValue) - if err != nil { - return false, err - } - return val, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/enum.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/enum.go deleted file mode 100644 index 66751bb1f4da..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/enum.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - - "github.com/vmware/govmomi/vim25/types" -) - -type PbmAssociateAndApplyPolicyStatusPolicyStatus string - -const ( - PbmAssociateAndApplyPolicyStatusPolicyStatusSuccess = PbmAssociateAndApplyPolicyStatusPolicyStatus("success") - PbmAssociateAndApplyPolicyStatusPolicyStatusFailed = PbmAssociateAndApplyPolicyStatusPolicyStatus("failed") - PbmAssociateAndApplyPolicyStatusPolicyStatusInvalid = PbmAssociateAndApplyPolicyStatusPolicyStatus("invalid") -) - -func init() { - types.Add("pbm:PbmAssociateAndApplyPolicyStatusPolicyStatus", reflect.TypeOf((*PbmAssociateAndApplyPolicyStatusPolicyStatus)(nil)).Elem()) -} - -type PbmBuiltinGenericType string - -const ( - PbmBuiltinGenericTypeVMW_RANGE = PbmBuiltinGenericType("VMW_RANGE") - PbmBuiltinGenericTypeVMW_SET = PbmBuiltinGenericType("VMW_SET") -) - -func init() { - types.Add("pbm:PbmBuiltinGenericType", reflect.TypeOf((*PbmBuiltinGenericType)(nil)).Elem()) -} - -type PbmBuiltinType string - -const ( - PbmBuiltinTypeXSD_LONG = PbmBuiltinType("XSD_LONG") - PbmBuiltinTypeXSD_SHORT = PbmBuiltinType("XSD_SHORT") - PbmBuiltinTypeXSD_INTEGER = PbmBuiltinType("XSD_INTEGER") - PbmBuiltinTypeXSD_INT = PbmBuiltinType("XSD_INT") - PbmBuiltinTypeXSD_STRING = PbmBuiltinType("XSD_STRING") - PbmBuiltinTypeXSD_BOOLEAN = PbmBuiltinType("XSD_BOOLEAN") - PbmBuiltinTypeXSD_DOUBLE = PbmBuiltinType("XSD_DOUBLE") - PbmBuiltinTypeXSD_DATETIME = PbmBuiltinType("XSD_DATETIME") - PbmBuiltinTypeVMW_TIMESPAN = PbmBuiltinType("VMW_TIMESPAN") - PbmBuiltinTypeVMW_POLICY = PbmBuiltinType("VMW_POLICY") -) - -func init() { - types.Add("pbm:PbmBuiltinType", reflect.TypeOf((*PbmBuiltinType)(nil)).Elem()) -} - -type PbmCapabilityOperator string - -const ( - PbmCapabilityOperatorNOT = PbmCapabilityOperator("NOT") -) - -func init() { - types.Add("pbm:PbmCapabilityOperator", reflect.TypeOf((*PbmCapabilityOperator)(nil)).Elem()) -} - -type PbmCapabilityTimeUnitType string - -const ( - PbmCapabilityTimeUnitTypeSECONDS = PbmCapabilityTimeUnitType("SECONDS") - PbmCapabilityTimeUnitTypeMINUTES = PbmCapabilityTimeUnitType("MINUTES") - PbmCapabilityTimeUnitTypeHOURS = PbmCapabilityTimeUnitType("HOURS") - PbmCapabilityTimeUnitTypeDAYS = PbmCapabilityTimeUnitType("DAYS") - PbmCapabilityTimeUnitTypeWEEKS = PbmCapabilityTimeUnitType("WEEKS") - PbmCapabilityTimeUnitTypeMONTHS = PbmCapabilityTimeUnitType("MONTHS") - PbmCapabilityTimeUnitTypeYEARS = PbmCapabilityTimeUnitType("YEARS") -) - -func init() { - types.Add("pbm:PbmCapabilityTimeUnitType", reflect.TypeOf((*PbmCapabilityTimeUnitType)(nil)).Elem()) -} - -type PbmComplianceResultComplianceTaskStatus string - -const ( - PbmComplianceResultComplianceTaskStatusInProgress = PbmComplianceResultComplianceTaskStatus("inProgress") - PbmComplianceResultComplianceTaskStatusSuccess = PbmComplianceResultComplianceTaskStatus("success") - PbmComplianceResultComplianceTaskStatusFailed = PbmComplianceResultComplianceTaskStatus("failed") -) - -func init() { - types.Add("pbm:PbmComplianceResultComplianceTaskStatus", reflect.TypeOf((*PbmComplianceResultComplianceTaskStatus)(nil)).Elem()) -} - -type PbmComplianceStatus string - -const ( - PbmComplianceStatusCompliant = PbmComplianceStatus("compliant") - PbmComplianceStatusNonCompliant = PbmComplianceStatus("nonCompliant") - PbmComplianceStatusUnknown = PbmComplianceStatus("unknown") - PbmComplianceStatusNotApplicable = PbmComplianceStatus("notApplicable") - PbmComplianceStatusOutOfDate = PbmComplianceStatus("outOfDate") -) - -func init() { - types.Add("pbm:PbmComplianceStatus", reflect.TypeOf((*PbmComplianceStatus)(nil)).Elem()) -} - -type PbmDebugManagerKeystoreName string - -const ( - PbmDebugManagerKeystoreNameSMS = PbmDebugManagerKeystoreName("SMS") - PbmDebugManagerKeystoreNameTRUSTED_ROOTS = PbmDebugManagerKeystoreName("TRUSTED_ROOTS") -) - -func init() { - types.Add("pbm:PbmDebugManagerKeystoreName", reflect.TypeOf((*PbmDebugManagerKeystoreName)(nil)).Elem()) -} - -type PbmHealthStatusForEntity string - -const ( - PbmHealthStatusForEntityRed = PbmHealthStatusForEntity("red") - PbmHealthStatusForEntityYellow = PbmHealthStatusForEntity("yellow") - PbmHealthStatusForEntityGreen = PbmHealthStatusForEntity("green") - PbmHealthStatusForEntityUnknown = PbmHealthStatusForEntity("unknown") -) - -func init() { - types.Add("pbm:PbmHealthStatusForEntity", reflect.TypeOf((*PbmHealthStatusForEntity)(nil)).Elem()) -} - -type PbmIofilterInfoFilterType string - -const ( - PbmIofilterInfoFilterTypeINSPECTION = PbmIofilterInfoFilterType("INSPECTION") - PbmIofilterInfoFilterTypeCOMPRESSION = PbmIofilterInfoFilterType("COMPRESSION") - PbmIofilterInfoFilterTypeENCRYPTION = PbmIofilterInfoFilterType("ENCRYPTION") - PbmIofilterInfoFilterTypeREPLICATION = PbmIofilterInfoFilterType("REPLICATION") - PbmIofilterInfoFilterTypeCACHE = PbmIofilterInfoFilterType("CACHE") - PbmIofilterInfoFilterTypeDATAPROVIDER = PbmIofilterInfoFilterType("DATAPROVIDER") - PbmIofilterInfoFilterTypeDATASTOREIOCONTROL = PbmIofilterInfoFilterType("DATASTOREIOCONTROL") -) - -func init() { - types.Add("pbm:PbmIofilterInfoFilterType", reflect.TypeOf((*PbmIofilterInfoFilterType)(nil)).Elem()) -} - -type PbmLineOfServiceInfoLineOfServiceEnum string - -const ( - PbmLineOfServiceInfoLineOfServiceEnumINSPECTION = PbmLineOfServiceInfoLineOfServiceEnum("INSPECTION") - PbmLineOfServiceInfoLineOfServiceEnumCOMPRESSION = PbmLineOfServiceInfoLineOfServiceEnum("COMPRESSION") - PbmLineOfServiceInfoLineOfServiceEnumENCRYPTION = PbmLineOfServiceInfoLineOfServiceEnum("ENCRYPTION") - PbmLineOfServiceInfoLineOfServiceEnumREPLICATION = PbmLineOfServiceInfoLineOfServiceEnum("REPLICATION") - PbmLineOfServiceInfoLineOfServiceEnumCACHING = PbmLineOfServiceInfoLineOfServiceEnum("CACHING") - PbmLineOfServiceInfoLineOfServiceEnumPERSISTENCE = PbmLineOfServiceInfoLineOfServiceEnum("PERSISTENCE") - PbmLineOfServiceInfoLineOfServiceEnumDATA_PROVIDER = PbmLineOfServiceInfoLineOfServiceEnum("DATA_PROVIDER") - PbmLineOfServiceInfoLineOfServiceEnumDATASTORE_IO_CONTROL = PbmLineOfServiceInfoLineOfServiceEnum("DATASTORE_IO_CONTROL") - PbmLineOfServiceInfoLineOfServiceEnumDATA_PROTECTION = PbmLineOfServiceInfoLineOfServiceEnum("DATA_PROTECTION") -) - -func init() { - types.Add("pbm:PbmLineOfServiceInfoLineOfServiceEnum", reflect.TypeOf((*PbmLineOfServiceInfoLineOfServiceEnum)(nil)).Elem()) -} - -type PbmLoggingConfigurationComponent string - -const ( - PbmLoggingConfigurationComponentPbm = PbmLoggingConfigurationComponent("pbm") - PbmLoggingConfigurationComponentVslm = PbmLoggingConfigurationComponent("vslm") - PbmLoggingConfigurationComponentSms = PbmLoggingConfigurationComponent("sms") - PbmLoggingConfigurationComponentSpbm = PbmLoggingConfigurationComponent("spbm") - PbmLoggingConfigurationComponentSps = PbmLoggingConfigurationComponent("sps") - PbmLoggingConfigurationComponentHttpclient_header = PbmLoggingConfigurationComponent("httpclient_header") - PbmLoggingConfigurationComponentHttpclient_content = PbmLoggingConfigurationComponent("httpclient_content") - PbmLoggingConfigurationComponentVmomi = PbmLoggingConfigurationComponent("vmomi") -) - -func init() { - types.Add("pbm:PbmLoggingConfigurationComponent", reflect.TypeOf((*PbmLoggingConfigurationComponent)(nil)).Elem()) -} - -type PbmLoggingConfigurationLogLevel string - -const ( - PbmLoggingConfigurationLogLevelINFO = PbmLoggingConfigurationLogLevel("INFO") - PbmLoggingConfigurationLogLevelDEBUG = PbmLoggingConfigurationLogLevel("DEBUG") - PbmLoggingConfigurationLogLevelTRACE = PbmLoggingConfigurationLogLevel("TRACE") -) - -func init() { - types.Add("pbm:PbmLoggingConfigurationLogLevel", reflect.TypeOf((*PbmLoggingConfigurationLogLevel)(nil)).Elem()) -} - -type PbmObjectType string - -const ( - PbmObjectTypeVirtualMachine = PbmObjectType("virtualMachine") - PbmObjectTypeVirtualMachineAndDisks = PbmObjectType("virtualMachineAndDisks") - PbmObjectTypeVirtualDiskId = PbmObjectType("virtualDiskId") - PbmObjectTypeVirtualDiskUUID = PbmObjectType("virtualDiskUUID") - PbmObjectTypeDatastore = PbmObjectType("datastore") - PbmObjectTypeVsanObjectId = PbmObjectType("vsanObjectId") - PbmObjectTypeFileShareId = PbmObjectType("fileShareId") - PbmObjectTypeUnknown = PbmObjectType("unknown") -) - -func init() { - types.Add("pbm:PbmObjectType", reflect.TypeOf((*PbmObjectType)(nil)).Elem()) -} - -type PbmOperation string - -const ( - PbmOperationCREATE = PbmOperation("CREATE") - PbmOperationREGISTER = PbmOperation("REGISTER") - PbmOperationRECONFIGURE = PbmOperation("RECONFIGURE") - PbmOperationMIGRATE = PbmOperation("MIGRATE") - PbmOperationCLONE = PbmOperation("CLONE") -) - -func init() { - types.Add("pbm:PbmOperation", reflect.TypeOf((*PbmOperation)(nil)).Elem()) -} - -type PbmPolicyAssociationVolumeAllocationType string - -const ( - PbmPolicyAssociationVolumeAllocationTypeFullyInitialized = PbmPolicyAssociationVolumeAllocationType("FullyInitialized") - PbmPolicyAssociationVolumeAllocationTypeReserveSpace = PbmPolicyAssociationVolumeAllocationType("ReserveSpace") - PbmPolicyAssociationVolumeAllocationTypeConserveSpaceWhenPossible = PbmPolicyAssociationVolumeAllocationType("ConserveSpaceWhenPossible") -) - -func init() { - types.Add("pbm:PbmPolicyAssociationVolumeAllocationType", reflect.TypeOf((*PbmPolicyAssociationVolumeAllocationType)(nil)).Elem()) -} - -type PbmProfileCategoryEnum string - -const ( - PbmProfileCategoryEnumREQUIREMENT = PbmProfileCategoryEnum("REQUIREMENT") - PbmProfileCategoryEnumRESOURCE = PbmProfileCategoryEnum("RESOURCE") - PbmProfileCategoryEnumDATA_SERVICE_POLICY = PbmProfileCategoryEnum("DATA_SERVICE_POLICY") -) - -func init() { - types.Add("pbm:PbmProfileCategoryEnum", reflect.TypeOf((*PbmProfileCategoryEnum)(nil)).Elem()) -} - -type PbmProfileResourceTypeEnum string - -const ( - PbmProfileResourceTypeEnumSTORAGE = PbmProfileResourceTypeEnum("STORAGE") -) - -func init() { - types.Add("pbm:PbmProfileResourceTypeEnum", reflect.TypeOf((*PbmProfileResourceTypeEnum)(nil)).Elem()) -} - -type PbmSystemCreatedProfileType string - -const ( - PbmSystemCreatedProfileTypeVsanDefaultProfile = PbmSystemCreatedProfileType("VsanDefaultProfile") - PbmSystemCreatedProfileTypeVVolDefaultProfile = PbmSystemCreatedProfileType("VVolDefaultProfile") - PbmSystemCreatedProfileTypePmemDefaultProfile = PbmSystemCreatedProfileType("PmemDefaultProfile") - PbmSystemCreatedProfileTypeVsanMaxDefaultProfile = PbmSystemCreatedProfileType("VsanMaxDefaultProfile") -) - -func init() { - types.Add("pbm:PbmSystemCreatedProfileType", reflect.TypeOf((*PbmSystemCreatedProfileType)(nil)).Elem()) -} - -type PbmVmOperation string - -const ( - PbmVmOperationCREATE = PbmVmOperation("CREATE") - PbmVmOperationRECONFIGURE = PbmVmOperation("RECONFIGURE") - PbmVmOperationMIGRATE = PbmVmOperation("MIGRATE") - PbmVmOperationCLONE = PbmVmOperation("CLONE") -) - -func init() { - types.Add("pbm:PbmVmOperation", reflect.TypeOf((*PbmVmOperation)(nil)).Elem()) -} - -type PbmVvolType string - -const ( - PbmVvolTypeConfig = PbmVvolType("Config") - PbmVvolTypeData = PbmVvolType("Data") - PbmVvolTypeSwap = PbmVvolType("Swap") -) - -func init() { - types.Add("pbm:PbmVvolType", reflect.TypeOf((*PbmVvolType)(nil)).Elem()) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/if.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/if.go deleted file mode 100644 index a740a25dabee..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/if.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - - "github.com/vmware/govmomi/vim25/types" -) - -func (b *PbmCapabilityConstraints) GetPbmCapabilityConstraints() *PbmCapabilityConstraints { return b } - -type BasePbmCapabilityConstraints interface { - GetPbmCapabilityConstraints() *PbmCapabilityConstraints -} - -func init() { - types.Add("BasePbmCapabilityConstraints", reflect.TypeOf((*PbmCapabilityConstraints)(nil)).Elem()) -} - -func (b *PbmCapabilityProfile) GetPbmCapabilityProfile() *PbmCapabilityProfile { return b } - -type BasePbmCapabilityProfile interface { - GetPbmCapabilityProfile() *PbmCapabilityProfile -} - -func init() { - types.Add("BasePbmCapabilityProfile", reflect.TypeOf((*PbmCapabilityProfile)(nil)).Elem()) -} - -func (b *PbmCapabilityProfilePropertyMismatchFault) GetPbmCapabilityProfilePropertyMismatchFault() *PbmCapabilityProfilePropertyMismatchFault { - return b -} - -type BasePbmCapabilityProfilePropertyMismatchFault interface { - GetPbmCapabilityProfilePropertyMismatchFault() *PbmCapabilityProfilePropertyMismatchFault -} - -func init() { - types.Add("BasePbmCapabilityProfilePropertyMismatchFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFault)(nil)).Elem()) -} - -func (b *PbmCapabilityTypeInfo) GetPbmCapabilityTypeInfo() *PbmCapabilityTypeInfo { return b } - -type BasePbmCapabilityTypeInfo interface { - GetPbmCapabilityTypeInfo() *PbmCapabilityTypeInfo -} - -func init() { - types.Add("BasePbmCapabilityTypeInfo", reflect.TypeOf((*PbmCapabilityTypeInfo)(nil)).Elem()) -} - -func (b *PbmCompatibilityCheckFault) GetPbmCompatibilityCheckFault() *PbmCompatibilityCheckFault { - return b -} - -type BasePbmCompatibilityCheckFault interface { - GetPbmCompatibilityCheckFault() *PbmCompatibilityCheckFault -} - -func init() { - types.Add("BasePbmCompatibilityCheckFault", reflect.TypeOf((*PbmCompatibilityCheckFault)(nil)).Elem()) -} - -func (b *PbmFault) GetPbmFault() *PbmFault { return b } - -type BasePbmFault interface { - GetPbmFault() *PbmFault -} - -func init() { - types.Add("BasePbmFault", reflect.TypeOf((*PbmFault)(nil)).Elem()) -} - -func (b *PbmLineOfServiceInfo) GetPbmLineOfServiceInfo() *PbmLineOfServiceInfo { return b } - -type BasePbmLineOfServiceInfo interface { - GetPbmLineOfServiceInfo() *PbmLineOfServiceInfo -} - -func init() { - types.Add("BasePbmLineOfServiceInfo", reflect.TypeOf((*PbmLineOfServiceInfo)(nil)).Elem()) -} - -func (b *PbmPlacementMatchingResources) GetPbmPlacementMatchingResources() *PbmPlacementMatchingResources { - return b -} - -type BasePbmPlacementMatchingResources interface { - GetPbmPlacementMatchingResources() *PbmPlacementMatchingResources -} - -func init() { - types.Add("BasePbmPlacementMatchingResources", reflect.TypeOf((*PbmPlacementMatchingResources)(nil)).Elem()) -} - -func (b *PbmPlacementRequirement) GetPbmPlacementRequirement() *PbmPlacementRequirement { return b } - -type BasePbmPlacementRequirement interface { - GetPbmPlacementRequirement() *PbmPlacementRequirement -} - -func init() { - types.Add("BasePbmPlacementRequirement", reflect.TypeOf((*PbmPlacementRequirement)(nil)).Elem()) -} - -func (b *PbmProfile) GetPbmProfile() *PbmProfile { return b } - -type BasePbmProfile interface { - GetPbmProfile() *PbmProfile -} - -func init() { - types.Add("BasePbmProfile", reflect.TypeOf((*PbmProfile)(nil)).Elem()) -} - -func (b *PbmPropertyMismatchFault) GetPbmPropertyMismatchFault() *PbmPropertyMismatchFault { return b } - -type BasePbmPropertyMismatchFault interface { - GetPbmPropertyMismatchFault() *PbmPropertyMismatchFault -} - -func init() { - types.Add("BasePbmPropertyMismatchFault", reflect.TypeOf((*PbmPropertyMismatchFault)(nil)).Elem()) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/types.go deleted file mode 100644 index 1687df447db1..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/pbm/types/types.go +++ /dev/null @@ -1,1757 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - "time" - - "github.com/vmware/govmomi/vim25/types" -) - -type ArrayOfPbmCapabilityConstraintInstance struct { - PbmCapabilityConstraintInstance []PbmCapabilityConstraintInstance `xml:"PbmCapabilityConstraintInstance,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityConstraintInstance", reflect.TypeOf((*ArrayOfPbmCapabilityConstraintInstance)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityInstance struct { - PbmCapabilityInstance []PbmCapabilityInstance `xml:"PbmCapabilityInstance,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityInstance", reflect.TypeOf((*ArrayOfPbmCapabilityInstance)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityMetadata struct { - PbmCapabilityMetadata []PbmCapabilityMetadata `xml:"PbmCapabilityMetadata,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityMetadata", reflect.TypeOf((*ArrayOfPbmCapabilityMetadata)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityMetadataPerCategory struct { - PbmCapabilityMetadataPerCategory []PbmCapabilityMetadataPerCategory `xml:"PbmCapabilityMetadataPerCategory,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityMetadataPerCategory", reflect.TypeOf((*ArrayOfPbmCapabilityMetadataPerCategory)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityPropertyInstance struct { - PbmCapabilityPropertyInstance []PbmCapabilityPropertyInstance `xml:"PbmCapabilityPropertyInstance,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityPropertyInstance", reflect.TypeOf((*ArrayOfPbmCapabilityPropertyInstance)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityPropertyMetadata struct { - PbmCapabilityPropertyMetadata []PbmCapabilityPropertyMetadata `xml:"PbmCapabilityPropertyMetadata,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityPropertyMetadata", reflect.TypeOf((*ArrayOfPbmCapabilityPropertyMetadata)(nil)).Elem()) -} - -type ArrayOfPbmCapabilitySchema struct { - PbmCapabilitySchema []PbmCapabilitySchema `xml:"PbmCapabilitySchema,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilitySchema", reflect.TypeOf((*ArrayOfPbmCapabilitySchema)(nil)).Elem()) -} - -type ArrayOfPbmCapabilitySubProfile struct { - PbmCapabilitySubProfile []PbmCapabilitySubProfile `xml:"PbmCapabilitySubProfile,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilitySubProfile", reflect.TypeOf((*ArrayOfPbmCapabilitySubProfile)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityVendorNamespaceInfo struct { - PbmCapabilityVendorNamespaceInfo []PbmCapabilityVendorNamespaceInfo `xml:"PbmCapabilityVendorNamespaceInfo,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityVendorNamespaceInfo", reflect.TypeOf((*ArrayOfPbmCapabilityVendorNamespaceInfo)(nil)).Elem()) -} - -type ArrayOfPbmCapabilityVendorResourceTypeInfo struct { - PbmCapabilityVendorResourceTypeInfo []PbmCapabilityVendorResourceTypeInfo `xml:"PbmCapabilityVendorResourceTypeInfo,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCapabilityVendorResourceTypeInfo", reflect.TypeOf((*ArrayOfPbmCapabilityVendorResourceTypeInfo)(nil)).Elem()) -} - -type ArrayOfPbmCompliancePolicyStatus struct { - PbmCompliancePolicyStatus []PbmCompliancePolicyStatus `xml:"PbmCompliancePolicyStatus,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmCompliancePolicyStatus", reflect.TypeOf((*ArrayOfPbmCompliancePolicyStatus)(nil)).Elem()) -} - -type ArrayOfPbmComplianceResult struct { - PbmComplianceResult []PbmComplianceResult `xml:"PbmComplianceResult,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmComplianceResult", reflect.TypeOf((*ArrayOfPbmComplianceResult)(nil)).Elem()) -} - -type ArrayOfPbmDatastoreSpaceStatistics struct { - PbmDatastoreSpaceStatistics []PbmDatastoreSpaceStatistics `xml:"PbmDatastoreSpaceStatistics,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmDatastoreSpaceStatistics", reflect.TypeOf((*ArrayOfPbmDatastoreSpaceStatistics)(nil)).Elem()) -} - -type ArrayOfPbmDefaultProfileInfo struct { - PbmDefaultProfileInfo []PbmDefaultProfileInfo `xml:"PbmDefaultProfileInfo,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmDefaultProfileInfo", reflect.TypeOf((*ArrayOfPbmDefaultProfileInfo)(nil)).Elem()) -} - -type ArrayOfPbmPlacementCompatibilityResult struct { - PbmPlacementCompatibilityResult []PbmPlacementCompatibilityResult `xml:"PbmPlacementCompatibilityResult,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmPlacementCompatibilityResult", reflect.TypeOf((*ArrayOfPbmPlacementCompatibilityResult)(nil)).Elem()) -} - -type ArrayOfPbmPlacementHub struct { - PbmPlacementHub []PbmPlacementHub `xml:"PbmPlacementHub,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmPlacementHub", reflect.TypeOf((*ArrayOfPbmPlacementHub)(nil)).Elem()) -} - -type ArrayOfPbmPlacementMatchingResources struct { - PbmPlacementMatchingResources []BasePbmPlacementMatchingResources `xml:"PbmPlacementMatchingResources,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:ArrayOfPbmPlacementMatchingResources", reflect.TypeOf((*ArrayOfPbmPlacementMatchingResources)(nil)).Elem()) -} - -type ArrayOfPbmPlacementRequirement struct { - PbmPlacementRequirement []BasePbmPlacementRequirement `xml:"PbmPlacementRequirement,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:ArrayOfPbmPlacementRequirement", reflect.TypeOf((*ArrayOfPbmPlacementRequirement)(nil)).Elem()) -} - -type ArrayOfPbmPlacementResourceUtilization struct { - PbmPlacementResourceUtilization []PbmPlacementResourceUtilization `xml:"PbmPlacementResourceUtilization,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmPlacementResourceUtilization", reflect.TypeOf((*ArrayOfPbmPlacementResourceUtilization)(nil)).Elem()) -} - -type ArrayOfPbmProfile struct { - PbmProfile []BasePbmProfile `xml:"PbmProfile,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:ArrayOfPbmProfile", reflect.TypeOf((*ArrayOfPbmProfile)(nil)).Elem()) -} - -type ArrayOfPbmProfileId struct { - PbmProfileId []PbmProfileId `xml:"PbmProfileId,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmProfileId", reflect.TypeOf((*ArrayOfPbmProfileId)(nil)).Elem()) -} - -type ArrayOfPbmProfileOperationOutcome struct { - PbmProfileOperationOutcome []PbmProfileOperationOutcome `xml:"PbmProfileOperationOutcome,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmProfileOperationOutcome", reflect.TypeOf((*ArrayOfPbmProfileOperationOutcome)(nil)).Elem()) -} - -type ArrayOfPbmProfileResourceType struct { - PbmProfileResourceType []PbmProfileResourceType `xml:"PbmProfileResourceType,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmProfileResourceType", reflect.TypeOf((*ArrayOfPbmProfileResourceType)(nil)).Elem()) -} - -type ArrayOfPbmProfileType struct { - PbmProfileType []PbmProfileType `xml:"PbmProfileType,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmProfileType", reflect.TypeOf((*ArrayOfPbmProfileType)(nil)).Elem()) -} - -type ArrayOfPbmQueryProfileResult struct { - PbmQueryProfileResult []PbmQueryProfileResult `xml:"PbmQueryProfileResult,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmQueryProfileResult", reflect.TypeOf((*ArrayOfPbmQueryProfileResult)(nil)).Elem()) -} - -type ArrayOfPbmQueryReplicationGroupResult struct { - PbmQueryReplicationGroupResult []PbmQueryReplicationGroupResult `xml:"PbmQueryReplicationGroupResult,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmQueryReplicationGroupResult", reflect.TypeOf((*ArrayOfPbmQueryReplicationGroupResult)(nil)).Elem()) -} - -type ArrayOfPbmRollupComplianceResult struct { - PbmRollupComplianceResult []PbmRollupComplianceResult `xml:"PbmRollupComplianceResult,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmRollupComplianceResult", reflect.TypeOf((*ArrayOfPbmRollupComplianceResult)(nil)).Elem()) -} - -type ArrayOfPbmServerObjectRef struct { - PbmServerObjectRef []PbmServerObjectRef `xml:"PbmServerObjectRef,omitempty"` -} - -func init() { - types.Add("pbm:ArrayOfPbmServerObjectRef", reflect.TypeOf((*ArrayOfPbmServerObjectRef)(nil)).Elem()) -} - -type PbmAboutInfo struct { - types.DynamicData - - Name string `xml:"name"` - Version string `xml:"version"` - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - types.Add("pbm:PbmAboutInfo", reflect.TypeOf((*PbmAboutInfo)(nil)).Elem()) -} - -type PbmAlreadyExists struct { - PbmFault - - Name string `xml:"name,omitempty"` -} - -func init() { - types.Add("pbm:PbmAlreadyExists", reflect.TypeOf((*PbmAlreadyExists)(nil)).Elem()) -} - -type PbmAlreadyExistsFault PbmAlreadyExists - -func init() { - types.Add("pbm:PbmAlreadyExistsFault", reflect.TypeOf((*PbmAlreadyExistsFault)(nil)).Elem()) -} - -type PbmAssignDefaultRequirementProfile PbmAssignDefaultRequirementProfileRequestType - -func init() { - types.Add("pbm:PbmAssignDefaultRequirementProfile", reflect.TypeOf((*PbmAssignDefaultRequirementProfile)(nil)).Elem()) -} - -type PbmAssignDefaultRequirementProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Profile PbmProfileId `xml:"profile"` - Datastores []PbmPlacementHub `xml:"datastores"` -} - -func init() { - types.Add("pbm:PbmAssignDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmAssignDefaultRequirementProfileRequestType)(nil)).Elem()) -} - -type PbmAssignDefaultRequirementProfileResponse struct { -} - -type PbmCapabilityConstraintInstance struct { - types.DynamicData - - PropertyInstance []PbmCapabilityPropertyInstance `xml:"propertyInstance"` -} - -func init() { - types.Add("pbm:PbmCapabilityConstraintInstance", reflect.TypeOf((*PbmCapabilityConstraintInstance)(nil)).Elem()) -} - -type PbmCapabilityConstraints struct { - types.DynamicData -} - -func init() { - types.Add("pbm:PbmCapabilityConstraints", reflect.TypeOf((*PbmCapabilityConstraints)(nil)).Elem()) -} - -type PbmCapabilityDescription struct { - types.DynamicData - - Description PbmExtendedElementDescription `xml:"description"` - Value types.AnyType `xml:"value,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityDescription", reflect.TypeOf((*PbmCapabilityDescription)(nil)).Elem()) -} - -type PbmCapabilityDiscreteSet struct { - types.DynamicData - - Values []types.AnyType `xml:"values,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityDiscreteSet", reflect.TypeOf((*PbmCapabilityDiscreteSet)(nil)).Elem()) -} - -type PbmCapabilityGenericTypeInfo struct { - PbmCapabilityTypeInfo - - GenericTypeName string `xml:"genericTypeName"` -} - -func init() { - types.Add("pbm:PbmCapabilityGenericTypeInfo", reflect.TypeOf((*PbmCapabilityGenericTypeInfo)(nil)).Elem()) -} - -type PbmCapabilityInstance struct { - types.DynamicData - - Id PbmCapabilityMetadataUniqueId `xml:"id"` - Constraint []PbmCapabilityConstraintInstance `xml:"constraint"` -} - -func init() { - types.Add("pbm:PbmCapabilityInstance", reflect.TypeOf((*PbmCapabilityInstance)(nil)).Elem()) -} - -type PbmCapabilityMetadata struct { - types.DynamicData - - Id PbmCapabilityMetadataUniqueId `xml:"id"` - Summary PbmExtendedElementDescription `xml:"summary"` - Mandatory *bool `xml:"mandatory"` - Hint *bool `xml:"hint"` - KeyId string `xml:"keyId,omitempty"` - AllowMultipleConstraints *bool `xml:"allowMultipleConstraints"` - PropertyMetadata []PbmCapabilityPropertyMetadata `xml:"propertyMetadata"` -} - -func init() { - types.Add("pbm:PbmCapabilityMetadata", reflect.TypeOf((*PbmCapabilityMetadata)(nil)).Elem()) -} - -type PbmCapabilityMetadataPerCategory struct { - types.DynamicData - - SubCategory string `xml:"subCategory"` - CapabilityMetadata []PbmCapabilityMetadata `xml:"capabilityMetadata"` -} - -func init() { - types.Add("pbm:PbmCapabilityMetadataPerCategory", reflect.TypeOf((*PbmCapabilityMetadataPerCategory)(nil)).Elem()) -} - -type PbmCapabilityMetadataUniqueId struct { - types.DynamicData - - Namespace string `xml:"namespace"` - Id string `xml:"id"` -} - -func init() { - types.Add("pbm:PbmCapabilityMetadataUniqueId", reflect.TypeOf((*PbmCapabilityMetadataUniqueId)(nil)).Elem()) -} - -type PbmCapabilityNamespaceInfo struct { - types.DynamicData - - Version string `xml:"version"` - Namespace string `xml:"namespace"` - Info *PbmExtendedElementDescription `xml:"info,omitempty"` -} - -func init() { - types.Add("pbm:PbmCapabilityNamespaceInfo", reflect.TypeOf((*PbmCapabilityNamespaceInfo)(nil)).Elem()) -} - -type PbmCapabilityProfile struct { - PbmProfile - - ProfileCategory string `xml:"profileCategory"` - ResourceType PbmProfileResourceType `xml:"resourceType"` - Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` - GenerationId int64 `xml:"generationId,omitempty"` - IsDefault bool `xml:"isDefault"` - SystemCreatedProfileType string `xml:"systemCreatedProfileType,omitempty"` - LineOfService string `xml:"lineOfService,omitempty"` -} - -func init() { - types.Add("pbm:PbmCapabilityProfile", reflect.TypeOf((*PbmCapabilityProfile)(nil)).Elem()) -} - -type PbmCapabilityProfileCreateSpec struct { - types.DynamicData - - Name string `xml:"name"` - Description string `xml:"description,omitempty"` - Category string `xml:"category,omitempty"` - ResourceType PbmProfileResourceType `xml:"resourceType"` - Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityProfileCreateSpec", reflect.TypeOf((*PbmCapabilityProfileCreateSpec)(nil)).Elem()) -} - -type PbmCapabilityProfilePropertyMismatchFault struct { - PbmPropertyMismatchFault - - ResourcePropertyInstance PbmCapabilityPropertyInstance `xml:"resourcePropertyInstance"` -} - -func init() { - types.Add("pbm:PbmCapabilityProfilePropertyMismatchFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFault)(nil)).Elem()) -} - -type PbmCapabilityProfilePropertyMismatchFaultFault BasePbmCapabilityProfilePropertyMismatchFault - -func init() { - types.Add("pbm:PbmCapabilityProfilePropertyMismatchFaultFault", reflect.TypeOf((*PbmCapabilityProfilePropertyMismatchFaultFault)(nil)).Elem()) -} - -type PbmCapabilityProfileUpdateSpec struct { - types.DynamicData - - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` - Constraints BasePbmCapabilityConstraints `xml:"constraints,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityProfileUpdateSpec", reflect.TypeOf((*PbmCapabilityProfileUpdateSpec)(nil)).Elem()) -} - -type PbmCapabilityPropertyInstance struct { - types.DynamicData - - Id string `xml:"id"` - Operator string `xml:"operator,omitempty"` - Value types.AnyType `xml:"value,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityPropertyInstance", reflect.TypeOf((*PbmCapabilityPropertyInstance)(nil)).Elem()) -} - -type PbmCapabilityPropertyMetadata struct { - types.DynamicData - - Id string `xml:"id"` - Summary PbmExtendedElementDescription `xml:"summary"` - Mandatory bool `xml:"mandatory"` - Type BasePbmCapabilityTypeInfo `xml:"type,omitempty,typeattr"` - DefaultValue types.AnyType `xml:"defaultValue,omitempty,typeattr"` - AllowedValue types.AnyType `xml:"allowedValue,omitempty,typeattr"` - RequirementsTypeHint string `xml:"requirementsTypeHint,omitempty"` -} - -func init() { - types.Add("pbm:PbmCapabilityPropertyMetadata", reflect.TypeOf((*PbmCapabilityPropertyMetadata)(nil)).Elem()) -} - -type PbmCapabilityRange struct { - types.DynamicData - - Min types.AnyType `xml:"min,typeattr"` - Max types.AnyType `xml:"max,typeattr"` -} - -func init() { - types.Add("pbm:PbmCapabilityRange", reflect.TypeOf((*PbmCapabilityRange)(nil)).Elem()) -} - -type PbmCapabilitySchema struct { - types.DynamicData - - VendorInfo PbmCapabilitySchemaVendorInfo `xml:"vendorInfo"` - NamespaceInfo PbmCapabilityNamespaceInfo `xml:"namespaceInfo"` - LineOfService BasePbmLineOfServiceInfo `xml:"lineOfService,omitempty,typeattr"` - CapabilityMetadataPerCategory []PbmCapabilityMetadataPerCategory `xml:"capabilityMetadataPerCategory"` -} - -func init() { - types.Add("pbm:PbmCapabilitySchema", reflect.TypeOf((*PbmCapabilitySchema)(nil)).Elem()) -} - -type PbmCapabilitySchemaVendorInfo struct { - types.DynamicData - - VendorUuid string `xml:"vendorUuid"` - Info PbmExtendedElementDescription `xml:"info"` -} - -func init() { - types.Add("pbm:PbmCapabilitySchemaVendorInfo", reflect.TypeOf((*PbmCapabilitySchemaVendorInfo)(nil)).Elem()) -} - -type PbmCapabilitySubProfile struct { - types.DynamicData - - Name string `xml:"name"` - Capability []PbmCapabilityInstance `xml:"capability"` - ForceProvision *bool `xml:"forceProvision"` -} - -func init() { - types.Add("pbm:PbmCapabilitySubProfile", reflect.TypeOf((*PbmCapabilitySubProfile)(nil)).Elem()) -} - -type PbmCapabilitySubProfileConstraints struct { - PbmCapabilityConstraints - - SubProfiles []PbmCapabilitySubProfile `xml:"subProfiles"` -} - -func init() { - types.Add("pbm:PbmCapabilitySubProfileConstraints", reflect.TypeOf((*PbmCapabilitySubProfileConstraints)(nil)).Elem()) -} - -type PbmCapabilityTimeSpan struct { - types.DynamicData - - Value int32 `xml:"value"` - Unit string `xml:"unit"` -} - -func init() { - types.Add("pbm:PbmCapabilityTimeSpan", reflect.TypeOf((*PbmCapabilityTimeSpan)(nil)).Elem()) -} - -type PbmCapabilityTypeInfo struct { - types.DynamicData - - TypeName string `xml:"typeName"` -} - -func init() { - types.Add("pbm:PbmCapabilityTypeInfo", reflect.TypeOf((*PbmCapabilityTypeInfo)(nil)).Elem()) -} - -type PbmCapabilityVendorNamespaceInfo struct { - types.DynamicData - - VendorInfo PbmCapabilitySchemaVendorInfo `xml:"vendorInfo"` - NamespaceInfo PbmCapabilityNamespaceInfo `xml:"namespaceInfo"` -} - -func init() { - types.Add("pbm:PbmCapabilityVendorNamespaceInfo", reflect.TypeOf((*PbmCapabilityVendorNamespaceInfo)(nil)).Elem()) -} - -type PbmCapabilityVendorResourceTypeInfo struct { - types.DynamicData - - ResourceType string `xml:"resourceType"` - VendorNamespaceInfo []PbmCapabilityVendorNamespaceInfo `xml:"vendorNamespaceInfo"` -} - -func init() { - types.Add("pbm:PbmCapabilityVendorResourceTypeInfo", reflect.TypeOf((*PbmCapabilityVendorResourceTypeInfo)(nil)).Elem()) -} - -type PbmCheckCompatibility PbmCheckCompatibilityRequestType - -func init() { - types.Add("pbm:PbmCheckCompatibility", reflect.TypeOf((*PbmCheckCompatibility)(nil)).Elem()) -} - -type PbmCheckCompatibilityRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` - Profile PbmProfileId `xml:"profile"` -} - -func init() { - types.Add("pbm:PbmCheckCompatibilityRequestType", reflect.TypeOf((*PbmCheckCompatibilityRequestType)(nil)).Elem()) -} - -type PbmCheckCompatibilityResponse struct { - Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` -} - -type PbmCheckCompatibilityWithSpec PbmCheckCompatibilityWithSpecRequestType - -func init() { - types.Add("pbm:PbmCheckCompatibilityWithSpec", reflect.TypeOf((*PbmCheckCompatibilityWithSpec)(nil)).Elem()) -} - -type PbmCheckCompatibilityWithSpecRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` - ProfileSpec PbmCapabilityProfileCreateSpec `xml:"profileSpec"` -} - -func init() { - types.Add("pbm:PbmCheckCompatibilityWithSpecRequestType", reflect.TypeOf((*PbmCheckCompatibilityWithSpecRequestType)(nil)).Elem()) -} - -type PbmCheckCompatibilityWithSpecResponse struct { - Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` -} - -type PbmCheckCompliance PbmCheckComplianceRequestType - -func init() { - types.Add("pbm:PbmCheckCompliance", reflect.TypeOf((*PbmCheckCompliance)(nil)).Elem()) -} - -type PbmCheckComplianceRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entities []PbmServerObjectRef `xml:"entities"` - Profile *PbmProfileId `xml:"profile,omitempty"` -} - -func init() { - types.Add("pbm:PbmCheckComplianceRequestType", reflect.TypeOf((*PbmCheckComplianceRequestType)(nil)).Elem()) -} - -type PbmCheckComplianceResponse struct { - Returnval []PbmComplianceResult `xml:"returnval,omitempty"` -} - -type PbmCheckRequirements PbmCheckRequirementsRequestType - -func init() { - types.Add("pbm:PbmCheckRequirements", reflect.TypeOf((*PbmCheckRequirements)(nil)).Elem()) -} - -type PbmCheckRequirementsRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` - PlacementSubjectRef *PbmServerObjectRef `xml:"placementSubjectRef,omitempty"` - PlacementSubjectRequirement []BasePbmPlacementRequirement `xml:"placementSubjectRequirement,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:PbmCheckRequirementsRequestType", reflect.TypeOf((*PbmCheckRequirementsRequestType)(nil)).Elem()) -} - -type PbmCheckRequirementsResponse struct { - Returnval []PbmPlacementCompatibilityResult `xml:"returnval,omitempty"` -} - -type PbmCheckRollupCompliance PbmCheckRollupComplianceRequestType - -func init() { - types.Add("pbm:PbmCheckRollupCompliance", reflect.TypeOf((*PbmCheckRollupCompliance)(nil)).Elem()) -} - -type PbmCheckRollupComplianceRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entity []PbmServerObjectRef `xml:"entity"` -} - -func init() { - types.Add("pbm:PbmCheckRollupComplianceRequestType", reflect.TypeOf((*PbmCheckRollupComplianceRequestType)(nil)).Elem()) -} - -type PbmCheckRollupComplianceResponse struct { - Returnval []PbmRollupComplianceResult `xml:"returnval,omitempty"` -} - -type PbmCompatibilityCheckFault struct { - PbmFault - - Hub PbmPlacementHub `xml:"hub"` -} - -func init() { - types.Add("pbm:PbmCompatibilityCheckFault", reflect.TypeOf((*PbmCompatibilityCheckFault)(nil)).Elem()) -} - -type PbmCompatibilityCheckFaultFault BasePbmCompatibilityCheckFault - -func init() { - types.Add("pbm:PbmCompatibilityCheckFaultFault", reflect.TypeOf((*PbmCompatibilityCheckFaultFault)(nil)).Elem()) -} - -type PbmComplianceOperationalStatus struct { - types.DynamicData - - Healthy *bool `xml:"healthy"` - OperationETA *time.Time `xml:"operationETA"` - OperationProgress int64 `xml:"operationProgress,omitempty"` - Transitional *bool `xml:"transitional"` -} - -func init() { - types.Add("pbm:PbmComplianceOperationalStatus", reflect.TypeOf((*PbmComplianceOperationalStatus)(nil)).Elem()) -} - -type PbmCompliancePolicyStatus struct { - types.DynamicData - - ExpectedValue PbmCapabilityInstance `xml:"expectedValue"` - CurrentValue *PbmCapabilityInstance `xml:"currentValue,omitempty"` -} - -func init() { - types.Add("pbm:PbmCompliancePolicyStatus", reflect.TypeOf((*PbmCompliancePolicyStatus)(nil)).Elem()) -} - -type PbmComplianceResult struct { - types.DynamicData - - CheckTime time.Time `xml:"checkTime"` - Entity PbmServerObjectRef `xml:"entity"` - Profile *PbmProfileId `xml:"profile,omitempty"` - ComplianceTaskStatus string `xml:"complianceTaskStatus,omitempty"` - ComplianceStatus string `xml:"complianceStatus"` - Mismatch bool `xml:"mismatch"` - ViolatedPolicies []PbmCompliancePolicyStatus `xml:"violatedPolicies,omitempty"` - ErrorCause []types.LocalizedMethodFault `xml:"errorCause,omitempty"` - OperationalStatus *PbmComplianceOperationalStatus `xml:"operationalStatus,omitempty"` - Info *PbmExtendedElementDescription `xml:"info,omitempty"` -} - -func init() { - types.Add("pbm:PbmComplianceResult", reflect.TypeOf((*PbmComplianceResult)(nil)).Elem()) -} - -type PbmCreate PbmCreateRequestType - -func init() { - types.Add("pbm:PbmCreate", reflect.TypeOf((*PbmCreate)(nil)).Elem()) -} - -type PbmCreateRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - CreateSpec PbmCapabilityProfileCreateSpec `xml:"createSpec"` -} - -func init() { - types.Add("pbm:PbmCreateRequestType", reflect.TypeOf((*PbmCreateRequestType)(nil)).Elem()) -} - -type PbmCreateResponse struct { - Returnval PbmProfileId `xml:"returnval"` -} - -type PbmDataServiceToPoliciesMap struct { - types.DynamicData - - DataServicePolicy PbmProfileId `xml:"dataServicePolicy"` - ParentStoragePolicies []PbmProfileId `xml:"parentStoragePolicies,omitempty"` - Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - types.Add("pbm:PbmDataServiceToPoliciesMap", reflect.TypeOf((*PbmDataServiceToPoliciesMap)(nil)).Elem()) -} - -type PbmDatastoreSpaceStatistics struct { - types.DynamicData - - ProfileId string `xml:"profileId,omitempty"` - PhysicalTotalInMB int64 `xml:"physicalTotalInMB"` - PhysicalFreeInMB int64 `xml:"physicalFreeInMB"` - PhysicalUsedInMB int64 `xml:"physicalUsedInMB"` - LogicalLimitInMB int64 `xml:"logicalLimitInMB,omitempty"` - LogicalFreeInMB int64 `xml:"logicalFreeInMB"` - LogicalUsedInMB int64 `xml:"logicalUsedInMB"` -} - -func init() { - types.Add("pbm:PbmDatastoreSpaceStatistics", reflect.TypeOf((*PbmDatastoreSpaceStatistics)(nil)).Elem()) -} - -type PbmDefaultCapabilityProfile struct { - PbmCapabilityProfile - - VvolType []string `xml:"vvolType"` - ContainerId string `xml:"containerId"` -} - -func init() { - types.Add("pbm:PbmDefaultCapabilityProfile", reflect.TypeOf((*PbmDefaultCapabilityProfile)(nil)).Elem()) -} - -type PbmDefaultProfileAppliesFault struct { - PbmCompatibilityCheckFault -} - -func init() { - types.Add("pbm:PbmDefaultProfileAppliesFault", reflect.TypeOf((*PbmDefaultProfileAppliesFault)(nil)).Elem()) -} - -type PbmDefaultProfileAppliesFaultFault PbmDefaultProfileAppliesFault - -func init() { - types.Add("pbm:PbmDefaultProfileAppliesFaultFault", reflect.TypeOf((*PbmDefaultProfileAppliesFaultFault)(nil)).Elem()) -} - -type PbmDefaultProfileInfo struct { - types.DynamicData - - Datastores []PbmPlacementHub `xml:"datastores"` - DefaultProfile BasePbmProfile `xml:"defaultProfile,omitempty,typeattr"` -} - -func init() { - types.Add("pbm:PbmDefaultProfileInfo", reflect.TypeOf((*PbmDefaultProfileInfo)(nil)).Elem()) -} - -type PbmDelete PbmDeleteRequestType - -func init() { - types.Add("pbm:PbmDelete", reflect.TypeOf((*PbmDelete)(nil)).Elem()) -} - -type PbmDeleteRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ProfileId []PbmProfileId `xml:"profileId"` -} - -func init() { - types.Add("pbm:PbmDeleteRequestType", reflect.TypeOf((*PbmDeleteRequestType)(nil)).Elem()) -} - -type PbmDeleteResponse struct { - Returnval []PbmProfileOperationOutcome `xml:"returnval,omitempty"` -} - -type PbmDuplicateName struct { - PbmFault - - Name string `xml:"name"` -} - -func init() { - types.Add("pbm:PbmDuplicateName", reflect.TypeOf((*PbmDuplicateName)(nil)).Elem()) -} - -type PbmDuplicateNameFault PbmDuplicateName - -func init() { - types.Add("pbm:PbmDuplicateNameFault", reflect.TypeOf((*PbmDuplicateNameFault)(nil)).Elem()) -} - -type PbmExtendedElementDescription struct { - types.DynamicData - - Label string `xml:"label"` - Summary string `xml:"summary"` - Key string `xml:"key"` - MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` - MessageArg []types.KeyAnyValue `xml:"messageArg,omitempty"` -} - -func init() { - types.Add("pbm:PbmExtendedElementDescription", reflect.TypeOf((*PbmExtendedElementDescription)(nil)).Elem()) -} - -type PbmFault struct { - types.MethodFault -} - -func init() { - types.Add("pbm:PbmFault", reflect.TypeOf((*PbmFault)(nil)).Elem()) -} - -type PbmFaultFault BasePbmFault - -func init() { - types.Add("pbm:PbmFaultFault", reflect.TypeOf((*PbmFaultFault)(nil)).Elem()) -} - -type PbmFaultInvalidLogin struct { - PbmFault -} - -func init() { - types.Add("pbm:PbmFaultInvalidLogin", reflect.TypeOf((*PbmFaultInvalidLogin)(nil)).Elem()) -} - -type PbmFaultInvalidLoginFault PbmFaultInvalidLogin - -func init() { - types.Add("pbm:PbmFaultInvalidLoginFault", reflect.TypeOf((*PbmFaultInvalidLoginFault)(nil)).Elem()) -} - -type PbmFaultNoPermissionEntityPrivileges struct { - types.DynamicData - - ProfileId *PbmProfileId `xml:"profileId,omitempty"` - PrivilegeIds []string `xml:"privilegeIds,omitempty"` -} - -func init() { - types.Add("pbm:PbmFaultNoPermissionEntityPrivileges", reflect.TypeOf((*PbmFaultNoPermissionEntityPrivileges)(nil)).Elem()) -} - -type PbmFaultNotFound struct { - PbmFault -} - -func init() { - types.Add("pbm:PbmFaultNotFound", reflect.TypeOf((*PbmFaultNotFound)(nil)).Elem()) -} - -type PbmFaultNotFoundFault PbmFaultNotFound - -func init() { - types.Add("pbm:PbmFaultNotFoundFault", reflect.TypeOf((*PbmFaultNotFoundFault)(nil)).Elem()) -} - -type PbmFaultProfileStorageFault struct { - PbmFault -} - -func init() { - types.Add("pbm:PbmFaultProfileStorageFault", reflect.TypeOf((*PbmFaultProfileStorageFault)(nil)).Elem()) -} - -type PbmFaultProfileStorageFaultFault PbmFaultProfileStorageFault - -func init() { - types.Add("pbm:PbmFaultProfileStorageFaultFault", reflect.TypeOf((*PbmFaultProfileStorageFaultFault)(nil)).Elem()) -} - -type PbmFetchCapabilityMetadata PbmFetchCapabilityMetadataRequestType - -func init() { - types.Add("pbm:PbmFetchCapabilityMetadata", reflect.TypeOf((*PbmFetchCapabilityMetadata)(nil)).Elem()) -} - -type PbmFetchCapabilityMetadataRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ResourceType *PbmProfileResourceType `xml:"resourceType,omitempty"` - VendorUuid string `xml:"vendorUuid,omitempty"` -} - -func init() { - types.Add("pbm:PbmFetchCapabilityMetadataRequestType", reflect.TypeOf((*PbmFetchCapabilityMetadataRequestType)(nil)).Elem()) -} - -type PbmFetchCapabilityMetadataResponse struct { - Returnval []PbmCapabilityMetadataPerCategory `xml:"returnval,omitempty"` -} - -type PbmFetchCapabilitySchema PbmFetchCapabilitySchemaRequestType - -func init() { - types.Add("pbm:PbmFetchCapabilitySchema", reflect.TypeOf((*PbmFetchCapabilitySchema)(nil)).Elem()) -} - -type PbmFetchCapabilitySchemaRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - VendorUuid string `xml:"vendorUuid,omitempty"` - LineOfService []string `xml:"lineOfService,omitempty"` -} - -func init() { - types.Add("pbm:PbmFetchCapabilitySchemaRequestType", reflect.TypeOf((*PbmFetchCapabilitySchemaRequestType)(nil)).Elem()) -} - -type PbmFetchCapabilitySchemaResponse struct { - Returnval []PbmCapabilitySchema `xml:"returnval,omitempty"` -} - -type PbmFetchComplianceResult PbmFetchComplianceResultRequestType - -func init() { - types.Add("pbm:PbmFetchComplianceResult", reflect.TypeOf((*PbmFetchComplianceResult)(nil)).Elem()) -} - -type PbmFetchComplianceResultRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entities []PbmServerObjectRef `xml:"entities"` - Profile *PbmProfileId `xml:"profile,omitempty"` -} - -func init() { - types.Add("pbm:PbmFetchComplianceResultRequestType", reflect.TypeOf((*PbmFetchComplianceResultRequestType)(nil)).Elem()) -} - -type PbmFetchComplianceResultResponse struct { - Returnval []PbmComplianceResult `xml:"returnval,omitempty"` -} - -type PbmFetchEntityHealthStatusSpec struct { - types.DynamicData - - ObjectRef PbmServerObjectRef `xml:"objectRef"` - BackingId string `xml:"backingId,omitempty"` -} - -func init() { - types.Add("pbm:PbmFetchEntityHealthStatusSpec", reflect.TypeOf((*PbmFetchEntityHealthStatusSpec)(nil)).Elem()) -} - -type PbmFetchResourceType PbmFetchResourceTypeRequestType - -func init() { - types.Add("pbm:PbmFetchResourceType", reflect.TypeOf((*PbmFetchResourceType)(nil)).Elem()) -} - -type PbmFetchResourceTypeRequestType struct { - This types.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("pbm:PbmFetchResourceTypeRequestType", reflect.TypeOf((*PbmFetchResourceTypeRequestType)(nil)).Elem()) -} - -type PbmFetchResourceTypeResponse struct { - Returnval []PbmProfileResourceType `xml:"returnval,omitempty"` -} - -type PbmFetchRollupComplianceResult PbmFetchRollupComplianceResultRequestType - -func init() { - types.Add("pbm:PbmFetchRollupComplianceResult", reflect.TypeOf((*PbmFetchRollupComplianceResult)(nil)).Elem()) -} - -type PbmFetchRollupComplianceResultRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entity []PbmServerObjectRef `xml:"entity"` -} - -func init() { - types.Add("pbm:PbmFetchRollupComplianceResultRequestType", reflect.TypeOf((*PbmFetchRollupComplianceResultRequestType)(nil)).Elem()) -} - -type PbmFetchRollupComplianceResultResponse struct { - Returnval []PbmRollupComplianceResult `xml:"returnval,omitempty"` -} - -type PbmFetchVendorInfo PbmFetchVendorInfoRequestType - -func init() { - types.Add("pbm:PbmFetchVendorInfo", reflect.TypeOf((*PbmFetchVendorInfo)(nil)).Elem()) -} - -type PbmFetchVendorInfoRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ResourceType *PbmProfileResourceType `xml:"resourceType,omitempty"` -} - -func init() { - types.Add("pbm:PbmFetchVendorInfoRequestType", reflect.TypeOf((*PbmFetchVendorInfoRequestType)(nil)).Elem()) -} - -type PbmFetchVendorInfoResponse struct { - Returnval []PbmCapabilityVendorResourceTypeInfo `xml:"returnval,omitempty"` -} - -type PbmFindApplicableDefaultProfile PbmFindApplicableDefaultProfileRequestType - -func init() { - types.Add("pbm:PbmFindApplicableDefaultProfile", reflect.TypeOf((*PbmFindApplicableDefaultProfile)(nil)).Elem()) -} - -type PbmFindApplicableDefaultProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Datastores []PbmPlacementHub `xml:"datastores"` -} - -func init() { - types.Add("pbm:PbmFindApplicableDefaultProfileRequestType", reflect.TypeOf((*PbmFindApplicableDefaultProfileRequestType)(nil)).Elem()) -} - -type PbmFindApplicableDefaultProfileResponse struct { - Returnval []BasePbmProfile `xml:"returnval,omitempty,typeattr"` -} - -type PbmIncompatibleVendorSpecificRuleSet struct { - PbmCapabilityProfilePropertyMismatchFault -} - -func init() { - types.Add("pbm:PbmIncompatibleVendorSpecificRuleSet", reflect.TypeOf((*PbmIncompatibleVendorSpecificRuleSet)(nil)).Elem()) -} - -type PbmIncompatibleVendorSpecificRuleSetFault PbmIncompatibleVendorSpecificRuleSet - -func init() { - types.Add("pbm:PbmIncompatibleVendorSpecificRuleSetFault", reflect.TypeOf((*PbmIncompatibleVendorSpecificRuleSetFault)(nil)).Elem()) -} - -type PbmLegacyHubsNotSupported struct { - PbmFault - - Hubs []PbmPlacementHub `xml:"hubs"` -} - -func init() { - types.Add("pbm:PbmLegacyHubsNotSupported", reflect.TypeOf((*PbmLegacyHubsNotSupported)(nil)).Elem()) -} - -type PbmLegacyHubsNotSupportedFault PbmLegacyHubsNotSupported - -func init() { - types.Add("pbm:PbmLegacyHubsNotSupportedFault", reflect.TypeOf((*PbmLegacyHubsNotSupportedFault)(nil)).Elem()) -} - -type PbmLineOfServiceInfo struct { - types.DynamicData - - LineOfService string `xml:"lineOfService"` - Name PbmExtendedElementDescription `xml:"name"` - Description *PbmExtendedElementDescription `xml:"description,omitempty"` -} - -func init() { - types.Add("pbm:PbmLineOfServiceInfo", reflect.TypeOf((*PbmLineOfServiceInfo)(nil)).Elem()) -} - -type PbmLoggingConfiguration struct { - types.DynamicData - - Component string `xml:"component"` - LogLevel string `xml:"logLevel"` -} - -func init() { - types.Add("pbm:PbmLoggingConfiguration", reflect.TypeOf((*PbmLoggingConfiguration)(nil)).Elem()) -} - -type PbmNonExistentHubs struct { - PbmFault - - Hubs []PbmPlacementHub `xml:"hubs"` -} - -func init() { - types.Add("pbm:PbmNonExistentHubs", reflect.TypeOf((*PbmNonExistentHubs)(nil)).Elem()) -} - -type PbmNonExistentHubsFault PbmNonExistentHubs - -func init() { - types.Add("pbm:PbmNonExistentHubsFault", reflect.TypeOf((*PbmNonExistentHubsFault)(nil)).Elem()) -} - -type PbmPersistenceBasedDataServiceInfo struct { - PbmLineOfServiceInfo - - CompatiblePersistenceSchemaNamespace []string `xml:"compatiblePersistenceSchemaNamespace,omitempty"` -} - -func init() { - types.Add("pbm:PbmPersistenceBasedDataServiceInfo", reflect.TypeOf((*PbmPersistenceBasedDataServiceInfo)(nil)).Elem()) -} - -type PbmPlacementCapabilityConstraintsRequirement struct { - PbmPlacementRequirement - - Constraints BasePbmCapabilityConstraints `xml:"constraints,typeattr"` -} - -func init() { - types.Add("pbm:PbmPlacementCapabilityConstraintsRequirement", reflect.TypeOf((*PbmPlacementCapabilityConstraintsRequirement)(nil)).Elem()) -} - -type PbmPlacementCapabilityProfileRequirement struct { - PbmPlacementRequirement - - ProfileId PbmProfileId `xml:"profileId"` -} - -func init() { - types.Add("pbm:PbmPlacementCapabilityProfileRequirement", reflect.TypeOf((*PbmPlacementCapabilityProfileRequirement)(nil)).Elem()) -} - -type PbmPlacementCompatibilityResult struct { - types.DynamicData - - Hub PbmPlacementHub `xml:"hub"` - MatchingResources []BasePbmPlacementMatchingResources `xml:"matchingResources,omitempty,typeattr"` - HowMany int64 `xml:"howMany,omitempty"` - Utilization []PbmPlacementResourceUtilization `xml:"utilization,omitempty"` - Warning []types.LocalizedMethodFault `xml:"warning,omitempty"` - Error []types.LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - types.Add("pbm:PbmPlacementCompatibilityResult", reflect.TypeOf((*PbmPlacementCompatibilityResult)(nil)).Elem()) -} - -type PbmPlacementHub struct { - types.DynamicData - - HubType string `xml:"hubType"` - HubId string `xml:"hubId"` -} - -func init() { - types.Add("pbm:PbmPlacementHub", reflect.TypeOf((*PbmPlacementHub)(nil)).Elem()) -} - -type PbmPlacementMatchingReplicationResources struct { - PbmPlacementMatchingResources - - ReplicationGroup []types.ReplicationGroupId `xml:"replicationGroup,omitempty"` -} - -func init() { - types.Add("pbm:PbmPlacementMatchingReplicationResources", reflect.TypeOf((*PbmPlacementMatchingReplicationResources)(nil)).Elem()) -} - -type PbmPlacementMatchingResources struct { - types.DynamicData -} - -func init() { - types.Add("pbm:PbmPlacementMatchingResources", reflect.TypeOf((*PbmPlacementMatchingResources)(nil)).Elem()) -} - -type PbmPlacementRequirement struct { - types.DynamicData -} - -func init() { - types.Add("pbm:PbmPlacementRequirement", reflect.TypeOf((*PbmPlacementRequirement)(nil)).Elem()) -} - -type PbmPlacementResourceUtilization struct { - types.DynamicData - - Name PbmExtendedElementDescription `xml:"name"` - Description PbmExtendedElementDescription `xml:"description"` - AvailableBefore int64 `xml:"availableBefore,omitempty"` - AvailableAfter int64 `xml:"availableAfter,omitempty"` - Total int64 `xml:"total,omitempty"` -} - -func init() { - types.Add("pbm:PbmPlacementResourceUtilization", reflect.TypeOf((*PbmPlacementResourceUtilization)(nil)).Elem()) -} - -type PbmProfile struct { - types.DynamicData - - ProfileId PbmProfileId `xml:"profileId"` - Name string `xml:"name"` - Description string `xml:"description,omitempty"` - CreationTime time.Time `xml:"creationTime"` - CreatedBy string `xml:"createdBy"` - LastUpdatedTime time.Time `xml:"lastUpdatedTime"` - LastUpdatedBy string `xml:"lastUpdatedBy"` -} - -func init() { - types.Add("pbm:PbmProfile", reflect.TypeOf((*PbmProfile)(nil)).Elem()) -} - -type PbmProfileId struct { - types.DynamicData - - UniqueId string `xml:"uniqueId"` -} - -func init() { - types.Add("pbm:PbmProfileId", reflect.TypeOf((*PbmProfileId)(nil)).Elem()) -} - -type PbmProfileOperationOutcome struct { - types.DynamicData - - ProfileId PbmProfileId `xml:"profileId"` - Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - types.Add("pbm:PbmProfileOperationOutcome", reflect.TypeOf((*PbmProfileOperationOutcome)(nil)).Elem()) -} - -type PbmProfileResourceType struct { - types.DynamicData - - ResourceType string `xml:"resourceType"` -} - -func init() { - types.Add("pbm:PbmProfileResourceType", reflect.TypeOf((*PbmProfileResourceType)(nil)).Elem()) -} - -type PbmProfileType struct { - types.DynamicData - - UniqueId string `xml:"uniqueId"` -} - -func init() { - types.Add("pbm:PbmProfileType", reflect.TypeOf((*PbmProfileType)(nil)).Elem()) -} - -type PbmPropertyMismatchFault struct { - PbmCompatibilityCheckFault - - CapabilityInstanceId PbmCapabilityMetadataUniqueId `xml:"capabilityInstanceId"` - RequirementPropertyInstance PbmCapabilityPropertyInstance `xml:"requirementPropertyInstance"` -} - -func init() { - types.Add("pbm:PbmPropertyMismatchFault", reflect.TypeOf((*PbmPropertyMismatchFault)(nil)).Elem()) -} - -type PbmPropertyMismatchFaultFault BasePbmPropertyMismatchFault - -func init() { - types.Add("pbm:PbmPropertyMismatchFaultFault", reflect.TypeOf((*PbmPropertyMismatchFaultFault)(nil)).Elem()) -} - -type PbmQueryAssociatedEntities PbmQueryAssociatedEntitiesRequestType - -func init() { - types.Add("pbm:PbmQueryAssociatedEntities", reflect.TypeOf((*PbmQueryAssociatedEntities)(nil)).Elem()) -} - -type PbmQueryAssociatedEntitiesRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Profiles []PbmProfileId `xml:"profiles,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryAssociatedEntitiesRequestType", reflect.TypeOf((*PbmQueryAssociatedEntitiesRequestType)(nil)).Elem()) -} - -type PbmQueryAssociatedEntitiesResponse struct { - Returnval []PbmQueryProfileResult `xml:"returnval,omitempty"` -} - -type PbmQueryAssociatedEntity PbmQueryAssociatedEntityRequestType - -func init() { - types.Add("pbm:PbmQueryAssociatedEntity", reflect.TypeOf((*PbmQueryAssociatedEntity)(nil)).Elem()) -} - -type PbmQueryAssociatedEntityRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Profile PbmProfileId `xml:"profile"` - EntityType string `xml:"entityType,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryAssociatedEntityRequestType", reflect.TypeOf((*PbmQueryAssociatedEntityRequestType)(nil)).Elem()) -} - -type PbmQueryAssociatedEntityResponse struct { - Returnval []PbmServerObjectRef `xml:"returnval,omitempty"` -} - -type PbmQueryAssociatedProfile PbmQueryAssociatedProfileRequestType - -func init() { - types.Add("pbm:PbmQueryAssociatedProfile", reflect.TypeOf((*PbmQueryAssociatedProfile)(nil)).Elem()) -} - -type PbmQueryAssociatedProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entity PbmServerObjectRef `xml:"entity"` -} - -func init() { - types.Add("pbm:PbmQueryAssociatedProfileRequestType", reflect.TypeOf((*PbmQueryAssociatedProfileRequestType)(nil)).Elem()) -} - -type PbmQueryAssociatedProfileResponse struct { - Returnval []PbmProfileId `xml:"returnval,omitempty"` -} - -type PbmQueryAssociatedProfiles PbmQueryAssociatedProfilesRequestType - -func init() { - types.Add("pbm:PbmQueryAssociatedProfiles", reflect.TypeOf((*PbmQueryAssociatedProfiles)(nil)).Elem()) -} - -type PbmQueryAssociatedProfilesRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entities []PbmServerObjectRef `xml:"entities"` -} - -func init() { - types.Add("pbm:PbmQueryAssociatedProfilesRequestType", reflect.TypeOf((*PbmQueryAssociatedProfilesRequestType)(nil)).Elem()) -} - -type PbmQueryAssociatedProfilesResponse struct { - Returnval []PbmQueryProfileResult `xml:"returnval,omitempty"` -} - -type PbmQueryByRollupComplianceStatus PbmQueryByRollupComplianceStatusRequestType - -func init() { - types.Add("pbm:PbmQueryByRollupComplianceStatus", reflect.TypeOf((*PbmQueryByRollupComplianceStatus)(nil)).Elem()) -} - -type PbmQueryByRollupComplianceStatusRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Status string `xml:"status"` -} - -func init() { - types.Add("pbm:PbmQueryByRollupComplianceStatusRequestType", reflect.TypeOf((*PbmQueryByRollupComplianceStatusRequestType)(nil)).Elem()) -} - -type PbmQueryByRollupComplianceStatusResponse struct { - Returnval []PbmServerObjectRef `xml:"returnval,omitempty"` -} - -type PbmQueryDefaultRequirementProfile PbmQueryDefaultRequirementProfileRequestType - -func init() { - types.Add("pbm:PbmQueryDefaultRequirementProfile", reflect.TypeOf((*PbmQueryDefaultRequirementProfile)(nil)).Elem()) -} - -type PbmQueryDefaultRequirementProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Hub PbmPlacementHub `xml:"hub"` -} - -func init() { - types.Add("pbm:PbmQueryDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmQueryDefaultRequirementProfileRequestType)(nil)).Elem()) -} - -type PbmQueryDefaultRequirementProfileResponse struct { - Returnval *PbmProfileId `xml:"returnval,omitempty"` -} - -type PbmQueryDefaultRequirementProfiles PbmQueryDefaultRequirementProfilesRequestType - -func init() { - types.Add("pbm:PbmQueryDefaultRequirementProfiles", reflect.TypeOf((*PbmQueryDefaultRequirementProfiles)(nil)).Elem()) -} - -type PbmQueryDefaultRequirementProfilesRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Datastores []PbmPlacementHub `xml:"datastores"` -} - -func init() { - types.Add("pbm:PbmQueryDefaultRequirementProfilesRequestType", reflect.TypeOf((*PbmQueryDefaultRequirementProfilesRequestType)(nil)).Elem()) -} - -type PbmQueryDefaultRequirementProfilesResponse struct { - Returnval []PbmDefaultProfileInfo `xml:"returnval"` -} - -type PbmQueryMatchingHub PbmQueryMatchingHubRequestType - -func init() { - types.Add("pbm:PbmQueryMatchingHub", reflect.TypeOf((*PbmQueryMatchingHub)(nil)).Elem()) -} - -type PbmQueryMatchingHubRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` - Profile PbmProfileId `xml:"profile"` -} - -func init() { - types.Add("pbm:PbmQueryMatchingHubRequestType", reflect.TypeOf((*PbmQueryMatchingHubRequestType)(nil)).Elem()) -} - -type PbmQueryMatchingHubResponse struct { - Returnval []PbmPlacementHub `xml:"returnval,omitempty"` -} - -type PbmQueryMatchingHubWithSpec PbmQueryMatchingHubWithSpecRequestType - -func init() { - types.Add("pbm:PbmQueryMatchingHubWithSpec", reflect.TypeOf((*PbmQueryMatchingHubWithSpec)(nil)).Elem()) -} - -type PbmQueryMatchingHubWithSpecRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - HubsToSearch []PbmPlacementHub `xml:"hubsToSearch,omitempty"` - CreateSpec PbmCapabilityProfileCreateSpec `xml:"createSpec"` -} - -func init() { - types.Add("pbm:PbmQueryMatchingHubWithSpecRequestType", reflect.TypeOf((*PbmQueryMatchingHubWithSpecRequestType)(nil)).Elem()) -} - -type PbmQueryMatchingHubWithSpecResponse struct { - Returnval []PbmPlacementHub `xml:"returnval,omitempty"` -} - -type PbmQueryProfile PbmQueryProfileRequestType - -func init() { - types.Add("pbm:PbmQueryProfile", reflect.TypeOf((*PbmQueryProfile)(nil)).Elem()) -} - -type PbmQueryProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ResourceType PbmProfileResourceType `xml:"resourceType"` - ProfileCategory string `xml:"profileCategory,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryProfileRequestType", reflect.TypeOf((*PbmQueryProfileRequestType)(nil)).Elem()) -} - -type PbmQueryProfileResponse struct { - Returnval []PbmProfileId `xml:"returnval,omitempty"` -} - -type PbmQueryProfileResult struct { - types.DynamicData - - Object PbmServerObjectRef `xml:"object"` - ProfileId []PbmProfileId `xml:"profileId,omitempty"` - Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryProfileResult", reflect.TypeOf((*PbmQueryProfileResult)(nil)).Elem()) -} - -type PbmQueryReplicationGroupResult struct { - types.DynamicData - - Object PbmServerObjectRef `xml:"object"` - ReplicationGroupId *types.ReplicationGroupId `xml:"replicationGroupId,omitempty"` - Fault *types.LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryReplicationGroupResult", reflect.TypeOf((*PbmQueryReplicationGroupResult)(nil)).Elem()) -} - -type PbmQueryReplicationGroups PbmQueryReplicationGroupsRequestType - -func init() { - types.Add("pbm:PbmQueryReplicationGroups", reflect.TypeOf((*PbmQueryReplicationGroups)(nil)).Elem()) -} - -type PbmQueryReplicationGroupsRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Entities []PbmServerObjectRef `xml:"entities,omitempty"` -} - -func init() { - types.Add("pbm:PbmQueryReplicationGroupsRequestType", reflect.TypeOf((*PbmQueryReplicationGroupsRequestType)(nil)).Elem()) -} - -type PbmQueryReplicationGroupsResponse struct { - Returnval []PbmQueryReplicationGroupResult `xml:"returnval,omitempty"` -} - -type PbmQuerySpaceStatsForStorageContainer PbmQuerySpaceStatsForStorageContainerRequestType - -func init() { - types.Add("pbm:PbmQuerySpaceStatsForStorageContainer", reflect.TypeOf((*PbmQuerySpaceStatsForStorageContainer)(nil)).Elem()) -} - -type PbmQuerySpaceStatsForStorageContainerRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Datastore PbmServerObjectRef `xml:"datastore"` - CapabilityProfileId []PbmProfileId `xml:"capabilityProfileId,omitempty"` -} - -func init() { - types.Add("pbm:PbmQuerySpaceStatsForStorageContainerRequestType", reflect.TypeOf((*PbmQuerySpaceStatsForStorageContainerRequestType)(nil)).Elem()) -} - -type PbmQuerySpaceStatsForStorageContainerResponse struct { - Returnval []PbmDatastoreSpaceStatistics `xml:"returnval,omitempty"` -} - -type PbmResetDefaultRequirementProfile PbmResetDefaultRequirementProfileRequestType - -func init() { - types.Add("pbm:PbmResetDefaultRequirementProfile", reflect.TypeOf((*PbmResetDefaultRequirementProfile)(nil)).Elem()) -} - -type PbmResetDefaultRequirementProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - Profile *PbmProfileId `xml:"profile,omitempty"` -} - -func init() { - types.Add("pbm:PbmResetDefaultRequirementProfileRequestType", reflect.TypeOf((*PbmResetDefaultRequirementProfileRequestType)(nil)).Elem()) -} - -type PbmResetDefaultRequirementProfileResponse struct { -} - -type PbmResetVSanDefaultProfile PbmResetVSanDefaultProfileRequestType - -func init() { - types.Add("pbm:PbmResetVSanDefaultProfile", reflect.TypeOf((*PbmResetVSanDefaultProfile)(nil)).Elem()) -} - -type PbmResetVSanDefaultProfileRequestType struct { - This types.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("pbm:PbmResetVSanDefaultProfileRequestType", reflect.TypeOf((*PbmResetVSanDefaultProfileRequestType)(nil)).Elem()) -} - -type PbmResetVSanDefaultProfileResponse struct { -} - -type PbmResourceInUse struct { - PbmFault - - Type string `xml:"type,omitempty"` - Name string `xml:"name,omitempty"` -} - -func init() { - types.Add("pbm:PbmResourceInUse", reflect.TypeOf((*PbmResourceInUse)(nil)).Elem()) -} - -type PbmResourceInUseFault PbmResourceInUse - -func init() { - types.Add("pbm:PbmResourceInUseFault", reflect.TypeOf((*PbmResourceInUseFault)(nil)).Elem()) -} - -type PbmRetrieveContent PbmRetrieveContentRequestType - -func init() { - types.Add("pbm:PbmRetrieveContent", reflect.TypeOf((*PbmRetrieveContent)(nil)).Elem()) -} - -type PbmRetrieveContentRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ProfileIds []PbmProfileId `xml:"profileIds"` -} - -func init() { - types.Add("pbm:PbmRetrieveContentRequestType", reflect.TypeOf((*PbmRetrieveContentRequestType)(nil)).Elem()) -} - -type PbmRetrieveContentResponse struct { - Returnval []BasePbmProfile `xml:"returnval,typeattr"` -} - -type PbmRetrieveServiceContent PbmRetrieveServiceContentRequestType - -func init() { - types.Add("pbm:PbmRetrieveServiceContent", reflect.TypeOf((*PbmRetrieveServiceContent)(nil)).Elem()) -} - -type PbmRetrieveServiceContentRequestType struct { - This types.ManagedObjectReference `xml:"_this"` -} - -func init() { - types.Add("pbm:PbmRetrieveServiceContentRequestType", reflect.TypeOf((*PbmRetrieveServiceContentRequestType)(nil)).Elem()) -} - -type PbmRetrieveServiceContentResponse struct { - Returnval PbmServiceInstanceContent `xml:"returnval"` -} - -type PbmRollupComplianceResult struct { - types.DynamicData - - OldestCheckTime time.Time `xml:"oldestCheckTime"` - Entity PbmServerObjectRef `xml:"entity"` - OverallComplianceStatus string `xml:"overallComplianceStatus"` - OverallComplianceTaskStatus string `xml:"overallComplianceTaskStatus,omitempty"` - Result []PbmComplianceResult `xml:"result,omitempty"` - ErrorCause []types.LocalizedMethodFault `xml:"errorCause,omitempty"` - ProfileMismatch bool `xml:"profileMismatch"` -} - -func init() { - types.Add("pbm:PbmRollupComplianceResult", reflect.TypeOf((*PbmRollupComplianceResult)(nil)).Elem()) -} - -type PbmServerObjectRef struct { - types.DynamicData - - ObjectType string `xml:"objectType"` - Key string `xml:"key"` - ServerUuid string `xml:"serverUuid,omitempty"` -} - -func init() { - types.Add("pbm:PbmServerObjectRef", reflect.TypeOf((*PbmServerObjectRef)(nil)).Elem()) -} - -type PbmServiceInstanceContent struct { - types.DynamicData - - AboutInfo PbmAboutInfo `xml:"aboutInfo"` - SessionManager types.ManagedObjectReference `xml:"sessionManager"` - CapabilityMetadataManager types.ManagedObjectReference `xml:"capabilityMetadataManager"` - ProfileManager types.ManagedObjectReference `xml:"profileManager"` - ComplianceManager types.ManagedObjectReference `xml:"complianceManager"` - PlacementSolver types.ManagedObjectReference `xml:"placementSolver"` - ReplicationManager *types.ManagedObjectReference `xml:"replicationManager,omitempty"` -} - -func init() { - types.Add("pbm:PbmServiceInstanceContent", reflect.TypeOf((*PbmServiceInstanceContent)(nil)).Elem()) -} - -type PbmUpdate PbmUpdateRequestType - -func init() { - types.Add("pbm:PbmUpdate", reflect.TypeOf((*PbmUpdate)(nil)).Elem()) -} - -type PbmUpdateRequestType struct { - This types.ManagedObjectReference `xml:"_this"` - ProfileId PbmProfileId `xml:"profileId"` - UpdateSpec PbmCapabilityProfileUpdateSpec `xml:"updateSpec"` -} - -func init() { - types.Add("pbm:PbmUpdateRequestType", reflect.TypeOf((*PbmUpdateRequestType)(nil)).Elem()) -} - -type PbmUpdateResponse struct { -} - -type PbmVaioDataServiceInfo struct { - PbmLineOfServiceInfo -} - -func init() { - types.Add("pbm:PbmVaioDataServiceInfo", reflect.TypeOf((*PbmVaioDataServiceInfo)(nil)).Elem()) -} - -type VersionURI string - -func init() { - types.Add("pbm:versionURI", reflect.TypeOf((*VersionURI)(nil)).Elem()) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/collector.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/collector.go deleted file mode 100644 index 8798ceacbf17..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/collector.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package property - -import ( - "context" - "errors" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// Collector models the PropertyCollector managed object. -// -// For more information, see: -// http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvmodl.query.PropertyCollector.html -// -type Collector struct { - roundTripper soap.RoundTripper - reference types.ManagedObjectReference -} - -// DefaultCollector returns the session's default property collector. -func DefaultCollector(c *vim25.Client) *Collector { - p := Collector{ - roundTripper: c, - reference: c.ServiceContent.PropertyCollector, - } - - return &p -} - -func (p Collector) Reference() types.ManagedObjectReference { - return p.reference -} - -// Create creates a new session-specific Collector that can be used to -// retrieve property updates independent of any other Collector. -func (p *Collector) Create(ctx context.Context) (*Collector, error) { - req := types.CreatePropertyCollector{ - This: p.Reference(), - } - - res, err := methods.CreatePropertyCollector(ctx, p.roundTripper, &req) - if err != nil { - return nil, err - } - - newp := Collector{ - roundTripper: p.roundTripper, - reference: res.Returnval, - } - - return &newp, nil -} - -// Destroy destroys this Collector. -func (p *Collector) Destroy(ctx context.Context) error { - req := types.DestroyPropertyCollector{ - This: p.Reference(), - } - - _, err := methods.DestroyPropertyCollector(ctx, p.roundTripper, &req) - if err != nil { - return err - } - - p.reference = types.ManagedObjectReference{} - return nil -} - -func (p *Collector) CreateFilter(ctx context.Context, req types.CreateFilter) error { - req.This = p.Reference() - - _, err := methods.CreateFilter(ctx, p.roundTripper, &req) - if err != nil { - return err - } - - return nil -} - -func (p *Collector) WaitForUpdates(ctx context.Context, version string, opts ...*types.WaitOptions) (*types.UpdateSet, error) { - req := types.WaitForUpdatesEx{ - This: p.Reference(), - Version: version, - } - - if len(opts) == 1 { - req.Options = opts[0] - } else if len(opts) > 1 { - panic("only one option may be specified") - } - - res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -func (p *Collector) CancelWaitForUpdates(ctx context.Context) error { - req := &types.CancelWaitForUpdates{This: p.Reference()} - _, err := methods.CancelWaitForUpdates(ctx, p.roundTripper, req) - return err -} - -func (p *Collector) RetrieveProperties(ctx context.Context, req types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) { - req.This = p.Reference() - return methods.RetrieveProperties(ctx, p.roundTripper, &req) -} - -// Retrieve loads properties for a slice of managed objects. The dst argument -// must be a pointer to a []interface{}, which is populated with the instances -// of the specified managed objects, with the relevant properties filled in. If -// the properties slice is nil, all properties are loaded. -// Note that pointer types are optional fields that may be left as a nil value. -// The caller should check such fields for a nil value before dereferencing. -func (p *Collector) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}) error { - if len(objs) == 0 { - return errors.New("object references is empty") - } - - kinds := make(map[string]bool) - - var propSet []types.PropertySpec - var objectSet []types.ObjectSpec - - for _, obj := range objs { - if _, ok := kinds[obj.Type]; !ok { - spec := types.PropertySpec{ - Type: obj.Type, - } - if len(ps) == 0 { - spec.All = types.NewBool(true) - } else { - spec.PathSet = ps - } - propSet = append(propSet, spec) - kinds[obj.Type] = true - } - - objectSpec := types.ObjectSpec{ - Obj: obj, - Skip: types.NewBool(false), - } - - objectSet = append(objectSet, objectSpec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: objectSet, - PropSet: propSet, - }, - }, - } - - res, err := p.RetrieveProperties(ctx, req) - if err != nil { - return err - } - - if d, ok := dst.(*[]types.ObjectContent); ok { - *d = res.Returnval - return nil - } - - return mo.LoadObjectContent(res.Returnval, dst) -} - -// RetrieveWithFilter populates dst as Retrieve does, but only for entities matching the given filter. -func (p *Collector) RetrieveWithFilter(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}, filter Filter) error { - if len(filter) == 0 { - return p.Retrieve(ctx, objs, ps, dst) - } - - var content []types.ObjectContent - - err := p.Retrieve(ctx, objs, filter.Keys(), &content) - if err != nil { - return err - } - - objs = filter.MatchObjectContent(content) - - if len(objs) == 0 { - return nil - } - - return p.Retrieve(ctx, objs, ps, dst) -} - -// RetrieveOne calls Retrieve with a single managed object reference via Collector.Retrieve(). -func (p *Collector) RetrieveOne(ctx context.Context, obj types.ManagedObjectReference, ps []string, dst interface{}) error { - var objs = []types.ManagedObjectReference{obj} - return p.Retrieve(ctx, objs, ps, dst) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/filter.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/filter.go deleted file mode 100644 index 2287bbfd96da..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/filter.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package property - -import ( - "fmt" - "path" - "reflect" - "strconv" - "strings" - - "github.com/vmware/govmomi/vim25/types" -) - -// Filter provides methods for matching against types.DynamicProperty -type Filter map[string]types.AnyType - -// Keys returns the Filter map keys as a []string -func (f Filter) Keys() []string { - keys := make([]string, 0, len(f)) - - for key := range f { - keys = append(keys, key) - } - - return keys -} - -// MatchProperty returns true if a Filter entry matches the given prop. -func (f Filter) MatchProperty(prop types.DynamicProperty) bool { - if prop.Val == nil { - return false - } - match, ok := f[prop.Name] - if !ok { - return false - } - - if match == prop.Val { - return true - } - - ptype := reflect.TypeOf(prop.Val) - - if strings.HasPrefix(ptype.Name(), "ArrayOf") { - pval := reflect.ValueOf(prop.Val).Field(0) - - for i := 0; i < pval.Len(); i++ { - prop.Val = pval.Index(i).Interface() - - if f.MatchProperty(prop) { - return true - } - } - - return false - } - - if reflect.TypeOf(match) != ptype { - s, ok := match.(string) - if !ok { - return false - } - - // convert if we can - switch val := prop.Val.(type) { - case bool: - match, _ = strconv.ParseBool(s) - case int16: - x, _ := strconv.ParseInt(s, 10, 16) - match = int16(x) - case int32: - x, _ := strconv.ParseInt(s, 10, 32) - match = int32(x) - case int64: - match, _ = strconv.ParseInt(s, 10, 64) - case float32: - x, _ := strconv.ParseFloat(s, 32) - match = float32(x) - case float64: - match, _ = strconv.ParseFloat(s, 64) - case fmt.Stringer: - prop.Val = val.String() - case *types.CustomFieldStringValue: - prop.Val = fmt.Sprintf("%d:%s", val.Key, val.Value) - default: - if ptype.Kind() != reflect.String { - return false - } - // An enum type we can convert to a string type - prop.Val = reflect.ValueOf(prop.Val).String() - } - } - - switch pval := prop.Val.(type) { - case string: - s := match.(string) - if s == "*" { - return true // TODO: path.Match fails if s contains a '/' - } - m, _ := path.Match(s, pval) - return m - default: - return reflect.DeepEqual(match, pval) - } -} - -// MatchPropertyList returns true if all given props match the Filter. -func (f Filter) MatchPropertyList(props []types.DynamicProperty) bool { - for _, p := range props { - if !f.MatchProperty(p) { - return false - } - } - - return len(f) == len(props) // false if a property such as VM "guest" is unset -} - -// MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches all properties the Filter. -func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference { - var refs []types.ManagedObjectReference - - for _, o := range objects { - if f.MatchPropertyList(o.PropSet) { - refs = append(refs, o.Obj) - } - } - - return refs -} - -// MatchAnyPropertyList returns true if any given props match the Filter. -func (f Filter) MatchAnyPropertyList(props []types.DynamicProperty) bool { - for _, p := range props { - if f.MatchProperty(p) { - return true - } - } - - return false -} - -// MatchAnyObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches any property in the Filter. -func (f Filter) MatchAnyObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference { - var refs []types.ManagedObjectReference - - for _, o := range objects { - if f.MatchAnyPropertyList(o.PropSet) { - refs = append(refs, o.Obj) - } - } - - return refs -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/wait.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/wait.go deleted file mode 100644 index fbb680771195..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/property/wait.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright (c) 2015-2017 VMware, Inc. 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. -*/ - -package property - -import ( - "context" - - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// WaitFilter provides helpers to construct a types.CreateFilter for use with property.Wait -type WaitFilter struct { - types.CreateFilter - Options *types.WaitOptions - PropagateMissing bool - Truncated bool -} - -// Add a new ObjectSpec and PropertySpec to the WaitFilter -func (f *WaitFilter) Add(obj types.ManagedObjectReference, kind string, ps []string, set ...types.BaseSelectionSpec) *WaitFilter { - spec := types.ObjectSpec{ - Obj: obj, - SelectSet: set, - } - - pset := types.PropertySpec{ - Type: kind, - PathSet: ps, - } - - if len(ps) == 0 { - pset.All = types.NewBool(true) - } - - f.Spec.ObjectSet = append(f.Spec.ObjectSet, spec) - - f.Spec.PropSet = append(f.Spec.PropSet, pset) - - return f -} - -// Wait creates a new WaitFilter and calls the specified function for each ObjectUpdate via WaitForUpdates -func Wait(ctx context.Context, c *Collector, obj types.ManagedObjectReference, ps []string, f func([]types.PropertyChange) bool) error { - filter := new(WaitFilter).Add(obj, obj.Type, ps) - - return WaitForUpdates(ctx, c, filter, func(updates []types.ObjectUpdate) bool { - for _, update := range updates { - if f(update.ChangeSet) { - return true - } - } - - return false - }) -} - -// WaitForUpdates waits for any of the specified properties of the specified managed -// object to change. It calls the specified function for every update it -// receives. If this function returns false, it continues waiting for -// subsequent updates. If this function returns true, it stops waiting and -// returns. -// -// To only receive updates for the specified managed object, the function -// creates a new property collector and calls CreateFilter. A new property -// collector is required because filters can only be added, not removed. -// -// If the Context is canceled, a call to CancelWaitForUpdates() is made and its error value is returned. -// The newly created collector is destroyed before this function returns (both -// in case of success or error). -// -// By default, ObjectUpdate.MissingSet faults are not propagated to the returned error, -// set WaitFilter.PropagateMissing=true to enable MissingSet fault propagation. -func WaitForUpdates(ctx context.Context, c *Collector, filter *WaitFilter, f func([]types.ObjectUpdate) bool) error { - p, err := c.Create(ctx) - if err != nil { - return err - } - - // Attempt to destroy the collector using the background context, as the - // specified context may have timed out or have been canceled. - defer func() { - _ = p.Destroy(context.Background()) - }() - - err = p.CreateFilter(ctx, filter.CreateFilter) - if err != nil { - return err - } - - req := types.WaitForUpdatesEx{ - This: p.Reference(), - Options: filter.Options, - } - - for { - res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req) - if err != nil { - if ctx.Err() == context.Canceled { - werr := p.CancelWaitForUpdates(context.Background()) - return werr - } - return err - } - - set := res.Returnval - if set == nil { - if req.Options != nil && req.Options.MaxWaitSeconds != nil { - return nil // WaitOptions.MaxWaitSeconds exceeded - } - // Retry if the result came back empty - continue - } - - req.Version = set.Version - filter.Truncated = false - if set.Truncated != nil { - filter.Truncated = *set.Truncated - } - - for _, fs := range set.FilterSet { - if filter.PropagateMissing { - for i := range fs.ObjectSet { - for _, p := range fs.ObjectSet[i].MissingSet { - // Same behavior as mo.ObjectContentToType() - return soap.WrapVimFault(p.Fault.Fault) - } - } - } - - if f(fs.ObjectSet) { - return nil - } - } - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keep_alive.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keep_alive.go deleted file mode 100644 index 7c1bebf91349..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keep_alive.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright (c) 2015-2020 VMware, Inc. 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. -*/ - -package session - -import ( - "time" - - "github.com/vmware/govmomi/session/keepalive" - "github.com/vmware/govmomi/vim25/soap" -) - -// KeepAlive is a backward compatible wrapper around KeepAliveHandler. -func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper { - return KeepAliveHandler(roundTripper, idleTime, nil) -} - -// KeepAliveHandler is a backward compatible wrapper around keepalive.NewHandlerSOAP. -func KeepAliveHandler(roundTripper soap.RoundTripper, idleTime time.Duration, handler func(soap.RoundTripper) error) soap.RoundTripper { - var f func() error - if handler != nil { - f = func() error { - return handler(roundTripper) - } - } - return keepalive.NewHandlerSOAP(roundTripper, idleTime, f) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keepalive/handler.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keepalive/handler.go deleted file mode 100644 index 3ebf046a53bc..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/keepalive/handler.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -Copyright (c) 2020 VMware, Inc. 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. -*/ - -package keepalive - -import ( - "context" - "errors" - "net/http" - "sync" - "time" - - "github.com/vmware/govmomi/vapi/rest" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/soap" -) - -// handler contains the generic keep alive settings and logic -type handler struct { - mu sync.Mutex - notifyStop chan struct{} - notifyWaitGroup sync.WaitGroup - - idle time.Duration - send func() error -} - -// NewHandlerSOAP returns a soap.RoundTripper for use with a vim25.Client -// The idle time specifies the interval in between send() requests. Defaults to 10 minutes. -// The send func is used to keep a session alive. Defaults to calling vim25 GetCurrentTime(). -// The keep alive goroutine starts when a Login method is called and runs until Logout is called or send returns an error. -func NewHandlerSOAP(c soap.RoundTripper, idle time.Duration, send func() error) *HandlerSOAP { - h := &handler{ - idle: idle, - send: send, - } - - if send == nil { - h.send = func() error { - return h.keepAliveSOAP(c) - } - } - - return &HandlerSOAP{h, c} -} - -// NewHandlerREST returns an http.RoundTripper for use with a rest.Client -// The idle time specifies the interval in between send() requests. Defaults to 10 minutes. -// The send func is used to keep a session alive. Defaults to calling the rest.Client.Session() method -// The keep alive goroutine starts when a Login method is called and runs until Logout is called or send returns an error. -func NewHandlerREST(c *rest.Client, idle time.Duration, send func() error) *HandlerREST { - h := &handler{ - idle: idle, - send: send, - } - - if send == nil { - h.send = func() error { - return h.keepAliveREST(c) - } - } - - return &HandlerREST{h, c.Transport} -} - -func (h *handler) keepAliveSOAP(rt soap.RoundTripper) error { - ctx := context.Background() - _, err := methods.GetCurrentTime(ctx, rt) - return err -} - -func (h *handler) keepAliveREST(c *rest.Client) error { - ctx := context.Background() - - s, err := c.Session(ctx) - if err != nil { - return err - } - if s != nil { - return nil - } - return errors.New(http.StatusText(http.StatusUnauthorized)) -} - -// Start explicitly starts the keep alive go routine. -// For use with session cache.Client, as cached sessions may not involve Login/Logout via RoundTripper. -func (h *handler) Start() { - h.mu.Lock() - defer h.mu.Unlock() - - if h.notifyStop != nil { - return - } - - if h.idle == 0 { - h.idle = time.Minute * 10 - } - - // This channel must be closed to terminate idle timer. - h.notifyStop = make(chan struct{}) - h.notifyWaitGroup.Add(1) - - go func() { - for t := time.NewTimer(h.idle); ; { - select { - case <-h.notifyStop: - h.notifyWaitGroup.Done() - t.Stop() - return - case <-t.C: - if err := h.send(); err != nil { - h.notifyWaitGroup.Done() - h.Stop() - return - } - t.Reset(h.idle) - } - } - }() -} - -// Stop explicitly stops the keep alive go routine. -// For use with session cache.Client, as cached sessions may not involve Login/Logout via RoundTripper. -func (h *handler) Stop() { - h.mu.Lock() - defer h.mu.Unlock() - - if h.notifyStop != nil { - close(h.notifyStop) - h.notifyWaitGroup.Wait() - h.notifyStop = nil - } -} - -// HandlerSOAP is a keep alive implementation for use with vim25.Client -type HandlerSOAP struct { - *handler - - roundTripper soap.RoundTripper -} - -// RoundTrip implements soap.RoundTripper -func (h *HandlerSOAP) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - // Stop ticker on logout. - switch req.(type) { - case *methods.LogoutBody: - h.Stop() - } - - err := h.roundTripper.RoundTrip(ctx, req, res) - if err != nil { - return err - } - - // Start ticker on login. - switch req.(type) { - case *methods.LoginBody, *methods.LoginExtensionByCertificateBody, *methods.LoginByTokenBody: - h.Start() - } - - return nil -} - -// HandlerREST is a keep alive implementation for use with rest.Client -type HandlerREST struct { - *handler - - roundTripper http.RoundTripper -} - -// RoundTrip implements http.RoundTripper -func (h *HandlerREST) RoundTrip(req *http.Request) (*http.Response, error) { - if req.URL.Path != "/rest/com/vmware/cis/session" { - return h.roundTripper.RoundTrip(req) - } - - if req.Method == http.MethodDelete { // Logout - h.Stop() - } - - res, err := h.roundTripper.RoundTrip(req) - if err != nil { - return res, err - } - - if req.Method == http.MethodPost { // Login - h.Start() - } - - return res, err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/manager.go deleted file mode 100644 index 8689acd504a4..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/session/manager.go +++ /dev/null @@ -1,294 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package session - -import ( - "context" - "io/ioutil" - "net/url" - "os" - "strings" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -// Locale defaults to "en_US" and can be overridden via this var or the GOVMOMI_LOCALE env var. -// A value of "_" uses the server locale setting. -var Locale = os.Getenv("GOVMOMI_LOCALE") - -func init() { - if Locale == "_" { - Locale = "" - } else if Locale == "" { - Locale = "en_US" - } -} - -// Secret returns the contents if a file path value is given, otherwise returns value itself. -func Secret(value string) (string, error) { - if len(value) == 0 { - return value, nil - } - contents, err := ioutil.ReadFile(value) - if err != nil { - if os.IsPermission(err) { - return "", err - } - return value, nil - } - return strings.TrimSpace(string(contents)), nil -} - -type Manager struct { - client *vim25.Client - userSession *types.UserSession -} - -func NewManager(client *vim25.Client) *Manager { - m := Manager{ - client: client, - } - - return &m -} - -func (sm Manager) Reference() types.ManagedObjectReference { - return *sm.client.ServiceContent.SessionManager -} - -func (sm *Manager) SetLocale(ctx context.Context, locale string) error { - req := types.SetLocale{ - This: sm.Reference(), - Locale: locale, - } - - _, err := methods.SetLocale(ctx, sm.client, &req) - return err -} - -func (sm *Manager) Login(ctx context.Context, u *url.Userinfo) error { - req := types.Login{ - This: sm.Reference(), - Locale: Locale, - } - - if u != nil { - req.UserName = u.Username() - if pw, ok := u.Password(); ok { - req.Password = pw - } - } - - login, err := methods.Login(ctx, sm.client, &req) - if err != nil { - return err - } - - sm.userSession = &login.Returnval - return nil -} - -// LoginExtensionByCertificate uses the vCenter SDK tunnel to login using a client certificate. -// The client certificate can be set using the soap.Client.SetCertificate method. -// See: https://kb.vmware.com/s/article/2004305 -func (sm *Manager) LoginExtensionByCertificate(ctx context.Context, key string) error { - c := sm.client - u := c.URL() - if u.Hostname() != "sdkTunnel" { - sc := c.Tunnel() - c = &vim25.Client{ - Client: sc, - RoundTripper: sc, - ServiceContent: c.ServiceContent, - } - // When http.Transport.Proxy is used, our thumbprint checker is bypassed, resulting in: - // "Post https://sdkTunnel:8089/sdk: x509: certificate is valid for $vcenter_hostname, not sdkTunnel" - // The only easy way around this is to disable verification for the call to LoginExtensionByCertificate(). - // TODO: find a way to avoid disabling InsecureSkipVerify. - c.DefaultTransport().TLSClientConfig.InsecureSkipVerify = true - } - - req := types.LoginExtensionByCertificate{ - This: sm.Reference(), - ExtensionKey: key, - Locale: Locale, - } - - login, err := methods.LoginExtensionByCertificate(ctx, c, &req) - if err != nil { - return err - } - - // Copy the session cookie - sm.client.Jar.SetCookies(u, c.Jar.Cookies(c.URL())) - - sm.userSession = &login.Returnval - return nil -} - -func (sm *Manager) LoginByToken(ctx context.Context) error { - req := types.LoginByToken{ - This: sm.Reference(), - Locale: Locale, - } - - login, err := methods.LoginByToken(ctx, sm.client, &req) - if err != nil { - return err - } - - sm.userSession = &login.Returnval - return nil -} - -func (sm *Manager) Logout(ctx context.Context) error { - req := types.Logout{ - This: sm.Reference(), - } - - _, err := methods.Logout(ctx, sm.client, &req) - if err != nil { - return err - } - - sm.userSession = nil - return nil -} - -// UserSession retrieves and returns the SessionManager's CurrentSession field. -// Nil is returned if the session is not authenticated. -func (sm *Manager) UserSession(ctx context.Context) (*types.UserSession, error) { - var mgr mo.SessionManager - - pc := property.DefaultCollector(sm.client) - err := pc.RetrieveOne(ctx, sm.Reference(), []string{"currentSession"}, &mgr) - if err != nil { - // It's OK if we can't retrieve properties because we're not authenticated - if f, ok := err.(types.HasFault); ok { - switch f.Fault().(type) { - case *types.NotAuthenticated: - return nil, nil - } - } - - return nil, err - } - - return mgr.CurrentSession, nil -} - -func (sm *Manager) TerminateSession(ctx context.Context, sessionId []string) error { - req := types.TerminateSession{ - This: sm.Reference(), - SessionId: sessionId, - } - - _, err := methods.TerminateSession(ctx, sm.client, &req) - return err -} - -// SessionIsActive checks whether the session that was created at login is -// still valid. This function only works against vCenter. -func (sm *Manager) SessionIsActive(ctx context.Context) (bool, error) { - if sm.userSession == nil { - return false, nil - } - - req := types.SessionIsActive{ - This: sm.Reference(), - SessionID: sm.userSession.Key, - UserName: sm.userSession.UserName, - } - - active, err := methods.SessionIsActive(ctx, sm.client, &req) - if err != nil { - return false, err - } - - return active.Returnval, err -} - -func (sm *Manager) AcquireGenericServiceTicket(ctx context.Context, spec types.BaseSessionManagerServiceRequestSpec) (*types.SessionManagerGenericServiceTicket, error) { - req := types.AcquireGenericServiceTicket{ - This: sm.Reference(), - Spec: spec, - } - - res, err := methods.AcquireGenericServiceTicket(ctx, sm.client, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (sm *Manager) AcquireLocalTicket(ctx context.Context, userName string) (*types.SessionManagerLocalTicket, error) { - req := types.AcquireLocalTicket{ - This: sm.Reference(), - UserName: userName, - } - - res, err := methods.AcquireLocalTicket(ctx, sm.client, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} - -func (sm *Manager) AcquireCloneTicket(ctx context.Context) (string, error) { - req := types.AcquireCloneTicket{ - This: sm.Reference(), - } - - res, err := methods.AcquireCloneTicket(ctx, sm.client, &req) - if err != nil { - return "", err - } - - return res.Returnval, nil -} - -func (sm *Manager) CloneSession(ctx context.Context, ticket string) error { - req := types.CloneSession{ - This: sm.Reference(), - CloneTicket: ticket, - } - - res, err := methods.CloneSession(ctx, sm.client, &req) - if err != nil { - return err - } - - sm.userSession = &res.Returnval - return nil -} - -func (sm *Manager) UpdateServiceMessage(ctx context.Context, message string) error { - req := types.UpdateServiceMessage{ - This: sm.Reference(), - Message: message, - } - - _, err := methods.UpdateServiceMessage(ctx, sm.client, &req) - - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/client.go deleted file mode 100644 index d98c560954a5..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/client.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package sts - -import ( - "context" - "crypto/tls" - "errors" - "net/url" - "time" - - "github.com/vmware/govmomi/lookup" - "github.com/vmware/govmomi/lookup/types" - "github.com/vmware/govmomi/sts/internal" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/soap" -) - -const ( - Namespace = "oasis:names:tc:SAML:2.0:assertion" - Path = "/sts/STSService" -) - -// Client is a soap.Client targeting the STS (Secure Token Service) API endpoint. -type Client struct { - *soap.Client - - RoundTripper soap.RoundTripper -} - -// NewClient returns a client targeting the STS API endpoint. -// The Client.URL will be set to that of the Lookup Service's endpoint registration, -// as the SSO endpoint can be external to vCenter. If the Lookup Service is not available, -// URL defaults to Path on the vim25.Client.URL.Host. -func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) { - filter := &types.LookupServiceRegistrationFilter{ - ServiceType: &types.LookupServiceRegistrationServiceType{ - Product: "com.vmware.cis", - Type: "cs.identity", - }, - EndpointType: &types.LookupServiceRegistrationEndpointType{ - Protocol: "wsTrust", - Type: "com.vmware.cis.cs.identity.sso", - }, - } - - url := lookup.EndpointURL(ctx, c, Path, filter) - sc := c.Client.NewServiceClient(url, Namespace) - - return &Client{sc, sc}, nil -} - -// RoundTrip dispatches to the RoundTripper field. -func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - return c.RoundTripper.RoundTrip(ctx, req, res) -} - -// TokenRequest parameters for issuing a SAML token. -// At least one of Userinfo or Certificate must be specified. -// When `TokenRequest.Certificate` is set, the `tls.Certificate.PrivateKey` field must be set as it is required to sign the request. -// When the `tls.Certificate.Certificate` field is not set, the request Assertion header is set to that of the TokenRequest.Token. -// Otherwise `tls.Certificate.Certificate` is used as the BinarySecurityToken in the request. -type TokenRequest struct { - Userinfo *url.Userinfo // Userinfo when set issues a Bearer token - Certificate *tls.Certificate // Certificate when set issues a HoK token - Lifetime time.Duration // Lifetime is the token's lifetime, defaults to 10m - Renewable bool // Renewable allows the issued token to be renewed - Delegatable bool // Delegatable allows the issued token to be delegated (e.g. for use with ActAs) - ActAs bool // ActAs allows to request an ActAs token based on the passed Token. - Token string // Token for Renew request or Issue request ActAs identity or to be exchanged. - KeyType string // KeyType for requested token (if not set will be decucted from Userinfo and Certificate options) - KeyID string // KeyID used for signing the requests -} - -func (c *Client) newRequest(req TokenRequest, kind string, s *Signer) (internal.RequestSecurityToken, error) { - if req.Lifetime == 0 { - req.Lifetime = 5 * time.Minute - } - - created := time.Now().UTC() - rst := internal.RequestSecurityToken{ - TokenType: c.Namespace, - RequestType: "http://docs.oasis-open.org/ws-sx/ws-trust/200512/" + kind, - SignatureAlgorithm: internal.SHA256, - Lifetime: &internal.Lifetime{ - Created: created.Format(internal.Time), - Expires: created.Add(req.Lifetime).Format(internal.Time), - }, - Renewing: &internal.Renewing{ - Allow: req.Renewable, - // /wst:RequestSecurityToken/wst:Renewing/@OK - // "It NOT RECOMMENDED to use this as it can leave you open to certain types of security attacks. - // Issuers MAY restrict the period after expiration during which time the token can be renewed. - // This window is governed by the issuer's policy." - OK: false, - }, - Delegatable: req.Delegatable, - KeyType: req.KeyType, - } - - if req.KeyType == "" { - // Deduce KeyType based on Certificate nad Userinfo. - if req.Certificate == nil { - if req.Userinfo == nil { - return rst, errors.New("one of TokenRequest Certificate or Userinfo is required") - } - rst.KeyType = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer" - } else { - rst.KeyType = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey" - // For HOK KeyID is required. - if req.KeyID == "" { - req.KeyID = newID() - } - } - } - - if req.KeyID != "" { - rst.UseKey = &internal.UseKey{Sig: req.KeyID} - s.keyID = rst.UseKey.Sig - } - - return rst, nil -} - -func (s *Signer) setLifetime(lifetime *internal.Lifetime) error { - var err error - if lifetime != nil { - s.Lifetime.Created, err = time.Parse(internal.Time, lifetime.Created) - if err == nil { - s.Lifetime.Expires, err = time.Parse(internal.Time, lifetime.Expires) - } - } - return err -} - -// Issue is used to request a security token. -// The returned Signer can be used to sign SOAP requests, such as the SessionManager LoginByToken method and the RequestSecurityToken method itself. -// One of TokenRequest Certificate or Userinfo is required, with Certificate taking precedence. -// When Certificate is set, a Holder-of-Key token will be requested. Otherwise, a Bearer token is requested with the Userinfo credentials. -// See: http://docs.oasis-open.org/ws-sx/ws-trust/v1.4/errata01/os/ws-trust-1.4-errata01-os-complete.html#_Toc325658937 -func (c *Client) Issue(ctx context.Context, req TokenRequest) (*Signer, error) { - s := &Signer{ - Certificate: req.Certificate, - keyID: req.KeyID, - Token: req.Token, - user: req.Userinfo, - } - - rst, err := c.newRequest(req, "Issue", s) - if err != nil { - return nil, err - } - - if req.ActAs { - rst.ActAs = &internal.Target{ - Token: req.Token, - } - } - - header := soap.Header{ - Security: s, - Action: rst.Action(), - } - - res, err := internal.Issue(c.WithHeader(ctx, header), c, &rst) - if err != nil { - return nil, err - } - - s.Token = res.RequestSecurityTokenResponse.RequestedSecurityToken.Assertion - - return s, s.setLifetime(res.RequestSecurityTokenResponse.Lifetime) -} - -// Renew is used to request a security token renewal. -func (c *Client) Renew(ctx context.Context, req TokenRequest) (*Signer, error) { - s := &Signer{ - Certificate: req.Certificate, - } - - rst, err := c.newRequest(req, "Renew", s) - if err != nil { - return nil, err - } - - if req.Token == "" { - return nil, errors.New("TokenRequest Token is required") - } - - rst.RenewTarget = &internal.Target{Token: req.Token} - - header := soap.Header{ - Security: s, - Action: rst.Action(), - } - - res, err := internal.Renew(c.WithHeader(ctx, header), c, &rst) - if err != nil { - return nil, err - } - - s.Token = res.RequestedSecurityToken.Assertion - - return s, s.setLifetime(res.Lifetime) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/internal/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/internal/types.go deleted file mode 100644 index 875dbe50538c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/internal/types.go +++ /dev/null @@ -1,694 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package internal - -// The sts/internal package provides the types for invoking the sts.Issue method. -// The sts.Issue and SessionManager LoginByToken methods require an XML signature. -// Unlike the JRE and .NET runtimes, the Go stdlib does not support XML signing. -// We should considering contributing to the goxmldsig package and gosaml2 to meet -// the needs of sts.Issue rather than maintaining this package long term. -// The tricky part of xmldig is the XML canonicalization (C14N), which is responsible -// for most of the make-your-eyes bleed XML formatting in this package. -// C14N is also why some structures use xml.Name without a field tag and methods modify the xml.Name directly, -// though also working around Go's handling of XML namespace prefixes. -// Most of the types in this package were originally generated from the wsdl and hacked up gen/ scripts, -// but have since been modified by hand. - -import ( - "bytes" - "context" - "crypto/sha256" - "encoding/base64" - "fmt" - "log" - "path" - "reflect" - "strings" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" - "github.com/vmware/govmomi/vim25/xml" -) - -const ( - XSI = "http://www.w3.org/2001/XMLSchema-instance" - WSU = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - DSIG = "http://www.w3.org/2000/09/xmldsig#" - SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" - Time = "2006-01-02T15:04:05.000Z" -) - -// Security is used as soap.Envelope.Header.Security when signing requests. -type Security struct { - XMLName xml.Name `xml:"wsse:Security"` - WSSE string `xml:"xmlns:wsse,attr"` - WSU string `xml:"xmlns:wsu,attr"` - Timestamp Timestamp - BinarySecurityToken *BinarySecurityToken `xml:",omitempty"` - UsernameToken *UsernameToken `xml:",omitempty"` - Assertion string `xml:",innerxml"` - Signature *Signature `xml:",omitempty"` -} - -type Timestamp struct { - XMLName xml.Name `xml:"wsu:Timestamp"` - NS string `xml:"xmlns:wsu,attr"` - ID string `xml:"wsu:Id,attr"` - Created string `xml:"wsu:Created"` - Expires string `xml:"wsu:Expires"` -} - -func (t *Timestamp) C14N() string { - return Marshal(t) -} - -type BinarySecurityToken struct { - XMLName xml.Name `xml:"wsse:BinarySecurityToken"` - EncodingType string `xml:"EncodingType,attr"` - ValueType string `xml:"ValueType,attr"` - ID string `xml:"wsu:Id,attr"` - Value string `xml:",chardata"` -} - -type UsernameToken struct { - XMLName xml.Name `xml:"wsse:UsernameToken"` - Username string `xml:"wsse:Username"` - Password string `xml:"wsse:Password"` -} - -type Signature struct { - XMLName xml.Name - NS string `xml:"xmlns:ds,attr"` - ID string `xml:"Id,attr"` - SignedInfo SignedInfo - SignatureValue Value - KeyInfo KeyInfo -} - -func (s *Signature) C14N() string { - return fmt.Sprintf(`%s%s%s`, - DSIG, s.SignedInfo.C14N(), s.SignatureValue.C14N(), s.KeyInfo.C14N()) -} - -type SignedInfo struct { - XMLName xml.Name - NS string `xml:"xmlns:ds,attr,omitempty"` - CanonicalizationMethod Method - SignatureMethod Method - Reference []Reference -} - -func (s SignedInfo) C14N() string { - ns := "" // empty in ActAs c14n form for example - if s.NS != "" { - ns = fmt.Sprintf(` xmlns:ds="%s"`, s.NS) - } - - c14n := []string{fmt.Sprintf("", ns)} - c14n = append(c14n, s.CanonicalizationMethod.C14N(), s.SignatureMethod.C14N()) - for i := range s.Reference { - c14n = append(c14n, s.Reference[i].C14N()) - } - c14n = append(c14n, "") - - return strings.Join(c14n, "") -} - -type Method struct { - XMLName xml.Name - Algorithm string `xml:",attr"` -} - -func (m *Method) C14N() string { - return mkns("ds", m, &m.XMLName) -} - -type Value struct { - XMLName xml.Name - Value string `xml:",innerxml"` -} - -func (v *Value) C14N() string { - return mkns("ds", v, &v.XMLName) -} - -type Reference struct { - XMLName xml.Name - URI string `xml:",attr"` - Transforms Transforms - DigestMethod Method - DigestValue Value -} - -func (r Reference) C14N() string { - for i := range r.Transforms.Transform { - t := &r.Transforms.Transform[i] - t.XMLName.Local = "ds:Transform" - t.XMLName.Space = "" - - if t.InclusiveNamespaces != nil { - name := &t.InclusiveNamespaces.XMLName - if !strings.HasPrefix(name.Local, "ec:") { - name.Local = "ec:" + name.Local - name.Space = "" - } - t.InclusiveNamespaces.NS = t.Algorithm - } - } - - c14n := []string{ - fmt.Sprintf(``, r.URI), - r.Transforms.C14N(), - r.DigestMethod.C14N(), - r.DigestValue.C14N(), - "", - } - - return strings.Join(c14n, "") -} - -func NewReference(id string, val string) Reference { - sum := sha256.Sum256([]byte(val)) - - return Reference{ - XMLName: xml.Name{Local: "ds:Reference"}, - URI: "#" + id, - Transforms: Transforms{ - XMLName: xml.Name{Local: "ds:Transforms"}, - Transform: []Transform{ - Transform{ - XMLName: xml.Name{Local: "ds:Transform"}, - Algorithm: "http://www.w3.org/2001/10/xml-exc-c14n#", - }, - }, - }, - DigestMethod: Method{ - XMLName: xml.Name{Local: "ds:DigestMethod"}, - Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256", - }, - DigestValue: Value{ - XMLName: xml.Name{Local: "ds:DigestValue"}, - Value: base64.StdEncoding.EncodeToString(sum[:]), - }, - } -} - -type Transforms struct { - XMLName xml.Name - Transform []Transform -} - -func (t *Transforms) C14N() string { - return mkns("ds", t, &t.XMLName) -} - -type Transform struct { - XMLName xml.Name - Algorithm string `xml:",attr"` - InclusiveNamespaces *InclusiveNamespaces `xml:",omitempty"` -} - -type InclusiveNamespaces struct { - XMLName xml.Name - NS string `xml:"xmlns:ec,attr,omitempty"` - PrefixList string `xml:",attr"` -} - -type X509Data struct { - XMLName xml.Name - X509Certificate string `xml:",innerxml"` -} - -type KeyInfo struct { - XMLName xml.Name - NS string `xml:"xmlns:ds,attr,omitempty"` - SecurityTokenReference *SecurityTokenReference `xml:",omitempty"` - X509Data *X509Data `xml:",omitempty"` -} - -func (o *KeyInfo) C14N() string { - names := []*xml.Name{ - &o.XMLName, - } - - if o.SecurityTokenReference != nil { - names = append(names, &o.SecurityTokenReference.XMLName) - } - if o.X509Data != nil { - names = append(names, &o.X509Data.XMLName) - } - - return mkns("ds", o, names...) -} - -type SecurityTokenReference struct { - XMLName xml.Name `xml:"wsse:SecurityTokenReference"` - WSSE11 string `xml:"xmlns:wsse11,attr,omitempty"` - TokenType string `xml:"wsse11:TokenType,attr,omitempty"` - Reference *SecurityReference `xml:",omitempty"` - KeyIdentifier *KeyIdentifier `xml:",omitempty"` -} - -type SecurityReference struct { - XMLName xml.Name `xml:"wsse:Reference"` - URI string `xml:",attr"` - ValueType string `xml:",attr"` -} - -type KeyIdentifier struct { - XMLName xml.Name `xml:"wsse:KeyIdentifier"` - ID string `xml:",innerxml"` - ValueType string `xml:",attr"` -} - -type Issuer struct { - XMLName xml.Name - Format string `xml:",attr"` - Value string `xml:",innerxml"` -} - -func (i *Issuer) C14N() string { - return mkns("saml2", i, &i.XMLName) -} - -type Assertion struct { - XMLName xml.Name - ID string `xml:",attr"` - IssueInstant string `xml:",attr"` - Version string `xml:",attr"` - Issuer Issuer - Signature Signature - Subject Subject - Conditions Conditions - AuthnStatement AuthnStatement - AttributeStatement AttributeStatement -} - -func (a *Assertion) C14N() string { - start := `` - c14n := []string{ - fmt.Sprintf(start, a.XMLName.Space, a.ID, a.IssueInstant, a.Version), - a.Issuer.C14N(), - a.Signature.C14N(), - a.Subject.C14N(), - a.Conditions.C14N(), - a.AuthnStatement.C14N(), - a.AttributeStatement.C14N(), - ``, - } - - return strings.Join(c14n, "") -} - -type NameID struct { - XMLName xml.Name - Format string `xml:",attr"` - ID string `xml:",innerxml"` -} - -type Subject struct { - XMLName xml.Name - NameID NameID - SubjectConfirmation SubjectConfirmation -} - -func (s *Subject) C14N() string { - data := &s.SubjectConfirmation.SubjectConfirmationData - names := []*xml.Name{ - &s.XMLName, - &s.NameID.XMLName, - &s.SubjectConfirmation.XMLName, - &data.XMLName, - } - if s.SubjectConfirmation.NameID != nil { - names = append(names, &s.SubjectConfirmation.NameID.XMLName) - } - if data.KeyInfo != nil { - data.NS = XSI - data.Type = "saml2:KeyInfoConfirmationDataType" - data.KeyInfo.XMLName = xml.Name{Local: "ds:KeyInfo"} - data.KeyInfo.X509Data.XMLName = xml.Name{Local: "ds:X509Data"} - data.KeyInfo.NS = DSIG - } - return mkns("saml2", s, names...) -} - -type SubjectConfirmationData struct { - XMLName xml.Name - NS string `xml:"xmlns:xsi,attr,omitempty"` - Type string `xml:"xsi:type,attr,omitempty"` - NotOnOrAfter string `xml:",attr,omitempty"` - KeyInfo *KeyInfo -} - -type SubjectConfirmation struct { - XMLName xml.Name - Method string `xml:",attr"` - NameID *NameID - SubjectConfirmationData SubjectConfirmationData -} - -type Condition struct { - Type string `xml:"xsi:type,attr,omitempty"` -} - -func (c *Condition) GetCondition() *Condition { - return c -} - -type BaseCondition interface { - GetCondition() *Condition -} - -func init() { - types.Add("BaseCondition", reflect.TypeOf((*Condition)(nil)).Elem()) - types.Add("del:DelegationRestrictionType", reflect.TypeOf((*DelegateRestriction)(nil)).Elem()) - types.Add("rsa:RenewRestrictionType", reflect.TypeOf((*RenewRestriction)(nil)).Elem()) -} - -type Conditions struct { - XMLName xml.Name - NotBefore string `xml:",attr"` - NotOnOrAfter string `xml:",attr"` - ProxyRestriction *ProxyRestriction `xml:",omitempty"` - Condition []BaseCondition `xml:",omitempty"` -} - -func (c *Conditions) C14N() string { - names := []*xml.Name{ - &c.XMLName, - } - - if c.ProxyRestriction != nil { - names = append(names, &c.ProxyRestriction.XMLName) - } - - for i := range c.Condition { - switch r := c.Condition[i].(type) { - case *DelegateRestriction: - names = append(names, &r.XMLName, &r.Delegate.NameID.XMLName) - r.NS = XSI - r.Type = "del:DelegationRestrictionType" - r.Delegate.NS = r.Delegate.XMLName.Space - r.Delegate.XMLName = xml.Name{Local: "del:Delegate"} - case *RenewRestriction: - names = append(names, &r.XMLName) - r.NS = XSI - r.Type = "rsa:RenewRestrictionType" - } - } - - return mkns("saml2", c, names...) -} - -type ProxyRestriction struct { - XMLName xml.Name - Count int32 `xml:",attr"` -} - -type RenewRestriction struct { - XMLName xml.Name - NS string `xml:"xmlns:xsi,attr,omitempty"` - Count int32 `xml:",attr"` - Condition -} - -type Delegate struct { - XMLName xml.Name - NS string `xml:"xmlns:del,attr,omitempty"` - DelegationInstant string `xml:",attr"` - NameID NameID -} - -type DelegateRestriction struct { - XMLName xml.Name - NS string `xml:"xmlns:xsi,attr,omitempty"` - Condition - Delegate Delegate -} - -type AuthnStatement struct { - XMLName xml.Name - AuthnInstant string `xml:",attr"` - AuthnContext struct { - XMLName xml.Name - AuthnContextClassRef struct { - XMLName xml.Name - Value string `xml:",innerxml"` - } - } -} - -func (a *AuthnStatement) C14N() string { - return mkns("saml2", a, &a.XMLName, &a.AuthnContext.XMLName, &a.AuthnContext.AuthnContextClassRef.XMLName) -} - -type AttributeStatement struct { - XMLName xml.Name - Attribute []Attribute -} - -func (a *AttributeStatement) C14N() string { - c14n := []string{""} - for i := range a.Attribute { - c14n = append(c14n, a.Attribute[i].C14N()) - } - c14n = append(c14n, "") - return strings.Join(c14n, "") -} - -type AttributeValue struct { - XMLName xml.Name - Type string `xml:"type,attr,typeattr"` - Value string `xml:",innerxml"` -} - -func (a *AttributeValue) C14N() string { - return fmt.Sprintf(`%s`, XSI, a.Type, a.Value) -} - -type Attribute struct { - XMLName xml.Name - FriendlyName string `xml:",attr"` - Name string `xml:",attr"` - NameFormat string `xml:",attr"` - AttributeValue []AttributeValue -} - -func (a *Attribute) C14N() string { - c14n := []string{ - fmt.Sprintf(``, a.FriendlyName, a.Name, a.NameFormat), - } - - for i := range a.AttributeValue { - c14n = append(c14n, a.AttributeValue[i].C14N()) - } - - c14n = append(c14n, ``) - - return strings.Join(c14n, "") -} - -type Lifetime struct { - Created string `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd Created"` - Expires string `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd Expires"` -} - -func (t *Lifetime) C14N() string { - return fmt.Sprintf(`%s%s`, t.Created, t.Expires) -} - -type Renewing struct { - Allow bool `xml:",attr"` - OK bool `xml:",attr"` -} - -type UseKey struct { - Sig string `xml:",attr"` -} - -type Target struct { - Token string `xml:",innerxml"` -} - -type RequestSecurityToken struct { - TokenType string `xml:",omitempty"` - RequestType string `xml:",omitempty"` - Lifetime *Lifetime `xml:",omitempty"` - Renewing *Renewing `xml:",omitempty"` - Delegatable bool `xml:",omitempty"` - KeyType string `xml:",omitempty"` - SignatureAlgorithm string `xml:",omitempty"` - UseKey *UseKey `xml:",omitempty"` - ActAs *Target `xml:",omitempty"` - ValidateTarget *Target `xml:",omitempty"` - RenewTarget *Target `xml:",omitempty"` -} - -func Unmarshal(data []byte, v interface{}) error { - dec := xml.NewDecoder(bytes.NewReader(data)) - dec.TypeFunc = types.TypeFunc() - return dec.Decode(v) -} - -// toString returns an XML encoded RequestSecurityToken. -// When c14n is true, returns the canonicalized ActAs.Assertion which is required to sign the Issue request. -// When c14n is false, returns the original content of the ActAs.Assertion. -// The original content must be used within the request Body, as it has its own signature. -func (r *RequestSecurityToken) toString(c14n bool) string { - actas := "" - if r.ActAs != nil { - token := r.ActAs.Token - if c14n { - var a Assertion - err := Unmarshal([]byte(r.ActAs.Token), &a) - if err != nil { - log.Printf("decode ActAs: %s", err) - } - token = a.C14N() - } - - actas = fmt.Sprintf(`%s`, token) - } - - body := []string{ - fmt.Sprintf(``), - fmt.Sprintf(`%s`, r.TokenType), - fmt.Sprintf(`%s`, r.RequestType), - r.Lifetime.C14N(), - } - - if r.RenewTarget == nil { - body = append(body, - fmt.Sprintf(``, r.Renewing.Allow, r.Renewing.OK), - fmt.Sprintf(`%t`, r.Delegatable), - actas, - fmt.Sprintf(`%s`, r.KeyType), - fmt.Sprintf(`%s`, r.SignatureAlgorithm), - fmt.Sprintf(``, r.UseKey.Sig)) - } else { - token := r.RenewTarget.Token - if c14n { - var a Assertion - err := Unmarshal([]byte(r.RenewTarget.Token), &a) - if err != nil { - log.Printf("decode Renew: %s", err) - } - token = a.C14N() - } - - body = append(body, - fmt.Sprintf(``, r.UseKey.Sig), - fmt.Sprintf(`%s`, token)) - } - - return strings.Join(append(body, ``), "") -} - -func (r *RequestSecurityToken) C14N() string { - return r.toString(true) -} - -func (r *RequestSecurityToken) String() string { - return r.toString(false) -} - -type RequestSecurityTokenResponseCollection struct { - RequestSecurityTokenResponse RequestSecurityTokenResponse -} - -type RequestSecurityTokenResponse struct { - RequestedSecurityToken RequestedSecurityToken - Lifetime *Lifetime `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 Lifetime"` -} - -type RequestedSecurityToken struct { - Assertion string `xml:",innerxml"` -} - -type RequestSecurityTokenBody struct { - Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` - Res *RequestSecurityTokenResponseCollection `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponseCollection,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RequestSecurityTokenBody) Fault() *soap.Fault { return b.Fault_ } - -func (b *RequestSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken { return b.Req } - -func (r *RequestSecurityToken) Action() string { - kind := path.Base(r.RequestType) - return "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/" + kind -} - -func Issue(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponseCollection, error) { - var reqBody, resBody RequestSecurityTokenBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenewSecurityTokenBody struct { - Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` - Res *RequestSecurityTokenResponse `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenewSecurityTokenBody) Fault() *soap.Fault { return b.Fault_ } - -func (b *RenewSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken { return b.Req } - -func Renew(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponse, error) { - var reqBody, resBody RenewSecurityTokenBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -// Marshal panics if xml.Marshal returns an error -func Marshal(val interface{}) string { - b, err := xml.Marshal(val) - if err != nil { - panic(err) - } - return string(b) -} - -// mkns prepends the given namespace to xml.Name.Local and returns obj encoded as xml. -// Note that the namespace is required when encoding, but the namespace prefix must not be -// present when decoding as Go's decoding does not handle namespace prefix. -func mkns(ns string, obj interface{}, name ...*xml.Name) string { - ns += ":" - for i := range name { - name[i].Space = "" - if !strings.HasPrefix(name[i].Local, ns) { - name[i].Local = ns + name[i].Local - } - } - - return Marshal(obj) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/signer.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/signer.go deleted file mode 100644 index 6ee0ffdebd03..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/sts/signer.go +++ /dev/null @@ -1,355 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package sts - -import ( - "bytes" - "compress/gzip" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "crypto/tls" - "encoding/base64" - "errors" - "fmt" - "io" - "io/ioutil" - mrand "math/rand" - "net" - "net/http" - "net/url" - "strings" - "time" - - "github.com/google/uuid" - - "github.com/vmware/govmomi/sts/internal" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/xml" -) - -// Signer implements the soap.Signer interface. -type Signer struct { - Token string // Token is a SAML token - Certificate *tls.Certificate // Certificate is used to sign requests - Lifetime struct { - Created time.Time - Expires time.Time - } - user *url.Userinfo // user contains the credentials for bearer token request - keyID string // keyID is the Signature UseKey ID, which is referenced in both the soap body and header -} - -// signedEnvelope is similar to soap.Envelope, but with namespace and Body as innerxml -type signedEnvelope struct { - XMLName xml.Name `xml:"soap:Envelope"` - NS string `xml:"xmlns:soap,attr"` - Header soap.Header `xml:"soap:Header"` - Body string `xml:",innerxml"` -} - -// newID returns a unique Reference ID, with a leading underscore as required by STS. -func newID() string { - return "_" + uuid.New().String() -} - -func (s *Signer) setTokenReference(info *internal.KeyInfo) error { - var token struct { - ID string `xml:",attr"` // parse saml2:Assertion ID attribute - InnerXML string `xml:",innerxml"` // no need to parse the entire token - } - if err := xml.Unmarshal([]byte(s.Token), &token); err != nil { - return err - } - - info.SecurityTokenReference = &internal.SecurityTokenReference{ - WSSE11: "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd", - TokenType: "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0", - KeyIdentifier: &internal.KeyIdentifier{ - ID: token.ID, - ValueType: "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID", - }, - } - - return nil -} - -// Sign is a soap.Signer implementation which can be used to sign RequestSecurityToken and LoginByTokenBody requests. -func (s *Signer) Sign(env soap.Envelope) ([]byte, error) { - var key *rsa.PrivateKey - hasKey := false - if s.Certificate != nil { - key, hasKey = s.Certificate.PrivateKey.(*rsa.PrivateKey) - if !hasKey { - return nil, errors.New("sts: rsa.PrivateKey is required") - } - } - - created := time.Now().UTC() - header := &internal.Security{ - WSU: internal.WSU, - WSSE: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", - Timestamp: internal.Timestamp{ - NS: internal.WSU, - ID: newID(), - Created: created.Format(internal.Time), - Expires: created.Add(time.Minute).Format(internal.Time), // If STS receives this request after this, it is assumed to have expired. - }, - } - env.Header.Security = header - - info := internal.KeyInfo{XMLName: xml.Name{Local: "ds:KeyInfo"}} - var c14n, body string - type requestToken interface { - RequestSecurityToken() *internal.RequestSecurityToken - } - - switch x := env.Body.(type) { - case requestToken: - if hasKey { - // We need c14n for all requests, as its digest is included in the signature and must match on the server side. - // We need the body in original form when using an ActAs or RenewTarget token, where the token and its signature are embedded in the body. - req := x.RequestSecurityToken() - c14n = req.C14N() - body = req.String() - - if len(s.Certificate.Certificate) == 0 { - header.Assertion = s.Token - if err := s.setTokenReference(&info); err != nil { - return nil, err - } - } else { - id := newID() - - header.BinarySecurityToken = &internal.BinarySecurityToken{ - EncodingType: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary", - ValueType: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3", - ID: id, - Value: base64.StdEncoding.EncodeToString(s.Certificate.Certificate[0]), - } - - info.SecurityTokenReference = &internal.SecurityTokenReference{ - Reference: &internal.SecurityReference{ - URI: "#" + id, - ValueType: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3", - }, - } - } - } - // When requesting HoK token for interactive user, request will have both priv. key and username/password. - if s.user.Username() != "" { - header.UsernameToken = &internal.UsernameToken{ - Username: s.user.Username(), - } - header.UsernameToken.Password, _ = s.user.Password() - } - case *methods.LoginByTokenBody: - header.Assertion = s.Token - - if hasKey { - if err := s.setTokenReference(&info); err != nil { - return nil, err - } - - c14n = internal.Marshal(x.Req) - } - default: - // We can end up here via ssoadmin.SessionManager.Login(). - // No other known cases where a signed request is needed. - header.Assertion = s.Token - if hasKey { - if err := s.setTokenReference(&info); err != nil { - return nil, err - } - type Req interface { - C14N() string - } - c14n = env.Body.(Req).C14N() - } - } - - if !hasKey { - return xml.Marshal(env) // Bearer token without key to sign - } - - id := newID() - tmpl := `%s` - c14n = fmt.Sprintf(tmpl, internal.WSU, id, c14n) - if body == "" { - body = c14n - } else { - body = fmt.Sprintf(tmpl, internal.WSU, id, body) - } - - header.Signature = &internal.Signature{ - XMLName: xml.Name{Local: "ds:Signature"}, - NS: internal.DSIG, - ID: s.keyID, - KeyInfo: info, - SignedInfo: internal.SignedInfo{ - XMLName: xml.Name{Local: "ds:SignedInfo"}, - NS: internal.DSIG, - CanonicalizationMethod: internal.Method{ - XMLName: xml.Name{Local: "ds:CanonicalizationMethod"}, - Algorithm: "http://www.w3.org/2001/10/xml-exc-c14n#", - }, - SignatureMethod: internal.Method{ - XMLName: xml.Name{Local: "ds:SignatureMethod"}, - Algorithm: internal.SHA256, - }, - Reference: []internal.Reference{ - internal.NewReference(header.Timestamp.ID, header.Timestamp.C14N()), - internal.NewReference(id, c14n), - }, - }, - } - - sum := sha256.Sum256([]byte(header.Signature.SignedInfo.C14N())) - sig, err := rsa.SignPKCS1v15(rand.Reader, key, crypto.SHA256, sum[:]) - if err != nil { - return nil, err - } - - header.Signature.SignatureValue = internal.Value{ - XMLName: xml.Name{Local: "ds:SignatureValue"}, - Value: base64.StdEncoding.EncodeToString(sig), - } - - return xml.Marshal(signedEnvelope{ - NS: "http://schemas.xmlsoap.org/soap/envelope/", - Header: *env.Header, - Body: body, - }) -} - -// SignRequest is a rest.Signer implementation which can be used to sign rest.Client.LoginByTokenBody requests. -func (s *Signer) SignRequest(req *http.Request) error { - type param struct { - key, val string - } - var params []string - add := func(p param) { - params = append(params, fmt.Sprintf(`%s="%s"`, p.key, p.val)) - } - - var buf bytes.Buffer - gz := gzip.NewWriter(&buf) - if _, err := io.WriteString(gz, s.Token); err != nil { - return fmt.Errorf("zip token: %s", err) - } - if err := gz.Close(); err != nil { - return fmt.Errorf("zip token: %s", err) - } - add(param{ - key: "token", - val: base64.StdEncoding.EncodeToString(buf.Bytes()), - }) - - if s.Certificate != nil { - nonce := fmt.Sprintf("%d:%d", time.Now().UnixNano()/1e6, mrand.Int()) - var body []byte - if req.GetBody != nil { - r, rerr := req.GetBody() - if rerr != nil { - return fmt.Errorf("sts: getting http.Request body: %s", rerr) - } - defer r.Close() - body, rerr = ioutil.ReadAll(r) - if rerr != nil { - return fmt.Errorf("sts: reading http.Request body: %s", rerr) - } - } - bhash := sha256.Sum256(body) - - port := req.URL.Port() - if port == "" { - port = "80" // Default port for the "Host" header on the server side - } - - var buf bytes.Buffer - host := req.URL.Hostname() - - // Check if the host IP is in IPv6 format. If yes, add the opening and closing square brackets. - if isIPv6(host) { - host = fmt.Sprintf("%s%s%s", "[", host, "]") - } - - msg := []string{ - nonce, - req.Method, - req.URL.Path, - strings.ToLower(host), - port, - } - for i := range msg { - buf.WriteString(msg[i]) - buf.WriteByte('\n') - } - buf.Write(bhash[:]) - buf.WriteByte('\n') - - sum := sha256.Sum256(buf.Bytes()) - key, ok := s.Certificate.PrivateKey.(*rsa.PrivateKey) - if !ok { - return errors.New("sts: rsa.PrivateKey is required to sign http.Request") - } - sig, err := rsa.SignPKCS1v15(rand.Reader, key, crypto.SHA256, sum[:]) - if err != nil { - return err - } - - add(param{ - key: "signature_alg", - val: "RSA-SHA256", - }) - add(param{ - key: "signature", - val: base64.StdEncoding.EncodeToString(sig), - }) - add(param{ - key: "nonce", - val: nonce, - }) - add(param{ - key: "bodyhash", - val: base64.StdEncoding.EncodeToString(bhash[:]), - }) - } - - req.Header.Set("Authorization", fmt.Sprintf("SIGN %s", strings.Join(params, ", "))) - - return nil -} - -func (s *Signer) NewRequest() TokenRequest { - return TokenRequest{ - Token: s.Token, - Certificate: s.Certificate, - Userinfo: s.user, - KeyID: s.keyID, - } -} - -func isIPv6(s string) bool { - ip := net.ParseIP(s) - if ip == nil { - return false - } - return ip.To4() == nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/error.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/error.go deleted file mode 100644 index 3fff5aa26582..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/error.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package task - -import "github.com/vmware/govmomi/vim25/types" - -type Error struct { - *types.LocalizedMethodFault - Description *types.LocalizableMessage -} - -// Error returns the task's localized fault message. -func (e Error) Error() string { - return e.LocalizedMethodFault.LocalizedMessage -} - -func (e Error) Fault() types.BaseMethodFault { - return e.LocalizedMethodFault.Fault -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/history_collector.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/history_collector.go deleted file mode 100644 index 7d8a6cf04ab5..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/history_collector.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright (c) 2015-2022 VMware, Inc. 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. -*/ - -package task - -import ( - "context" - - "github.com/vmware/govmomi/history" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -// HistoryCollector provides a mechanism for retrieving historical data and -// updates when the server appends new tasks. -type HistoryCollector struct { - *history.Collector -} - -func newHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector { - return &HistoryCollector{ - Collector: history.NewCollector(c, ref), - } -} - -// LatestPage returns items in the 'viewable latest page' of the task history collector. -// As new tasks that match the collector's TaskFilterSpec are created, -// they are added to this page, and the oldest tasks are removed from the collector to keep -// the size of the page to that allowed by SetCollectorPageSize. -// The "oldest task" is the one with the oldest creation time. The tasks in the returned page are unordered. -func (h HistoryCollector) LatestPage(ctx context.Context) ([]types.TaskInfo, error) { - var o mo.TaskHistoryCollector - - err := h.Properties(ctx, h.Reference(), []string{"latestPage"}, &o) - if err != nil { - return nil, err - } - - return o.LatestPage, nil -} - -// ReadNextTasks reads the scrollable view from the current position. The -// scrollable position is moved to the next newer page after the read. No item -// is returned when the end of the collector is reached. -func (h HistoryCollector) ReadNextTasks(ctx context.Context, maxCount int32) ([]types.TaskInfo, error) { - req := types.ReadNextTasks{ - This: h.Reference(), - MaxCount: maxCount, - } - - res, err := methods.ReadNextTasks(ctx, h.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} - -// ReadPreviousTasks reads the scrollable view from the current position. The -// scrollable position is then moved to the next older page after the read. No -// item is returned when the head of the collector is reached. -func (h HistoryCollector) ReadPreviousTasks(ctx context.Context, maxCount int32) ([]types.TaskInfo, error) { - req := types.ReadPreviousTasks{ - This: h.Reference(), - MaxCount: maxCount, - } - - res, err := methods.ReadPreviousTasks(ctx, h.Client(), &req) - if err != nil { - return nil, err - } - - return res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/manager.go deleted file mode 100644 index 8279089d7dba..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/manager.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package task - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type Manager struct { - r types.ManagedObjectReference - c *vim25.Client -} - -// NewManager creates a new task manager -func NewManager(c *vim25.Client) *Manager { - m := Manager{ - r: *c.ServiceContent.TaskManager, - c: c, - } - - return &m -} - -// Reference returns the task.Manager MOID -func (m Manager) Reference() types.ManagedObjectReference { - return m.r -} - -// CreateCollectorForTasks returns a task history collector, a specialized -// history collector that gathers TaskInfo data objects. -func (m Manager) CreateCollectorForTasks(ctx context.Context, filter types.TaskFilterSpec) (*HistoryCollector, error) { - req := types.CreateCollectorForTasks{ - This: m.r, - Filter: filter, - } - - res, err := methods.CreateCollectorForTasks(ctx, m.c, &req) - if err != nil { - return nil, err - } - - return newHistoryCollector(m.c, res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/wait.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/wait.go deleted file mode 100644 index b78f5110d959..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/task/wait.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package task - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25/progress" - "github.com/vmware/govmomi/vim25/types" -) - -type taskProgress struct { - info *types.TaskInfo -} - -func (t taskProgress) Percentage() float32 { - return float32(t.info.Progress) -} - -func (t taskProgress) Detail() string { - return "" -} - -func (t taskProgress) Error() error { - if t.info.Error != nil { - return Error{t.info.Error, t.info.Description} - } - - return nil -} - -type taskCallback struct { - ch chan<- progress.Report - info *types.TaskInfo - err error -} - -func (t *taskCallback) fn(pc []types.PropertyChange) bool { - for _, c := range pc { - if c.Name != "info" { - continue - } - - if c.Op != types.PropertyChangeOpAssign { - continue - } - - if c.Val == nil { - continue - } - - ti := c.Val.(types.TaskInfo) - t.info = &ti - } - - // t.info could be nil if pc can't satisfy the rules above - if t.info == nil { - return false - } - - pr := taskProgress{t.info} - - // Store copy of error, so Wait() can return it as well. - t.err = pr.Error() - - switch t.info.State { - case types.TaskInfoStateQueued, types.TaskInfoStateRunning: - if t.ch != nil { - // Don't care if this is dropped - select { - case t.ch <- pr: - default: - } - } - return false - case types.TaskInfoStateSuccess, types.TaskInfoStateError: - if t.ch != nil { - // Last one must always be delivered - t.ch <- pr - } - return true - default: - panic("unknown state: " + t.info.State) - } -} - -// Wait waits for a task to finish with either success or failure. It does so -// by waiting for the "info" property of task managed object to change. The -// function returns when it finds the task in the "success" or "error" state. -// In the former case, the return value is nil. In the latter case the return -// value is an instance of this package's Error struct. -// -// Any error returned while waiting for property changes causes the function to -// return immediately and propagate the error. -// -// If the progress.Sinker argument is specified, any progress updates for the -// task are sent here. The completion percentage is passed through directly. -// The detail for the progress update is set to an empty string. If the task -// finishes in the error state, the error instance is passed through as well. -// Note that this error is the same error that is returned by this function. -// -func Wait(ctx context.Context, ref types.ManagedObjectReference, pc *property.Collector, s progress.Sinker) (*types.TaskInfo, error) { - cb := &taskCallback{} - - // Include progress sink if specified - if s != nil { - cb.ch = s.Sink() - defer close(cb.ch) - } - - filter := &property.WaitFilter{PropagateMissing: true} - filter.Add(ref, ref.Type, []string{"info"}) - - err := property.WaitForUpdates(ctx, pc, filter, func(updates []types.ObjectUpdate) bool { - for _, update := range updates { - if cb.fn(update.ChangeSet) { - return true - } - } - - return false - }) - if err != nil { - return nil, err - } - - return cb.info, cb.err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/internal/internal.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/internal/internal.go deleted file mode 100644 index f6584c569bf2..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/internal/internal.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright (c) 2018-2022 VMware, Inc. 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. -*/ - -package internal - -import ( - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -// VAPI REST Paths -const ( - SessionPath = "/com/vmware/cis/session" - CategoryPath = "/com/vmware/cis/tagging/category" - TagPath = "/com/vmware/cis/tagging/tag" - AssociationPath = "/com/vmware/cis/tagging/tag-association" - LibraryPath = "/com/vmware/content/library" - LibraryItemFileData = "/com/vmware/cis/data" - LibraryItemPath = "/com/vmware/content/library/item" - LibraryItemFilePath = "/com/vmware/content/library/item/file" - LibraryItemUpdateSession = "/com/vmware/content/library/item/update-session" - LibraryItemUpdateSessionFile = "/com/vmware/content/library/item/updatesession/file" - LibraryItemDownloadSession = "/com/vmware/content/library/item/download-session" - LibraryItemDownloadSessionFile = "/com/vmware/content/library/item/downloadsession/file" - LocalLibraryPath = "/com/vmware/content/local-library" - SubscribedLibraryPath = "/com/vmware/content/subscribed-library" - SecurityPoliciesPath = "/api/content/security-policies" - SubscribedLibraryItem = "/com/vmware/content/library/subscribed-item" - Subscriptions = "/com/vmware/content/library/subscriptions" - TrustedCertificatesPath = "/api/content/trusted-certificates" - VCenterOVFLibraryItem = "/com/vmware/vcenter/ovf/library-item" - VCenterVMTXLibraryItem = "/vcenter/vm-template/library-items" - VCenterVM = "/vcenter/vm" - SessionCookieName = "vmware-api-session-id" - UseHeaderAuthn = "vmware-use-header-authn" - DebugEcho = "/vc-sim/debug/echo" -) - -// AssociatedObject is the same structure as types.ManagedObjectReference, -// just with a different field name (ID instead of Value). -// In the API we use mo.Reference, this type is only used for wire transfer. -type AssociatedObject struct { - Type string `json:"type"` - Value string `json:"id"` -} - -// Reference implements mo.Reference -func (o AssociatedObject) Reference() types.ManagedObjectReference { - return types.ManagedObjectReference(o) -} - -// Association for tag-association requests. -type Association struct { - ObjectID *AssociatedObject `json:"object_id,omitempty"` -} - -// NewAssociation returns an Association, converting ref to an AssociatedObject. -func NewAssociation(ref mo.Reference) Association { - obj := AssociatedObject(ref.Reference()) - return Association{ - ObjectID: &obj, - } -} - -type SubscriptionDestination struct { - ID string `json:"subscription"` -} - -type SubscriptionDestinationSpec struct { - Subscriptions []SubscriptionDestination `json:"subscriptions,omitempty"` -} - -type SubscriptionItemDestinationSpec struct { - Force bool `json:"force_sync_content"` - Subscriptions []SubscriptionDestination `json:"subscriptions,omitempty"` -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/client.go deleted file mode 100644 index b1cefd0e2801..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/client.go +++ /dev/null @@ -1,336 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package rest - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "github.com/vmware/govmomi/vapi/internal" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/soap" -) - -// Client extends soap.Client to support JSON encoding, while inheriting security features, debug tracing and session persistence. -type Client struct { - mu sync.Mutex - - *soap.Client - sessionID string -} - -// Session information -type Session struct { - User string `json:"user"` - Created time.Time `json:"created_time"` - LastAccessed time.Time `json:"last_accessed_time"` -} - -// LocalizableMessage represents a localizable error -type LocalizableMessage struct { - Args []string `json:"args,omitempty"` - DefaultMessage string `json:"default_message,omitempty"` - ID string `json:"id,omitempty"` -} - -func (m *LocalizableMessage) Error() string { - return m.DefaultMessage -} - -// NewClient creates a new Client instance. -func NewClient(c *vim25.Client) *Client { - sc := c.Client.NewServiceClient(Path, "") - - return &Client{Client: sc} -} - -// SessionID is set by calling Login() or optionally with the given id param -func (c *Client) SessionID(id ...string) string { - c.mu.Lock() - defer c.mu.Unlock() - if len(id) != 0 { - c.sessionID = id[0] - } - return c.sessionID -} - -type marshaledClient struct { - SoapClient *soap.Client - SessionID string -} - -func (c *Client) MarshalJSON() ([]byte, error) { - m := marshaledClient{ - SoapClient: c.Client, - SessionID: c.sessionID, - } - - return json.Marshal(m) -} - -func (c *Client) UnmarshalJSON(b []byte) error { - var m marshaledClient - - err := json.Unmarshal(b, &m) - if err != nil { - return err - } - - *c = Client{ - Client: m.SoapClient, - sessionID: m.SessionID, - } - - return nil -} - -// isAPI returns true if path starts with "/api" -// This hack allows helpers to support both endpoints: -// "/rest" - value wrapped responses and structured error responses -// "/api" - raw responses and no structured error responses -func isAPI(path string) bool { - return strings.HasPrefix(path, "/api") -} - -// Resource helper for the given path. -func (c *Client) Resource(path string) *Resource { - r := &Resource{u: c.URL()} - if !isAPI(path) { - path = Path + path - } - r.u.Path = path - return r -} - -type Signer interface { - SignRequest(*http.Request) error -} - -type signerContext struct{} - -func (c *Client) WithSigner(ctx context.Context, s Signer) context.Context { - return context.WithValue(ctx, signerContext{}, s) -} - -type headersContext struct{} - -// WithHeader returns a new Context populated with the provided headers map. -// Calls to a VAPI REST client with this context will populate the HTTP headers -// map using the provided headers. -func (c *Client) WithHeader( - ctx context.Context, - headers http.Header) context.Context { - - return context.WithValue(ctx, headersContext{}, headers) -} - -type statusError struct { - res *http.Response -} - -func (e *statusError) Error() string { - return fmt.Sprintf("%s %s: %s", e.res.Request.Method, e.res.Request.URL, e.res.Status) -} - -// RawResponse may be used with the Do method as the resBody argument in order -// to capture the raw response data. -type RawResponse struct { - bytes.Buffer -} - -// Do sends the http.Request, decoding resBody if provided. -func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error { - switch req.Method { - case http.MethodPost, http.MethodPatch, http.MethodPut: - req.Header.Set("Content-Type", "application/json") - } - - req.Header.Set("Accept", "application/json") - - if id := c.SessionID(); id != "" { - req.Header.Set(internal.SessionCookieName, id) - } - - if s, ok := ctx.Value(signerContext{}).(Signer); ok { - if err := s.SignRequest(req); err != nil { - return err - } - } - - if headers, ok := ctx.Value(headersContext{}).(http.Header); ok { - for k, v := range headers { - for _, v := range v { - req.Header.Add(k, v) - } - } - } - - return c.Client.Do(ctx, req, func(res *http.Response) error { - switch res.StatusCode { - case http.StatusOK: - case http.StatusCreated: - case http.StatusNoContent: - case http.StatusBadRequest: - // TODO: structured error types - detail, err := ioutil.ReadAll(res.Body) - if err != nil { - return err - } - return fmt.Errorf("%s: %s", res.Status, bytes.TrimSpace(detail)) - default: - return &statusError{res} - } - - if resBody == nil { - return nil - } - - switch b := resBody.(type) { - case *RawResponse: - return res.Write(b) - case io.Writer: - _, err := io.Copy(b, res.Body) - return err - default: - d := json.NewDecoder(res.Body) - if isAPI(req.URL.Path) { - // Responses from the /api endpoint are not wrapped - return d.Decode(resBody) - } - // Responses from the /rest endpoint are wrapped in this structure - val := struct { - Value interface{} `json:"value,omitempty"` - }{ - resBody, - } - return d.Decode(&val) - } - }) -} - -// authHeaders ensures the given map contains a REST auth header -func (c *Client) authHeaders(h map[string]string) map[string]string { - if _, exists := h[internal.SessionCookieName]; exists { - return h - } - if h == nil { - h = make(map[string]string) - } - - h[internal.SessionCookieName] = c.SessionID() - - return h -} - -// Download wraps soap.Client.Download, adding the REST authentication header -func (c *Client) Download(ctx context.Context, u *url.URL, param *soap.Download) (io.ReadCloser, int64, error) { - p := *param - p.Headers = c.authHeaders(p.Headers) - return c.Client.Download(ctx, u, &p) -} - -// DownloadFile wraps soap.Client.DownloadFile, adding the REST authentication header -func (c *Client) DownloadFile(ctx context.Context, file string, u *url.URL, param *soap.Download) error { - p := *param - p.Headers = c.authHeaders(p.Headers) - return c.Client.DownloadFile(ctx, file, u, &p) -} - -// Upload wraps soap.Client.Upload, adding the REST authentication header -func (c *Client) Upload(ctx context.Context, f io.Reader, u *url.URL, param *soap.Upload) error { - p := *param - p.Headers = c.authHeaders(p.Headers) - return c.Client.Upload(ctx, f, u, &p) -} - -// Login creates a new session via Basic Authentication with the given url.Userinfo. -func (c *Client) Login(ctx context.Context, user *url.Userinfo) error { - req := c.Resource(internal.SessionPath).Request(http.MethodPost) - - req.Header.Set(internal.UseHeaderAuthn, "true") - - if user != nil { - if password, ok := user.Password(); ok { - req.SetBasicAuth(user.Username(), password) - } - } - - var id string - err := c.Do(ctx, req, &id) - if err != nil { - return err - } - - c.SessionID(id) - - return nil -} - -func (c *Client) LoginByToken(ctx context.Context) error { - return c.Login(ctx, nil) -} - -// Session returns the user's current session. -// Nil is returned if the session is not authenticated. -func (c *Client) Session(ctx context.Context) (*Session, error) { - var s Session - req := c.Resource(internal.SessionPath).WithAction("get").Request(http.MethodPost) - err := c.Do(ctx, req, &s) - if err != nil { - if e, ok := err.(*statusError); ok { - if e.res.StatusCode == http.StatusUnauthorized { - return nil, nil - } - } - return nil, err - } - return &s, nil -} - -// Logout deletes the current session. -func (c *Client) Logout(ctx context.Context) error { - req := c.Resource(internal.SessionPath).Request(http.MethodDelete) - return c.Do(ctx, req, nil) -} - -// Valid returns whether or not the client is valid and ready for use. -// This should be called after unmarshalling the client. -func (c *Client) Valid() bool { - if c == nil { - return false - } - - if c.Client == nil { - return false - } - - return true -} - -// Path returns rest.Path (see cache.Client) -func (c *Client) Path() string { - return Path -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/resource.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/resource.go deleted file mode 100644 index e6e627492ab4..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/rest/resource.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright (c) 2019 VMware, Inc. 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. -*/ - -package rest - -import ( - "bytes" - "encoding/json" - "io" - "net/http" - "net/url" -) - -const ( - Path = "/rest" -) - -// Resource wraps url.URL with helpers -type Resource struct { - u *url.URL -} - -func (r *Resource) String() string { - return r.u.String() -} - -// WithID appends id to the URL.Path -func (r *Resource) WithID(id string) *Resource { - r.u.Path += "/id:" + id - return r -} - -// WithAction sets adds action to the URL.RawQuery -func (r *Resource) WithAction(action string) *Resource { - return r.WithParam("~action", action) -} - -// WithParam adds one parameter on the URL.RawQuery -func (r *Resource) WithParam(name string, value string) *Resource { - // ParseQuery handles empty case, and we control access to query string so shouldn't encounter an error case - params, err := url.ParseQuery(r.u.RawQuery) - if err != nil { - panic(err) - } - params[name] = append(params[name], value) - r.u.RawQuery = params.Encode() - return r -} - -// WithPathEncodedParam appends a parameter on the URL.RawQuery, -// For special cases where URL Path-style encoding is needed -func (r *Resource) WithPathEncodedParam(name string, value string) *Resource { - t := &url.URL{Path: value} - encodedValue := t.String() - t = &url.URL{Path: name} - encodedName := t.String() - // ParseQuery handles empty case, and we control access to query string so shouldn't encounter an error case - params, err := url.ParseQuery(r.u.RawQuery) - if err != nil { - panic(err) - } - // Values.Encode() doesn't escape exactly how we want, so we need to build the query string ourselves - if len(params) >= 1 { - r.u.RawQuery = r.u.RawQuery + "&" + encodedName + "=" + encodedValue - } else { - r.u.RawQuery = r.u.RawQuery + encodedName + "=" + encodedValue - } - return r -} - -// Request returns a new http.Request for the given method. -// An optional body can be provided for POST and PATCH methods. -func (r *Resource) Request(method string, body ...interface{}) *http.Request { - rdr := io.MultiReader() // empty body by default - if len(body) != 0 { - rdr = encode(body[0]) - } - req, err := http.NewRequest(method, r.u.String(), rdr) - if err != nil { - panic(err) - } - return req -} - -type errorReader struct { - e error -} - -func (e errorReader) Read([]byte) (int, error) { - return -1, e.e -} - -// encode body as JSON, deferring any errors until io.Reader is used. -func encode(body interface{}) io.Reader { - var b bytes.Buffer - err := json.NewEncoder(&b).Encode(body) - if err != nil { - return errorReader{err} - } - return &b -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/categories.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/categories.go deleted file mode 100644 index 64d0b66c16c4..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/categories.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package tags - -import ( - "context" - "fmt" - "net/http" - "strings" - - "github.com/vmware/govmomi/vapi/internal" -) - -// Category provides methods to create, read, update, delete, and enumerate -// categories. -type Category struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - Cardinality string `json:"cardinality,omitempty"` - AssociableTypes []string `json:"associable_types,omitempty"` - UsedBy []string `json:"used_by,omitempty"` -} - -func (c *Category) hasType(kind string) bool { - for _, k := range c.AssociableTypes { - if kind == k { - return true - } - } - return false -} - -// Patch merges Category changes from the given src. -// AssociableTypes can only be appended to and cannot shrink. -func (c *Category) Patch(src *Category) { - if src.Name != "" { - c.Name = src.Name - } - if src.Description != "" { - c.Description = src.Description - } - if src.Cardinality != "" { - c.Cardinality = src.Cardinality - } - // Note that in order to append to AssociableTypes any existing types must be included in their original order. - for _, kind := range src.AssociableTypes { - if !c.hasType(kind) { - c.AssociableTypes = append(c.AssociableTypes, kind) - } - } -} - -// CreateCategory creates a new category and returns the category ID. -func (c *Manager) CreateCategory(ctx context.Context, category *Category) (string, error) { - // create avoids the annoyance of CreateTag requiring field keys to be included in the request, - // even though the field value can be empty. - type create struct { - Name string `json:"name"` - Description string `json:"description"` - Cardinality string `json:"cardinality"` - AssociableTypes []string `json:"associable_types"` - } - spec := struct { - Category create `json:"create_spec"` - }{ - Category: create{ - Name: category.Name, - Description: category.Description, - Cardinality: category.Cardinality, - AssociableTypes: category.AssociableTypes, - }, - } - if spec.Category.AssociableTypes == nil { - // otherwise create fails with invalid_argument - spec.Category.AssociableTypes = []string{} - } - url := c.Resource(internal.CategoryPath) - var res string - return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) -} - -// UpdateCategory updates one or more of the AssociableTypes, Cardinality, -// Description and Name fields. -func (c *Manager) UpdateCategory(ctx context.Context, category *Category) error { - spec := struct { - Category Category `json:"update_spec"` - }{ - Category: Category{ - AssociableTypes: category.AssociableTypes, - Cardinality: category.Cardinality, - Description: category.Description, - Name: category.Name, - }, - } - url := c.Resource(internal.CategoryPath).WithID(category.ID) - return c.Do(ctx, url.Request(http.MethodPatch, spec), nil) -} - -// DeleteCategory deletes a category. -func (c *Manager) DeleteCategory(ctx context.Context, category *Category) error { - url := c.Resource(internal.CategoryPath).WithID(category.ID) - return c.Do(ctx, url.Request(http.MethodDelete), nil) -} - -// GetCategory fetches the category information for the given identifier. -// The id parameter can be a Category ID or Category Name. -func (c *Manager) GetCategory(ctx context.Context, id string) (*Category, error) { - if isName(id) { - cat, err := c.GetCategories(ctx) - if err != nil { - return nil, err - } - - for i := range cat { - if cat[i].Name == id { - return &cat[i], nil - } - } - } - url := c.Resource(internal.CategoryPath).WithID(id) - var res Category - return &res, c.Do(ctx, url.Request(http.MethodGet), &res) -} - -// ListCategories returns all category IDs in the system. -func (c *Manager) ListCategories(ctx context.Context) ([]string, error) { - url := c.Resource(internal.CategoryPath) - var res []string - return res, c.Do(ctx, url.Request(http.MethodGet), &res) -} - -// GetCategories fetches a list of category information in the system. -func (c *Manager) GetCategories(ctx context.Context) ([]Category, error) { - ids, err := c.ListCategories(ctx) - if err != nil { - return nil, fmt.Errorf("list categories: %s", err) - } - - var categories []Category - for _, id := range ids { - category, err := c.GetCategory(ctx, id) - if err != nil { - if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) { - continue // deleted since last fetch - } - return nil, fmt.Errorf("get category %s: %v", id, err) - } - categories = append(categories, *category) - } - - return categories, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/errors.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/errors.go deleted file mode 100644 index b3f84f842f4f..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/errors.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright (c) 2020 VMware, Inc. 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. -*/ - -package tags - -import ( - "fmt" -) - -const ( - errFormat = "[error: %d type: %s reason: %s]" - separator = "," // concat multiple error strings -) - -// BatchError is an error returned for a single item which failed in a batch -// operation -type BatchError struct { - Type string `json:"id"` - Message string `json:"default_message"` -} - -// BatchErrors contains all errors which occurred in a batch operation -type BatchErrors []BatchError - -func (b BatchErrors) Error() string { - if len(b) == 0 { - return "" - } - - var errString string - for i := range b { - errType := b[i].Type - reason := b[i].Message - errString += fmt.Sprintf(errFormat, i, errType, reason) - - // no separator after last item - if i+1 < len(b) { - errString += separator - } - } - return errString -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tag_association.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tag_association.go deleted file mode 100644 index 33b220936617..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tag_association.go +++ /dev/null @@ -1,377 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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 - -vUnless 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 tags - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - - "github.com/vmware/govmomi/vapi/internal" - "github.com/vmware/govmomi/vim25/mo" -) - -func (c *Manager) tagID(ctx context.Context, id string) (string, error) { - if isName(id) { - tag, err := c.GetTag(ctx, id) - if err != nil { - return "", err - } - return tag.ID, nil - } - return id, nil -} - -// AttachTag attaches a tag ID to a managed object. -func (c *Manager) AttachTag(ctx context.Context, tagID string, ref mo.Reference) error { - id, err := c.tagID(ctx, tagID) - if err != nil { - return err - } - spec := internal.NewAssociation(ref) - url := c.Resource(internal.AssociationPath).WithID(id).WithAction("attach") - return c.Do(ctx, url.Request(http.MethodPost, spec), nil) -} - -// DetachTag detaches a tag ID from a managed object. -// If the tag is already removed from the object, then this operation is a no-op and an error will not be thrown. -func (c *Manager) DetachTag(ctx context.Context, tagID string, ref mo.Reference) error { - id, err := c.tagID(ctx, tagID) - if err != nil { - return err - } - spec := internal.NewAssociation(ref) - url := c.Resource(internal.AssociationPath).WithID(id).WithAction("detach") - return c.Do(ctx, url.Request(http.MethodPost, spec), nil) -} - -// batchResponse is the response type used by attach/detach operations which -// take multiple tagIDs or moRefs as input. On failure Success will be false and -// Errors contains information about all failed operations -type batchResponse struct { - Success bool `json:"success"` - Errors BatchErrors `json:"error_messages,omitempty"` -} - -// AttachTagToMultipleObjects attaches a tag ID to multiple managed objects. -// This operation is idempotent, i.e. if a tag is already attached to the -// object, then the individual operation is a no-op and no error will be thrown. -// -// This operation was added in vSphere API 6.5. -func (c *Manager) AttachTagToMultipleObjects(ctx context.Context, tagID string, refs []mo.Reference) error { - id, err := c.tagID(ctx, tagID) - if err != nil { - return err - } - - var ids []internal.AssociatedObject - for i := range refs { - ids = append(ids, internal.AssociatedObject(refs[i].Reference())) - } - - spec := struct { - ObjectIDs []internal.AssociatedObject `json:"object_ids"` - }{ids} - - url := c.Resource(internal.AssociationPath).WithID(id).WithAction("attach-tag-to-multiple-objects") - return c.Do(ctx, url.Request(http.MethodPost, spec), nil) -} - -// AttachMultipleTagsToObject attaches multiple tag IDs to a managed object. -// This operation is idempotent. If a tag is already attached to the object, -// then the individual operation is a no-op and no error will be thrown. This -// operation is not atomic. If the underlying call fails with one or more tags -// not successfully attached to the managed object reference it might leave the -// managed object reference in a partially tagged state and needs to be resolved -// by the caller. In this case BatchErrors is returned and can be used to -// analyse failure reasons on each failed tag. -// -// Specified tagIDs must use URN-notation instead of display names or a generic -// error will be returned and no tagging operation will be performed. If the -// managed object reference does not exist a generic 403 Forbidden error will be -// returned. -// -// This operation was added in vSphere API 6.5. -func (c *Manager) AttachMultipleTagsToObject(ctx context.Context, tagIDs []string, ref mo.Reference) error { - for _, id := range tagIDs { - // URN enforced to avoid unnecessary round-trips due to invalid tags or display - // name lookups - if isName(id) { - return fmt.Errorf("specified tag is not a URN: %q", id) - } - } - - obj := internal.AssociatedObject(ref.Reference()) - spec := struct { - ObjectID internal.AssociatedObject `json:"object_id"` - TagIDs []string `json:"tag_ids"` - }{ - ObjectID: obj, - TagIDs: tagIDs, - } - - var res batchResponse - url := c.Resource(internal.AssociationPath).WithAction("attach-multiple-tags-to-object") - err := c.Do(ctx, url.Request(http.MethodPost, spec), &res) - if err != nil { - return err - } - - if !res.Success { - if len(res.Errors) != 0 { - return res.Errors - } - panic("invalid batch error") - } - - return nil -} - -// DetachMultipleTagsFromObject detaches multiple tag IDs from a managed object. -// This operation is idempotent. If a tag is already detached from the object, -// then the individual operation is a no-op and no error will be thrown. This -// operation is not atomic. If the underlying call fails with one or more tags -// not successfully detached from the managed object reference it might leave -// the managed object reference in a partially tagged state and needs to be -// resolved by the caller. In this case BatchErrors is returned and can be used -// to analyse failure reasons on each failed tag. -// -// Specified tagIDs must use URN-notation instead of display names or a generic -// error will be returned and no tagging operation will be performed. If the -// managed object reference does not exist a generic 403 Forbidden error will be -// returned. -// -// This operation was added in vSphere API 6.5. -func (c *Manager) DetachMultipleTagsFromObject(ctx context.Context, tagIDs []string, ref mo.Reference) error { - for _, id := range tagIDs { - // URN enforced to avoid unnecessary round-trips due to invalid tags or display - // name lookups - if isName(id) { - return fmt.Errorf("specified tag is not a URN: %q", id) - } - } - - obj := internal.AssociatedObject(ref.Reference()) - spec := struct { - ObjectID internal.AssociatedObject `json:"object_id"` - TagIDs []string `json:"tag_ids"` - }{ - ObjectID: obj, - TagIDs: tagIDs, - } - - var res batchResponse - url := c.Resource(internal.AssociationPath).WithAction("detach-multiple-tags-from-object") - err := c.Do(ctx, url.Request(http.MethodPost, spec), &res) - if err != nil { - return err - } - - if !res.Success { - if len(res.Errors) != 0 { - return res.Errors - } - panic("invalid batch error") - } - - return nil -} - -// ListAttachedTags fetches the array of tag IDs attached to the given object. -func (c *Manager) ListAttachedTags(ctx context.Context, ref mo.Reference) ([]string, error) { - spec := internal.NewAssociation(ref) - url := c.Resource(internal.AssociationPath).WithAction("list-attached-tags") - var res []string - return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) -} - -// GetAttachedTags fetches the array of tags attached to the given object. -func (c *Manager) GetAttachedTags(ctx context.Context, ref mo.Reference) ([]Tag, error) { - ids, err := c.ListAttachedTags(ctx, ref) - if err != nil { - return nil, fmt.Errorf("get attached tags %s: %s", ref, err) - } - - var info []Tag - for _, id := range ids { - tag, err := c.GetTag(ctx, id) - if err != nil { - return nil, fmt.Errorf("get tag %s: %s", id, err) - } - info = append(info, *tag) - } - return info, nil -} - -// ListAttachedObjects fetches the array of attached objects for the given tag ID. -func (c *Manager) ListAttachedObjects(ctx context.Context, tagID string) ([]mo.Reference, error) { - id, err := c.tagID(ctx, tagID) - if err != nil { - return nil, err - } - url := c.Resource(internal.AssociationPath).WithID(id).WithAction("list-attached-objects") - var res []internal.AssociatedObject - if err := c.Do(ctx, url.Request(http.MethodPost, nil), &res); err != nil { - return nil, err - } - - refs := make([]mo.Reference, len(res)) - for i := range res { - refs[i] = res[i] - } - return refs, nil -} - -// AttachedObjects is the response type used by ListAttachedObjectsOnTags. -type AttachedObjects struct { - TagID string `json:"tag_id"` - Tag *Tag `json:"tag,omitempty"` - ObjectIDs []mo.Reference `json:"object_ids"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (t *AttachedObjects) UnmarshalJSON(b []byte) error { - var o struct { - TagID string `json:"tag_id"` - ObjectIDs []internal.AssociatedObject `json:"object_ids"` - } - err := json.Unmarshal(b, &o) - if err != nil { - return err - } - - t.TagID = o.TagID - t.ObjectIDs = make([]mo.Reference, len(o.ObjectIDs)) - for i := range o.ObjectIDs { - t.ObjectIDs[i] = o.ObjectIDs[i] - } - - return nil -} - -// ListAttachedObjectsOnTags fetches the array of attached objects for the given tag IDs. -func (c *Manager) ListAttachedObjectsOnTags(ctx context.Context, tagID []string) ([]AttachedObjects, error) { - var ids []string - for i := range tagID { - id, err := c.tagID(ctx, tagID[i]) - if err != nil { - return nil, err - } - ids = append(ids, id) - } - - spec := struct { - TagIDs []string `json:"tag_ids"` - }{ids} - - url := c.Resource(internal.AssociationPath).WithAction("list-attached-objects-on-tags") - var res []AttachedObjects - return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) -} - -// GetAttachedObjectsOnTags combines ListAttachedObjectsOnTags and populates each Tag field. -func (c *Manager) GetAttachedObjectsOnTags(ctx context.Context, tagID []string) ([]AttachedObjects, error) { - objs, err := c.ListAttachedObjectsOnTags(ctx, tagID) - if err != nil { - return nil, fmt.Errorf("list attached objects %s: %s", tagID, err) - } - - tags := make(map[string]*Tag) - - for i := range objs { - var err error - id := objs[i].TagID - tag, ok := tags[id] - if !ok { - tag, err = c.GetTag(ctx, id) - if err != nil { - return nil, fmt.Errorf("get tag %s: %s", id, err) - } - objs[i].Tag = tag - } - } - - return objs, nil -} - -// AttachedTags is the response type used by ListAttachedTagsOnObjects. -type AttachedTags struct { - ObjectID mo.Reference `json:"object_id"` - TagIDs []string `json:"tag_ids"` - Tags []Tag `json:"tags,omitempty"` -} - -// UnmarshalJSON implements json.Unmarshaler. -func (t *AttachedTags) UnmarshalJSON(b []byte) error { - var o struct { - ObjectID internal.AssociatedObject `json:"object_id"` - TagIDs []string `json:"tag_ids"` - } - err := json.Unmarshal(b, &o) - if err != nil { - return err - } - - t.ObjectID = o.ObjectID - t.TagIDs = o.TagIDs - - return nil -} - -// ListAttachedTagsOnObjects fetches the array of attached tag IDs for the given object IDs. -func (c *Manager) ListAttachedTagsOnObjects(ctx context.Context, objectID []mo.Reference) ([]AttachedTags, error) { - var ids []internal.AssociatedObject - for i := range objectID { - ids = append(ids, internal.AssociatedObject(objectID[i].Reference())) - } - - spec := struct { - ObjectIDs []internal.AssociatedObject `json:"object_ids"` - }{ids} - - url := c.Resource(internal.AssociationPath).WithAction("list-attached-tags-on-objects") - var res []AttachedTags - return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) -} - -// GetAttachedTagsOnObjects calls ListAttachedTagsOnObjects and populates each Tags field. -func (c *Manager) GetAttachedTagsOnObjects(ctx context.Context, objectID []mo.Reference) ([]AttachedTags, error) { - objs, err := c.ListAttachedTagsOnObjects(ctx, objectID) - if err != nil { - return nil, fmt.Errorf("list attached tags %s: %s", objectID, err) - } - - tags := make(map[string]*Tag) - - for i := range objs { - for _, id := range objs[i].TagIDs { - var err error - tag, ok := tags[id] - if !ok { - tag, err = c.GetTag(ctx, id) - if err != nil { - return nil, fmt.Errorf("get tag %s: %s", id, err) - } - tags[id] = tag - } - objs[i].Tags = append(objs[i].Tags, *tag) - } - } - - return objs, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tags.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tags.go deleted file mode 100644 index b9024f998a2b..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vapi/tags/tags.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright (c) 2018 VMware, Inc. 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. -*/ - -package tags - -import ( - "context" - "fmt" - "net/http" - "strings" - - "github.com/vmware/govmomi/vapi/internal" - "github.com/vmware/govmomi/vapi/rest" -) - -// Manager extends rest.Client, adding tag related methods. -type Manager struct { - *rest.Client -} - -// NewManager creates a new Manager instance with the given client. -func NewManager(client *rest.Client) *Manager { - return &Manager{ - Client: client, - } -} - -// isName returns true if the id is not a urn. -func isName(id string) bool { - return !strings.HasPrefix(id, "urn:") -} - -// Tag provides methods to create, read, update, delete, and enumerate tags. -type Tag struct { - ID string `json:"id,omitempty"` - Description string `json:"description,omitempty"` - Name string `json:"name,omitempty"` - CategoryID string `json:"category_id,omitempty"` - UsedBy []string `json:"used_by,omitempty"` -} - -// Patch merges updates from the given src. -func (t *Tag) Patch(src *Tag) { - if src.Name != "" { - t.Name = src.Name - } - if src.Description != "" { - t.Description = src.Description - } - if src.CategoryID != "" { - t.CategoryID = src.CategoryID - } -} - -// CreateTag creates a new tag with the given Name, Description and CategoryID. -func (c *Manager) CreateTag(ctx context.Context, tag *Tag) (string, error) { - // create avoids the annoyance of CreateTag requiring a "description" key to be included in the request, - // even though the field value can be empty. - type create struct { - Name string `json:"name"` - Description string `json:"description"` - CategoryID string `json:"category_id"` - } - spec := struct { - Tag create `json:"create_spec"` - }{ - Tag: create{ - Name: tag.Name, - Description: tag.Description, - CategoryID: tag.CategoryID, - }, - } - if isName(tag.CategoryID) { - cat, err := c.GetCategory(ctx, tag.CategoryID) - if err != nil { - return "", err - } - spec.Tag.CategoryID = cat.ID - } - url := c.Resource(internal.TagPath) - var res string - return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) -} - -// UpdateTag can update one or both of the tag Description and Name fields. -func (c *Manager) UpdateTag(ctx context.Context, tag *Tag) error { - spec := struct { - Tag Tag `json:"update_spec"` - }{ - Tag: Tag{ - Name: tag.Name, - Description: tag.Description, - }, - } - url := c.Resource(internal.TagPath).WithID(tag.ID) - return c.Do(ctx, url.Request(http.MethodPatch, spec), nil) -} - -// DeleteTag deletes an existing tag. -func (c *Manager) DeleteTag(ctx context.Context, tag *Tag) error { - url := c.Resource(internal.TagPath).WithID(tag.ID) - return c.Do(ctx, url.Request(http.MethodDelete), nil) -} - -// GetTag fetches the tag information for the given identifier. -// The id parameter can be a Tag ID or Tag Name. -func (c *Manager) GetTag(ctx context.Context, id string) (*Tag, error) { - if isName(id) { - tags, err := c.GetTags(ctx) - if err != nil { - return nil, err - } - - for i := range tags { - if tags[i].Name == id { - return &tags[i], nil - } - } - } - - url := c.Resource(internal.TagPath).WithID(id) - var res Tag - return &res, c.Do(ctx, url.Request(http.MethodGet), &res) - -} - -// GetTagForCategory fetches the tag information for the given identifier in the given category. -func (c *Manager) GetTagForCategory(ctx context.Context, id, category string) (*Tag, error) { - if category == "" { - return c.GetTag(ctx, id) - } - - ids, err := c.ListTagsForCategory(ctx, category) - if err != nil { - return nil, err - } - - for _, tagid := range ids { - tag, err := c.GetTag(ctx, tagid) - if err != nil { - return nil, fmt.Errorf("get tag for category %s %s: %s", category, tagid, err) - } - if tag.ID == id || tag.Name == id { - return tag, nil - } - } - - return nil, fmt.Errorf("tag %q not found in category %q", id, category) -} - -// ListTags returns all tag IDs in the system. -func (c *Manager) ListTags(ctx context.Context) ([]string, error) { - url := c.Resource(internal.TagPath) - var res []string - return res, c.Do(ctx, url.Request(http.MethodGet), &res) -} - -// GetTags fetches an array of tag information in the system. -func (c *Manager) GetTags(ctx context.Context) ([]Tag, error) { - ids, err := c.ListTags(ctx) - if err != nil { - return nil, fmt.Errorf("get tags failed for: %s", err) - } - - var tags []Tag - for _, id := range ids { - tag, err := c.GetTag(ctx, id) - if err != nil { - return nil, fmt.Errorf("get category %s failed for %s", id, err) - } - - tags = append(tags, *tag) - - } - return tags, nil -} - -// The id parameter can be a Category ID or Category Name. -func (c *Manager) ListTagsForCategory(ctx context.Context, id string) ([]string, error) { - if isName(id) { - cat, err := c.GetCategory(ctx, id) - if err != nil { - return nil, err - } - id = cat.ID - } - - body := struct { - ID string `json:"category_id"` - }{id} - url := c.Resource(internal.TagPath).WithID(id).WithAction("list-tags-for-category") - var res []string - return res, c.Do(ctx, url.Request(http.MethodPost, body), &res) -} - -// The id parameter can be a Category ID or Category Name. -func (c *Manager) GetTagsForCategory(ctx context.Context, id string) ([]Tag, error) { - ids, err := c.ListTagsForCategory(ctx, id) - if err != nil { - return nil, err - } - - var tags []Tag - for _, id := range ids { - tag, err := c.GetTag(ctx, id) - if err != nil { - return nil, fmt.Errorf("get tag %s: %s", id, err) - } - - tags = append(tags, *tag) - } - return tags, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/container_view.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/container_view.go deleted file mode 100644 index 39041c41f973..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/container_view.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package view - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/mo" - "github.com/vmware/govmomi/vim25/types" -) - -type ContainerView struct { - ManagedObjectView -} - -func NewContainerView(c *vim25.Client, ref types.ManagedObjectReference) *ContainerView { - return &ContainerView{ - ManagedObjectView: *NewManagedObjectView(c, ref), - } -} - -// Retrieve populates dst as property.Collector.Retrieve does, for all entities in the view of types specified by kind. -func (v ContainerView) Retrieve(ctx context.Context, kind []string, ps []string, dst interface{}, pspec ...types.PropertySpec) error { - pc := property.DefaultCollector(v.Client()) - - ospec := types.ObjectSpec{ - Obj: v.Reference(), - Skip: types.NewBool(true), - SelectSet: []types.BaseSelectionSpec{ - &types.TraversalSpec{ - Type: v.Reference().Type, - Path: "view", - }, - }, - } - - if len(kind) == 0 { - kind = []string{"ManagedEntity"} - } - - for _, t := range kind { - spec := types.PropertySpec{ - Type: t, - } - - if len(ps) == 0 { - spec.All = types.NewBool(true) - } else { - spec.PathSet = ps - } - - pspec = append(pspec, spec) - } - - req := types.RetrieveProperties{ - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspec, - }, - }, - } - - res, err := pc.RetrieveProperties(ctx, req) - if err != nil { - return err - } - - if d, ok := dst.(*[]types.ObjectContent); ok { - *d = res.Returnval - return nil - } - - return mo.LoadObjectContent(res.Returnval, dst) -} - -// RetrieveWithFilter populates dst as Retrieve does, but only for entities matching the given filter. -func (v ContainerView) RetrieveWithFilter(ctx context.Context, kind []string, ps []string, dst interface{}, filter property.Filter) error { - if len(filter) == 0 { - return v.Retrieve(ctx, kind, ps, dst) - } - - var content []types.ObjectContent - - err := v.Retrieve(ctx, kind, filter.Keys(), &content) - if err != nil { - return err - } - - objs := filter.MatchObjectContent(content) - - pc := property.DefaultCollector(v.Client()) - - return pc.Retrieve(ctx, objs, ps, dst) -} - -// Find returns object references for entities of type kind, matching the given filter. -func (v ContainerView) Find(ctx context.Context, kind []string, filter property.Filter) ([]types.ManagedObjectReference, error) { - if len(filter) == 0 { - // Ensure we have at least 1 filter to avoid retrieving all properties. - filter = property.Filter{"name": "*"} - } - - var content []types.ObjectContent - - err := v.Retrieve(ctx, kind, filter.Keys(), &content) - if err != nil { - return nil, err - } - - return filter.MatchObjectContent(content), nil -} - -// FindAny returns object references for entities of type kind, matching any property the given filter. -func (v ContainerView) FindAny(ctx context.Context, kind []string, filter property.Filter) ([]types.ManagedObjectReference, error) { - if len(filter) == 0 { - // Ensure we have at least 1 filter to avoid retrieving all properties. - filter = property.Filter{"name": "*"} - } - - var content []types.ObjectContent - - err := v.Retrieve(ctx, kind, filter.Keys(), &content) - if err != nil { - return nil, err - } - - return filter.MatchAnyObjectContent(content), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/list_view.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/list_view.go deleted file mode 100644 index e8cfb504341e..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/list_view.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright (c) 2015-2017 VMware, Inc. 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. -*/ - -package view - -import ( - "context" - - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type ListView struct { - ManagedObjectView -} - -func NewListView(c *vim25.Client, ref types.ManagedObjectReference) *ListView { - return &ListView{ - ManagedObjectView: *NewManagedObjectView(c, ref), - } -} - -func (v ListView) Add(ctx context.Context, refs []types.ManagedObjectReference) error { - req := types.ModifyListView{ - This: v.Reference(), - Add: refs, - } - _, err := methods.ModifyListView(ctx, v.Client(), &req) - return err -} - -func (v ListView) Remove(ctx context.Context, refs []types.ManagedObjectReference) error { - req := types.ModifyListView{ - This: v.Reference(), - Remove: refs, - } - _, err := methods.ModifyListView(ctx, v.Client(), &req) - return err -} - -func (v ListView) Reset(ctx context.Context, refs []types.ManagedObjectReference) error { - req := types.ResetListView{ - This: v.Reference(), - Obj: refs, - } - _, err := methods.ResetListView(ctx, v.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/managed_object_view.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/managed_object_view.go deleted file mode 100644 index 805c8643107c..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/managed_object_view.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package view - -import ( - "context" - - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type ManagedObjectView struct { - object.Common -} - -func NewManagedObjectView(c *vim25.Client, ref types.ManagedObjectReference) *ManagedObjectView { - return &ManagedObjectView{ - Common: object.NewCommon(c, ref), - } -} - -func (v *ManagedObjectView) TraversalSpec() *types.TraversalSpec { - return &types.TraversalSpec{ - Path: "view", - Type: v.Reference().Type, - } -} - -func (v *ManagedObjectView) Destroy(ctx context.Context) error { - req := types.DestroyView{ - This: v.Reference(), - } - - _, err := methods.DestroyView(ctx, v.Client(), &req) - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/manager.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/manager.go deleted file mode 100644 index d44def0cd997..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/manager.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package view - -import ( - "context" - - "github.com/vmware/govmomi/object" - "github.com/vmware/govmomi/vim25" - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/types" -) - -type Manager struct { - object.Common -} - -func NewManager(c *vim25.Client) *Manager { - m := Manager{ - object.NewCommon(c, *c.ServiceContent.ViewManager), - } - - return &m -} - -func (m Manager) CreateListView(ctx context.Context, objects []types.ManagedObjectReference) (*ListView, error) { - req := types.CreateListView{ - This: m.Common.Reference(), - Obj: objects, - } - - res, err := methods.CreateListView(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return NewListView(m.Client(), res.Returnval), nil -} - -func (m Manager) CreateContainerView(ctx context.Context, container types.ManagedObjectReference, managedObjectTypes []string, recursive bool) (*ContainerView, error) { - - req := types.CreateContainerView{ - This: m.Common.Reference(), - Container: container, - Recursive: recursive, - Type: managedObjectTypes, - } - - res, err := methods.CreateContainerView(ctx, m.Client(), &req) - if err != nil { - return nil, err - } - - return NewContainerView(m.Client(), res.Returnval), nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/task_view.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/task_view.go deleted file mode 100644 index 68f62f8d107f..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/view/task_view.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -Copyright (c) 2017 VMware, Inc. 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. -*/ - -package view - -import ( - "context" - - "github.com/vmware/govmomi/property" - "github.com/vmware/govmomi/vim25/types" -) - -// TaskView extends ListView such that it can follow a ManagedEntity's recentTask updates. -type TaskView struct { - *ListView - - Follow bool - - Watch *types.ManagedObjectReference -} - -// CreateTaskView creates a new ListView that optionally watches for a ManagedEntity's recentTask updates. -func (m Manager) CreateTaskView(ctx context.Context, watch *types.ManagedObjectReference) (*TaskView, error) { - l, err := m.CreateListView(ctx, nil) - if err != nil { - return nil, err - } - - tv := &TaskView{ - ListView: l, - Watch: watch, - } - - return tv, nil -} - -// Collect calls function f for each Task update. -func (v TaskView) Collect(ctx context.Context, f func([]types.TaskInfo)) error { - // Using TaskHistoryCollector would be less clunky, but it isn't supported on ESX at all. - ref := v.Reference() - filter := new(property.WaitFilter).Add(ref, "Task", []string{"info"}, v.TraversalSpec()) - - if v.Watch != nil { - filter.Add(*v.Watch, v.Watch.Type, []string{"recentTask"}) - } - - pc := property.DefaultCollector(v.Client()) - - completed := make(map[string]bool) - - return property.WaitForUpdates(ctx, pc, filter, func(updates []types.ObjectUpdate) bool { - var infos []types.TaskInfo - var prune []types.ManagedObjectReference - var tasks []types.ManagedObjectReference - var reset func() - - for _, update := range updates { - for _, change := range update.ChangeSet { - if change.Name == "recentTask" { - tasks = change.Val.(types.ArrayOfManagedObjectReference).ManagedObjectReference - if len(tasks) != 0 { - reset = func() { - _ = v.Reset(ctx, tasks) - - // Remember any tasks we've reported as complete already, - // to avoid reporting multiple times when Reset is triggered. - rtasks := make(map[string]bool) - for i := range tasks { - if _, ok := completed[tasks[i].Value]; ok { - rtasks[tasks[i].Value] = true - } - } - completed = rtasks - } - } - - continue - } - - info, ok := change.Val.(types.TaskInfo) - if !ok { - continue - } - - if !completed[info.Task.Value] { - infos = append(infos, info) - } - - if v.Follow && info.CompleteTime != nil { - prune = append(prune, info.Task) - completed[info.Task.Value] = true - } - } - } - - if len(infos) != 0 { - f(infos) - } - - if reset != nil { - reset() - } else if len(prune) != 0 { - _ = v.Remove(ctx, prune) - } - - if len(tasks) != 0 && len(infos) == 0 { - return false - } - - return !v.Follow - }) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/client.go deleted file mode 100644 index b14cea852021..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/client.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright (c) 2015-2016 VMware, Inc. 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. -*/ - -package vim25 - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "path" - "strings" - - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" - "github.com/vmware/govmomi/vim25/xml" -) - -const ( - Namespace = "vim25" - Version = "7.0" - Path = "/sdk" -) - -var ( - ServiceInstance = types.ManagedObjectReference{ - Type: "ServiceInstance", - Value: "ServiceInstance", - } -) - -// Client is a tiny wrapper around the vim25/soap Client that stores session -// specific state (i.e. state that only needs to be retrieved once after the -// client has been created). This means the client can be reused after -// serialization without performing additional requests for initialization. -type Client struct { - *soap.Client - - ServiceContent types.ServiceContent - - // RoundTripper is a separate field such that the client's implementation of - // the RoundTripper interface can be wrapped by separate implementations for - // extra functionality (for example, reauthentication on session timeout). - RoundTripper soap.RoundTripper -} - -// NewClient creates and returns a new client with the ServiceContent field -// filled in. -func NewClient(ctx context.Context, rt soap.RoundTripper) (*Client, error) { - c := Client{ - RoundTripper: rt, - } - - // Set client if it happens to be a soap.Client - if sc, ok := rt.(*soap.Client); ok { - c.Client = sc - - if c.Namespace == "" { - c.Namespace = "urn:" + Namespace - } else if !strings.Contains(c.Namespace, ":") { - c.Namespace = "urn:" + c.Namespace // ensure valid URI format - } - if c.Version == "" { - c.Version = Version - } - } - - var err error - c.ServiceContent, err = methods.GetServiceContent(ctx, rt) - if err != nil { - return nil, err - } - - return &c, nil -} - -// UseServiceVersion sets soap.Client.Version to the current version of the service endpoint via /sdk/vimServiceVersions.xml -func (c *Client) UseServiceVersion(kind ...string) error { - ns := "vim" - if len(kind) != 0 { - ns = kind[0] - } - - u := c.URL() - u.Path = path.Join(Path, ns+"ServiceVersions.xml") - - res, err := c.Get(u.String()) - if err != nil { - return err - } - - if res.StatusCode != http.StatusOK { - return fmt.Errorf("http.Get(%s): %s", u.Path, err) - } - - v := struct { - Namespace *string `xml:"namespace>name"` - Version *string `xml:"namespace>version"` - }{ - &c.Namespace, - &c.Version, - } - - err = xml.NewDecoder(res.Body).Decode(&v) - _ = res.Body.Close() - if err != nil { - return fmt.Errorf("xml.Decode(%s): %s", u.Path, err) - } - - return nil -} - -// RoundTrip dispatches to the RoundTripper field. -func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - return c.RoundTripper.RoundTrip(ctx, req, res) -} - -type marshaledClient struct { - SoapClient *soap.Client - ServiceContent types.ServiceContent -} - -func (c *Client) MarshalJSON() ([]byte, error) { - m := marshaledClient{ - SoapClient: c.Client, - ServiceContent: c.ServiceContent, - } - - return json.Marshal(m) -} - -func (c *Client) UnmarshalJSON(b []byte) error { - var m marshaledClient - - err := json.Unmarshal(b, &m) - if err != nil { - return err - } - - *c = Client{ - Client: m.SoapClient, - ServiceContent: m.ServiceContent, - RoundTripper: m.SoapClient, - } - - return nil -} - -// Valid returns whether or not the client is valid and ready for use. -// This should be called after unmarshalling the client. -func (c *Client) Valid() bool { - if c == nil { - return false - } - - if c.Client == nil { - return false - } - - // Use arbitrary pointer field in the service content. - // Doesn't matter which one, as long as it is populated by default. - if c.ServiceContent.SessionManager == nil { - return false - } - - return true -} - -// Path returns vim25.Path (see cache.Client) -func (c *Client) Path() string { - return Path -} - -// IsVC returns true if we are connected to a vCenter -func (c *Client) IsVC() bool { - return c.ServiceContent.About.ApiType == "VirtualCenter" -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/debug.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/debug.go deleted file mode 100644 index 048062825d55..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/debug.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package debug - -import ( - "io" - "regexp" -) - -// Provider specified the interface types must implement to be used as a -// debugging sink. Having multiple such sink implementations allows it to be -// changed externally (for example when running tests). -type Provider interface { - NewFile(s string) io.WriteCloser - Flush() -} - -// ReadCloser is a struct that satisfies the io.ReadCloser interface -type ReadCloser struct { - io.Reader - io.Closer -} - -// NewTeeReader wraps io.TeeReader and patches through the Close() function. -func NewTeeReader(rc io.ReadCloser, w io.Writer) io.ReadCloser { - return ReadCloser{ - Reader: io.TeeReader(rc, w), - Closer: rc, - } -} - -var currentProvider Provider = nil -var scrubPassword = regexp.MustCompile(`(.*)`) - -func SetProvider(p Provider) { - if currentProvider != nil { - currentProvider.Flush() - } - currentProvider = p -} - -// Enabled returns whether debugging is enabled or not. -func Enabled() bool { - return currentProvider != nil -} - -// NewFile dispatches to the current provider's NewFile function. -func NewFile(s string) io.WriteCloser { - return currentProvider.NewFile(s) -} - -// Flush dispatches to the current provider's Flush function. -func Flush() { - currentProvider.Flush() -} - -func Scrub(in []byte) []byte { - return scrubPassword.ReplaceAll(in, []byte(`********`)) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/file.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/file.go deleted file mode 100644 index 4290a29167ff..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/file.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package debug - -import ( - "io" - "os" - "path" - "sync" -) - -// FileProvider implements a debugging provider that creates a real file for -// every call to NewFile. It maintains a list of all files that it creates, -// such that it can close them when its Flush function is called. -type FileProvider struct { - Path string - - mu sync.Mutex - files []*os.File -} - -func (fp *FileProvider) NewFile(p string) io.WriteCloser { - f, err := os.Create(path.Join(fp.Path, p)) - if err != nil { - panic(err) - } - - fp.mu.Lock() - defer fp.mu.Unlock() - fp.files = append(fp.files, f) - - return NewFileWriterCloser(f, p) -} - -func (fp *FileProvider) Flush() { - fp.mu.Lock() - defer fp.mu.Unlock() - for _, f := range fp.files { - f.Close() - } -} - -type FileWriterCloser struct { - f *os.File - p string -} - -func NewFileWriterCloser(f *os.File, p string) *FileWriterCloser { - return &FileWriterCloser{ - f, - p, - } -} - -func (fwc *FileWriterCloser) Write(p []byte) (n int, err error) { - return fwc.f.Write(Scrub(p)) -} - -func (fwc *FileWriterCloser) Close() error { - return fwc.f.Close() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/log.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/log.go deleted file mode 100644 index 183c606a3cb6..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/debug/log.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package debug - -import ( - "fmt" - "io" - "os" -) - -type LogWriterCloser struct { -} - -func NewLogWriterCloser() *LogWriterCloser { - return &LogWriterCloser{} -} - -func (lwc *LogWriterCloser) Write(p []byte) (n int, err error) { - fmt.Fprint(os.Stderr, string(Scrub(p))) - return len(p), nil -} - -func (lwc *LogWriterCloser) Close() error { - return nil -} - -type LogProvider struct { -} - -func (s *LogProvider) NewFile(p string) io.WriteCloser { - return NewLogWriterCloser() -} - -func (s *LogProvider) Flush() { -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/doc.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/doc.go deleted file mode 100644 index acb2c9f64dde..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -/* -Package vim25 provides a minimal client implementation to use with other -packages in the vim25 tree. The code in this package intentionally does not -take any dependendies outside the vim25 tree. - -The client implementation in this package embeds the soap.Client structure. -Additionally, it stores the value of the session's ServiceContent object. This -object stores references to a variety of subsystems, such as the root property -collector, the session manager, and the search index. The client is fully -functional after serialization and deserialization, without the need for -additional requests for initialization. -*/ -package vim25 diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/methods.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/methods.go deleted file mode 100644 index 4f1cf8ac0b52..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/methods.go +++ /dev/null @@ -1,18704 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package methods - -import ( - "context" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -type AbandonHciWorkflowBody struct { - Req *types.AbandonHciWorkflow `xml:"urn:vim25 AbandonHciWorkflow,omitempty"` - Res *types.AbandonHciWorkflowResponse `xml:"AbandonHciWorkflowResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AbandonHciWorkflowBody) Fault() *soap.Fault { return b.Fault_ } - -func AbandonHciWorkflow(ctx context.Context, r soap.RoundTripper, req *types.AbandonHciWorkflow) (*types.AbandonHciWorkflowResponse, error) { - var reqBody, resBody AbandonHciWorkflowBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AbdicateDomOwnershipBody struct { - Req *types.AbdicateDomOwnership `xml:"urn:vim25 AbdicateDomOwnership,omitempty"` - Res *types.AbdicateDomOwnershipResponse `xml:"AbdicateDomOwnershipResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AbdicateDomOwnershipBody) Fault() *soap.Fault { return b.Fault_ } - -func AbdicateDomOwnership(ctx context.Context, r soap.RoundTripper, req *types.AbdicateDomOwnership) (*types.AbdicateDomOwnershipResponse, error) { - var reqBody, resBody AbdicateDomOwnershipBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AbortCustomization_TaskBody struct { - Req *types.AbortCustomization_Task `xml:"urn:vim25 AbortCustomization_Task,omitempty"` - Res *types.AbortCustomization_TaskResponse `xml:"AbortCustomization_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AbortCustomization_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AbortCustomization_Task(ctx context.Context, r soap.RoundTripper, req *types.AbortCustomization_Task) (*types.AbortCustomization_TaskResponse, error) { - var reqBody, resBody AbortCustomization_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcknowledgeAlarmBody struct { - Req *types.AcknowledgeAlarm `xml:"urn:vim25 AcknowledgeAlarm,omitempty"` - Res *types.AcknowledgeAlarmResponse `xml:"AcknowledgeAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcknowledgeAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func AcknowledgeAlarm(ctx context.Context, r soap.RoundTripper, req *types.AcknowledgeAlarm) (*types.AcknowledgeAlarmResponse, error) { - var reqBody, resBody AcknowledgeAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireCimServicesTicketBody struct { - Req *types.AcquireCimServicesTicket `xml:"urn:vim25 AcquireCimServicesTicket,omitempty"` - Res *types.AcquireCimServicesTicketResponse `xml:"AcquireCimServicesTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireCimServicesTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireCimServicesTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCimServicesTicket) (*types.AcquireCimServicesTicketResponse, error) { - var reqBody, resBody AcquireCimServicesTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireCloneTicketBody struct { - Req *types.AcquireCloneTicket `xml:"urn:vim25 AcquireCloneTicket,omitempty"` - Res *types.AcquireCloneTicketResponse `xml:"AcquireCloneTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireCloneTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireCloneTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireCloneTicket) (*types.AcquireCloneTicketResponse, error) { - var reqBody, resBody AcquireCloneTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireCredentialsInGuestBody struct { - Req *types.AcquireCredentialsInGuest `xml:"urn:vim25 AcquireCredentialsInGuest,omitempty"` - Res *types.AcquireCredentialsInGuestResponse `xml:"AcquireCredentialsInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.AcquireCredentialsInGuest) (*types.AcquireCredentialsInGuestResponse, error) { - var reqBody, resBody AcquireCredentialsInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireGenericServiceTicketBody struct { - Req *types.AcquireGenericServiceTicket `xml:"urn:vim25 AcquireGenericServiceTicket,omitempty"` - Res *types.AcquireGenericServiceTicketResponse `xml:"AcquireGenericServiceTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireGenericServiceTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireGenericServiceTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireGenericServiceTicket) (*types.AcquireGenericServiceTicketResponse, error) { - var reqBody, resBody AcquireGenericServiceTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireLocalTicketBody struct { - Req *types.AcquireLocalTicket `xml:"urn:vim25 AcquireLocalTicket,omitempty"` - Res *types.AcquireLocalTicketResponse `xml:"AcquireLocalTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireLocalTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireLocalTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireLocalTicket) (*types.AcquireLocalTicketResponse, error) { - var reqBody, resBody AcquireLocalTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireMksTicketBody struct { - Req *types.AcquireMksTicket `xml:"urn:vim25 AcquireMksTicket,omitempty"` - Res *types.AcquireMksTicketResponse `xml:"AcquireMksTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireMksTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireMksTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireMksTicket) (*types.AcquireMksTicketResponse, error) { - var reqBody, resBody AcquireMksTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AcquireTicketBody struct { - Req *types.AcquireTicket `xml:"urn:vim25 AcquireTicket,omitempty"` - Res *types.AcquireTicketResponse `xml:"AcquireTicketResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AcquireTicketBody) Fault() *soap.Fault { return b.Fault_ } - -func AcquireTicket(ctx context.Context, r soap.RoundTripper, req *types.AcquireTicket) (*types.AcquireTicketResponse, error) { - var reqBody, resBody AcquireTicketBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddAuthorizationRoleBody struct { - Req *types.AddAuthorizationRole `xml:"urn:vim25 AddAuthorizationRole,omitempty"` - Res *types.AddAuthorizationRoleResponse `xml:"AddAuthorizationRoleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } - -func AddAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.AddAuthorizationRole) (*types.AddAuthorizationRoleResponse, error) { - var reqBody, resBody AddAuthorizationRoleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddCustomFieldDefBody struct { - Req *types.AddCustomFieldDef `xml:"urn:vim25 AddCustomFieldDef,omitempty"` - Res *types.AddCustomFieldDefResponse `xml:"AddCustomFieldDefResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } - -func AddCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.AddCustomFieldDef) (*types.AddCustomFieldDefResponse, error) { - var reqBody, resBody AddCustomFieldDefBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddDVPortgroup_TaskBody struct { - Req *types.AddDVPortgroup_Task `xml:"urn:vim25 AddDVPortgroup_Task,omitempty"` - Res *types.AddDVPortgroup_TaskResponse `xml:"AddDVPortgroup_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AddDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDVPortgroup_Task) (*types.AddDVPortgroup_TaskResponse, error) { - var reqBody, resBody AddDVPortgroup_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddDisks_TaskBody struct { - Req *types.AddDisks_Task `xml:"urn:vim25 AddDisks_Task,omitempty"` - Res *types.AddDisks_TaskResponse `xml:"AddDisks_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AddDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.AddDisks_Task) (*types.AddDisks_TaskResponse, error) { - var reqBody, resBody AddDisks_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddFilterBody struct { - Req *types.AddFilter `xml:"urn:vim25 AddFilter,omitempty"` - Res *types.AddFilterResponse `xml:"AddFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func AddFilter(ctx context.Context, r soap.RoundTripper, req *types.AddFilter) (*types.AddFilterResponse, error) { - var reqBody, resBody AddFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddFilterEntitiesBody struct { - Req *types.AddFilterEntities `xml:"urn:vim25 AddFilterEntities,omitempty"` - Res *types.AddFilterEntitiesResponse `xml:"AddFilterEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func AddFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.AddFilterEntities) (*types.AddFilterEntitiesResponse, error) { - var reqBody, resBody AddFilterEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddGuestAliasBody struct { - Req *types.AddGuestAlias `xml:"urn:vim25 AddGuestAlias,omitempty"` - Res *types.AddGuestAliasResponse `xml:"AddGuestAliasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddGuestAliasBody) Fault() *soap.Fault { return b.Fault_ } - -func AddGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.AddGuestAlias) (*types.AddGuestAliasResponse, error) { - var reqBody, resBody AddGuestAliasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddHost_TaskBody struct { - Req *types.AddHost_Task `xml:"urn:vim25 AddHost_Task,omitempty"` - Res *types.AddHost_TaskResponse `xml:"AddHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AddHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddHost_Task) (*types.AddHost_TaskResponse, error) { - var reqBody, resBody AddHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddInternetScsiSendTargetsBody struct { - Req *types.AddInternetScsiSendTargets `xml:"urn:vim25 AddInternetScsiSendTargets,omitempty"` - Res *types.AddInternetScsiSendTargetsResponse `xml:"AddInternetScsiSendTargetsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ } - -func AddInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiSendTargets) (*types.AddInternetScsiSendTargetsResponse, error) { - var reqBody, resBody AddInternetScsiSendTargetsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddInternetScsiStaticTargetsBody struct { - Req *types.AddInternetScsiStaticTargets `xml:"urn:vim25 AddInternetScsiStaticTargets,omitempty"` - Res *types.AddInternetScsiStaticTargetsResponse `xml:"AddInternetScsiStaticTargetsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ } - -func AddInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.AddInternetScsiStaticTargets) (*types.AddInternetScsiStaticTargetsResponse, error) { - var reqBody, resBody AddInternetScsiStaticTargetsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddKeyBody struct { - Req *types.AddKey `xml:"urn:vim25 AddKey,omitempty"` - Res *types.AddKeyResponse `xml:"AddKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func AddKey(ctx context.Context, r soap.RoundTripper, req *types.AddKey) (*types.AddKeyResponse, error) { - var reqBody, resBody AddKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddKeysBody struct { - Req *types.AddKeys `xml:"urn:vim25 AddKeys,omitempty"` - Res *types.AddKeysResponse `xml:"AddKeysResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddKeysBody) Fault() *soap.Fault { return b.Fault_ } - -func AddKeys(ctx context.Context, r soap.RoundTripper, req *types.AddKeys) (*types.AddKeysResponse, error) { - var reqBody, resBody AddKeysBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddLicenseBody struct { - Req *types.AddLicense `xml:"urn:vim25 AddLicense,omitempty"` - Res *types.AddLicenseResponse `xml:"AddLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func AddLicense(ctx context.Context, r soap.RoundTripper, req *types.AddLicense) (*types.AddLicenseResponse, error) { - var reqBody, resBody AddLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddMonitoredEntitiesBody struct { - Req *types.AddMonitoredEntities `xml:"urn:vim25 AddMonitoredEntities,omitempty"` - Res *types.AddMonitoredEntitiesResponse `xml:"AddMonitoredEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func AddMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.AddMonitoredEntities) (*types.AddMonitoredEntitiesResponse, error) { - var reqBody, resBody AddMonitoredEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddNetworkResourcePoolBody struct { - Req *types.AddNetworkResourcePool `xml:"urn:vim25 AddNetworkResourcePool,omitempty"` - Res *types.AddNetworkResourcePoolResponse `xml:"AddNetworkResourcePoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } - -func AddNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.AddNetworkResourcePool) (*types.AddNetworkResourcePoolResponse, error) { - var reqBody, resBody AddNetworkResourcePoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddPortGroupBody struct { - Req *types.AddPortGroup `xml:"urn:vim25 AddPortGroup,omitempty"` - Res *types.AddPortGroupResponse `xml:"AddPortGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddPortGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func AddPortGroup(ctx context.Context, r soap.RoundTripper, req *types.AddPortGroup) (*types.AddPortGroupResponse, error) { - var reqBody, resBody AddPortGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddServiceConsoleVirtualNicBody struct { - Req *types.AddServiceConsoleVirtualNic `xml:"urn:vim25 AddServiceConsoleVirtualNic,omitempty"` - Res *types.AddServiceConsoleVirtualNicResponse `xml:"AddServiceConsoleVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func AddServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddServiceConsoleVirtualNic) (*types.AddServiceConsoleVirtualNicResponse, error) { - var reqBody, resBody AddServiceConsoleVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddStandaloneHost_TaskBody struct { - Req *types.AddStandaloneHost_Task `xml:"urn:vim25 AddStandaloneHost_Task,omitempty"` - Res *types.AddStandaloneHost_TaskResponse `xml:"AddStandaloneHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddStandaloneHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AddStandaloneHost_Task(ctx context.Context, r soap.RoundTripper, req *types.AddStandaloneHost_Task) (*types.AddStandaloneHost_TaskResponse, error) { - var reqBody, resBody AddStandaloneHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddVirtualNicBody struct { - Req *types.AddVirtualNic `xml:"urn:vim25 AddVirtualNic,omitempty"` - Res *types.AddVirtualNicResponse `xml:"AddVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func AddVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualNic) (*types.AddVirtualNicResponse, error) { - var reqBody, resBody AddVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AddVirtualSwitchBody struct { - Req *types.AddVirtualSwitch `xml:"urn:vim25 AddVirtualSwitch,omitempty"` - Res *types.AddVirtualSwitchResponse `xml:"AddVirtualSwitchResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AddVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } - -func AddVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.AddVirtualSwitch) (*types.AddVirtualSwitchResponse, error) { - var reqBody, resBody AddVirtualSwitchBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AllocateIpv4AddressBody struct { - Req *types.AllocateIpv4Address `xml:"urn:vim25 AllocateIpv4Address,omitempty"` - Res *types.AllocateIpv4AddressResponse `xml:"AllocateIpv4AddressResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AllocateIpv4AddressBody) Fault() *soap.Fault { return b.Fault_ } - -func AllocateIpv4Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv4Address) (*types.AllocateIpv4AddressResponse, error) { - var reqBody, resBody AllocateIpv4AddressBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AllocateIpv6AddressBody struct { - Req *types.AllocateIpv6Address `xml:"urn:vim25 AllocateIpv6Address,omitempty"` - Res *types.AllocateIpv6AddressResponse `xml:"AllocateIpv6AddressResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AllocateIpv6AddressBody) Fault() *soap.Fault { return b.Fault_ } - -func AllocateIpv6Address(ctx context.Context, r soap.RoundTripper, req *types.AllocateIpv6Address) (*types.AllocateIpv6AddressResponse, error) { - var reqBody, resBody AllocateIpv6AddressBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AnswerVMBody struct { - Req *types.AnswerVM `xml:"urn:vim25 AnswerVM,omitempty"` - Res *types.AnswerVMResponse `xml:"AnswerVMResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AnswerVMBody) Fault() *soap.Fault { return b.Fault_ } - -func AnswerVM(ctx context.Context, r soap.RoundTripper, req *types.AnswerVM) (*types.AnswerVMResponse, error) { - var reqBody, resBody AnswerVMBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyEntitiesConfig_TaskBody struct { - Req *types.ApplyEntitiesConfig_Task `xml:"urn:vim25 ApplyEntitiesConfig_Task,omitempty"` - Res *types.ApplyEntitiesConfig_TaskResponse `xml:"ApplyEntitiesConfig_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyEntitiesConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyEntitiesConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyEntitiesConfig_Task) (*types.ApplyEntitiesConfig_TaskResponse, error) { - var reqBody, resBody ApplyEntitiesConfig_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyEvcModeVM_TaskBody struct { - Req *types.ApplyEvcModeVM_Task `xml:"urn:vim25 ApplyEvcModeVM_Task,omitempty"` - Res *types.ApplyEvcModeVM_TaskResponse `xml:"ApplyEvcModeVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyEvcModeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyEvcModeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyEvcModeVM_Task) (*types.ApplyEvcModeVM_TaskResponse, error) { - var reqBody, resBody ApplyEvcModeVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyHostConfig_TaskBody struct { - Req *types.ApplyHostConfig_Task `xml:"urn:vim25 ApplyHostConfig_Task,omitempty"` - Res *types.ApplyHostConfig_TaskResponse `xml:"ApplyHostConfig_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyHostConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyHostConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyHostConfig_Task) (*types.ApplyHostConfig_TaskResponse, error) { - var reqBody, resBody ApplyHostConfig_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyRecommendationBody struct { - Req *types.ApplyRecommendation `xml:"urn:vim25 ApplyRecommendation,omitempty"` - Res *types.ApplyRecommendationResponse `xml:"ApplyRecommendationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyRecommendationBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyRecommendation(ctx context.Context, r soap.RoundTripper, req *types.ApplyRecommendation) (*types.ApplyRecommendationResponse, error) { - var reqBody, resBody ApplyRecommendationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyStorageDrsRecommendationToPod_TaskBody struct { - Req *types.ApplyStorageDrsRecommendationToPod_Task `xml:"urn:vim25 ApplyStorageDrsRecommendationToPod_Task,omitempty"` - Res *types.ApplyStorageDrsRecommendationToPod_TaskResponse `xml:"ApplyStorageDrsRecommendationToPod_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyStorageDrsRecommendationToPod_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyStorageDrsRecommendationToPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendationToPod_Task) (*types.ApplyStorageDrsRecommendationToPod_TaskResponse, error) { - var reqBody, resBody ApplyStorageDrsRecommendationToPod_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ApplyStorageDrsRecommendation_TaskBody struct { - Req *types.ApplyStorageDrsRecommendation_Task `xml:"urn:vim25 ApplyStorageDrsRecommendation_Task,omitempty"` - Res *types.ApplyStorageDrsRecommendation_TaskResponse `xml:"ApplyStorageDrsRecommendation_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ApplyStorageDrsRecommendation_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ApplyStorageDrsRecommendation_Task(ctx context.Context, r soap.RoundTripper, req *types.ApplyStorageDrsRecommendation_Task) (*types.ApplyStorageDrsRecommendation_TaskResponse, error) { - var reqBody, resBody ApplyStorageDrsRecommendation_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AreAlarmActionsEnabledBody struct { - Req *types.AreAlarmActionsEnabled `xml:"urn:vim25 AreAlarmActionsEnabled,omitempty"` - Res *types.AreAlarmActionsEnabledResponse `xml:"AreAlarmActionsEnabledResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AreAlarmActionsEnabledBody) Fault() *soap.Fault { return b.Fault_ } - -func AreAlarmActionsEnabled(ctx context.Context, r soap.RoundTripper, req *types.AreAlarmActionsEnabled) (*types.AreAlarmActionsEnabledResponse, error) { - var reqBody, resBody AreAlarmActionsEnabledBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AssignUserToGroupBody struct { - Req *types.AssignUserToGroup `xml:"urn:vim25 AssignUserToGroup,omitempty"` - Res *types.AssignUserToGroupResponse `xml:"AssignUserToGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AssignUserToGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func AssignUserToGroup(ctx context.Context, r soap.RoundTripper, req *types.AssignUserToGroup) (*types.AssignUserToGroupResponse, error) { - var reqBody, resBody AssignUserToGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AssociateProfileBody struct { - Req *types.AssociateProfile `xml:"urn:vim25 AssociateProfile,omitempty"` - Res *types.AssociateProfileResponse `xml:"AssociateProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AssociateProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func AssociateProfile(ctx context.Context, r soap.RoundTripper, req *types.AssociateProfile) (*types.AssociateProfileResponse, error) { - var reqBody, resBody AssociateProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AttachDisk_TaskBody struct { - Req *types.AttachDisk_Task `xml:"urn:vim25 AttachDisk_Task,omitempty"` - Res *types.AttachDisk_TaskResponse `xml:"AttachDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AttachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AttachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachDisk_Task) (*types.AttachDisk_TaskResponse, error) { - var reqBody, resBody AttachDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AttachScsiLunBody struct { - Req *types.AttachScsiLun `xml:"urn:vim25 AttachScsiLun,omitempty"` - Res *types.AttachScsiLunResponse `xml:"AttachScsiLunResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AttachScsiLunBody) Fault() *soap.Fault { return b.Fault_ } - -func AttachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLun) (*types.AttachScsiLunResponse, error) { - var reqBody, resBody AttachScsiLunBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AttachScsiLunEx_TaskBody struct { - Req *types.AttachScsiLunEx_Task `xml:"urn:vim25 AttachScsiLunEx_Task,omitempty"` - Res *types.AttachScsiLunEx_TaskResponse `xml:"AttachScsiLunEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AttachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func AttachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.AttachScsiLunEx_Task) (*types.AttachScsiLunEx_TaskResponse, error) { - var reqBody, resBody AttachScsiLunEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AttachTagToVStorageObjectBody struct { - Req *types.AttachTagToVStorageObject `xml:"urn:vim25 AttachTagToVStorageObject,omitempty"` - Res *types.AttachTagToVStorageObjectResponse `xml:"AttachTagToVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AttachTagToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func AttachTagToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.AttachTagToVStorageObject) (*types.AttachTagToVStorageObjectResponse, error) { - var reqBody, resBody AttachTagToVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AttachVmfsExtentBody struct { - Req *types.AttachVmfsExtent `xml:"urn:vim25 AttachVmfsExtent,omitempty"` - Res *types.AttachVmfsExtentResponse `xml:"AttachVmfsExtentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AttachVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ } - -func AttachVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.AttachVmfsExtent) (*types.AttachVmfsExtentResponse, error) { - var reqBody, resBody AttachVmfsExtentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AutoStartPowerOffBody struct { - Req *types.AutoStartPowerOff `xml:"urn:vim25 AutoStartPowerOff,omitempty"` - Res *types.AutoStartPowerOffResponse `xml:"AutoStartPowerOffResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AutoStartPowerOffBody) Fault() *soap.Fault { return b.Fault_ } - -func AutoStartPowerOff(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOff) (*types.AutoStartPowerOffResponse, error) { - var reqBody, resBody AutoStartPowerOffBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type AutoStartPowerOnBody struct { - Req *types.AutoStartPowerOn `xml:"urn:vim25 AutoStartPowerOn,omitempty"` - Res *types.AutoStartPowerOnResponse `xml:"AutoStartPowerOnResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *AutoStartPowerOnBody) Fault() *soap.Fault { return b.Fault_ } - -func AutoStartPowerOn(ctx context.Context, r soap.RoundTripper, req *types.AutoStartPowerOn) (*types.AutoStartPowerOnResponse, error) { - var reqBody, resBody AutoStartPowerOnBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BackupFirmwareConfigurationBody struct { - Req *types.BackupFirmwareConfiguration `xml:"urn:vim25 BackupFirmwareConfiguration,omitempty"` - Res *types.BackupFirmwareConfigurationResponse `xml:"BackupFirmwareConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BackupFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func BackupFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.BackupFirmwareConfiguration) (*types.BackupFirmwareConfigurationResponse, error) { - var reqBody, resBody BackupFirmwareConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BatchAddHostsToCluster_TaskBody struct { - Req *types.BatchAddHostsToCluster_Task `xml:"urn:vim25 BatchAddHostsToCluster_Task,omitempty"` - Res *types.BatchAddHostsToCluster_TaskResponse `xml:"BatchAddHostsToCluster_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BatchAddHostsToCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func BatchAddHostsToCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.BatchAddHostsToCluster_Task) (*types.BatchAddHostsToCluster_TaskResponse, error) { - var reqBody, resBody BatchAddHostsToCluster_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BatchAddStandaloneHosts_TaskBody struct { - Req *types.BatchAddStandaloneHosts_Task `xml:"urn:vim25 BatchAddStandaloneHosts_Task,omitempty"` - Res *types.BatchAddStandaloneHosts_TaskResponse `xml:"BatchAddStandaloneHosts_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BatchAddStandaloneHosts_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func BatchAddStandaloneHosts_Task(ctx context.Context, r soap.RoundTripper, req *types.BatchAddStandaloneHosts_Task) (*types.BatchAddStandaloneHosts_TaskResponse, error) { - var reqBody, resBody BatchAddStandaloneHosts_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BatchQueryConnectInfoBody struct { - Req *types.BatchQueryConnectInfo `xml:"urn:vim25 BatchQueryConnectInfo,omitempty"` - Res *types.BatchQueryConnectInfoResponse `xml:"BatchQueryConnectInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BatchQueryConnectInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func BatchQueryConnectInfo(ctx context.Context, r soap.RoundTripper, req *types.BatchQueryConnectInfo) (*types.BatchQueryConnectInfoResponse, error) { - var reqBody, resBody BatchQueryConnectInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BindVnicBody struct { - Req *types.BindVnic `xml:"urn:vim25 BindVnic,omitempty"` - Res *types.BindVnicResponse `xml:"BindVnicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BindVnicBody) Fault() *soap.Fault { return b.Fault_ } - -func BindVnic(ctx context.Context, r soap.RoundTripper, req *types.BindVnic) (*types.BindVnicResponse, error) { - var reqBody, resBody BindVnicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type BrowseDiagnosticLogBody struct { - Req *types.BrowseDiagnosticLog `xml:"urn:vim25 BrowseDiagnosticLog,omitempty"` - Res *types.BrowseDiagnosticLogResponse `xml:"BrowseDiagnosticLogResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *BrowseDiagnosticLogBody) Fault() *soap.Fault { return b.Fault_ } - -func BrowseDiagnosticLog(ctx context.Context, r soap.RoundTripper, req *types.BrowseDiagnosticLog) (*types.BrowseDiagnosticLogResponse, error) { - var reqBody, resBody BrowseDiagnosticLogBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CanProvisionObjectsBody struct { - Req *types.CanProvisionObjects `xml:"urn:vim25 CanProvisionObjects,omitempty"` - Res *types.CanProvisionObjectsResponse `xml:"CanProvisionObjectsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CanProvisionObjectsBody) Fault() *soap.Fault { return b.Fault_ } - -func CanProvisionObjects(ctx context.Context, r soap.RoundTripper, req *types.CanProvisionObjects) (*types.CanProvisionObjectsResponse, error) { - var reqBody, resBody CanProvisionObjectsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CancelRecommendationBody struct { - Req *types.CancelRecommendation `xml:"urn:vim25 CancelRecommendation,omitempty"` - Res *types.CancelRecommendationResponse `xml:"CancelRecommendationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CancelRecommendationBody) Fault() *soap.Fault { return b.Fault_ } - -func CancelRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelRecommendation) (*types.CancelRecommendationResponse, error) { - var reqBody, resBody CancelRecommendationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CancelRetrievePropertiesExBody struct { - Req *types.CancelRetrievePropertiesEx `xml:"urn:vim25 CancelRetrievePropertiesEx,omitempty"` - Res *types.CancelRetrievePropertiesExResponse `xml:"CancelRetrievePropertiesExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CancelRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } - -func CancelRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.CancelRetrievePropertiesEx) (*types.CancelRetrievePropertiesExResponse, error) { - var reqBody, resBody CancelRetrievePropertiesExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CancelStorageDrsRecommendationBody struct { - Req *types.CancelStorageDrsRecommendation `xml:"urn:vim25 CancelStorageDrsRecommendation,omitempty"` - Res *types.CancelStorageDrsRecommendationResponse `xml:"CancelStorageDrsRecommendationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CancelStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ } - -func CancelStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.CancelStorageDrsRecommendation) (*types.CancelStorageDrsRecommendationResponse, error) { - var reqBody, resBody CancelStorageDrsRecommendationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CancelTaskBody struct { - Req *types.CancelTask `xml:"urn:vim25 CancelTask,omitempty"` - Res *types.CancelTaskResponse `xml:"CancelTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CancelTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CancelTask(ctx context.Context, r soap.RoundTripper, req *types.CancelTask) (*types.CancelTaskResponse, error) { - var reqBody, resBody CancelTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CancelWaitForUpdatesBody struct { - Req *types.CancelWaitForUpdates `xml:"urn:vim25 CancelWaitForUpdates,omitempty"` - Res *types.CancelWaitForUpdatesResponse `xml:"CancelWaitForUpdatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CancelWaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } - -func CancelWaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CancelWaitForUpdates) (*types.CancelWaitForUpdatesResponse, error) { - var reqBody, resBody CancelWaitForUpdatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CertMgrRefreshCACertificatesAndCRLs_TaskBody struct { - Req *types.CertMgrRefreshCACertificatesAndCRLs_Task `xml:"urn:vim25 CertMgrRefreshCACertificatesAndCRLs_Task,omitempty"` - Res *types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse `xml:"CertMgrRefreshCACertificatesAndCRLs_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CertMgrRefreshCACertificatesAndCRLs_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CertMgrRefreshCACertificatesAndCRLs_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCACertificatesAndCRLs_Task) (*types.CertMgrRefreshCACertificatesAndCRLs_TaskResponse, error) { - var reqBody, resBody CertMgrRefreshCACertificatesAndCRLs_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CertMgrRefreshCertificates_TaskBody struct { - Req *types.CertMgrRefreshCertificates_Task `xml:"urn:vim25 CertMgrRefreshCertificates_Task,omitempty"` - Res *types.CertMgrRefreshCertificates_TaskResponse `xml:"CertMgrRefreshCertificates_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CertMgrRefreshCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CertMgrRefreshCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRefreshCertificates_Task) (*types.CertMgrRefreshCertificates_TaskResponse, error) { - var reqBody, resBody CertMgrRefreshCertificates_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CertMgrRevokeCertificates_TaskBody struct { - Req *types.CertMgrRevokeCertificates_Task `xml:"urn:vim25 CertMgrRevokeCertificates_Task,omitempty"` - Res *types.CertMgrRevokeCertificates_TaskResponse `xml:"CertMgrRevokeCertificates_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CertMgrRevokeCertificates_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CertMgrRevokeCertificates_Task(ctx context.Context, r soap.RoundTripper, req *types.CertMgrRevokeCertificates_Task) (*types.CertMgrRevokeCertificates_TaskResponse, error) { - var reqBody, resBody CertMgrRevokeCertificates_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeAccessModeBody struct { - Req *types.ChangeAccessMode `xml:"urn:vim25 ChangeAccessMode,omitempty"` - Res *types.ChangeAccessModeResponse `xml:"ChangeAccessModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeAccessModeBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeAccessMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeAccessMode) (*types.ChangeAccessModeResponse, error) { - var reqBody, resBody ChangeAccessModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeFileAttributesInGuestBody struct { - Req *types.ChangeFileAttributesInGuest `xml:"urn:vim25 ChangeFileAttributesInGuest,omitempty"` - Res *types.ChangeFileAttributesInGuestResponse `xml:"ChangeFileAttributesInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeFileAttributesInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeFileAttributesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ChangeFileAttributesInGuest) (*types.ChangeFileAttributesInGuestResponse, error) { - var reqBody, resBody ChangeFileAttributesInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeKey_TaskBody struct { - Req *types.ChangeKey_Task `xml:"urn:vim25 ChangeKey_Task,omitempty"` - Res *types.ChangeKey_TaskResponse `xml:"ChangeKey_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeKey_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeKey_Task(ctx context.Context, r soap.RoundTripper, req *types.ChangeKey_Task) (*types.ChangeKey_TaskResponse, error) { - var reqBody, resBody ChangeKey_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeLockdownModeBody struct { - Req *types.ChangeLockdownMode `xml:"urn:vim25 ChangeLockdownMode,omitempty"` - Res *types.ChangeLockdownModeResponse `xml:"ChangeLockdownModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ChangeLockdownMode) (*types.ChangeLockdownModeResponse, error) { - var reqBody, resBody ChangeLockdownModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeNFSUserPasswordBody struct { - Req *types.ChangeNFSUserPassword `xml:"urn:vim25 ChangeNFSUserPassword,omitempty"` - Res *types.ChangeNFSUserPasswordResponse `xml:"ChangeNFSUserPasswordResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeNFSUserPasswordBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeNFSUserPassword(ctx context.Context, r soap.RoundTripper, req *types.ChangeNFSUserPassword) (*types.ChangeNFSUserPasswordResponse, error) { - var reqBody, resBody ChangeNFSUserPasswordBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangeOwnerBody struct { - Req *types.ChangeOwner `xml:"urn:vim25 ChangeOwner,omitempty"` - Res *types.ChangeOwnerResponse `xml:"ChangeOwnerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangeOwnerBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangeOwner(ctx context.Context, r soap.RoundTripper, req *types.ChangeOwner) (*types.ChangeOwnerResponse, error) { - var reqBody, resBody ChangeOwnerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ChangePasswordBody struct { - Req *types.ChangePassword `xml:"urn:vim25 ChangePassword,omitempty"` - Res *types.ChangePasswordResponse `xml:"ChangePasswordResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ChangePasswordBody) Fault() *soap.Fault { return b.Fault_ } - -func ChangePassword(ctx context.Context, r soap.RoundTripper, req *types.ChangePassword) (*types.ChangePasswordResponse, error) { - var reqBody, resBody ChangePasswordBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckAddHostEvc_TaskBody struct { - Req *types.CheckAddHostEvc_Task `xml:"urn:vim25 CheckAddHostEvc_Task,omitempty"` - Res *types.CheckAddHostEvc_TaskResponse `xml:"CheckAddHostEvc_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckAddHostEvc_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckAddHostEvc_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAddHostEvc_Task) (*types.CheckAddHostEvc_TaskResponse, error) { - var reqBody, resBody CheckAddHostEvc_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckAnswerFileStatus_TaskBody struct { - Req *types.CheckAnswerFileStatus_Task `xml:"urn:vim25 CheckAnswerFileStatus_Task,omitempty"` - Res *types.CheckAnswerFileStatus_TaskResponse `xml:"CheckAnswerFileStatus_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckAnswerFileStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckAnswerFileStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckAnswerFileStatus_Task) (*types.CheckAnswerFileStatus_TaskResponse, error) { - var reqBody, resBody CheckAnswerFileStatus_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckClone_TaskBody struct { - Req *types.CheckClone_Task `xml:"urn:vim25 CheckClone_Task,omitempty"` - Res *types.CheckClone_TaskResponse `xml:"CheckClone_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckClone_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckClone_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckClone_Task) (*types.CheckClone_TaskResponse, error) { - var reqBody, resBody CheckClone_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckCompatibility_TaskBody struct { - Req *types.CheckCompatibility_Task `xml:"urn:vim25 CheckCompatibility_Task,omitempty"` - Res *types.CheckCompatibility_TaskResponse `xml:"CheckCompatibility_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckCompatibility_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckCompatibility_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompatibility_Task) (*types.CheckCompatibility_TaskResponse, error) { - var reqBody, resBody CheckCompatibility_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckCompliance_TaskBody struct { - Req *types.CheckCompliance_Task `xml:"urn:vim25 CheckCompliance_Task,omitempty"` - Res *types.CheckCompliance_TaskResponse `xml:"CheckCompliance_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckCompliance_Task) (*types.CheckCompliance_TaskResponse, error) { - var reqBody, resBody CheckCompliance_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckConfigureEvcMode_TaskBody struct { - Req *types.CheckConfigureEvcMode_Task `xml:"urn:vim25 CheckConfigureEvcMode_Task,omitempty"` - Res *types.CheckConfigureEvcMode_TaskResponse `xml:"CheckConfigureEvcMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckConfigureEvcMode_Task) (*types.CheckConfigureEvcMode_TaskResponse, error) { - var reqBody, resBody CheckConfigureEvcMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckCustomizationResourcesBody struct { - Req *types.CheckCustomizationResources `xml:"urn:vim25 CheckCustomizationResources,omitempty"` - Res *types.CheckCustomizationResourcesResponse `xml:"CheckCustomizationResourcesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckCustomizationResourcesBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckCustomizationResources(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationResources) (*types.CheckCustomizationResourcesResponse, error) { - var reqBody, resBody CheckCustomizationResourcesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckCustomizationSpecBody struct { - Req *types.CheckCustomizationSpec `xml:"urn:vim25 CheckCustomizationSpec,omitempty"` - Res *types.CheckCustomizationSpecResponse `xml:"CheckCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CheckCustomizationSpec) (*types.CheckCustomizationSpecResponse, error) { - var reqBody, resBody CheckCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckForUpdatesBody struct { - Req *types.CheckForUpdates `xml:"urn:vim25 CheckForUpdates,omitempty"` - Res *types.CheckForUpdatesResponse `xml:"CheckForUpdatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckForUpdates(ctx context.Context, r soap.RoundTripper, req *types.CheckForUpdates) (*types.CheckForUpdatesResponse, error) { - var reqBody, resBody CheckForUpdatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckHostPatch_TaskBody struct { - Req *types.CheckHostPatch_Task `xml:"urn:vim25 CheckHostPatch_Task,omitempty"` - Res *types.CheckHostPatch_TaskResponse `xml:"CheckHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckHostPatch_Task) (*types.CheckHostPatch_TaskResponse, error) { - var reqBody, resBody CheckHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckInstantClone_TaskBody struct { - Req *types.CheckInstantClone_Task `xml:"urn:vim25 CheckInstantClone_Task,omitempty"` - Res *types.CheckInstantClone_TaskResponse `xml:"CheckInstantClone_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckInstantClone_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckInstantClone_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckInstantClone_Task) (*types.CheckInstantClone_TaskResponse, error) { - var reqBody, resBody CheckInstantClone_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckLicenseFeatureBody struct { - Req *types.CheckLicenseFeature `xml:"urn:vim25 CheckLicenseFeature,omitempty"` - Res *types.CheckLicenseFeatureResponse `xml:"CheckLicenseFeatureResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckLicenseFeatureBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckLicenseFeature(ctx context.Context, r soap.RoundTripper, req *types.CheckLicenseFeature) (*types.CheckLicenseFeatureResponse, error) { - var reqBody, resBody CheckLicenseFeatureBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckMigrate_TaskBody struct { - Req *types.CheckMigrate_Task `xml:"urn:vim25 CheckMigrate_Task,omitempty"` - Res *types.CheckMigrate_TaskResponse `xml:"CheckMigrate_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckMigrate_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckMigrate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckMigrate_Task) (*types.CheckMigrate_TaskResponse, error) { - var reqBody, resBody CheckMigrate_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckPowerOn_TaskBody struct { - Req *types.CheckPowerOn_Task `xml:"urn:vim25 CheckPowerOn_Task,omitempty"` - Res *types.CheckPowerOn_TaskResponse `xml:"CheckPowerOn_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckPowerOn_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckPowerOn_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckPowerOn_Task) (*types.CheckPowerOn_TaskResponse, error) { - var reqBody, resBody CheckPowerOn_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckProfileCompliance_TaskBody struct { - Req *types.CheckProfileCompliance_Task `xml:"urn:vim25 CheckProfileCompliance_Task,omitempty"` - Res *types.CheckProfileCompliance_TaskResponse `xml:"CheckProfileCompliance_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckProfileCompliance_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckProfileCompliance_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckProfileCompliance_Task) (*types.CheckProfileCompliance_TaskResponse, error) { - var reqBody, resBody CheckProfileCompliance_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckRelocate_TaskBody struct { - Req *types.CheckRelocate_Task `xml:"urn:vim25 CheckRelocate_Task,omitempty"` - Res *types.CheckRelocate_TaskResponse `xml:"CheckRelocate_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckRelocate_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckRelocate_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckRelocate_Task) (*types.CheckRelocate_TaskResponse, error) { - var reqBody, resBody CheckRelocate_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CheckVmConfig_TaskBody struct { - Req *types.CheckVmConfig_Task `xml:"urn:vim25 CheckVmConfig_Task,omitempty"` - Res *types.CheckVmConfig_TaskResponse `xml:"CheckVmConfig_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CheckVmConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CheckVmConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.CheckVmConfig_Task) (*types.CheckVmConfig_TaskResponse, error) { - var reqBody, resBody CheckVmConfig_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClearComplianceStatusBody struct { - Req *types.ClearComplianceStatus `xml:"urn:vim25 ClearComplianceStatus,omitempty"` - Res *types.ClearComplianceStatusResponse `xml:"ClearComplianceStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClearComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func ClearComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.ClearComplianceStatus) (*types.ClearComplianceStatusResponse, error) { - var reqBody, resBody ClearComplianceStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClearNFSUserBody struct { - Req *types.ClearNFSUser `xml:"urn:vim25 ClearNFSUser,omitempty"` - Res *types.ClearNFSUserResponse `xml:"ClearNFSUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClearNFSUserBody) Fault() *soap.Fault { return b.Fault_ } - -func ClearNFSUser(ctx context.Context, r soap.RoundTripper, req *types.ClearNFSUser) (*types.ClearNFSUserResponse, error) { - var reqBody, resBody ClearNFSUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClearSystemEventLogBody struct { - Req *types.ClearSystemEventLog `xml:"urn:vim25 ClearSystemEventLog,omitempty"` - Res *types.ClearSystemEventLogResponse `xml:"ClearSystemEventLogResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClearSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ } - -func ClearSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.ClearSystemEventLog) (*types.ClearSystemEventLogResponse, error) { - var reqBody, resBody ClearSystemEventLogBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClearTriggeredAlarmsBody struct { - Req *types.ClearTriggeredAlarms `xml:"urn:vim25 ClearTriggeredAlarms,omitempty"` - Res *types.ClearTriggeredAlarmsResponse `xml:"ClearTriggeredAlarmsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClearTriggeredAlarmsBody) Fault() *soap.Fault { return b.Fault_ } - -func ClearTriggeredAlarms(ctx context.Context, r soap.RoundTripper, req *types.ClearTriggeredAlarms) (*types.ClearTriggeredAlarmsResponse, error) { - var reqBody, resBody ClearTriggeredAlarmsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClearVStorageObjectControlFlagsBody struct { - Req *types.ClearVStorageObjectControlFlags `xml:"urn:vim25 ClearVStorageObjectControlFlags,omitempty"` - Res *types.ClearVStorageObjectControlFlagsResponse `xml:"ClearVStorageObjectControlFlagsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClearVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ } - -func ClearVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.ClearVStorageObjectControlFlags) (*types.ClearVStorageObjectControlFlagsResponse, error) { - var reqBody, resBody ClearVStorageObjectControlFlagsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CloneSessionBody struct { - Req *types.CloneSession `xml:"urn:vim25 CloneSession,omitempty"` - Res *types.CloneSessionResponse `xml:"CloneSessionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CloneSessionBody) Fault() *soap.Fault { return b.Fault_ } - -func CloneSession(ctx context.Context, r soap.RoundTripper, req *types.CloneSession) (*types.CloneSessionResponse, error) { - var reqBody, resBody CloneSessionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CloneVApp_TaskBody struct { - Req *types.CloneVApp_Task `xml:"urn:vim25 CloneVApp_Task,omitempty"` - Res *types.CloneVApp_TaskResponse `xml:"CloneVApp_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CloneVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CloneVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVApp_Task) (*types.CloneVApp_TaskResponse, error) { - var reqBody, resBody CloneVApp_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CloneVM_TaskBody struct { - Req *types.CloneVM_Task `xml:"urn:vim25 CloneVM_Task,omitempty"` - Res *types.CloneVM_TaskResponse `xml:"CloneVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CloneVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CloneVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVM_Task) (*types.CloneVM_TaskResponse, error) { - var reqBody, resBody CloneVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CloneVStorageObject_TaskBody struct { - Req *types.CloneVStorageObject_Task `xml:"urn:vim25 CloneVStorageObject_Task,omitempty"` - Res *types.CloneVStorageObject_TaskResponse `xml:"CloneVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.CloneVStorageObject_Task) (*types.CloneVStorageObject_TaskResponse, error) { - var reqBody, resBody CloneVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CloseInventoryViewFolderBody struct { - Req *types.CloseInventoryViewFolder `xml:"urn:vim25 CloseInventoryViewFolder,omitempty"` - Res *types.CloseInventoryViewFolderResponse `xml:"CloseInventoryViewFolderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CloseInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ } - -func CloseInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.CloseInventoryViewFolder) (*types.CloseInventoryViewFolderResponse, error) { - var reqBody, resBody CloseInventoryViewFolderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ClusterEnterMaintenanceModeBody struct { - Req *types.ClusterEnterMaintenanceMode `xml:"urn:vim25 ClusterEnterMaintenanceMode,omitempty"` - Res *types.ClusterEnterMaintenanceModeResponse `xml:"ClusterEnterMaintenanceModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ClusterEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ } - -func ClusterEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.ClusterEnterMaintenanceMode) (*types.ClusterEnterMaintenanceModeResponse, error) { - var reqBody, resBody ClusterEnterMaintenanceModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CompositeHostProfile_TaskBody struct { - Req *types.CompositeHostProfile_Task `xml:"urn:vim25 CompositeHostProfile_Task,omitempty"` - Res *types.CompositeHostProfile_TaskResponse `xml:"CompositeHostProfile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CompositeHostProfile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CompositeHostProfile_Task(ctx context.Context, r soap.RoundTripper, req *types.CompositeHostProfile_Task) (*types.CompositeHostProfile_TaskResponse, error) { - var reqBody, resBody CompositeHostProfile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ComputeDiskPartitionInfoBody struct { - Req *types.ComputeDiskPartitionInfo `xml:"urn:vim25 ComputeDiskPartitionInfo,omitempty"` - Res *types.ComputeDiskPartitionInfoResponse `xml:"ComputeDiskPartitionInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ComputeDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func ComputeDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfo) (*types.ComputeDiskPartitionInfoResponse, error) { - var reqBody, resBody ComputeDiskPartitionInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ComputeDiskPartitionInfoForResizeBody struct { - Req *types.ComputeDiskPartitionInfoForResize `xml:"urn:vim25 ComputeDiskPartitionInfoForResize,omitempty"` - Res *types.ComputeDiskPartitionInfoForResizeResponse `xml:"ComputeDiskPartitionInfoForResizeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ComputeDiskPartitionInfoForResizeBody) Fault() *soap.Fault { return b.Fault_ } - -func ComputeDiskPartitionInfoForResize(ctx context.Context, r soap.RoundTripper, req *types.ComputeDiskPartitionInfoForResize) (*types.ComputeDiskPartitionInfoForResizeResponse, error) { - var reqBody, resBody ComputeDiskPartitionInfoForResizeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureCryptoKeyBody struct { - Req *types.ConfigureCryptoKey `xml:"urn:vim25 ConfigureCryptoKey,omitempty"` - Res *types.ConfigureCryptoKeyResponse `xml:"ConfigureCryptoKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureCryptoKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureCryptoKey(ctx context.Context, r soap.RoundTripper, req *types.ConfigureCryptoKey) (*types.ConfigureCryptoKeyResponse, error) { - var reqBody, resBody ConfigureCryptoKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureDatastoreIORM_TaskBody struct { - Req *types.ConfigureDatastoreIORM_Task `xml:"urn:vim25 ConfigureDatastoreIORM_Task,omitempty"` - Res *types.ConfigureDatastoreIORM_TaskResponse `xml:"ConfigureDatastoreIORM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureDatastoreIORM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureDatastoreIORM_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastoreIORM_Task) (*types.ConfigureDatastoreIORM_TaskResponse, error) { - var reqBody, resBody ConfigureDatastoreIORM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureDatastorePrincipalBody struct { - Req *types.ConfigureDatastorePrincipal `xml:"urn:vim25 ConfigureDatastorePrincipal,omitempty"` - Res *types.ConfigureDatastorePrincipalResponse `xml:"ConfigureDatastorePrincipalResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureDatastorePrincipalBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureDatastorePrincipal(ctx context.Context, r soap.RoundTripper, req *types.ConfigureDatastorePrincipal) (*types.ConfigureDatastorePrincipalResponse, error) { - var reqBody, resBody ConfigureDatastorePrincipalBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureEvcMode_TaskBody struct { - Req *types.ConfigureEvcMode_Task `xml:"urn:vim25 ConfigureEvcMode_Task,omitempty"` - Res *types.ConfigureEvcMode_TaskResponse `xml:"ConfigureEvcMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureEvcMode_Task) (*types.ConfigureEvcMode_TaskResponse, error) { - var reqBody, resBody ConfigureEvcMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureHCI_TaskBody struct { - Req *types.ConfigureHCI_Task `xml:"urn:vim25 ConfigureHCI_Task,omitempty"` - Res *types.ConfigureHCI_TaskResponse `xml:"ConfigureHCI_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureHCI_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureHCI_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureHCI_Task) (*types.ConfigureHCI_TaskResponse, error) { - var reqBody, resBody ConfigureHCI_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureHostCache_TaskBody struct { - Req *types.ConfigureHostCache_Task `xml:"urn:vim25 ConfigureHostCache_Task,omitempty"` - Res *types.ConfigureHostCache_TaskResponse `xml:"ConfigureHostCache_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureHostCache_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureHostCache_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureHostCache_Task) (*types.ConfigureHostCache_TaskResponse, error) { - var reqBody, resBody ConfigureHostCache_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureLicenseSourceBody struct { - Req *types.ConfigureLicenseSource `xml:"urn:vim25 ConfigureLicenseSource,omitempty"` - Res *types.ConfigureLicenseSourceResponse `xml:"ConfigureLicenseSourceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureLicenseSourceBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureLicenseSource(ctx context.Context, r soap.RoundTripper, req *types.ConfigureLicenseSource) (*types.ConfigureLicenseSourceResponse, error) { - var reqBody, resBody ConfigureLicenseSourceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigurePowerPolicyBody struct { - Req *types.ConfigurePowerPolicy `xml:"urn:vim25 ConfigurePowerPolicy,omitempty"` - Res *types.ConfigurePowerPolicyResponse `xml:"ConfigurePowerPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigurePowerPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigurePowerPolicy(ctx context.Context, r soap.RoundTripper, req *types.ConfigurePowerPolicy) (*types.ConfigurePowerPolicyResponse, error) { - var reqBody, resBody ConfigurePowerPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureStorageDrsForPod_TaskBody struct { - Req *types.ConfigureStorageDrsForPod_Task `xml:"urn:vim25 ConfigureStorageDrsForPod_Task,omitempty"` - Res *types.ConfigureStorageDrsForPod_TaskResponse `xml:"ConfigureStorageDrsForPod_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureStorageDrsForPod_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureStorageDrsForPod_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureStorageDrsForPod_Task) (*types.ConfigureStorageDrsForPod_TaskResponse, error) { - var reqBody, resBody ConfigureStorageDrsForPod_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureVFlashResourceEx_TaskBody struct { - Req *types.ConfigureVFlashResourceEx_Task `xml:"urn:vim25 ConfigureVFlashResourceEx_Task,omitempty"` - Res *types.ConfigureVFlashResourceEx_TaskResponse `xml:"ConfigureVFlashResourceEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureVFlashResourceEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureVFlashResourceEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureVFlashResourceEx_Task) (*types.ConfigureVFlashResourceEx_TaskResponse, error) { - var reqBody, resBody ConfigureVFlashResourceEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConnectNvmeControllerBody struct { - Req *types.ConnectNvmeController `xml:"urn:vim25 ConnectNvmeController,omitempty"` - Res *types.ConnectNvmeControllerResponse `xml:"ConnectNvmeControllerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConnectNvmeControllerBody) Fault() *soap.Fault { return b.Fault_ } - -func ConnectNvmeController(ctx context.Context, r soap.RoundTripper, req *types.ConnectNvmeController) (*types.ConnectNvmeControllerResponse, error) { - var reqBody, resBody ConnectNvmeControllerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConnectNvmeControllerEx_TaskBody struct { - Req *types.ConnectNvmeControllerEx_Task `xml:"urn:vim25 ConnectNvmeControllerEx_Task,omitempty"` - Res *types.ConnectNvmeControllerEx_TaskResponse `xml:"ConnectNvmeControllerEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConnectNvmeControllerEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConnectNvmeControllerEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ConnectNvmeControllerEx_Task) (*types.ConnectNvmeControllerEx_TaskResponse, error) { - var reqBody, resBody ConnectNvmeControllerEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConsolidateVMDisks_TaskBody struct { - Req *types.ConsolidateVMDisks_Task `xml:"urn:vim25 ConsolidateVMDisks_Task,omitempty"` - Res *types.ConsolidateVMDisks_TaskResponse `xml:"ConsolidateVMDisks_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConsolidateVMDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConsolidateVMDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.ConsolidateVMDisks_Task) (*types.ConsolidateVMDisks_TaskResponse, error) { - var reqBody, resBody ConsolidateVMDisks_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ContinueRetrievePropertiesExBody struct { - Req *types.ContinueRetrievePropertiesEx `xml:"urn:vim25 ContinueRetrievePropertiesEx,omitempty"` - Res *types.ContinueRetrievePropertiesExResponse `xml:"ContinueRetrievePropertiesExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ContinueRetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } - -func ContinueRetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.ContinueRetrievePropertiesEx) (*types.ContinueRetrievePropertiesExResponse, error) { - var reqBody, resBody ContinueRetrievePropertiesExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConvertNamespacePathToUuidPathBody struct { - Req *types.ConvertNamespacePathToUuidPath `xml:"urn:vim25 ConvertNamespacePathToUuidPath,omitempty"` - Res *types.ConvertNamespacePathToUuidPathResponse `xml:"ConvertNamespacePathToUuidPathResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConvertNamespacePathToUuidPathBody) Fault() *soap.Fault { return b.Fault_ } - -func ConvertNamespacePathToUuidPath(ctx context.Context, r soap.RoundTripper, req *types.ConvertNamespacePathToUuidPath) (*types.ConvertNamespacePathToUuidPathResponse, error) { - var reqBody, resBody ConvertNamespacePathToUuidPathBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CopyDatastoreFile_TaskBody struct { - Req *types.CopyDatastoreFile_Task `xml:"urn:vim25 CopyDatastoreFile_Task,omitempty"` - Res *types.CopyDatastoreFile_TaskResponse `xml:"CopyDatastoreFile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CopyDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CopyDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyDatastoreFile_Task) (*types.CopyDatastoreFile_TaskResponse, error) { - var reqBody, resBody CopyDatastoreFile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CopyVirtualDisk_TaskBody struct { - Req *types.CopyVirtualDisk_Task `xml:"urn:vim25 CopyVirtualDisk_Task,omitempty"` - Res *types.CopyVirtualDisk_TaskResponse `xml:"CopyVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CopyVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CopyVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CopyVirtualDisk_Task) (*types.CopyVirtualDisk_TaskResponse, error) { - var reqBody, resBody CopyVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateAlarmBody struct { - Req *types.CreateAlarm `xml:"urn:vim25 CreateAlarm,omitempty"` - Res *types.CreateAlarmResponse `xml:"CreateAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateAlarm(ctx context.Context, r soap.RoundTripper, req *types.CreateAlarm) (*types.CreateAlarmResponse, error) { - var reqBody, resBody CreateAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateChildVM_TaskBody struct { - Req *types.CreateChildVM_Task `xml:"urn:vim25 CreateChildVM_Task,omitempty"` - Res *types.CreateChildVM_TaskResponse `xml:"CreateChildVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateChildVM_Task) (*types.CreateChildVM_TaskResponse, error) { - var reqBody, resBody CreateChildVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateClusterBody struct { - Req *types.CreateCluster `xml:"urn:vim25 CreateCluster,omitempty"` - Res *types.CreateClusterResponse `xml:"CreateClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateCluster(ctx context.Context, r soap.RoundTripper, req *types.CreateCluster) (*types.CreateClusterResponse, error) { - var reqBody, resBody CreateClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateClusterExBody struct { - Req *types.CreateClusterEx `xml:"urn:vim25 CreateClusterEx,omitempty"` - Res *types.CreateClusterExResponse `xml:"CreateClusterExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateClusterExBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateClusterEx(ctx context.Context, r soap.RoundTripper, req *types.CreateClusterEx) (*types.CreateClusterExResponse, error) { - var reqBody, resBody CreateClusterExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateCollectorForEventsBody struct { - Req *types.CreateCollectorForEvents `xml:"urn:vim25 CreateCollectorForEvents,omitempty"` - Res *types.CreateCollectorForEventsResponse `xml:"CreateCollectorForEventsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateCollectorForEventsBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateCollectorForEvents(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForEvents) (*types.CreateCollectorForEventsResponse, error) { - var reqBody, resBody CreateCollectorForEventsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateCollectorForTasksBody struct { - Req *types.CreateCollectorForTasks `xml:"urn:vim25 CreateCollectorForTasks,omitempty"` - Res *types.CreateCollectorForTasksResponse `xml:"CreateCollectorForTasksResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateCollectorForTasksBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateCollectorForTasks(ctx context.Context, r soap.RoundTripper, req *types.CreateCollectorForTasks) (*types.CreateCollectorForTasksResponse, error) { - var reqBody, resBody CreateCollectorForTasksBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateContainerViewBody struct { - Req *types.CreateContainerView `xml:"urn:vim25 CreateContainerView,omitempty"` - Res *types.CreateContainerViewResponse `xml:"CreateContainerViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateContainerViewBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateContainerView(ctx context.Context, r soap.RoundTripper, req *types.CreateContainerView) (*types.CreateContainerViewResponse, error) { - var reqBody, resBody CreateContainerViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateCustomizationSpecBody struct { - Req *types.CreateCustomizationSpec `xml:"urn:vim25 CreateCustomizationSpec,omitempty"` - Res *types.CreateCustomizationSpecResponse `xml:"CreateCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateCustomizationSpec) (*types.CreateCustomizationSpecResponse, error) { - var reqBody, resBody CreateCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDVPortgroup_TaskBody struct { - Req *types.CreateDVPortgroup_Task `xml:"urn:vim25 CreateDVPortgroup_Task,omitempty"` - Res *types.CreateDVPortgroup_TaskResponse `xml:"CreateDVPortgroup_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVPortgroup_Task) (*types.CreateDVPortgroup_TaskResponse, error) { - var reqBody, resBody CreateDVPortgroup_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDVS_TaskBody struct { - Req *types.CreateDVS_Task `xml:"urn:vim25 CreateDVS_Task,omitempty"` - Res *types.CreateDVS_TaskResponse `xml:"CreateDVS_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDVS_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDVS_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDVS_Task) (*types.CreateDVS_TaskResponse, error) { - var reqBody, resBody CreateDVS_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDatacenterBody struct { - Req *types.CreateDatacenter `xml:"urn:vim25 CreateDatacenter,omitempty"` - Res *types.CreateDatacenterResponse `xml:"CreateDatacenterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDatacenterBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDatacenter(ctx context.Context, r soap.RoundTripper, req *types.CreateDatacenter) (*types.CreateDatacenterResponse, error) { - var reqBody, resBody CreateDatacenterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDefaultProfileBody struct { - Req *types.CreateDefaultProfile `xml:"urn:vim25 CreateDefaultProfile,omitempty"` - Res *types.CreateDefaultProfileResponse `xml:"CreateDefaultProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDefaultProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDefaultProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateDefaultProfile) (*types.CreateDefaultProfileResponse, error) { - var reqBody, resBody CreateDefaultProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDescriptorBody struct { - Req *types.CreateDescriptor `xml:"urn:vim25 CreateDescriptor,omitempty"` - Res *types.CreateDescriptorResponse `xml:"CreateDescriptorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDescriptorBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDescriptor(ctx context.Context, r soap.RoundTripper, req *types.CreateDescriptor) (*types.CreateDescriptorResponse, error) { - var reqBody, resBody CreateDescriptorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDiagnosticPartitionBody struct { - Req *types.CreateDiagnosticPartition `xml:"urn:vim25 CreateDiagnosticPartition,omitempty"` - Res *types.CreateDiagnosticPartitionResponse `xml:"CreateDiagnosticPartitionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDiagnosticPartitionBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDiagnosticPartition(ctx context.Context, r soap.RoundTripper, req *types.CreateDiagnosticPartition) (*types.CreateDiagnosticPartitionResponse, error) { - var reqBody, resBody CreateDiagnosticPartitionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDirectoryBody struct { - Req *types.CreateDirectory `xml:"urn:vim25 CreateDirectory,omitempty"` - Res *types.CreateDirectoryResponse `xml:"CreateDirectoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDirectoryBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDirectory(ctx context.Context, r soap.RoundTripper, req *types.CreateDirectory) (*types.CreateDirectoryResponse, error) { - var reqBody, resBody CreateDirectoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDiskFromSnapshot_TaskBody struct { - Req *types.CreateDiskFromSnapshot_Task `xml:"urn:vim25 CreateDiskFromSnapshot_Task,omitempty"` - Res *types.CreateDiskFromSnapshot_TaskResponse `xml:"CreateDiskFromSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDiskFromSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDiskFromSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDiskFromSnapshot_Task) (*types.CreateDiskFromSnapshot_TaskResponse, error) { - var reqBody, resBody CreateDiskFromSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateDisk_TaskBody struct { - Req *types.CreateDisk_Task `xml:"urn:vim25 CreateDisk_Task,omitempty"` - Res *types.CreateDisk_TaskResponse `xml:"CreateDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateDisk_Task) (*types.CreateDisk_TaskResponse, error) { - var reqBody, resBody CreateDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateFilterBody struct { - Req *types.CreateFilter `xml:"urn:vim25 CreateFilter,omitempty"` - Res *types.CreateFilterResponse `xml:"CreateFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateFilter(ctx context.Context, r soap.RoundTripper, req *types.CreateFilter) (*types.CreateFilterResponse, error) { - var reqBody, resBody CreateFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateFolderBody struct { - Req *types.CreateFolder `xml:"urn:vim25 CreateFolder,omitempty"` - Res *types.CreateFolderResponse `xml:"CreateFolderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateFolderBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateFolder(ctx context.Context, r soap.RoundTripper, req *types.CreateFolder) (*types.CreateFolderResponse, error) { - var reqBody, resBody CreateFolderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateGroupBody struct { - Req *types.CreateGroup `xml:"urn:vim25 CreateGroup,omitempty"` - Res *types.CreateGroupResponse `xml:"CreateGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateGroup(ctx context.Context, r soap.RoundTripper, req *types.CreateGroup) (*types.CreateGroupResponse, error) { - var reqBody, resBody CreateGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateImportSpecBody struct { - Req *types.CreateImportSpec `xml:"urn:vim25 CreateImportSpec,omitempty"` - Res *types.CreateImportSpecResponse `xml:"CreateImportSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateImportSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateImportSpec(ctx context.Context, r soap.RoundTripper, req *types.CreateImportSpec) (*types.CreateImportSpecResponse, error) { - var reqBody, resBody CreateImportSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateInventoryViewBody struct { - Req *types.CreateInventoryView `xml:"urn:vim25 CreateInventoryView,omitempty"` - Res *types.CreateInventoryViewResponse `xml:"CreateInventoryViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateInventoryViewBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateInventoryView(ctx context.Context, r soap.RoundTripper, req *types.CreateInventoryView) (*types.CreateInventoryViewResponse, error) { - var reqBody, resBody CreateInventoryViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateIpPoolBody struct { - Req *types.CreateIpPool `xml:"urn:vim25 CreateIpPool,omitempty"` - Res *types.CreateIpPoolResponse `xml:"CreateIpPoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateIpPoolBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateIpPool(ctx context.Context, r soap.RoundTripper, req *types.CreateIpPool) (*types.CreateIpPoolResponse, error) { - var reqBody, resBody CreateIpPoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateListViewBody struct { - Req *types.CreateListView `xml:"urn:vim25 CreateListView,omitempty"` - Res *types.CreateListViewResponse `xml:"CreateListViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateListViewBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateListView(ctx context.Context, r soap.RoundTripper, req *types.CreateListView) (*types.CreateListViewResponse, error) { - var reqBody, resBody CreateListViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateListViewFromViewBody struct { - Req *types.CreateListViewFromView `xml:"urn:vim25 CreateListViewFromView,omitempty"` - Res *types.CreateListViewFromViewResponse `xml:"CreateListViewFromViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.CreateListViewFromView) (*types.CreateListViewFromViewResponse, error) { - var reqBody, resBody CreateListViewFromViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateLocalDatastoreBody struct { - Req *types.CreateLocalDatastore `xml:"urn:vim25 CreateLocalDatastore,omitempty"` - Res *types.CreateLocalDatastoreResponse `xml:"CreateLocalDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateLocalDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateLocalDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateLocalDatastore) (*types.CreateLocalDatastoreResponse, error) { - var reqBody, resBody CreateLocalDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateNasDatastoreBody struct { - Req *types.CreateNasDatastore `xml:"urn:vim25 CreateNasDatastore,omitempty"` - Res *types.CreateNasDatastoreResponse `xml:"CreateNasDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateNasDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateNasDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateNasDatastore) (*types.CreateNasDatastoreResponse, error) { - var reqBody, resBody CreateNasDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateNvdimmNamespace_TaskBody struct { - Req *types.CreateNvdimmNamespace_Task `xml:"urn:vim25 CreateNvdimmNamespace_Task,omitempty"` - Res *types.CreateNvdimmNamespace_TaskResponse `xml:"CreateNvdimmNamespace_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateNvdimmNamespace_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateNvdimmNamespace_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateNvdimmNamespace_Task) (*types.CreateNvdimmNamespace_TaskResponse, error) { - var reqBody, resBody CreateNvdimmNamespace_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateNvdimmPMemNamespace_TaskBody struct { - Req *types.CreateNvdimmPMemNamespace_Task `xml:"urn:vim25 CreateNvdimmPMemNamespace_Task,omitempty"` - Res *types.CreateNvdimmPMemNamespace_TaskResponse `xml:"CreateNvdimmPMemNamespace_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateNvdimmPMemNamespace_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateNvdimmPMemNamespace_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateNvdimmPMemNamespace_Task) (*types.CreateNvdimmPMemNamespace_TaskResponse, error) { - var reqBody, resBody CreateNvdimmPMemNamespace_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateNvmeOverRdmaAdapterBody struct { - Req *types.CreateNvmeOverRdmaAdapter `xml:"urn:vim25 CreateNvmeOverRdmaAdapter,omitempty"` - Res *types.CreateNvmeOverRdmaAdapterResponse `xml:"CreateNvmeOverRdmaAdapterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateNvmeOverRdmaAdapterBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateNvmeOverRdmaAdapter(ctx context.Context, r soap.RoundTripper, req *types.CreateNvmeOverRdmaAdapter) (*types.CreateNvmeOverRdmaAdapterResponse, error) { - var reqBody, resBody CreateNvmeOverRdmaAdapterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateObjectScheduledTaskBody struct { - Req *types.CreateObjectScheduledTask `xml:"urn:vim25 CreateObjectScheduledTask,omitempty"` - Res *types.CreateObjectScheduledTaskResponse `xml:"CreateObjectScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateObjectScheduledTask) (*types.CreateObjectScheduledTaskResponse, error) { - var reqBody, resBody CreateObjectScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreatePerfIntervalBody struct { - Req *types.CreatePerfInterval `xml:"urn:vim25 CreatePerfInterval,omitempty"` - Res *types.CreatePerfIntervalResponse `xml:"CreatePerfIntervalResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } - -func CreatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.CreatePerfInterval) (*types.CreatePerfIntervalResponse, error) { - var reqBody, resBody CreatePerfIntervalBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateProfileBody struct { - Req *types.CreateProfile `xml:"urn:vim25 CreateProfile,omitempty"` - Res *types.CreateProfileResponse `xml:"CreateProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateProfile(ctx context.Context, r soap.RoundTripper, req *types.CreateProfile) (*types.CreateProfileResponse, error) { - var reqBody, resBody CreateProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreatePropertyCollectorBody struct { - Req *types.CreatePropertyCollector `xml:"urn:vim25 CreatePropertyCollector,omitempty"` - Res *types.CreatePropertyCollectorResponse `xml:"CreatePropertyCollectorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreatePropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ } - -func CreatePropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.CreatePropertyCollector) (*types.CreatePropertyCollectorResponse, error) { - var reqBody, resBody CreatePropertyCollectorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateRegistryKeyInGuestBody struct { - Req *types.CreateRegistryKeyInGuest `xml:"urn:vim25 CreateRegistryKeyInGuest,omitempty"` - Res *types.CreateRegistryKeyInGuestResponse `xml:"CreateRegistryKeyInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateRegistryKeyInGuest) (*types.CreateRegistryKeyInGuestResponse, error) { - var reqBody, resBody CreateRegistryKeyInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateResourcePoolBody struct { - Req *types.CreateResourcePool `xml:"urn:vim25 CreateResourcePool,omitempty"` - Res *types.CreateResourcePoolResponse `xml:"CreateResourcePoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateResourcePool(ctx context.Context, r soap.RoundTripper, req *types.CreateResourcePool) (*types.CreateResourcePoolResponse, error) { - var reqBody, resBody CreateResourcePoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateScheduledTaskBody struct { - Req *types.CreateScheduledTask `xml:"urn:vim25 CreateScheduledTask,omitempty"` - Res *types.CreateScheduledTaskResponse `xml:"CreateScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.CreateScheduledTask) (*types.CreateScheduledTaskResponse, error) { - var reqBody, resBody CreateScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateScreenshot_TaskBody struct { - Req *types.CreateScreenshot_Task `xml:"urn:vim25 CreateScreenshot_Task,omitempty"` - Res *types.CreateScreenshot_TaskResponse `xml:"CreateScreenshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateScreenshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateScreenshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateScreenshot_Task) (*types.CreateScreenshot_TaskResponse, error) { - var reqBody, resBody CreateScreenshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateSecondaryVMEx_TaskBody struct { - Req *types.CreateSecondaryVMEx_Task `xml:"urn:vim25 CreateSecondaryVMEx_Task,omitempty"` - Res *types.CreateSecondaryVMEx_TaskResponse `xml:"CreateSecondaryVMEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateSecondaryVMEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateSecondaryVMEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVMEx_Task) (*types.CreateSecondaryVMEx_TaskResponse, error) { - var reqBody, resBody CreateSecondaryVMEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateSecondaryVM_TaskBody struct { - Req *types.CreateSecondaryVM_Task `xml:"urn:vim25 CreateSecondaryVM_Task,omitempty"` - Res *types.CreateSecondaryVM_TaskResponse `xml:"CreateSecondaryVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSecondaryVM_Task) (*types.CreateSecondaryVM_TaskResponse, error) { - var reqBody, resBody CreateSecondaryVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateSnapshotEx_TaskBody struct { - Req *types.CreateSnapshotEx_Task `xml:"urn:vim25 CreateSnapshotEx_Task,omitempty"` - Res *types.CreateSnapshotEx_TaskResponse `xml:"CreateSnapshotEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateSnapshotEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateSnapshotEx_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshotEx_Task) (*types.CreateSnapshotEx_TaskResponse, error) { - var reqBody, resBody CreateSnapshotEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateSnapshot_TaskBody struct { - Req *types.CreateSnapshot_Task `xml:"urn:vim25 CreateSnapshot_Task,omitempty"` - Res *types.CreateSnapshot_TaskResponse `xml:"CreateSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateSnapshot_Task) (*types.CreateSnapshot_TaskResponse, error) { - var reqBody, resBody CreateSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateSoftwareAdapterBody struct { - Req *types.CreateSoftwareAdapter `xml:"urn:vim25 CreateSoftwareAdapter,omitempty"` - Res *types.CreateSoftwareAdapterResponse `xml:"CreateSoftwareAdapterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateSoftwareAdapterBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateSoftwareAdapter(ctx context.Context, r soap.RoundTripper, req *types.CreateSoftwareAdapter) (*types.CreateSoftwareAdapterResponse, error) { - var reqBody, resBody CreateSoftwareAdapterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateStoragePodBody struct { - Req *types.CreateStoragePod `xml:"urn:vim25 CreateStoragePod,omitempty"` - Res *types.CreateStoragePodResponse `xml:"CreateStoragePodResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateStoragePodBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateStoragePod(ctx context.Context, r soap.RoundTripper, req *types.CreateStoragePod) (*types.CreateStoragePodResponse, error) { - var reqBody, resBody CreateStoragePodBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateTaskBody struct { - Req *types.CreateTask `xml:"urn:vim25 CreateTask,omitempty"` - Res *types.CreateTaskResponse `xml:"CreateTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateTask(ctx context.Context, r soap.RoundTripper, req *types.CreateTask) (*types.CreateTaskResponse, error) { - var reqBody, resBody CreateTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateTemporaryDirectoryInGuestBody struct { - Req *types.CreateTemporaryDirectoryInGuest `xml:"urn:vim25 CreateTemporaryDirectoryInGuest,omitempty"` - Res *types.CreateTemporaryDirectoryInGuestResponse `xml:"CreateTemporaryDirectoryInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateTemporaryDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateTemporaryDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryDirectoryInGuest) (*types.CreateTemporaryDirectoryInGuestResponse, error) { - var reqBody, resBody CreateTemporaryDirectoryInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateTemporaryFileInGuestBody struct { - Req *types.CreateTemporaryFileInGuest `xml:"urn:vim25 CreateTemporaryFileInGuest,omitempty"` - Res *types.CreateTemporaryFileInGuestResponse `xml:"CreateTemporaryFileInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateTemporaryFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateTemporaryFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.CreateTemporaryFileInGuest) (*types.CreateTemporaryFileInGuestResponse, error) { - var reqBody, resBody CreateTemporaryFileInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateUserBody struct { - Req *types.CreateUser `xml:"urn:vim25 CreateUser,omitempty"` - Res *types.CreateUserResponse `xml:"CreateUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateUserBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateUser(ctx context.Context, r soap.RoundTripper, req *types.CreateUser) (*types.CreateUserResponse, error) { - var reqBody, resBody CreateUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateVAppBody struct { - Req *types.CreateVApp `xml:"urn:vim25 CreateVApp,omitempty"` - Res *types.CreateVAppResponse `xml:"CreateVAppResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateVAppBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateVApp(ctx context.Context, r soap.RoundTripper, req *types.CreateVApp) (*types.CreateVAppResponse, error) { - var reqBody, resBody CreateVAppBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateVM_TaskBody struct { - Req *types.CreateVM_Task `xml:"urn:vim25 CreateVM_Task,omitempty"` - Res *types.CreateVM_TaskResponse `xml:"CreateVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVM_Task) (*types.CreateVM_TaskResponse, error) { - var reqBody, resBody CreateVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateVirtualDisk_TaskBody struct { - Req *types.CreateVirtualDisk_Task `xml:"urn:vim25 CreateVirtualDisk_Task,omitempty"` - Res *types.CreateVirtualDisk_TaskResponse `xml:"CreateVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateVirtualDisk_Task) (*types.CreateVirtualDisk_TaskResponse, error) { - var reqBody, resBody CreateVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateVmfsDatastoreBody struct { - Req *types.CreateVmfsDatastore `xml:"urn:vim25 CreateVmfsDatastore,omitempty"` - Res *types.CreateVmfsDatastoreResponse `xml:"CreateVmfsDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVmfsDatastore) (*types.CreateVmfsDatastoreResponse, error) { - var reqBody, resBody CreateVmfsDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateVvolDatastoreBody struct { - Req *types.CreateVvolDatastore `xml:"urn:vim25 CreateVvolDatastore,omitempty"` - Res *types.CreateVvolDatastoreResponse `xml:"CreateVvolDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateVvolDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateVvolDatastore(ctx context.Context, r soap.RoundTripper, req *types.CreateVvolDatastore) (*types.CreateVvolDatastoreResponse, error) { - var reqBody, resBody CreateVvolDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CryptoManagerHostDisableBody struct { - Req *types.CryptoManagerHostDisable `xml:"urn:vim25 CryptoManagerHostDisable,omitempty"` - Res *types.CryptoManagerHostDisableResponse `xml:"CryptoManagerHostDisableResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CryptoManagerHostDisableBody) Fault() *soap.Fault { return b.Fault_ } - -func CryptoManagerHostDisable(ctx context.Context, r soap.RoundTripper, req *types.CryptoManagerHostDisable) (*types.CryptoManagerHostDisableResponse, error) { - var reqBody, resBody CryptoManagerHostDisableBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CryptoManagerHostEnableBody struct { - Req *types.CryptoManagerHostEnable `xml:"urn:vim25 CryptoManagerHostEnable,omitempty"` - Res *types.CryptoManagerHostEnableResponse `xml:"CryptoManagerHostEnableResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CryptoManagerHostEnableBody) Fault() *soap.Fault { return b.Fault_ } - -func CryptoManagerHostEnable(ctx context.Context, r soap.RoundTripper, req *types.CryptoManagerHostEnable) (*types.CryptoManagerHostEnableResponse, error) { - var reqBody, resBody CryptoManagerHostEnableBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CryptoManagerHostPrepareBody struct { - Req *types.CryptoManagerHostPrepare `xml:"urn:vim25 CryptoManagerHostPrepare,omitempty"` - Res *types.CryptoManagerHostPrepareResponse `xml:"CryptoManagerHostPrepareResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CryptoManagerHostPrepareBody) Fault() *soap.Fault { return b.Fault_ } - -func CryptoManagerHostPrepare(ctx context.Context, r soap.RoundTripper, req *types.CryptoManagerHostPrepare) (*types.CryptoManagerHostPrepareResponse, error) { - var reqBody, resBody CryptoManagerHostPrepareBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CryptoUnlock_TaskBody struct { - Req *types.CryptoUnlock_Task `xml:"urn:vim25 CryptoUnlock_Task,omitempty"` - Res *types.CryptoUnlock_TaskResponse `xml:"CryptoUnlock_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CryptoUnlock_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CryptoUnlock_Task(ctx context.Context, r soap.RoundTripper, req *types.CryptoUnlock_Task) (*types.CryptoUnlock_TaskResponse, error) { - var reqBody, resBody CryptoUnlock_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CurrentTimeBody struct { - Req *types.CurrentTime `xml:"urn:vim25 CurrentTime,omitempty"` - Res *types.CurrentTimeResponse `xml:"CurrentTimeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CurrentTimeBody) Fault() *soap.Fault { return b.Fault_ } - -func CurrentTime(ctx context.Context, r soap.RoundTripper, req *types.CurrentTime) (*types.CurrentTimeResponse, error) { - var reqBody, resBody CurrentTimeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CustomizationSpecItemToXmlBody struct { - Req *types.CustomizationSpecItemToXml `xml:"urn:vim25 CustomizationSpecItemToXml,omitempty"` - Res *types.CustomizationSpecItemToXmlResponse `xml:"CustomizationSpecItemToXmlResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CustomizationSpecItemToXmlBody) Fault() *soap.Fault { return b.Fault_ } - -func CustomizationSpecItemToXml(ctx context.Context, r soap.RoundTripper, req *types.CustomizationSpecItemToXml) (*types.CustomizationSpecItemToXmlResponse, error) { - var reqBody, resBody CustomizationSpecItemToXmlBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CustomizeGuest_TaskBody struct { - Req *types.CustomizeGuest_Task `xml:"urn:vim25 CustomizeGuest_Task,omitempty"` - Res *types.CustomizeGuest_TaskResponse `xml:"CustomizeGuest_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CustomizeGuest_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CustomizeGuest_Task(ctx context.Context, r soap.RoundTripper, req *types.CustomizeGuest_Task) (*types.CustomizeGuest_TaskResponse, error) { - var reqBody, resBody CustomizeGuest_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CustomizeVM_TaskBody struct { - Req *types.CustomizeVM_Task `xml:"urn:vim25 CustomizeVM_Task,omitempty"` - Res *types.CustomizeVM_TaskResponse `xml:"CustomizeVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CustomizeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CustomizeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.CustomizeVM_Task) (*types.CustomizeVM_TaskResponse, error) { - var reqBody, resBody CustomizeVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DVPortgroupRollback_TaskBody struct { - Req *types.DVPortgroupRollback_Task `xml:"urn:vim25 DVPortgroupRollback_Task,omitempty"` - Res *types.DVPortgroupRollback_TaskResponse `xml:"DVPortgroupRollback_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DVPortgroupRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DVPortgroupRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVPortgroupRollback_Task) (*types.DVPortgroupRollback_TaskResponse, error) { - var reqBody, resBody DVPortgroupRollback_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DVSManagerExportEntity_TaskBody struct { - Req *types.DVSManagerExportEntity_Task `xml:"urn:vim25 DVSManagerExportEntity_Task,omitempty"` - Res *types.DVSManagerExportEntity_TaskResponse `xml:"DVSManagerExportEntity_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DVSManagerExportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DVSManagerExportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerExportEntity_Task) (*types.DVSManagerExportEntity_TaskResponse, error) { - var reqBody, resBody DVSManagerExportEntity_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DVSManagerImportEntity_TaskBody struct { - Req *types.DVSManagerImportEntity_Task `xml:"urn:vim25 DVSManagerImportEntity_Task,omitempty"` - Res *types.DVSManagerImportEntity_TaskResponse `xml:"DVSManagerImportEntity_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DVSManagerImportEntity_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DVSManagerImportEntity_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerImportEntity_Task) (*types.DVSManagerImportEntity_TaskResponse, error) { - var reqBody, resBody DVSManagerImportEntity_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DVSManagerLookupDvPortGroupBody struct { - Req *types.DVSManagerLookupDvPortGroup `xml:"urn:vim25 DVSManagerLookupDvPortGroup,omitempty"` - Res *types.DVSManagerLookupDvPortGroupResponse `xml:"DVSManagerLookupDvPortGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DVSManagerLookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func DVSManagerLookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.DVSManagerLookupDvPortGroup) (*types.DVSManagerLookupDvPortGroupResponse, error) { - var reqBody, resBody DVSManagerLookupDvPortGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DVSRollback_TaskBody struct { - Req *types.DVSRollback_Task `xml:"urn:vim25 DVSRollback_Task,omitempty"` - Res *types.DVSRollback_TaskResponse `xml:"DVSRollback_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DVSRollback_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DVSRollback_Task(ctx context.Context, r soap.RoundTripper, req *types.DVSRollback_Task) (*types.DVSRollback_TaskResponse, error) { - var reqBody, resBody DVSRollback_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DatastoreEnterMaintenanceModeBody struct { - Req *types.DatastoreEnterMaintenanceMode `xml:"urn:vim25 DatastoreEnterMaintenanceMode,omitempty"` - Res *types.DatastoreEnterMaintenanceModeResponse `xml:"DatastoreEnterMaintenanceModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DatastoreEnterMaintenanceModeBody) Fault() *soap.Fault { return b.Fault_ } - -func DatastoreEnterMaintenanceMode(ctx context.Context, r soap.RoundTripper, req *types.DatastoreEnterMaintenanceMode) (*types.DatastoreEnterMaintenanceModeResponse, error) { - var reqBody, resBody DatastoreEnterMaintenanceModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DatastoreExitMaintenanceMode_TaskBody struct { - Req *types.DatastoreExitMaintenanceMode_Task `xml:"urn:vim25 DatastoreExitMaintenanceMode_Task,omitempty"` - Res *types.DatastoreExitMaintenanceMode_TaskResponse `xml:"DatastoreExitMaintenanceMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DatastoreExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DatastoreExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DatastoreExitMaintenanceMode_Task) (*types.DatastoreExitMaintenanceMode_TaskResponse, error) { - var reqBody, resBody DatastoreExitMaintenanceMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DecodeLicenseBody struct { - Req *types.DecodeLicense `xml:"urn:vim25 DecodeLicense,omitempty"` - Res *types.DecodeLicenseResponse `xml:"DecodeLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DecodeLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func DecodeLicense(ctx context.Context, r soap.RoundTripper, req *types.DecodeLicense) (*types.DecodeLicenseResponse, error) { - var reqBody, resBody DecodeLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DefragmentAllDisksBody struct { - Req *types.DefragmentAllDisks `xml:"urn:vim25 DefragmentAllDisks,omitempty"` - Res *types.DefragmentAllDisksResponse `xml:"DefragmentAllDisksResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DefragmentAllDisksBody) Fault() *soap.Fault { return b.Fault_ } - -func DefragmentAllDisks(ctx context.Context, r soap.RoundTripper, req *types.DefragmentAllDisks) (*types.DefragmentAllDisksResponse, error) { - var reqBody, resBody DefragmentAllDisksBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DefragmentVirtualDisk_TaskBody struct { - Req *types.DefragmentVirtualDisk_Task `xml:"urn:vim25 DefragmentVirtualDisk_Task,omitempty"` - Res *types.DefragmentVirtualDisk_TaskResponse `xml:"DefragmentVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DefragmentVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DefragmentVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DefragmentVirtualDisk_Task) (*types.DefragmentVirtualDisk_TaskResponse, error) { - var reqBody, resBody DefragmentVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteCustomizationSpecBody struct { - Req *types.DeleteCustomizationSpec `xml:"urn:vim25 DeleteCustomizationSpec,omitempty"` - Res *types.DeleteCustomizationSpecResponse `xml:"DeleteCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DeleteCustomizationSpec) (*types.DeleteCustomizationSpecResponse, error) { - var reqBody, resBody DeleteCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteDatastoreFile_TaskBody struct { - Req *types.DeleteDatastoreFile_Task `xml:"urn:vim25 DeleteDatastoreFile_Task,omitempty"` - Res *types.DeleteDatastoreFile_TaskResponse `xml:"DeleteDatastoreFile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteDatastoreFile_Task) (*types.DeleteDatastoreFile_TaskResponse, error) { - var reqBody, resBody DeleteDatastoreFile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteDirectoryBody struct { - Req *types.DeleteDirectory `xml:"urn:vim25 DeleteDirectory,omitempty"` - Res *types.DeleteDirectoryResponse `xml:"DeleteDirectoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteDirectoryBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteDirectory(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectory) (*types.DeleteDirectoryResponse, error) { - var reqBody, resBody DeleteDirectoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteDirectoryInGuestBody struct { - Req *types.DeleteDirectoryInGuest `xml:"urn:vim25 DeleteDirectoryInGuest,omitempty"` - Res *types.DeleteDirectoryInGuestResponse `xml:"DeleteDirectoryInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteDirectoryInGuest) (*types.DeleteDirectoryInGuestResponse, error) { - var reqBody, resBody DeleteDirectoryInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteFileBody struct { - Req *types.DeleteFile `xml:"urn:vim25 DeleteFile,omitempty"` - Res *types.DeleteFileResponse `xml:"DeleteFileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteFileBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteFile(ctx context.Context, r soap.RoundTripper, req *types.DeleteFile) (*types.DeleteFileResponse, error) { - var reqBody, resBody DeleteFileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteFileInGuestBody struct { - Req *types.DeleteFileInGuest `xml:"urn:vim25 DeleteFileInGuest,omitempty"` - Res *types.DeleteFileInGuestResponse `xml:"DeleteFileInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteFileInGuest) (*types.DeleteFileInGuestResponse, error) { - var reqBody, resBody DeleteFileInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteHostSpecificationBody struct { - Req *types.DeleteHostSpecification `xml:"urn:vim25 DeleteHostSpecification,omitempty"` - Res *types.DeleteHostSpecificationResponse `xml:"DeleteHostSpecificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSpecification) (*types.DeleteHostSpecificationResponse, error) { - var reqBody, resBody DeleteHostSpecificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteHostSubSpecificationBody struct { - Req *types.DeleteHostSubSpecification `xml:"urn:vim25 DeleteHostSubSpecification,omitempty"` - Res *types.DeleteHostSubSpecificationResponse `xml:"DeleteHostSubSpecificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.DeleteHostSubSpecification) (*types.DeleteHostSubSpecificationResponse, error) { - var reqBody, resBody DeleteHostSubSpecificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteNvdimmBlockNamespaces_TaskBody struct { - Req *types.DeleteNvdimmBlockNamespaces_Task `xml:"urn:vim25 DeleteNvdimmBlockNamespaces_Task,omitempty"` - Res *types.DeleteNvdimmBlockNamespaces_TaskResponse `xml:"DeleteNvdimmBlockNamespaces_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteNvdimmBlockNamespaces_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteNvdimmBlockNamespaces_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteNvdimmBlockNamespaces_Task) (*types.DeleteNvdimmBlockNamespaces_TaskResponse, error) { - var reqBody, resBody DeleteNvdimmBlockNamespaces_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteNvdimmNamespace_TaskBody struct { - Req *types.DeleteNvdimmNamespace_Task `xml:"urn:vim25 DeleteNvdimmNamespace_Task,omitempty"` - Res *types.DeleteNvdimmNamespace_TaskResponse `xml:"DeleteNvdimmNamespace_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteNvdimmNamespace_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteNvdimmNamespace_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteNvdimmNamespace_Task) (*types.DeleteNvdimmNamespace_TaskResponse, error) { - var reqBody, resBody DeleteNvdimmNamespace_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteRegistryKeyInGuestBody struct { - Req *types.DeleteRegistryKeyInGuest `xml:"urn:vim25 DeleteRegistryKeyInGuest,omitempty"` - Res *types.DeleteRegistryKeyInGuestResponse `xml:"DeleteRegistryKeyInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteRegistryKeyInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteRegistryKeyInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryKeyInGuest) (*types.DeleteRegistryKeyInGuestResponse, error) { - var reqBody, resBody DeleteRegistryKeyInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteRegistryValueInGuestBody struct { - Req *types.DeleteRegistryValueInGuest `xml:"urn:vim25 DeleteRegistryValueInGuest,omitempty"` - Res *types.DeleteRegistryValueInGuestResponse `xml:"DeleteRegistryValueInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.DeleteRegistryValueInGuest) (*types.DeleteRegistryValueInGuestResponse, error) { - var reqBody, resBody DeleteRegistryValueInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteScsiLunStateBody struct { - Req *types.DeleteScsiLunState `xml:"urn:vim25 DeleteScsiLunState,omitempty"` - Res *types.DeleteScsiLunStateResponse `xml:"DeleteScsiLunStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteScsiLunStateBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteScsiLunState(ctx context.Context, r soap.RoundTripper, req *types.DeleteScsiLunState) (*types.DeleteScsiLunStateResponse, error) { - var reqBody, resBody DeleteScsiLunStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteSnapshot_TaskBody struct { - Req *types.DeleteSnapshot_Task `xml:"urn:vim25 DeleteSnapshot_Task,omitempty"` - Res *types.DeleteSnapshot_TaskResponse `xml:"DeleteSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteSnapshot_Task) (*types.DeleteSnapshot_TaskResponse, error) { - var reqBody, resBody DeleteSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVStorageObjectEx_TaskBody struct { - Req *types.DeleteVStorageObjectEx_Task `xml:"urn:vim25 DeleteVStorageObjectEx_Task,omitempty"` - Res *types.DeleteVStorageObjectEx_TaskResponse `xml:"DeleteVStorageObjectEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVStorageObjectEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVStorageObjectEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVStorageObjectEx_Task) (*types.DeleteVStorageObjectEx_TaskResponse, error) { - var reqBody, resBody DeleteVStorageObjectEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVStorageObject_TaskBody struct { - Req *types.DeleteVStorageObject_Task `xml:"urn:vim25 DeleteVStorageObject_Task,omitempty"` - Res *types.DeleteVStorageObject_TaskResponse `xml:"DeleteVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVStorageObject_Task) (*types.DeleteVStorageObject_TaskResponse, error) { - var reqBody, resBody DeleteVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVffsVolumeStateBody struct { - Req *types.DeleteVffsVolumeState `xml:"urn:vim25 DeleteVffsVolumeState,omitempty"` - Res *types.DeleteVffsVolumeStateResponse `xml:"DeleteVffsVolumeStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVffsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVffsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVffsVolumeState) (*types.DeleteVffsVolumeStateResponse, error) { - var reqBody, resBody DeleteVffsVolumeStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVirtualDisk_TaskBody struct { - Req *types.DeleteVirtualDisk_Task `xml:"urn:vim25 DeleteVirtualDisk_Task,omitempty"` - Res *types.DeleteVirtualDisk_TaskResponse `xml:"DeleteVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DeleteVirtualDisk_Task) (*types.DeleteVirtualDisk_TaskResponse, error) { - var reqBody, resBody DeleteVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVmfsVolumeStateBody struct { - Req *types.DeleteVmfsVolumeState `xml:"urn:vim25 DeleteVmfsVolumeState,omitempty"` - Res *types.DeleteVmfsVolumeStateResponse `xml:"DeleteVmfsVolumeStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVmfsVolumeStateBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVmfsVolumeState(ctx context.Context, r soap.RoundTripper, req *types.DeleteVmfsVolumeState) (*types.DeleteVmfsVolumeStateResponse, error) { - var reqBody, resBody DeleteVmfsVolumeStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeleteVsanObjectsBody struct { - Req *types.DeleteVsanObjects `xml:"urn:vim25 DeleteVsanObjects,omitempty"` - Res *types.DeleteVsanObjectsResponse `xml:"DeleteVsanObjectsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeleteVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } - -func DeleteVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.DeleteVsanObjects) (*types.DeleteVsanObjectsResponse, error) { - var reqBody, resBody DeleteVsanObjectsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeselectVnicBody struct { - Req *types.DeselectVnic `xml:"urn:vim25 DeselectVnic,omitempty"` - Res *types.DeselectVnicResponse `xml:"DeselectVnicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeselectVnicBody) Fault() *soap.Fault { return b.Fault_ } - -func DeselectVnic(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnic) (*types.DeselectVnicResponse, error) { - var reqBody, resBody DeselectVnicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeselectVnicForNicTypeBody struct { - Req *types.DeselectVnicForNicType `xml:"urn:vim25 DeselectVnicForNicType,omitempty"` - Res *types.DeselectVnicForNicTypeResponse `xml:"DeselectVnicForNicTypeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeselectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ } - -func DeselectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.DeselectVnicForNicType) (*types.DeselectVnicForNicTypeResponse, error) { - var reqBody, resBody DeselectVnicForNicTypeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyChildrenBody struct { - Req *types.DestroyChildren `xml:"urn:vim25 DestroyChildren,omitempty"` - Res *types.DestroyChildrenResponse `xml:"DestroyChildrenResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyChildrenBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyChildren(ctx context.Context, r soap.RoundTripper, req *types.DestroyChildren) (*types.DestroyChildrenResponse, error) { - var reqBody, resBody DestroyChildrenBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyCollectorBody struct { - Req *types.DestroyCollector `xml:"urn:vim25 DestroyCollector,omitempty"` - Res *types.DestroyCollectorResponse `xml:"DestroyCollectorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyCollectorBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyCollector) (*types.DestroyCollectorResponse, error) { - var reqBody, resBody DestroyCollectorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyDatastoreBody struct { - Req *types.DestroyDatastore `xml:"urn:vim25 DestroyDatastore,omitempty"` - Res *types.DestroyDatastoreResponse `xml:"DestroyDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyDatastore(ctx context.Context, r soap.RoundTripper, req *types.DestroyDatastore) (*types.DestroyDatastoreResponse, error) { - var reqBody, resBody DestroyDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyIpPoolBody struct { - Req *types.DestroyIpPool `xml:"urn:vim25 DestroyIpPool,omitempty"` - Res *types.DestroyIpPoolResponse `xml:"DestroyIpPoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyIpPoolBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyIpPool(ctx context.Context, r soap.RoundTripper, req *types.DestroyIpPool) (*types.DestroyIpPoolResponse, error) { - var reqBody, resBody DestroyIpPoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyNetworkBody struct { - Req *types.DestroyNetwork `xml:"urn:vim25 DestroyNetwork,omitempty"` - Res *types.DestroyNetworkResponse `xml:"DestroyNetworkResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyNetworkBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyNetwork(ctx context.Context, r soap.RoundTripper, req *types.DestroyNetwork) (*types.DestroyNetworkResponse, error) { - var reqBody, resBody DestroyNetworkBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyProfileBody struct { - Req *types.DestroyProfile `xml:"urn:vim25 DestroyProfile,omitempty"` - Res *types.DestroyProfileResponse `xml:"DestroyProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyProfile(ctx context.Context, r soap.RoundTripper, req *types.DestroyProfile) (*types.DestroyProfileResponse, error) { - var reqBody, resBody DestroyProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyPropertyCollectorBody struct { - Req *types.DestroyPropertyCollector `xml:"urn:vim25 DestroyPropertyCollector,omitempty"` - Res *types.DestroyPropertyCollectorResponse `xml:"DestroyPropertyCollectorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyPropertyCollectorBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyPropertyCollector(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyCollector) (*types.DestroyPropertyCollectorResponse, error) { - var reqBody, resBody DestroyPropertyCollectorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyPropertyFilterBody struct { - Req *types.DestroyPropertyFilter `xml:"urn:vim25 DestroyPropertyFilter,omitempty"` - Res *types.DestroyPropertyFilterResponse `xml:"DestroyPropertyFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyPropertyFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyPropertyFilter(ctx context.Context, r soap.RoundTripper, req *types.DestroyPropertyFilter) (*types.DestroyPropertyFilterResponse, error) { - var reqBody, resBody DestroyPropertyFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyVffsBody struct { - Req *types.DestroyVffs `xml:"urn:vim25 DestroyVffs,omitempty"` - Res *types.DestroyVffsResponse `xml:"DestroyVffsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyVffsBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyVffs(ctx context.Context, r soap.RoundTripper, req *types.DestroyVffs) (*types.DestroyVffsResponse, error) { - var reqBody, resBody DestroyVffsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyViewBody struct { - Req *types.DestroyView `xml:"urn:vim25 DestroyView,omitempty"` - Res *types.DestroyViewResponse `xml:"DestroyViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyViewBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyView(ctx context.Context, r soap.RoundTripper, req *types.DestroyView) (*types.DestroyViewResponse, error) { - var reqBody, resBody DestroyViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type Destroy_TaskBody struct { - Req *types.Destroy_Task `xml:"urn:vim25 Destroy_Task,omitempty"` - Res *types.Destroy_TaskResponse `xml:"Destroy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *Destroy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func Destroy_Task(ctx context.Context, r soap.RoundTripper, req *types.Destroy_Task) (*types.Destroy_TaskResponse, error) { - var reqBody, resBody Destroy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DetachDisk_TaskBody struct { - Req *types.DetachDisk_Task `xml:"urn:vim25 DetachDisk_Task,omitempty"` - Res *types.DetachDisk_TaskResponse `xml:"DetachDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DetachDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DetachDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachDisk_Task) (*types.DetachDisk_TaskResponse, error) { - var reqBody, resBody DetachDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DetachScsiLunBody struct { - Req *types.DetachScsiLun `xml:"urn:vim25 DetachScsiLun,omitempty"` - Res *types.DetachScsiLunResponse `xml:"DetachScsiLunResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DetachScsiLunBody) Fault() *soap.Fault { return b.Fault_ } - -func DetachScsiLun(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLun) (*types.DetachScsiLunResponse, error) { - var reqBody, resBody DetachScsiLunBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DetachScsiLunEx_TaskBody struct { - Req *types.DetachScsiLunEx_Task `xml:"urn:vim25 DetachScsiLunEx_Task,omitempty"` - Res *types.DetachScsiLunEx_TaskResponse `xml:"DetachScsiLunEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DetachScsiLunEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DetachScsiLunEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DetachScsiLunEx_Task) (*types.DetachScsiLunEx_TaskResponse, error) { - var reqBody, resBody DetachScsiLunEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DetachTagFromVStorageObjectBody struct { - Req *types.DetachTagFromVStorageObject `xml:"urn:vim25 DetachTagFromVStorageObject,omitempty"` - Res *types.DetachTagFromVStorageObjectResponse `xml:"DetachTagFromVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DetachTagFromVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func DetachTagFromVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.DetachTagFromVStorageObject) (*types.DetachTagFromVStorageObjectResponse, error) { - var reqBody, resBody DetachTagFromVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableAlarmBody struct { - Req *types.DisableAlarm `xml:"urn:vim25 DisableAlarm,omitempty"` - Res *types.DisableAlarmResponse `xml:"DisableAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableAlarm(ctx context.Context, r soap.RoundTripper, req *types.DisableAlarm) (*types.DisableAlarmResponse, error) { - var reqBody, resBody DisableAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableClusteredVmdkSupportBody struct { - Req *types.DisableClusteredVmdkSupport `xml:"urn:vim25 DisableClusteredVmdkSupport,omitempty"` - Res *types.DisableClusteredVmdkSupportResponse `xml:"DisableClusteredVmdkSupportResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableClusteredVmdkSupportBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableClusteredVmdkSupport(ctx context.Context, r soap.RoundTripper, req *types.DisableClusteredVmdkSupport) (*types.DisableClusteredVmdkSupportResponse, error) { - var reqBody, resBody DisableClusteredVmdkSupportBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableEvcMode_TaskBody struct { - Req *types.DisableEvcMode_Task `xml:"urn:vim25 DisableEvcMode_Task,omitempty"` - Res *types.DisableEvcMode_TaskResponse `xml:"DisableEvcMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableEvcMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableEvcMode_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableEvcMode_Task) (*types.DisableEvcMode_TaskResponse, error) { - var reqBody, resBody DisableEvcMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableFeatureBody struct { - Req *types.DisableFeature `xml:"urn:vim25 DisableFeature,omitempty"` - Res *types.DisableFeatureResponse `xml:"DisableFeatureResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableFeatureBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableFeature(ctx context.Context, r soap.RoundTripper, req *types.DisableFeature) (*types.DisableFeatureResponse, error) { - var reqBody, resBody DisableFeatureBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableHyperThreadingBody struct { - Req *types.DisableHyperThreading `xml:"urn:vim25 DisableHyperThreading,omitempty"` - Res *types.DisableHyperThreadingResponse `xml:"DisableHyperThreadingResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.DisableHyperThreading) (*types.DisableHyperThreadingResponse, error) { - var reqBody, resBody DisableHyperThreadingBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableMultipathPathBody struct { - Req *types.DisableMultipathPath `xml:"urn:vim25 DisableMultipathPath,omitempty"` - Res *types.DisableMultipathPathResponse `xml:"DisableMultipathPathResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.DisableMultipathPath) (*types.DisableMultipathPathResponse, error) { - var reqBody, resBody DisableMultipathPathBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableRulesetBody struct { - Req *types.DisableRuleset `xml:"urn:vim25 DisableRuleset,omitempty"` - Res *types.DisableRulesetResponse `xml:"DisableRulesetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableRulesetBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableRuleset(ctx context.Context, r soap.RoundTripper, req *types.DisableRuleset) (*types.DisableRulesetResponse, error) { - var reqBody, resBody DisableRulesetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableSecondaryVM_TaskBody struct { - Req *types.DisableSecondaryVM_Task `xml:"urn:vim25 DisableSecondaryVM_Task,omitempty"` - Res *types.DisableSecondaryVM_TaskResponse `xml:"DisableSecondaryVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.DisableSecondaryVM_Task) (*types.DisableSecondaryVM_TaskResponse, error) { - var reqBody, resBody DisableSecondaryVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisableSmartCardAuthenticationBody struct { - Req *types.DisableSmartCardAuthentication `xml:"urn:vim25 DisableSmartCardAuthentication,omitempty"` - Res *types.DisableSmartCardAuthenticationResponse `xml:"DisableSmartCardAuthenticationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ } - -func DisableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.DisableSmartCardAuthentication) (*types.DisableSmartCardAuthenticationResponse, error) { - var reqBody, resBody DisableSmartCardAuthenticationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisconnectHost_TaskBody struct { - Req *types.DisconnectHost_Task `xml:"urn:vim25 DisconnectHost_Task,omitempty"` - Res *types.DisconnectHost_TaskResponse `xml:"DisconnectHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DisconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.DisconnectHost_Task) (*types.DisconnectHost_TaskResponse, error) { - var reqBody, resBody DisconnectHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisconnectNvmeControllerBody struct { - Req *types.DisconnectNvmeController `xml:"urn:vim25 DisconnectNvmeController,omitempty"` - Res *types.DisconnectNvmeControllerResponse `xml:"DisconnectNvmeControllerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisconnectNvmeControllerBody) Fault() *soap.Fault { return b.Fault_ } - -func DisconnectNvmeController(ctx context.Context, r soap.RoundTripper, req *types.DisconnectNvmeController) (*types.DisconnectNvmeControllerResponse, error) { - var reqBody, resBody DisconnectNvmeControllerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DisconnectNvmeControllerEx_TaskBody struct { - Req *types.DisconnectNvmeControllerEx_Task `xml:"urn:vim25 DisconnectNvmeControllerEx_Task,omitempty"` - Res *types.DisconnectNvmeControllerEx_TaskResponse `xml:"DisconnectNvmeControllerEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DisconnectNvmeControllerEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DisconnectNvmeControllerEx_Task(ctx context.Context, r soap.RoundTripper, req *types.DisconnectNvmeControllerEx_Task) (*types.DisconnectNvmeControllerEx_TaskResponse, error) { - var reqBody, resBody DisconnectNvmeControllerEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DiscoverFcoeHbasBody struct { - Req *types.DiscoverFcoeHbas `xml:"urn:vim25 DiscoverFcoeHbas,omitempty"` - Res *types.DiscoverFcoeHbasResponse `xml:"DiscoverFcoeHbasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DiscoverFcoeHbasBody) Fault() *soap.Fault { return b.Fault_ } - -func DiscoverFcoeHbas(ctx context.Context, r soap.RoundTripper, req *types.DiscoverFcoeHbas) (*types.DiscoverFcoeHbasResponse, error) { - var reqBody, resBody DiscoverFcoeHbasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DiscoverNvmeControllersBody struct { - Req *types.DiscoverNvmeControllers `xml:"urn:vim25 DiscoverNvmeControllers,omitempty"` - Res *types.DiscoverNvmeControllersResponse `xml:"DiscoverNvmeControllersResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DiscoverNvmeControllersBody) Fault() *soap.Fault { return b.Fault_ } - -func DiscoverNvmeControllers(ctx context.Context, r soap.RoundTripper, req *types.DiscoverNvmeControllers) (*types.DiscoverNvmeControllersResponse, error) { - var reqBody, resBody DiscoverNvmeControllersBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DissociateProfileBody struct { - Req *types.DissociateProfile `xml:"urn:vim25 DissociateProfile,omitempty"` - Res *types.DissociateProfileResponse `xml:"DissociateProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DissociateProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func DissociateProfile(ctx context.Context, r soap.RoundTripper, req *types.DissociateProfile) (*types.DissociateProfileResponse, error) { - var reqBody, resBody DissociateProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DoesCustomizationSpecExistBody struct { - Req *types.DoesCustomizationSpecExist `xml:"urn:vim25 DoesCustomizationSpecExist,omitempty"` - Res *types.DoesCustomizationSpecExistResponse `xml:"DoesCustomizationSpecExistResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DoesCustomizationSpecExistBody) Fault() *soap.Fault { return b.Fault_ } - -func DoesCustomizationSpecExist(ctx context.Context, r soap.RoundTripper, req *types.DoesCustomizationSpecExist) (*types.DoesCustomizationSpecExistResponse, error) { - var reqBody, resBody DoesCustomizationSpecExistBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DownloadDescriptionTreeBody struct { - Req *types.DownloadDescriptionTree `xml:"urn:vim25 DownloadDescriptionTree,omitempty"` - Res *types.DownloadDescriptionTreeResponse `xml:"DownloadDescriptionTreeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DownloadDescriptionTreeBody) Fault() *soap.Fault { return b.Fault_ } - -func DownloadDescriptionTree(ctx context.Context, r soap.RoundTripper, req *types.DownloadDescriptionTree) (*types.DownloadDescriptionTreeResponse, error) { - var reqBody, resBody DownloadDescriptionTreeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DropConnectionsBody struct { - Req *types.DropConnections `xml:"urn:vim25 DropConnections,omitempty"` - Res *types.DropConnectionsResponse `xml:"DropConnectionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DropConnectionsBody) Fault() *soap.Fault { return b.Fault_ } - -func DropConnections(ctx context.Context, r soap.RoundTripper, req *types.DropConnections) (*types.DropConnectionsResponse, error) { - var reqBody, resBody DropConnectionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DuplicateCustomizationSpecBody struct { - Req *types.DuplicateCustomizationSpec `xml:"urn:vim25 DuplicateCustomizationSpec,omitempty"` - Res *types.DuplicateCustomizationSpecResponse `xml:"DuplicateCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DuplicateCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func DuplicateCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.DuplicateCustomizationSpec) (*types.DuplicateCustomizationSpecResponse, error) { - var reqBody, resBody DuplicateCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DvsReconfigureVmVnicNetworkResourcePool_TaskBody struct { - Req *types.DvsReconfigureVmVnicNetworkResourcePool_Task `xml:"urn:vim25 DvsReconfigureVmVnicNetworkResourcePool_Task,omitempty"` - Res *types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse `xml:"DvsReconfigureVmVnicNetworkResourcePool_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DvsReconfigureVmVnicNetworkResourcePool_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DvsReconfigureVmVnicNetworkResourcePool_Task(ctx context.Context, r soap.RoundTripper, req *types.DvsReconfigureVmVnicNetworkResourcePool_Task) (*types.DvsReconfigureVmVnicNetworkResourcePool_TaskResponse, error) { - var reqBody, resBody DvsReconfigureVmVnicNetworkResourcePool_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EagerZeroVirtualDisk_TaskBody struct { - Req *types.EagerZeroVirtualDisk_Task `xml:"urn:vim25 EagerZeroVirtualDisk_Task,omitempty"` - Res *types.EagerZeroVirtualDisk_TaskResponse `xml:"EagerZeroVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EagerZeroVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func EagerZeroVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.EagerZeroVirtualDisk_Task) (*types.EagerZeroVirtualDisk_TaskResponse, error) { - var reqBody, resBody EagerZeroVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableAlarmBody struct { - Req *types.EnableAlarm `xml:"urn:vim25 EnableAlarm,omitempty"` - Res *types.EnableAlarmResponse `xml:"EnableAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableAlarm(ctx context.Context, r soap.RoundTripper, req *types.EnableAlarm) (*types.EnableAlarmResponse, error) { - var reqBody, resBody EnableAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableAlarmActionsBody struct { - Req *types.EnableAlarmActions `xml:"urn:vim25 EnableAlarmActions,omitempty"` - Res *types.EnableAlarmActionsResponse `xml:"EnableAlarmActionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableAlarmActionsBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableAlarmActions(ctx context.Context, r soap.RoundTripper, req *types.EnableAlarmActions) (*types.EnableAlarmActionsResponse, error) { - var reqBody, resBody EnableAlarmActionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableClusteredVmdkSupportBody struct { - Req *types.EnableClusteredVmdkSupport `xml:"urn:vim25 EnableClusteredVmdkSupport,omitempty"` - Res *types.EnableClusteredVmdkSupportResponse `xml:"EnableClusteredVmdkSupportResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableClusteredVmdkSupportBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableClusteredVmdkSupport(ctx context.Context, r soap.RoundTripper, req *types.EnableClusteredVmdkSupport) (*types.EnableClusteredVmdkSupportResponse, error) { - var reqBody, resBody EnableClusteredVmdkSupportBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableCryptoBody struct { - Req *types.EnableCrypto `xml:"urn:vim25 EnableCrypto,omitempty"` - Res *types.EnableCryptoResponse `xml:"EnableCryptoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableCryptoBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableCrypto(ctx context.Context, r soap.RoundTripper, req *types.EnableCrypto) (*types.EnableCryptoResponse, error) { - var reqBody, resBody EnableCryptoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableFeatureBody struct { - Req *types.EnableFeature `xml:"urn:vim25 EnableFeature,omitempty"` - Res *types.EnableFeatureResponse `xml:"EnableFeatureResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableFeatureBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableFeature(ctx context.Context, r soap.RoundTripper, req *types.EnableFeature) (*types.EnableFeatureResponse, error) { - var reqBody, resBody EnableFeatureBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableHyperThreadingBody struct { - Req *types.EnableHyperThreading `xml:"urn:vim25 EnableHyperThreading,omitempty"` - Res *types.EnableHyperThreadingResponse `xml:"EnableHyperThreadingResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableHyperThreadingBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableHyperThreading(ctx context.Context, r soap.RoundTripper, req *types.EnableHyperThreading) (*types.EnableHyperThreadingResponse, error) { - var reqBody, resBody EnableHyperThreadingBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableMultipathPathBody struct { - Req *types.EnableMultipathPath `xml:"urn:vim25 EnableMultipathPath,omitempty"` - Res *types.EnableMultipathPathResponse `xml:"EnableMultipathPathResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableMultipathPathBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableMultipathPath(ctx context.Context, r soap.RoundTripper, req *types.EnableMultipathPath) (*types.EnableMultipathPathResponse, error) { - var reqBody, resBody EnableMultipathPathBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableNetworkResourceManagementBody struct { - Req *types.EnableNetworkResourceManagement `xml:"urn:vim25 EnableNetworkResourceManagement,omitempty"` - Res *types.EnableNetworkResourceManagementResponse `xml:"EnableNetworkResourceManagementResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableNetworkResourceManagementBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableNetworkResourceManagement(ctx context.Context, r soap.RoundTripper, req *types.EnableNetworkResourceManagement) (*types.EnableNetworkResourceManagementResponse, error) { - var reqBody, resBody EnableNetworkResourceManagementBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableRulesetBody struct { - Req *types.EnableRuleset `xml:"urn:vim25 EnableRuleset,omitempty"` - Res *types.EnableRulesetResponse `xml:"EnableRulesetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableRulesetBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableRuleset(ctx context.Context, r soap.RoundTripper, req *types.EnableRuleset) (*types.EnableRulesetResponse, error) { - var reqBody, resBody EnableRulesetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableSecondaryVM_TaskBody struct { - Req *types.EnableSecondaryVM_Task `xml:"urn:vim25 EnableSecondaryVM_Task,omitempty"` - Res *types.EnableSecondaryVM_TaskResponse `xml:"EnableSecondaryVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableSecondaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableSecondaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.EnableSecondaryVM_Task) (*types.EnableSecondaryVM_TaskResponse, error) { - var reqBody, resBody EnableSecondaryVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnableSmartCardAuthenticationBody struct { - Req *types.EnableSmartCardAuthentication `xml:"urn:vim25 EnableSmartCardAuthentication,omitempty"` - Res *types.EnableSmartCardAuthenticationResponse `xml:"EnableSmartCardAuthenticationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnableSmartCardAuthenticationBody) Fault() *soap.Fault { return b.Fault_ } - -func EnableSmartCardAuthentication(ctx context.Context, r soap.RoundTripper, req *types.EnableSmartCardAuthentication) (*types.EnableSmartCardAuthenticationResponse, error) { - var reqBody, resBody EnableSmartCardAuthenticationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnterLockdownModeBody struct { - Req *types.EnterLockdownMode `xml:"urn:vim25 EnterLockdownMode,omitempty"` - Res *types.EnterLockdownModeResponse `xml:"EnterLockdownModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnterLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } - -func EnterLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.EnterLockdownMode) (*types.EnterLockdownModeResponse, error) { - var reqBody, resBody EnterLockdownModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EnterMaintenanceMode_TaskBody struct { - Req *types.EnterMaintenanceMode_Task `xml:"urn:vim25 EnterMaintenanceMode_Task,omitempty"` - Res *types.EnterMaintenanceMode_TaskResponse `xml:"EnterMaintenanceMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EnterMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func EnterMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.EnterMaintenanceMode_Task) (*types.EnterMaintenanceMode_TaskResponse, error) { - var reqBody, resBody EnterMaintenanceMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EstimateDatabaseSizeBody struct { - Req *types.EstimateDatabaseSize `xml:"urn:vim25 EstimateDatabaseSize,omitempty"` - Res *types.EstimateDatabaseSizeResponse `xml:"EstimateDatabaseSizeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EstimateDatabaseSizeBody) Fault() *soap.Fault { return b.Fault_ } - -func EstimateDatabaseSize(ctx context.Context, r soap.RoundTripper, req *types.EstimateDatabaseSize) (*types.EstimateDatabaseSizeResponse, error) { - var reqBody, resBody EstimateDatabaseSizeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EstimateStorageForConsolidateSnapshots_TaskBody struct { - Req *types.EstimateStorageForConsolidateSnapshots_Task `xml:"urn:vim25 EstimateStorageForConsolidateSnapshots_Task,omitempty"` - Res *types.EstimateStorageForConsolidateSnapshots_TaskResponse `xml:"EstimateStorageForConsolidateSnapshots_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EstimateStorageForConsolidateSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func EstimateStorageForConsolidateSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.EstimateStorageForConsolidateSnapshots_Task) (*types.EstimateStorageForConsolidateSnapshots_TaskResponse, error) { - var reqBody, resBody EstimateStorageForConsolidateSnapshots_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EsxAgentHostManagerUpdateConfigBody struct { - Req *types.EsxAgentHostManagerUpdateConfig `xml:"urn:vim25 EsxAgentHostManagerUpdateConfig,omitempty"` - Res *types.EsxAgentHostManagerUpdateConfigResponse `xml:"EsxAgentHostManagerUpdateConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EsxAgentHostManagerUpdateConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func EsxAgentHostManagerUpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.EsxAgentHostManagerUpdateConfig) (*types.EsxAgentHostManagerUpdateConfigResponse, error) { - var reqBody, resBody EsxAgentHostManagerUpdateConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EvacuateVsanNode_TaskBody struct { - Req *types.EvacuateVsanNode_Task `xml:"urn:vim25 EvacuateVsanNode_Task,omitempty"` - Res *types.EvacuateVsanNode_TaskResponse `xml:"EvacuateVsanNode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EvacuateVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func EvacuateVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.EvacuateVsanNode_Task) (*types.EvacuateVsanNode_TaskResponse, error) { - var reqBody, resBody EvacuateVsanNode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type EvcManagerBody struct { - Req *types.EvcManager `xml:"urn:vim25 EvcManager,omitempty"` - Res *types.EvcManagerResponse `xml:"EvcManagerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *EvcManagerBody) Fault() *soap.Fault { return b.Fault_ } - -func EvcManager(ctx context.Context, r soap.RoundTripper, req *types.EvcManager) (*types.EvcManagerResponse, error) { - var reqBody, resBody EvcManagerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExecuteHostProfileBody struct { - Req *types.ExecuteHostProfile `xml:"urn:vim25 ExecuteHostProfile,omitempty"` - Res *types.ExecuteHostProfileResponse `xml:"ExecuteHostProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExecuteHostProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func ExecuteHostProfile(ctx context.Context, r soap.RoundTripper, req *types.ExecuteHostProfile) (*types.ExecuteHostProfileResponse, error) { - var reqBody, resBody ExecuteHostProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExecuteSimpleCommandBody struct { - Req *types.ExecuteSimpleCommand `xml:"urn:vim25 ExecuteSimpleCommand,omitempty"` - Res *types.ExecuteSimpleCommandResponse `xml:"ExecuteSimpleCommandResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExecuteSimpleCommandBody) Fault() *soap.Fault { return b.Fault_ } - -func ExecuteSimpleCommand(ctx context.Context, r soap.RoundTripper, req *types.ExecuteSimpleCommand) (*types.ExecuteSimpleCommandResponse, error) { - var reqBody, resBody ExecuteSimpleCommandBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExitLockdownModeBody struct { - Req *types.ExitLockdownMode `xml:"urn:vim25 ExitLockdownMode,omitempty"` - Res *types.ExitLockdownModeResponse `xml:"ExitLockdownModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExitLockdownModeBody) Fault() *soap.Fault { return b.Fault_ } - -func ExitLockdownMode(ctx context.Context, r soap.RoundTripper, req *types.ExitLockdownMode) (*types.ExitLockdownModeResponse, error) { - var reqBody, resBody ExitLockdownModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExitMaintenanceMode_TaskBody struct { - Req *types.ExitMaintenanceMode_Task `xml:"urn:vim25 ExitMaintenanceMode_Task,omitempty"` - Res *types.ExitMaintenanceMode_TaskResponse `xml:"ExitMaintenanceMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExitMaintenanceMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ExitMaintenanceMode_Task(ctx context.Context, r soap.RoundTripper, req *types.ExitMaintenanceMode_Task) (*types.ExitMaintenanceMode_TaskResponse, error) { - var reqBody, resBody ExitMaintenanceMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExpandVmfsDatastoreBody struct { - Req *types.ExpandVmfsDatastore `xml:"urn:vim25 ExpandVmfsDatastore,omitempty"` - Res *types.ExpandVmfsDatastoreResponse `xml:"ExpandVmfsDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExpandVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func ExpandVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsDatastore) (*types.ExpandVmfsDatastoreResponse, error) { - var reqBody, resBody ExpandVmfsDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExpandVmfsExtentBody struct { - Req *types.ExpandVmfsExtent `xml:"urn:vim25 ExpandVmfsExtent,omitempty"` - Res *types.ExpandVmfsExtentResponse `xml:"ExpandVmfsExtentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExpandVmfsExtentBody) Fault() *soap.Fault { return b.Fault_ } - -func ExpandVmfsExtent(ctx context.Context, r soap.RoundTripper, req *types.ExpandVmfsExtent) (*types.ExpandVmfsExtentResponse, error) { - var reqBody, resBody ExpandVmfsExtentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExportAnswerFile_TaskBody struct { - Req *types.ExportAnswerFile_Task `xml:"urn:vim25 ExportAnswerFile_Task,omitempty"` - Res *types.ExportAnswerFile_TaskResponse `xml:"ExportAnswerFile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExportAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ExportAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.ExportAnswerFile_Task) (*types.ExportAnswerFile_TaskResponse, error) { - var reqBody, resBody ExportAnswerFile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExportProfileBody struct { - Req *types.ExportProfile `xml:"urn:vim25 ExportProfile,omitempty"` - Res *types.ExportProfileResponse `xml:"ExportProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExportProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func ExportProfile(ctx context.Context, r soap.RoundTripper, req *types.ExportProfile) (*types.ExportProfileResponse, error) { - var reqBody, resBody ExportProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExportSnapshotBody struct { - Req *types.ExportSnapshot `xml:"urn:vim25 ExportSnapshot,omitempty"` - Res *types.ExportSnapshotResponse `xml:"ExportSnapshotResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExportSnapshotBody) Fault() *soap.Fault { return b.Fault_ } - -func ExportSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ExportSnapshot) (*types.ExportSnapshotResponse, error) { - var reqBody, resBody ExportSnapshotBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExportVAppBody struct { - Req *types.ExportVApp `xml:"urn:vim25 ExportVApp,omitempty"` - Res *types.ExportVAppResponse `xml:"ExportVAppResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExportVAppBody) Fault() *soap.Fault { return b.Fault_ } - -func ExportVApp(ctx context.Context, r soap.RoundTripper, req *types.ExportVApp) (*types.ExportVAppResponse, error) { - var reqBody, resBody ExportVAppBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExportVmBody struct { - Req *types.ExportVm `xml:"urn:vim25 ExportVm,omitempty"` - Res *types.ExportVmResponse `xml:"ExportVmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExportVmBody) Fault() *soap.Fault { return b.Fault_ } - -func ExportVm(ctx context.Context, r soap.RoundTripper, req *types.ExportVm) (*types.ExportVmResponse, error) { - var reqBody, resBody ExportVmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtendDisk_TaskBody struct { - Req *types.ExtendDisk_Task `xml:"urn:vim25 ExtendDisk_Task,omitempty"` - Res *types.ExtendDisk_TaskResponse `xml:"ExtendDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendDisk_Task) (*types.ExtendDisk_TaskResponse, error) { - var reqBody, resBody ExtendDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtendHCI_TaskBody struct { - Req *types.ExtendHCI_Task `xml:"urn:vim25 ExtendHCI_Task,omitempty"` - Res *types.ExtendHCI_TaskResponse `xml:"ExtendHCI_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtendHCI_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtendHCI_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendHCI_Task) (*types.ExtendHCI_TaskResponse, error) { - var reqBody, resBody ExtendHCI_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtendVffsBody struct { - Req *types.ExtendVffs `xml:"urn:vim25 ExtendVffs,omitempty"` - Res *types.ExtendVffsResponse `xml:"ExtendVffsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtendVffsBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtendVffs(ctx context.Context, r soap.RoundTripper, req *types.ExtendVffs) (*types.ExtendVffsResponse, error) { - var reqBody, resBody ExtendVffsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtendVirtualDisk_TaskBody struct { - Req *types.ExtendVirtualDisk_Task `xml:"urn:vim25 ExtendVirtualDisk_Task,omitempty"` - Res *types.ExtendVirtualDisk_TaskResponse `xml:"ExtendVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtendVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtendVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ExtendVirtualDisk_Task) (*types.ExtendVirtualDisk_TaskResponse, error) { - var reqBody, resBody ExtendVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtendVmfsDatastoreBody struct { - Req *types.ExtendVmfsDatastore `xml:"urn:vim25 ExtendVmfsDatastore,omitempty"` - Res *types.ExtendVmfsDatastoreResponse `xml:"ExtendVmfsDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtendVmfsDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtendVmfsDatastore(ctx context.Context, r soap.RoundTripper, req *types.ExtendVmfsDatastore) (*types.ExtendVmfsDatastoreResponse, error) { - var reqBody, resBody ExtendVmfsDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ExtractOvfEnvironmentBody struct { - Req *types.ExtractOvfEnvironment `xml:"urn:vim25 ExtractOvfEnvironment,omitempty"` - Res *types.ExtractOvfEnvironmentResponse `xml:"ExtractOvfEnvironmentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ExtractOvfEnvironmentBody) Fault() *soap.Fault { return b.Fault_ } - -func ExtractOvfEnvironment(ctx context.Context, r soap.RoundTripper, req *types.ExtractOvfEnvironment) (*types.ExtractOvfEnvironmentResponse, error) { - var reqBody, resBody ExtractOvfEnvironmentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchAuditRecordsBody struct { - Req *types.FetchAuditRecords `xml:"urn:vim25 FetchAuditRecords,omitempty"` - Res *types.FetchAuditRecordsResponse `xml:"FetchAuditRecordsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchAuditRecordsBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchAuditRecords(ctx context.Context, r soap.RoundTripper, req *types.FetchAuditRecords) (*types.FetchAuditRecordsResponse, error) { - var reqBody, resBody FetchAuditRecordsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchDVPortKeysBody struct { - Req *types.FetchDVPortKeys `xml:"urn:vim25 FetchDVPortKeys,omitempty"` - Res *types.FetchDVPortKeysResponse `xml:"FetchDVPortKeysResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchDVPortKeysBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchDVPortKeys(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPortKeys) (*types.FetchDVPortKeysResponse, error) { - var reqBody, resBody FetchDVPortKeysBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchDVPortsBody struct { - Req *types.FetchDVPorts `xml:"urn:vim25 FetchDVPorts,omitempty"` - Res *types.FetchDVPortsResponse `xml:"FetchDVPortsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchDVPortsBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchDVPorts(ctx context.Context, r soap.RoundTripper, req *types.FetchDVPorts) (*types.FetchDVPortsResponse, error) { - var reqBody, resBody FetchDVPortsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchSystemEventLogBody struct { - Req *types.FetchSystemEventLog `xml:"urn:vim25 FetchSystemEventLog,omitempty"` - Res *types.FetchSystemEventLogResponse `xml:"FetchSystemEventLogResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchSystemEventLogBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchSystemEventLog(ctx context.Context, r soap.RoundTripper, req *types.FetchSystemEventLog) (*types.FetchSystemEventLogResponse, error) { - var reqBody, resBody FetchSystemEventLogBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchUserPrivilegeOnEntitiesBody struct { - Req *types.FetchUserPrivilegeOnEntities `xml:"urn:vim25 FetchUserPrivilegeOnEntities,omitempty"` - Res *types.FetchUserPrivilegeOnEntitiesResponse `xml:"FetchUserPrivilegeOnEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.FetchUserPrivilegeOnEntities) (*types.FetchUserPrivilegeOnEntitiesResponse, error) { - var reqBody, resBody FetchUserPrivilegeOnEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindAllByDnsNameBody struct { - Req *types.FindAllByDnsName `xml:"urn:vim25 FindAllByDnsName,omitempty"` - Res *types.FindAllByDnsNameResponse `xml:"FindAllByDnsNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindAllByDnsNameBody) Fault() *soap.Fault { return b.Fault_ } - -func FindAllByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindAllByDnsName) (*types.FindAllByDnsNameResponse, error) { - var reqBody, resBody FindAllByDnsNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindAllByIpBody struct { - Req *types.FindAllByIp `xml:"urn:vim25 FindAllByIp,omitempty"` - Res *types.FindAllByIpResponse `xml:"FindAllByIpResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindAllByIpBody) Fault() *soap.Fault { return b.Fault_ } - -func FindAllByIp(ctx context.Context, r soap.RoundTripper, req *types.FindAllByIp) (*types.FindAllByIpResponse, error) { - var reqBody, resBody FindAllByIpBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindAllByUuidBody struct { - Req *types.FindAllByUuid `xml:"urn:vim25 FindAllByUuid,omitempty"` - Res *types.FindAllByUuidResponse `xml:"FindAllByUuidResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindAllByUuidBody) Fault() *soap.Fault { return b.Fault_ } - -func FindAllByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindAllByUuid) (*types.FindAllByUuidResponse, error) { - var reqBody, resBody FindAllByUuidBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindAssociatedProfileBody struct { - Req *types.FindAssociatedProfile `xml:"urn:vim25 FindAssociatedProfile,omitempty"` - Res *types.FindAssociatedProfileResponse `xml:"FindAssociatedProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindAssociatedProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func FindAssociatedProfile(ctx context.Context, r soap.RoundTripper, req *types.FindAssociatedProfile) (*types.FindAssociatedProfileResponse, error) { - var reqBody, resBody FindAssociatedProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindByDatastorePathBody struct { - Req *types.FindByDatastorePath `xml:"urn:vim25 FindByDatastorePath,omitempty"` - Res *types.FindByDatastorePathResponse `xml:"FindByDatastorePathResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindByDatastorePathBody) Fault() *soap.Fault { return b.Fault_ } - -func FindByDatastorePath(ctx context.Context, r soap.RoundTripper, req *types.FindByDatastorePath) (*types.FindByDatastorePathResponse, error) { - var reqBody, resBody FindByDatastorePathBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindByDnsNameBody struct { - Req *types.FindByDnsName `xml:"urn:vim25 FindByDnsName,omitempty"` - Res *types.FindByDnsNameResponse `xml:"FindByDnsNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindByDnsNameBody) Fault() *soap.Fault { return b.Fault_ } - -func FindByDnsName(ctx context.Context, r soap.RoundTripper, req *types.FindByDnsName) (*types.FindByDnsNameResponse, error) { - var reqBody, resBody FindByDnsNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindByInventoryPathBody struct { - Req *types.FindByInventoryPath `xml:"urn:vim25 FindByInventoryPath,omitempty"` - Res *types.FindByInventoryPathResponse `xml:"FindByInventoryPathResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindByInventoryPathBody) Fault() *soap.Fault { return b.Fault_ } - -func FindByInventoryPath(ctx context.Context, r soap.RoundTripper, req *types.FindByInventoryPath) (*types.FindByInventoryPathResponse, error) { - var reqBody, resBody FindByInventoryPathBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindByIpBody struct { - Req *types.FindByIp `xml:"urn:vim25 FindByIp,omitempty"` - Res *types.FindByIpResponse `xml:"FindByIpResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindByIpBody) Fault() *soap.Fault { return b.Fault_ } - -func FindByIp(ctx context.Context, r soap.RoundTripper, req *types.FindByIp) (*types.FindByIpResponse, error) { - var reqBody, resBody FindByIpBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindByUuidBody struct { - Req *types.FindByUuid `xml:"urn:vim25 FindByUuid,omitempty"` - Res *types.FindByUuidResponse `xml:"FindByUuidResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindByUuidBody) Fault() *soap.Fault { return b.Fault_ } - -func FindByUuid(ctx context.Context, r soap.RoundTripper, req *types.FindByUuid) (*types.FindByUuidResponse, error) { - var reqBody, resBody FindByUuidBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindChildBody struct { - Req *types.FindChild `xml:"urn:vim25 FindChild,omitempty"` - Res *types.FindChildResponse `xml:"FindChildResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindChildBody) Fault() *soap.Fault { return b.Fault_ } - -func FindChild(ctx context.Context, r soap.RoundTripper, req *types.FindChild) (*types.FindChildResponse, error) { - var reqBody, resBody FindChildBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindExtensionBody struct { - Req *types.FindExtension `xml:"urn:vim25 FindExtension,omitempty"` - Res *types.FindExtensionResponse `xml:"FindExtensionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindExtensionBody) Fault() *soap.Fault { return b.Fault_ } - -func FindExtension(ctx context.Context, r soap.RoundTripper, req *types.FindExtension) (*types.FindExtensionResponse, error) { - var reqBody, resBody FindExtensionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FindRulesForVmBody struct { - Req *types.FindRulesForVm `xml:"urn:vim25 FindRulesForVm,omitempty"` - Res *types.FindRulesForVmResponse `xml:"FindRulesForVmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FindRulesForVmBody) Fault() *soap.Fault { return b.Fault_ } - -func FindRulesForVm(ctx context.Context, r soap.RoundTripper, req *types.FindRulesForVm) (*types.FindRulesForVmResponse, error) { - var reqBody, resBody FindRulesForVmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FormatVffsBody struct { - Req *types.FormatVffs `xml:"urn:vim25 FormatVffs,omitempty"` - Res *types.FormatVffsResponse `xml:"FormatVffsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FormatVffsBody) Fault() *soap.Fault { return b.Fault_ } - -func FormatVffs(ctx context.Context, r soap.RoundTripper, req *types.FormatVffs) (*types.FormatVffsResponse, error) { - var reqBody, resBody FormatVffsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FormatVmfsBody struct { - Req *types.FormatVmfs `xml:"urn:vim25 FormatVmfs,omitempty"` - Res *types.FormatVmfsResponse `xml:"FormatVmfsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FormatVmfsBody) Fault() *soap.Fault { return b.Fault_ } - -func FormatVmfs(ctx context.Context, r soap.RoundTripper, req *types.FormatVmfs) (*types.FormatVmfsResponse, error) { - var reqBody, resBody FormatVmfsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateCertificateSigningRequestBody struct { - Req *types.GenerateCertificateSigningRequest `xml:"urn:vim25 GenerateCertificateSigningRequest,omitempty"` - Res *types.GenerateCertificateSigningRequestResponse `xml:"GenerateCertificateSigningRequestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateCertificateSigningRequestBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateCertificateSigningRequest(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequest) (*types.GenerateCertificateSigningRequestResponse, error) { - var reqBody, resBody GenerateCertificateSigningRequestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateCertificateSigningRequestByDnBody struct { - Req *types.GenerateCertificateSigningRequestByDn `xml:"urn:vim25 GenerateCertificateSigningRequestByDn,omitempty"` - Res *types.GenerateCertificateSigningRequestByDnResponse `xml:"GenerateCertificateSigningRequestByDnResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateCertificateSigningRequestByDnBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateCertificateSigningRequestByDn(ctx context.Context, r soap.RoundTripper, req *types.GenerateCertificateSigningRequestByDn) (*types.GenerateCertificateSigningRequestByDnResponse, error) { - var reqBody, resBody GenerateCertificateSigningRequestByDnBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateClientCsrBody struct { - Req *types.GenerateClientCsr `xml:"urn:vim25 GenerateClientCsr,omitempty"` - Res *types.GenerateClientCsrResponse `xml:"GenerateClientCsrResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateClientCsrBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateClientCsr(ctx context.Context, r soap.RoundTripper, req *types.GenerateClientCsr) (*types.GenerateClientCsrResponse, error) { - var reqBody, resBody GenerateClientCsrBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateConfigTaskListBody struct { - Req *types.GenerateConfigTaskList `xml:"urn:vim25 GenerateConfigTaskList,omitempty"` - Res *types.GenerateConfigTaskListResponse `xml:"GenerateConfigTaskListResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateConfigTaskListBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateConfigTaskList(ctx context.Context, r soap.RoundTripper, req *types.GenerateConfigTaskList) (*types.GenerateConfigTaskListResponse, error) { - var reqBody, resBody GenerateConfigTaskListBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateHostConfigTaskSpec_TaskBody struct { - Req *types.GenerateHostConfigTaskSpec_Task `xml:"urn:vim25 GenerateHostConfigTaskSpec_Task,omitempty"` - Res *types.GenerateHostConfigTaskSpec_TaskResponse `xml:"GenerateHostConfigTaskSpec_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateHostConfigTaskSpec_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateHostConfigTaskSpec_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostConfigTaskSpec_Task) (*types.GenerateHostConfigTaskSpec_TaskResponse, error) { - var reqBody, resBody GenerateHostConfigTaskSpec_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateHostProfileTaskList_TaskBody struct { - Req *types.GenerateHostProfileTaskList_Task `xml:"urn:vim25 GenerateHostProfileTaskList_Task,omitempty"` - Res *types.GenerateHostProfileTaskList_TaskResponse `xml:"GenerateHostProfileTaskList_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateHostProfileTaskList_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateHostProfileTaskList_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateHostProfileTaskList_Task) (*types.GenerateHostProfileTaskList_TaskResponse, error) { - var reqBody, resBody GenerateHostProfileTaskList_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateKeyBody struct { - Req *types.GenerateKey `xml:"urn:vim25 GenerateKey,omitempty"` - Res *types.GenerateKeyResponse `xml:"GenerateKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateKey(ctx context.Context, r soap.RoundTripper, req *types.GenerateKey) (*types.GenerateKeyResponse, error) { - var reqBody, resBody GenerateKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateLogBundles_TaskBody struct { - Req *types.GenerateLogBundles_Task `xml:"urn:vim25 GenerateLogBundles_Task,omitempty"` - Res *types.GenerateLogBundles_TaskResponse `xml:"GenerateLogBundles_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateLogBundles_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateLogBundles_Task(ctx context.Context, r soap.RoundTripper, req *types.GenerateLogBundles_Task) (*types.GenerateLogBundles_TaskResponse, error) { - var reqBody, resBody GenerateLogBundles_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GenerateSelfSignedClientCertBody struct { - Req *types.GenerateSelfSignedClientCert `xml:"urn:vim25 GenerateSelfSignedClientCert,omitempty"` - Res *types.GenerateSelfSignedClientCertResponse `xml:"GenerateSelfSignedClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GenerateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func GenerateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.GenerateSelfSignedClientCert) (*types.GenerateSelfSignedClientCertResponse, error) { - var reqBody, resBody GenerateSelfSignedClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetAlarmBody struct { - Req *types.GetAlarm `xml:"urn:vim25 GetAlarm,omitempty"` - Res *types.GetAlarmResponse `xml:"GetAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func GetAlarm(ctx context.Context, r soap.RoundTripper, req *types.GetAlarm) (*types.GetAlarmResponse, error) { - var reqBody, resBody GetAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetAlarmStateBody struct { - Req *types.GetAlarmState `xml:"urn:vim25 GetAlarmState,omitempty"` - Res *types.GetAlarmStateResponse `xml:"GetAlarmStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetAlarmStateBody) Fault() *soap.Fault { return b.Fault_ } - -func GetAlarmState(ctx context.Context, r soap.RoundTripper, req *types.GetAlarmState) (*types.GetAlarmStateResponse, error) { - var reqBody, resBody GetAlarmStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetCustomizationSpecBody struct { - Req *types.GetCustomizationSpec `xml:"urn:vim25 GetCustomizationSpec,omitempty"` - Res *types.GetCustomizationSpecResponse `xml:"GetCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func GetCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.GetCustomizationSpec) (*types.GetCustomizationSpecResponse, error) { - var reqBody, resBody GetCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetDefaultKmsClusterBody struct { - Req *types.GetDefaultKmsCluster `xml:"urn:vim25 GetDefaultKmsCluster,omitempty"` - Res *types.GetDefaultKmsClusterResponse `xml:"GetDefaultKmsClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetDefaultKmsClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func GetDefaultKmsCluster(ctx context.Context, r soap.RoundTripper, req *types.GetDefaultKmsCluster) (*types.GetDefaultKmsClusterResponse, error) { - var reqBody, resBody GetDefaultKmsClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetPublicKeyBody struct { - Req *types.GetPublicKey `xml:"urn:vim25 GetPublicKey,omitempty"` - Res *types.GetPublicKeyResponse `xml:"GetPublicKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func GetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.GetPublicKey) (*types.GetPublicKeyResponse, error) { - var reqBody, resBody GetPublicKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetResourceUsageBody struct { - Req *types.GetResourceUsage `xml:"urn:vim25 GetResourceUsage,omitempty"` - Res *types.GetResourceUsageResponse `xml:"GetResourceUsageResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetResourceUsageBody) Fault() *soap.Fault { return b.Fault_ } - -func GetResourceUsage(ctx context.Context, r soap.RoundTripper, req *types.GetResourceUsage) (*types.GetResourceUsageResponse, error) { - var reqBody, resBody GetResourceUsageBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetSiteInfoBody struct { - Req *types.GetSiteInfo `xml:"urn:vim25 GetSiteInfo,omitempty"` - Res *types.GetSiteInfoResponse `xml:"GetSiteInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetSiteInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func GetSiteInfo(ctx context.Context, r soap.RoundTripper, req *types.GetSiteInfo) (*types.GetSiteInfoResponse, error) { - var reqBody, resBody GetSiteInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetSystemVMsRestrictedDatastoresBody struct { - Req *types.GetSystemVMsRestrictedDatastores `xml:"urn:vim25 GetSystemVMsRestrictedDatastores,omitempty"` - Res *types.GetSystemVMsRestrictedDatastoresResponse `xml:"GetSystemVMsRestrictedDatastoresResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetSystemVMsRestrictedDatastoresBody) Fault() *soap.Fault { return b.Fault_ } - -func GetSystemVMsRestrictedDatastores(ctx context.Context, r soap.RoundTripper, req *types.GetSystemVMsRestrictedDatastores) (*types.GetSystemVMsRestrictedDatastoresResponse, error) { - var reqBody, resBody GetSystemVMsRestrictedDatastoresBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetVchaClusterHealthBody struct { - Req *types.GetVchaClusterHealth `xml:"urn:vim25 GetVchaClusterHealth,omitempty"` - Res *types.GetVchaClusterHealthResponse `xml:"GetVchaClusterHealthResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetVchaClusterHealthBody) Fault() *soap.Fault { return b.Fault_ } - -func GetVchaClusterHealth(ctx context.Context, r soap.RoundTripper, req *types.GetVchaClusterHealth) (*types.GetVchaClusterHealthResponse, error) { - var reqBody, resBody GetVchaClusterHealthBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetVsanObjExtAttrsBody struct { - Req *types.GetVsanObjExtAttrs `xml:"urn:vim25 GetVsanObjExtAttrs,omitempty"` - Res *types.GetVsanObjExtAttrsResponse `xml:"GetVsanObjExtAttrsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetVsanObjExtAttrsBody) Fault() *soap.Fault { return b.Fault_ } - -func GetVsanObjExtAttrs(ctx context.Context, r soap.RoundTripper, req *types.GetVsanObjExtAttrs) (*types.GetVsanObjExtAttrsResponse, error) { - var reqBody, resBody GetVsanObjExtAttrsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HasMonitoredEntityBody struct { - Req *types.HasMonitoredEntity `xml:"urn:vim25 HasMonitoredEntity,omitempty"` - Res *types.HasMonitoredEntityResponse `xml:"HasMonitoredEntityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HasMonitoredEntityBody) Fault() *soap.Fault { return b.Fault_ } - -func HasMonitoredEntity(ctx context.Context, r soap.RoundTripper, req *types.HasMonitoredEntity) (*types.HasMonitoredEntityResponse, error) { - var reqBody, resBody HasMonitoredEntityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HasPrivilegeOnEntitiesBody struct { - Req *types.HasPrivilegeOnEntities `xml:"urn:vim25 HasPrivilegeOnEntities,omitempty"` - Res *types.HasPrivilegeOnEntitiesResponse `xml:"HasPrivilegeOnEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HasPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func HasPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntities) (*types.HasPrivilegeOnEntitiesResponse, error) { - var reqBody, resBody HasPrivilegeOnEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HasPrivilegeOnEntityBody struct { - Req *types.HasPrivilegeOnEntity `xml:"urn:vim25 HasPrivilegeOnEntity,omitempty"` - Res *types.HasPrivilegeOnEntityResponse `xml:"HasPrivilegeOnEntityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HasPrivilegeOnEntityBody) Fault() *soap.Fault { return b.Fault_ } - -func HasPrivilegeOnEntity(ctx context.Context, r soap.RoundTripper, req *types.HasPrivilegeOnEntity) (*types.HasPrivilegeOnEntityResponse, error) { - var reqBody, resBody HasPrivilegeOnEntityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HasProviderBody struct { - Req *types.HasProvider `xml:"urn:vim25 HasProvider,omitempty"` - Res *types.HasProviderResponse `xml:"HasProviderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HasProviderBody) Fault() *soap.Fault { return b.Fault_ } - -func HasProvider(ctx context.Context, r soap.RoundTripper, req *types.HasProvider) (*types.HasProviderResponse, error) { - var reqBody, resBody HasProviderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HasUserPrivilegeOnEntitiesBody struct { - Req *types.HasUserPrivilegeOnEntities `xml:"urn:vim25 HasUserPrivilegeOnEntities,omitempty"` - Res *types.HasUserPrivilegeOnEntitiesResponse `xml:"HasUserPrivilegeOnEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HasUserPrivilegeOnEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func HasUserPrivilegeOnEntities(ctx context.Context, r soap.RoundTripper, req *types.HasUserPrivilegeOnEntities) (*types.HasUserPrivilegeOnEntitiesResponse, error) { - var reqBody, resBody HasUserPrivilegeOnEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostClearVStorageObjectControlFlagsBody struct { - Req *types.HostClearVStorageObjectControlFlags `xml:"urn:vim25 HostClearVStorageObjectControlFlags,omitempty"` - Res *types.HostClearVStorageObjectControlFlagsResponse `xml:"HostClearVStorageObjectControlFlagsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostClearVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ } - -func HostClearVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.HostClearVStorageObjectControlFlags) (*types.HostClearVStorageObjectControlFlagsResponse, error) { - var reqBody, resBody HostClearVStorageObjectControlFlagsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostCloneVStorageObject_TaskBody struct { - Req *types.HostCloneVStorageObject_Task `xml:"urn:vim25 HostCloneVStorageObject_Task,omitempty"` - Res *types.HostCloneVStorageObject_TaskResponse `xml:"HostCloneVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostCloneVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostCloneVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCloneVStorageObject_Task) (*types.HostCloneVStorageObject_TaskResponse, error) { - var reqBody, resBody HostCloneVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostConfigVFlashCacheBody struct { - Req *types.HostConfigVFlashCache `xml:"urn:vim25 HostConfigVFlashCache,omitempty"` - Res *types.HostConfigVFlashCacheResponse `xml:"HostConfigVFlashCacheResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostConfigVFlashCacheBody) Fault() *soap.Fault { return b.Fault_ } - -func HostConfigVFlashCache(ctx context.Context, r soap.RoundTripper, req *types.HostConfigVFlashCache) (*types.HostConfigVFlashCacheResponse, error) { - var reqBody, resBody HostConfigVFlashCacheBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostConfigureVFlashResourceBody struct { - Req *types.HostConfigureVFlashResource `xml:"urn:vim25 HostConfigureVFlashResource,omitempty"` - Res *types.HostConfigureVFlashResourceResponse `xml:"HostConfigureVFlashResourceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostConfigureVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ } - -func HostConfigureVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostConfigureVFlashResource) (*types.HostConfigureVFlashResourceResponse, error) { - var reqBody, resBody HostConfigureVFlashResourceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostCreateDisk_TaskBody struct { - Req *types.HostCreateDisk_Task `xml:"urn:vim25 HostCreateDisk_Task,omitempty"` - Res *types.HostCreateDisk_TaskResponse `xml:"HostCreateDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostCreateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostCreateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostCreateDisk_Task) (*types.HostCreateDisk_TaskResponse, error) { - var reqBody, resBody HostCreateDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostDeleteVStorageObjectEx_TaskBody struct { - Req *types.HostDeleteVStorageObjectEx_Task `xml:"urn:vim25 HostDeleteVStorageObjectEx_Task,omitempty"` - Res *types.HostDeleteVStorageObjectEx_TaskResponse `xml:"HostDeleteVStorageObjectEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostDeleteVStorageObjectEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostDeleteVStorageObjectEx_Task(ctx context.Context, r soap.RoundTripper, req *types.HostDeleteVStorageObjectEx_Task) (*types.HostDeleteVStorageObjectEx_TaskResponse, error) { - var reqBody, resBody HostDeleteVStorageObjectEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostDeleteVStorageObject_TaskBody struct { - Req *types.HostDeleteVStorageObject_Task `xml:"urn:vim25 HostDeleteVStorageObject_Task,omitempty"` - Res *types.HostDeleteVStorageObject_TaskResponse `xml:"HostDeleteVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostDeleteVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostDeleteVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostDeleteVStorageObject_Task) (*types.HostDeleteVStorageObject_TaskResponse, error) { - var reqBody, resBody HostDeleteVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostExtendDisk_TaskBody struct { - Req *types.HostExtendDisk_Task `xml:"urn:vim25 HostExtendDisk_Task,omitempty"` - Res *types.HostExtendDisk_TaskResponse `xml:"HostExtendDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostExtendDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostExtendDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostExtendDisk_Task) (*types.HostExtendDisk_TaskResponse, error) { - var reqBody, resBody HostExtendDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostGetVFlashModuleDefaultConfigBody struct { - Req *types.HostGetVFlashModuleDefaultConfig `xml:"urn:vim25 HostGetVFlashModuleDefaultConfig,omitempty"` - Res *types.HostGetVFlashModuleDefaultConfigResponse `xml:"HostGetVFlashModuleDefaultConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostGetVFlashModuleDefaultConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func HostGetVFlashModuleDefaultConfig(ctx context.Context, r soap.RoundTripper, req *types.HostGetVFlashModuleDefaultConfig) (*types.HostGetVFlashModuleDefaultConfigResponse, error) { - var reqBody, resBody HostGetVFlashModuleDefaultConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostImageConfigGetAcceptanceBody struct { - Req *types.HostImageConfigGetAcceptance `xml:"urn:vim25 HostImageConfigGetAcceptance,omitempty"` - Res *types.HostImageConfigGetAcceptanceResponse `xml:"HostImageConfigGetAcceptanceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostImageConfigGetAcceptanceBody) Fault() *soap.Fault { return b.Fault_ } - -func HostImageConfigGetAcceptance(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetAcceptance) (*types.HostImageConfigGetAcceptanceResponse, error) { - var reqBody, resBody HostImageConfigGetAcceptanceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostImageConfigGetProfileBody struct { - Req *types.HostImageConfigGetProfile `xml:"urn:vim25 HostImageConfigGetProfile,omitempty"` - Res *types.HostImageConfigGetProfileResponse `xml:"HostImageConfigGetProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostImageConfigGetProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func HostImageConfigGetProfile(ctx context.Context, r soap.RoundTripper, req *types.HostImageConfigGetProfile) (*types.HostImageConfigGetProfileResponse, error) { - var reqBody, resBody HostImageConfigGetProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostInflateDisk_TaskBody struct { - Req *types.HostInflateDisk_Task `xml:"urn:vim25 HostInflateDisk_Task,omitempty"` - Res *types.HostInflateDisk_TaskResponse `xml:"HostInflateDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostInflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostInflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.HostInflateDisk_Task) (*types.HostInflateDisk_TaskResponse, error) { - var reqBody, resBody HostInflateDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostListVStorageObjectBody struct { - Req *types.HostListVStorageObject `xml:"urn:vim25 HostListVStorageObject,omitempty"` - Res *types.HostListVStorageObjectResponse `xml:"HostListVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func HostListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostListVStorageObject) (*types.HostListVStorageObjectResponse, error) { - var reqBody, resBody HostListVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostProfileResetValidationStateBody struct { - Req *types.HostProfileResetValidationState `xml:"urn:vim25 HostProfileResetValidationState,omitempty"` - Res *types.HostProfileResetValidationStateResponse `xml:"HostProfileResetValidationStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostProfileResetValidationStateBody) Fault() *soap.Fault { return b.Fault_ } - -func HostProfileResetValidationState(ctx context.Context, r soap.RoundTripper, req *types.HostProfileResetValidationState) (*types.HostProfileResetValidationStateResponse, error) { - var reqBody, resBody HostProfileResetValidationStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostReconcileDatastoreInventory_TaskBody struct { - Req *types.HostReconcileDatastoreInventory_Task `xml:"urn:vim25 HostReconcileDatastoreInventory_Task,omitempty"` - Res *types.HostReconcileDatastoreInventory_TaskResponse `xml:"HostReconcileDatastoreInventory_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.HostReconcileDatastoreInventory_Task) (*types.HostReconcileDatastoreInventory_TaskResponse, error) { - var reqBody, resBody HostReconcileDatastoreInventory_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRegisterDiskBody struct { - Req *types.HostRegisterDisk `xml:"urn:vim25 HostRegisterDisk,omitempty"` - Res *types.HostRegisterDiskResponse `xml:"HostRegisterDiskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRegisterDiskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.HostRegisterDisk) (*types.HostRegisterDiskResponse, error) { - var reqBody, resBody HostRegisterDiskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRelocateVStorageObject_TaskBody struct { - Req *types.HostRelocateVStorageObject_Task `xml:"urn:vim25 HostRelocateVStorageObject_Task,omitempty"` - Res *types.HostRelocateVStorageObject_TaskResponse `xml:"HostRelocateVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.HostRelocateVStorageObject_Task) (*types.HostRelocateVStorageObject_TaskResponse, error) { - var reqBody, resBody HostRelocateVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRemoveVFlashResourceBody struct { - Req *types.HostRemoveVFlashResource `xml:"urn:vim25 HostRemoveVFlashResource,omitempty"` - Res *types.HostRemoveVFlashResourceResponse `xml:"HostRemoveVFlashResourceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRemoveVFlashResourceBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRemoveVFlashResource(ctx context.Context, r soap.RoundTripper, req *types.HostRemoveVFlashResource) (*types.HostRemoveVFlashResourceResponse, error) { - var reqBody, resBody HostRemoveVFlashResourceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRenameVStorageObjectBody struct { - Req *types.HostRenameVStorageObject `xml:"urn:vim25 HostRenameVStorageObject,omitempty"` - Res *types.HostRenameVStorageObjectResponse `xml:"HostRenameVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRenameVStorageObject) (*types.HostRenameVStorageObjectResponse, error) { - var reqBody, resBody HostRenameVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRetrieveVStorageInfrastructureObjectPolicyBody struct { - Req *types.HostRetrieveVStorageInfrastructureObjectPolicy `xml:"urn:vim25 HostRetrieveVStorageInfrastructureObjectPolicy,omitempty"` - Res *types.HostRetrieveVStorageInfrastructureObjectPolicyResponse `xml:"HostRetrieveVStorageInfrastructureObjectPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRetrieveVStorageInfrastructureObjectPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRetrieveVStorageInfrastructureObjectPolicy(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageInfrastructureObjectPolicy) (*types.HostRetrieveVStorageInfrastructureObjectPolicyResponse, error) { - var reqBody, resBody HostRetrieveVStorageInfrastructureObjectPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRetrieveVStorageObjectBody struct { - Req *types.HostRetrieveVStorageObject `xml:"urn:vim25 HostRetrieveVStorageObject,omitempty"` - Res *types.HostRetrieveVStorageObjectResponse `xml:"HostRetrieveVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObject) (*types.HostRetrieveVStorageObjectResponse, error) { - var reqBody, resBody HostRetrieveVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRetrieveVStorageObjectMetadataBody struct { - Req *types.HostRetrieveVStorageObjectMetadata `xml:"urn:vim25 HostRetrieveVStorageObjectMetadata,omitempty"` - Res *types.HostRetrieveVStorageObjectMetadataResponse `xml:"HostRetrieveVStorageObjectMetadataResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRetrieveVStorageObjectMetadataBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRetrieveVStorageObjectMetadata(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObjectMetadata) (*types.HostRetrieveVStorageObjectMetadataResponse, error) { - var reqBody, resBody HostRetrieveVStorageObjectMetadataBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRetrieveVStorageObjectMetadataValueBody struct { - Req *types.HostRetrieveVStorageObjectMetadataValue `xml:"urn:vim25 HostRetrieveVStorageObjectMetadataValue,omitempty"` - Res *types.HostRetrieveVStorageObjectMetadataValueResponse `xml:"HostRetrieveVStorageObjectMetadataValueResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRetrieveVStorageObjectMetadataValueBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRetrieveVStorageObjectMetadataValue(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObjectMetadataValue) (*types.HostRetrieveVStorageObjectMetadataValueResponse, error) { - var reqBody, resBody HostRetrieveVStorageObjectMetadataValueBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostRetrieveVStorageObjectStateBody struct { - Req *types.HostRetrieveVStorageObjectState `xml:"urn:vim25 HostRetrieveVStorageObjectState,omitempty"` - Res *types.HostRetrieveVStorageObjectStateResponse `xml:"HostRetrieveVStorageObjectStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostRetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ } - -func HostRetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.HostRetrieveVStorageObjectState) (*types.HostRetrieveVStorageObjectStateResponse, error) { - var reqBody, resBody HostRetrieveVStorageObjectStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostScheduleReconcileDatastoreInventoryBody struct { - Req *types.HostScheduleReconcileDatastoreInventory `xml:"urn:vim25 HostScheduleReconcileDatastoreInventory,omitempty"` - Res *types.HostScheduleReconcileDatastoreInventoryResponse `xml:"HostScheduleReconcileDatastoreInventoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ } - -func HostScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.HostScheduleReconcileDatastoreInventory) (*types.HostScheduleReconcileDatastoreInventoryResponse, error) { - var reqBody, resBody HostScheduleReconcileDatastoreInventoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostSetVStorageObjectControlFlagsBody struct { - Req *types.HostSetVStorageObjectControlFlags `xml:"urn:vim25 HostSetVStorageObjectControlFlags,omitempty"` - Res *types.HostSetVStorageObjectControlFlagsResponse `xml:"HostSetVStorageObjectControlFlagsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostSetVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ } - -func HostSetVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.HostSetVStorageObjectControlFlags) (*types.HostSetVStorageObjectControlFlagsResponse, error) { - var reqBody, resBody HostSetVStorageObjectControlFlagsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostSpecGetUpdatedHostsBody struct { - Req *types.HostSpecGetUpdatedHosts `xml:"urn:vim25 HostSpecGetUpdatedHosts,omitempty"` - Res *types.HostSpecGetUpdatedHostsResponse `xml:"HostSpecGetUpdatedHostsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostSpecGetUpdatedHostsBody) Fault() *soap.Fault { return b.Fault_ } - -func HostSpecGetUpdatedHosts(ctx context.Context, r soap.RoundTripper, req *types.HostSpecGetUpdatedHosts) (*types.HostSpecGetUpdatedHostsResponse, error) { - var reqBody, resBody HostSpecGetUpdatedHostsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostUpdateVStorageObjectMetadataEx_TaskBody struct { - Req *types.HostUpdateVStorageObjectMetadataEx_Task `xml:"urn:vim25 HostUpdateVStorageObjectMetadataEx_Task,omitempty"` - Res *types.HostUpdateVStorageObjectMetadataEx_TaskResponse `xml:"HostUpdateVStorageObjectMetadataEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostUpdateVStorageObjectMetadataEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostUpdateVStorageObjectMetadataEx_Task(ctx context.Context, r soap.RoundTripper, req *types.HostUpdateVStorageObjectMetadataEx_Task) (*types.HostUpdateVStorageObjectMetadataEx_TaskResponse, error) { - var reqBody, resBody HostUpdateVStorageObjectMetadataEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostUpdateVStorageObjectMetadata_TaskBody struct { - Req *types.HostUpdateVStorageObjectMetadata_Task `xml:"urn:vim25 HostUpdateVStorageObjectMetadata_Task,omitempty"` - Res *types.HostUpdateVStorageObjectMetadata_TaskResponse `xml:"HostUpdateVStorageObjectMetadata_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostUpdateVStorageObjectMetadata_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostUpdateVStorageObjectMetadata_Task(ctx context.Context, r soap.RoundTripper, req *types.HostUpdateVStorageObjectMetadata_Task) (*types.HostUpdateVStorageObjectMetadata_TaskResponse, error) { - var reqBody, resBody HostUpdateVStorageObjectMetadata_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostVStorageObjectCreateDiskFromSnapshot_TaskBody struct { - Req *types.HostVStorageObjectCreateDiskFromSnapshot_Task `xml:"urn:vim25 HostVStorageObjectCreateDiskFromSnapshot_Task,omitempty"` - Res *types.HostVStorageObjectCreateDiskFromSnapshot_TaskResponse `xml:"HostVStorageObjectCreateDiskFromSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostVStorageObjectCreateDiskFromSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostVStorageObjectCreateDiskFromSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectCreateDiskFromSnapshot_Task) (*types.HostVStorageObjectCreateDiskFromSnapshot_TaskResponse, error) { - var reqBody, resBody HostVStorageObjectCreateDiskFromSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostVStorageObjectCreateSnapshot_TaskBody struct { - Req *types.HostVStorageObjectCreateSnapshot_Task `xml:"urn:vim25 HostVStorageObjectCreateSnapshot_Task,omitempty"` - Res *types.HostVStorageObjectCreateSnapshot_TaskResponse `xml:"HostVStorageObjectCreateSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostVStorageObjectCreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostVStorageObjectCreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectCreateSnapshot_Task) (*types.HostVStorageObjectCreateSnapshot_TaskResponse, error) { - var reqBody, resBody HostVStorageObjectCreateSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostVStorageObjectDeleteSnapshot_TaskBody struct { - Req *types.HostVStorageObjectDeleteSnapshot_Task `xml:"urn:vim25 HostVStorageObjectDeleteSnapshot_Task,omitempty"` - Res *types.HostVStorageObjectDeleteSnapshot_TaskResponse `xml:"HostVStorageObjectDeleteSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostVStorageObjectDeleteSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostVStorageObjectDeleteSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectDeleteSnapshot_Task) (*types.HostVStorageObjectDeleteSnapshot_TaskResponse, error) { - var reqBody, resBody HostVStorageObjectDeleteSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostVStorageObjectRetrieveSnapshotInfoBody struct { - Req *types.HostVStorageObjectRetrieveSnapshotInfo `xml:"urn:vim25 HostVStorageObjectRetrieveSnapshotInfo,omitempty"` - Res *types.HostVStorageObjectRetrieveSnapshotInfoResponse `xml:"HostVStorageObjectRetrieveSnapshotInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostVStorageObjectRetrieveSnapshotInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func HostVStorageObjectRetrieveSnapshotInfo(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectRetrieveSnapshotInfo) (*types.HostVStorageObjectRetrieveSnapshotInfoResponse, error) { - var reqBody, resBody HostVStorageObjectRetrieveSnapshotInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HostVStorageObjectRevert_TaskBody struct { - Req *types.HostVStorageObjectRevert_Task `xml:"urn:vim25 HostVStorageObjectRevert_Task,omitempty"` - Res *types.HostVStorageObjectRevert_TaskResponse `xml:"HostVStorageObjectRevert_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HostVStorageObjectRevert_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HostVStorageObjectRevert_Task(ctx context.Context, r soap.RoundTripper, req *types.HostVStorageObjectRevert_Task) (*types.HostVStorageObjectRevert_TaskResponse, error) { - var reqBody, resBody HostVStorageObjectRevert_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseAbortBody struct { - Req *types.HttpNfcLeaseAbort `xml:"urn:vim25 HttpNfcLeaseAbort,omitempty"` - Res *types.HttpNfcLeaseAbortResponse `xml:"HttpNfcLeaseAbortResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseAbortBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseAbort(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseAbort) (*types.HttpNfcLeaseAbortResponse, error) { - var reqBody, resBody HttpNfcLeaseAbortBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseCompleteBody struct { - Req *types.HttpNfcLeaseComplete `xml:"urn:vim25 HttpNfcLeaseComplete,omitempty"` - Res *types.HttpNfcLeaseCompleteResponse `xml:"HttpNfcLeaseCompleteResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseCompleteBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseComplete(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseComplete) (*types.HttpNfcLeaseCompleteResponse, error) { - var reqBody, resBody HttpNfcLeaseCompleteBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseGetManifestBody struct { - Req *types.HttpNfcLeaseGetManifest `xml:"urn:vim25 HttpNfcLeaseGetManifest,omitempty"` - Res *types.HttpNfcLeaseGetManifestResponse `xml:"HttpNfcLeaseGetManifestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseGetManifestBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseGetManifest(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseGetManifest) (*types.HttpNfcLeaseGetManifestResponse, error) { - var reqBody, resBody HttpNfcLeaseGetManifestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseProbeUrlsBody struct { - Req *types.HttpNfcLeaseProbeUrls `xml:"urn:vim25 HttpNfcLeaseProbeUrls,omitempty"` - Res *types.HttpNfcLeaseProbeUrlsResponse `xml:"HttpNfcLeaseProbeUrlsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseProbeUrlsBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseProbeUrls(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseProbeUrls) (*types.HttpNfcLeaseProbeUrlsResponse, error) { - var reqBody, resBody HttpNfcLeaseProbeUrlsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseProgressBody struct { - Req *types.HttpNfcLeaseProgress `xml:"urn:vim25 HttpNfcLeaseProgress,omitempty"` - Res *types.HttpNfcLeaseProgressResponse `xml:"HttpNfcLeaseProgressResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseProgressBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseProgress(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseProgress) (*types.HttpNfcLeaseProgressResponse, error) { - var reqBody, resBody HttpNfcLeaseProgressBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeasePullFromUrls_TaskBody struct { - Req *types.HttpNfcLeasePullFromUrls_Task `xml:"urn:vim25 HttpNfcLeasePullFromUrls_Task,omitempty"` - Res *types.HttpNfcLeasePullFromUrls_TaskResponse `xml:"HttpNfcLeasePullFromUrls_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeasePullFromUrls_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeasePullFromUrls_Task(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeasePullFromUrls_Task) (*types.HttpNfcLeasePullFromUrls_TaskResponse, error) { - var reqBody, resBody HttpNfcLeasePullFromUrls_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type HttpNfcLeaseSetManifestChecksumTypeBody struct { - Req *types.HttpNfcLeaseSetManifestChecksumType `xml:"urn:vim25 HttpNfcLeaseSetManifestChecksumType,omitempty"` - Res *types.HttpNfcLeaseSetManifestChecksumTypeResponse `xml:"HttpNfcLeaseSetManifestChecksumTypeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *HttpNfcLeaseSetManifestChecksumTypeBody) Fault() *soap.Fault { return b.Fault_ } - -func HttpNfcLeaseSetManifestChecksumType(ctx context.Context, r soap.RoundTripper, req *types.HttpNfcLeaseSetManifestChecksumType) (*types.HttpNfcLeaseSetManifestChecksumTypeResponse, error) { - var reqBody, resBody HttpNfcLeaseSetManifestChecksumTypeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ImpersonateUserBody struct { - Req *types.ImpersonateUser `xml:"urn:vim25 ImpersonateUser,omitempty"` - Res *types.ImpersonateUserResponse `xml:"ImpersonateUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ImpersonateUserBody) Fault() *soap.Fault { return b.Fault_ } - -func ImpersonateUser(ctx context.Context, r soap.RoundTripper, req *types.ImpersonateUser) (*types.ImpersonateUserResponse, error) { - var reqBody, resBody ImpersonateUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ImportCertificateForCAM_TaskBody struct { - Req *types.ImportCertificateForCAM_Task `xml:"urn:vim25 ImportCertificateForCAM_Task,omitempty"` - Res *types.ImportCertificateForCAM_TaskResponse `xml:"ImportCertificateForCAM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ImportCertificateForCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ImportCertificateForCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.ImportCertificateForCAM_Task) (*types.ImportCertificateForCAM_TaskResponse, error) { - var reqBody, resBody ImportCertificateForCAM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ImportUnmanagedSnapshotBody struct { - Req *types.ImportUnmanagedSnapshot `xml:"urn:vim25 ImportUnmanagedSnapshot,omitempty"` - Res *types.ImportUnmanagedSnapshotResponse `xml:"ImportUnmanagedSnapshotResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ImportUnmanagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ } - -func ImportUnmanagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ImportUnmanagedSnapshot) (*types.ImportUnmanagedSnapshotResponse, error) { - var reqBody, resBody ImportUnmanagedSnapshotBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ImportVAppBody struct { - Req *types.ImportVApp `xml:"urn:vim25 ImportVApp,omitempty"` - Res *types.ImportVAppResponse `xml:"ImportVAppResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ImportVAppBody) Fault() *soap.Fault { return b.Fault_ } - -func ImportVApp(ctx context.Context, r soap.RoundTripper, req *types.ImportVApp) (*types.ImportVAppResponse, error) { - var reqBody, resBody ImportVAppBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InflateDisk_TaskBody struct { - Req *types.InflateDisk_Task `xml:"urn:vim25 InflateDisk_Task,omitempty"` - Res *types.InflateDisk_TaskResponse `xml:"InflateDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InflateDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InflateDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateDisk_Task) (*types.InflateDisk_TaskResponse, error) { - var reqBody, resBody InflateDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InflateVirtualDisk_TaskBody struct { - Req *types.InflateVirtualDisk_Task `xml:"urn:vim25 InflateVirtualDisk_Task,omitempty"` - Res *types.InflateVirtualDisk_TaskResponse `xml:"InflateVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InflateVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InflateVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.InflateVirtualDisk_Task) (*types.InflateVirtualDisk_TaskResponse, error) { - var reqBody, resBody InflateVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InitializeDisks_TaskBody struct { - Req *types.InitializeDisks_Task `xml:"urn:vim25 InitializeDisks_Task,omitempty"` - Res *types.InitializeDisks_TaskResponse `xml:"InitializeDisks_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InitializeDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InitializeDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.InitializeDisks_Task) (*types.InitializeDisks_TaskResponse, error) { - var reqBody, resBody InitializeDisks_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InitiateFileTransferFromGuestBody struct { - Req *types.InitiateFileTransferFromGuest `xml:"urn:vim25 InitiateFileTransferFromGuest,omitempty"` - Res *types.InitiateFileTransferFromGuestResponse `xml:"InitiateFileTransferFromGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InitiateFileTransferFromGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func InitiateFileTransferFromGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferFromGuest) (*types.InitiateFileTransferFromGuestResponse, error) { - var reqBody, resBody InitiateFileTransferFromGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InitiateFileTransferToGuestBody struct { - Req *types.InitiateFileTransferToGuest `xml:"urn:vim25 InitiateFileTransferToGuest,omitempty"` - Res *types.InitiateFileTransferToGuestResponse `xml:"InitiateFileTransferToGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InitiateFileTransferToGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func InitiateFileTransferToGuest(ctx context.Context, r soap.RoundTripper, req *types.InitiateFileTransferToGuest) (*types.InitiateFileTransferToGuestResponse, error) { - var reqBody, resBody InitiateFileTransferToGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallHostPatchV2_TaskBody struct { - Req *types.InstallHostPatchV2_Task `xml:"urn:vim25 InstallHostPatchV2_Task,omitempty"` - Res *types.InstallHostPatchV2_TaskResponse `xml:"InstallHostPatchV2_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatchV2_Task) (*types.InstallHostPatchV2_TaskResponse, error) { - var reqBody, resBody InstallHostPatchV2_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallHostPatch_TaskBody struct { - Req *types.InstallHostPatch_Task `xml:"urn:vim25 InstallHostPatch_Task,omitempty"` - Res *types.InstallHostPatch_TaskResponse `xml:"InstallHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallHostPatch_Task) (*types.InstallHostPatch_TaskResponse, error) { - var reqBody, resBody InstallHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallIoFilter_TaskBody struct { - Req *types.InstallIoFilter_Task `xml:"urn:vim25 InstallIoFilter_Task,omitempty"` - Res *types.InstallIoFilter_TaskResponse `xml:"InstallIoFilter_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.InstallIoFilter_Task) (*types.InstallIoFilter_TaskResponse, error) { - var reqBody, resBody InstallIoFilter_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallServerCertificateBody struct { - Req *types.InstallServerCertificate `xml:"urn:vim25 InstallServerCertificate,omitempty"` - Res *types.InstallServerCertificateResponse `xml:"InstallServerCertificateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallServerCertificateBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallServerCertificate(ctx context.Context, r soap.RoundTripper, req *types.InstallServerCertificate) (*types.InstallServerCertificateResponse, error) { - var reqBody, resBody InstallServerCertificateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallSmartCardTrustAnchorBody struct { - Req *types.InstallSmartCardTrustAnchor `xml:"urn:vim25 InstallSmartCardTrustAnchor,omitempty"` - Res *types.InstallSmartCardTrustAnchorResponse `xml:"InstallSmartCardTrustAnchorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.InstallSmartCardTrustAnchor) (*types.InstallSmartCardTrustAnchorResponse, error) { - var reqBody, resBody InstallSmartCardTrustAnchorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstantClone_TaskBody struct { - Req *types.InstantClone_Task `xml:"urn:vim25 InstantClone_Task,omitempty"` - Res *types.InstantClone_TaskResponse `xml:"InstantClone_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstantClone_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InstantClone_Task(ctx context.Context, r soap.RoundTripper, req *types.InstantClone_Task) (*types.InstantClone_TaskResponse, error) { - var reqBody, resBody InstantClone_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type IsKmsClusterActiveBody struct { - Req *types.IsKmsClusterActive `xml:"urn:vim25 IsKmsClusterActive,omitempty"` - Res *types.IsKmsClusterActiveResponse `xml:"IsKmsClusterActiveResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *IsKmsClusterActiveBody) Fault() *soap.Fault { return b.Fault_ } - -func IsKmsClusterActive(ctx context.Context, r soap.RoundTripper, req *types.IsKmsClusterActive) (*types.IsKmsClusterActiveResponse, error) { - var reqBody, resBody IsKmsClusterActiveBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type IsSharedGraphicsActiveBody struct { - Req *types.IsSharedGraphicsActive `xml:"urn:vim25 IsSharedGraphicsActive,omitempty"` - Res *types.IsSharedGraphicsActiveResponse `xml:"IsSharedGraphicsActiveResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *IsSharedGraphicsActiveBody) Fault() *soap.Fault { return b.Fault_ } - -func IsSharedGraphicsActive(ctx context.Context, r soap.RoundTripper, req *types.IsSharedGraphicsActive) (*types.IsSharedGraphicsActiveResponse, error) { - var reqBody, resBody IsSharedGraphicsActiveBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type JoinDomainWithCAM_TaskBody struct { - Req *types.JoinDomainWithCAM_Task `xml:"urn:vim25 JoinDomainWithCAM_Task,omitempty"` - Res *types.JoinDomainWithCAM_TaskResponse `xml:"JoinDomainWithCAM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *JoinDomainWithCAM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func JoinDomainWithCAM_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomainWithCAM_Task) (*types.JoinDomainWithCAM_TaskResponse, error) { - var reqBody, resBody JoinDomainWithCAM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type JoinDomain_TaskBody struct { - Req *types.JoinDomain_Task `xml:"urn:vim25 JoinDomain_Task,omitempty"` - Res *types.JoinDomain_TaskResponse `xml:"JoinDomain_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *JoinDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func JoinDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.JoinDomain_Task) (*types.JoinDomain_TaskResponse, error) { - var reqBody, resBody JoinDomain_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LeaveCurrentDomain_TaskBody struct { - Req *types.LeaveCurrentDomain_Task `xml:"urn:vim25 LeaveCurrentDomain_Task,omitempty"` - Res *types.LeaveCurrentDomain_TaskResponse `xml:"LeaveCurrentDomain_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LeaveCurrentDomain_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func LeaveCurrentDomain_Task(ctx context.Context, r soap.RoundTripper, req *types.LeaveCurrentDomain_Task) (*types.LeaveCurrentDomain_TaskResponse, error) { - var reqBody, resBody LeaveCurrentDomain_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListCACertificateRevocationListsBody struct { - Req *types.ListCACertificateRevocationLists `xml:"urn:vim25 ListCACertificateRevocationLists,omitempty"` - Res *types.ListCACertificateRevocationListsResponse `xml:"ListCACertificateRevocationListsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListCACertificateRevocationListsBody) Fault() *soap.Fault { return b.Fault_ } - -func ListCACertificateRevocationLists(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificateRevocationLists) (*types.ListCACertificateRevocationListsResponse, error) { - var reqBody, resBody ListCACertificateRevocationListsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListCACertificatesBody struct { - Req *types.ListCACertificates `xml:"urn:vim25 ListCACertificates,omitempty"` - Res *types.ListCACertificatesResponse `xml:"ListCACertificatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListCACertificatesBody) Fault() *soap.Fault { return b.Fault_ } - -func ListCACertificates(ctx context.Context, r soap.RoundTripper, req *types.ListCACertificates) (*types.ListCACertificatesResponse, error) { - var reqBody, resBody ListCACertificatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListFilesInGuestBody struct { - Req *types.ListFilesInGuest `xml:"urn:vim25 ListFilesInGuest,omitempty"` - Res *types.ListFilesInGuestResponse `xml:"ListFilesInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListFilesInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ListFilesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListFilesInGuest) (*types.ListFilesInGuestResponse, error) { - var reqBody, resBody ListFilesInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListGuestAliasesBody struct { - Req *types.ListGuestAliases `xml:"urn:vim25 ListGuestAliases,omitempty"` - Res *types.ListGuestAliasesResponse `xml:"ListGuestAliasesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListGuestAliasesBody) Fault() *soap.Fault { return b.Fault_ } - -func ListGuestAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestAliases) (*types.ListGuestAliasesResponse, error) { - var reqBody, resBody ListGuestAliasesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListGuestMappedAliasesBody struct { - Req *types.ListGuestMappedAliases `xml:"urn:vim25 ListGuestMappedAliases,omitempty"` - Res *types.ListGuestMappedAliasesResponse `xml:"ListGuestMappedAliasesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListGuestMappedAliasesBody) Fault() *soap.Fault { return b.Fault_ } - -func ListGuestMappedAliases(ctx context.Context, r soap.RoundTripper, req *types.ListGuestMappedAliases) (*types.ListGuestMappedAliasesResponse, error) { - var reqBody, resBody ListGuestMappedAliasesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListKeysBody struct { - Req *types.ListKeys `xml:"urn:vim25 ListKeys,omitempty"` - Res *types.ListKeysResponse `xml:"ListKeysResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListKeysBody) Fault() *soap.Fault { return b.Fault_ } - -func ListKeys(ctx context.Context, r soap.RoundTripper, req *types.ListKeys) (*types.ListKeysResponse, error) { - var reqBody, resBody ListKeysBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListKmipServersBody struct { - Req *types.ListKmipServers `xml:"urn:vim25 ListKmipServers,omitempty"` - Res *types.ListKmipServersResponse `xml:"ListKmipServersResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListKmipServersBody) Fault() *soap.Fault { return b.Fault_ } - -func ListKmipServers(ctx context.Context, r soap.RoundTripper, req *types.ListKmipServers) (*types.ListKmipServersResponse, error) { - var reqBody, resBody ListKmipServersBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListKmsClustersBody struct { - Req *types.ListKmsClusters `xml:"urn:vim25 ListKmsClusters,omitempty"` - Res *types.ListKmsClustersResponse `xml:"ListKmsClustersResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListKmsClustersBody) Fault() *soap.Fault { return b.Fault_ } - -func ListKmsClusters(ctx context.Context, r soap.RoundTripper, req *types.ListKmsClusters) (*types.ListKmsClustersResponse, error) { - var reqBody, resBody ListKmsClustersBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListProcessesInGuestBody struct { - Req *types.ListProcessesInGuest `xml:"urn:vim25 ListProcessesInGuest,omitempty"` - Res *types.ListProcessesInGuestResponse `xml:"ListProcessesInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListProcessesInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ListProcessesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListProcessesInGuest) (*types.ListProcessesInGuestResponse, error) { - var reqBody, resBody ListProcessesInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListRegistryKeysInGuestBody struct { - Req *types.ListRegistryKeysInGuest `xml:"urn:vim25 ListRegistryKeysInGuest,omitempty"` - Res *types.ListRegistryKeysInGuestResponse `xml:"ListRegistryKeysInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListRegistryKeysInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ListRegistryKeysInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryKeysInGuest) (*types.ListRegistryKeysInGuestResponse, error) { - var reqBody, resBody ListRegistryKeysInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListRegistryValuesInGuestBody struct { - Req *types.ListRegistryValuesInGuest `xml:"urn:vim25 ListRegistryValuesInGuest,omitempty"` - Res *types.ListRegistryValuesInGuestResponse `xml:"ListRegistryValuesInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListRegistryValuesInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ListRegistryValuesInGuest(ctx context.Context, r soap.RoundTripper, req *types.ListRegistryValuesInGuest) (*types.ListRegistryValuesInGuestResponse, error) { - var reqBody, resBody ListRegistryValuesInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListSmartCardTrustAnchorsBody struct { - Req *types.ListSmartCardTrustAnchors `xml:"urn:vim25 ListSmartCardTrustAnchors,omitempty"` - Res *types.ListSmartCardTrustAnchorsResponse `xml:"ListSmartCardTrustAnchorsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ } - -func ListSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ListSmartCardTrustAnchors) (*types.ListSmartCardTrustAnchorsResponse, error) { - var reqBody, resBody ListSmartCardTrustAnchorsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListTagsAttachedToVStorageObjectBody struct { - Req *types.ListTagsAttachedToVStorageObject `xml:"urn:vim25 ListTagsAttachedToVStorageObject,omitempty"` - Res *types.ListTagsAttachedToVStorageObjectResponse `xml:"ListTagsAttachedToVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListTagsAttachedToVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func ListTagsAttachedToVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListTagsAttachedToVStorageObject) (*types.ListTagsAttachedToVStorageObjectResponse, error) { - var reqBody, resBody ListTagsAttachedToVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListVStorageObjectBody struct { - Req *types.ListVStorageObject `xml:"urn:vim25 ListVStorageObject,omitempty"` - Res *types.ListVStorageObjectResponse `xml:"ListVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func ListVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObject) (*types.ListVStorageObjectResponse, error) { - var reqBody, resBody ListVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ListVStorageObjectsAttachedToTagBody struct { - Req *types.ListVStorageObjectsAttachedToTag `xml:"urn:vim25 ListVStorageObjectsAttachedToTag,omitempty"` - Res *types.ListVStorageObjectsAttachedToTagResponse `xml:"ListVStorageObjectsAttachedToTagResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ListVStorageObjectsAttachedToTagBody) Fault() *soap.Fault { return b.Fault_ } - -func ListVStorageObjectsAttachedToTag(ctx context.Context, r soap.RoundTripper, req *types.ListVStorageObjectsAttachedToTag) (*types.ListVStorageObjectsAttachedToTagResponse, error) { - var reqBody, resBody ListVStorageObjectsAttachedToTagBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LogUserEventBody struct { - Req *types.LogUserEvent `xml:"urn:vim25 LogUserEvent,omitempty"` - Res *types.LogUserEventResponse `xml:"LogUserEventResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LogUserEventBody) Fault() *soap.Fault { return b.Fault_ } - -func LogUserEvent(ctx context.Context, r soap.RoundTripper, req *types.LogUserEvent) (*types.LogUserEventResponse, error) { - var reqBody, resBody LogUserEventBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LoginBody struct { - Req *types.Login `xml:"urn:vim25 Login,omitempty"` - Res *types.LoginResponse `xml:"LoginResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LoginBody) Fault() *soap.Fault { return b.Fault_ } - -func Login(ctx context.Context, r soap.RoundTripper, req *types.Login) (*types.LoginResponse, error) { - var reqBody, resBody LoginBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LoginBySSPIBody struct { - Req *types.LoginBySSPI `xml:"urn:vim25 LoginBySSPI,omitempty"` - Res *types.LoginBySSPIResponse `xml:"LoginBySSPIResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LoginBySSPIBody) Fault() *soap.Fault { return b.Fault_ } - -func LoginBySSPI(ctx context.Context, r soap.RoundTripper, req *types.LoginBySSPI) (*types.LoginBySSPIResponse, error) { - var reqBody, resBody LoginBySSPIBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LoginByTokenBody struct { - Req *types.LoginByToken `xml:"urn:vim25 LoginByToken,omitempty"` - Res *types.LoginByTokenResponse `xml:"LoginByTokenResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LoginByTokenBody) Fault() *soap.Fault { return b.Fault_ } - -func LoginByToken(ctx context.Context, r soap.RoundTripper, req *types.LoginByToken) (*types.LoginByTokenResponse, error) { - var reqBody, resBody LoginByTokenBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LoginExtensionByCertificateBody struct { - Req *types.LoginExtensionByCertificate `xml:"urn:vim25 LoginExtensionByCertificate,omitempty"` - Res *types.LoginExtensionByCertificateResponse `xml:"LoginExtensionByCertificateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LoginExtensionByCertificateBody) Fault() *soap.Fault { return b.Fault_ } - -func LoginExtensionByCertificate(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionByCertificate) (*types.LoginExtensionByCertificateResponse, error) { - var reqBody, resBody LoginExtensionByCertificateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LoginExtensionBySubjectNameBody struct { - Req *types.LoginExtensionBySubjectName `xml:"urn:vim25 LoginExtensionBySubjectName,omitempty"` - Res *types.LoginExtensionBySubjectNameResponse `xml:"LoginExtensionBySubjectNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LoginExtensionBySubjectNameBody) Fault() *soap.Fault { return b.Fault_ } - -func LoginExtensionBySubjectName(ctx context.Context, r soap.RoundTripper, req *types.LoginExtensionBySubjectName) (*types.LoginExtensionBySubjectNameResponse, error) { - var reqBody, resBody LoginExtensionBySubjectNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LogoutBody struct { - Req *types.Logout `xml:"urn:vim25 Logout,omitempty"` - Res *types.LogoutResponse `xml:"LogoutResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LogoutBody) Fault() *soap.Fault { return b.Fault_ } - -func Logout(ctx context.Context, r soap.RoundTripper, req *types.Logout) (*types.LogoutResponse, error) { - var reqBody, resBody LogoutBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LookupDvPortGroupBody struct { - Req *types.LookupDvPortGroup `xml:"urn:vim25 LookupDvPortGroup,omitempty"` - Res *types.LookupDvPortGroupResponse `xml:"LookupDvPortGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LookupDvPortGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func LookupDvPortGroup(ctx context.Context, r soap.RoundTripper, req *types.LookupDvPortGroup) (*types.LookupDvPortGroupResponse, error) { - var reqBody, resBody LookupDvPortGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type LookupVmOverheadMemoryBody struct { - Req *types.LookupVmOverheadMemory `xml:"urn:vim25 LookupVmOverheadMemory,omitempty"` - Res *types.LookupVmOverheadMemoryResponse `xml:"LookupVmOverheadMemoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *LookupVmOverheadMemoryBody) Fault() *soap.Fault { return b.Fault_ } - -func LookupVmOverheadMemory(ctx context.Context, r soap.RoundTripper, req *types.LookupVmOverheadMemory) (*types.LookupVmOverheadMemoryResponse, error) { - var reqBody, resBody LookupVmOverheadMemoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MakeDirectoryBody struct { - Req *types.MakeDirectory `xml:"urn:vim25 MakeDirectory,omitempty"` - Res *types.MakeDirectoryResponse `xml:"MakeDirectoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MakeDirectoryBody) Fault() *soap.Fault { return b.Fault_ } - -func MakeDirectory(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectory) (*types.MakeDirectoryResponse, error) { - var reqBody, resBody MakeDirectoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MakeDirectoryInGuestBody struct { - Req *types.MakeDirectoryInGuest `xml:"urn:vim25 MakeDirectoryInGuest,omitempty"` - Res *types.MakeDirectoryInGuestResponse `xml:"MakeDirectoryInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MakeDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func MakeDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MakeDirectoryInGuest) (*types.MakeDirectoryInGuestResponse, error) { - var reqBody, resBody MakeDirectoryInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MakePrimaryVM_TaskBody struct { - Req *types.MakePrimaryVM_Task `xml:"urn:vim25 MakePrimaryVM_Task,omitempty"` - Res *types.MakePrimaryVM_TaskResponse `xml:"MakePrimaryVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MakePrimaryVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MakePrimaryVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MakePrimaryVM_Task) (*types.MakePrimaryVM_TaskResponse, error) { - var reqBody, resBody MakePrimaryVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsLocal_TaskBody struct { - Req *types.MarkAsLocal_Task `xml:"urn:vim25 MarkAsLocal_Task,omitempty"` - Res *types.MarkAsLocal_TaskResponse `xml:"MarkAsLocal_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsLocal_Task) (*types.MarkAsLocal_TaskResponse, error) { - var reqBody, resBody MarkAsLocal_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsNonLocal_TaskBody struct { - Req *types.MarkAsNonLocal_Task `xml:"urn:vim25 MarkAsNonLocal_Task,omitempty"` - Res *types.MarkAsNonLocal_TaskResponse `xml:"MarkAsNonLocal_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsNonLocal_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsNonLocal_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonLocal_Task) (*types.MarkAsNonLocal_TaskResponse, error) { - var reqBody, resBody MarkAsNonLocal_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsNonSsd_TaskBody struct { - Req *types.MarkAsNonSsd_Task `xml:"urn:vim25 MarkAsNonSsd_Task,omitempty"` - Res *types.MarkAsNonSsd_TaskResponse `xml:"MarkAsNonSsd_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsNonSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsNonSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsNonSsd_Task) (*types.MarkAsNonSsd_TaskResponse, error) { - var reqBody, resBody MarkAsNonSsd_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsSsd_TaskBody struct { - Req *types.MarkAsSsd_Task `xml:"urn:vim25 MarkAsSsd_Task,omitempty"` - Res *types.MarkAsSsd_TaskResponse `xml:"MarkAsSsd_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsSsd_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsSsd_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkAsSsd_Task) (*types.MarkAsSsd_TaskResponse, error) { - var reqBody, resBody MarkAsSsd_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsTemplateBody struct { - Req *types.MarkAsTemplate `xml:"urn:vim25 MarkAsTemplate,omitempty"` - Res *types.MarkAsTemplateResponse `xml:"MarkAsTemplateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsTemplateBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsTemplate(ctx context.Context, r soap.RoundTripper, req *types.MarkAsTemplate) (*types.MarkAsTemplateResponse, error) { - var reqBody, resBody MarkAsTemplateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkAsVirtualMachineBody struct { - Req *types.MarkAsVirtualMachine `xml:"urn:vim25 MarkAsVirtualMachine,omitempty"` - Res *types.MarkAsVirtualMachineResponse `xml:"MarkAsVirtualMachineResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkAsVirtualMachineBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkAsVirtualMachine(ctx context.Context, r soap.RoundTripper, req *types.MarkAsVirtualMachine) (*types.MarkAsVirtualMachineResponse, error) { - var reqBody, resBody MarkAsVirtualMachineBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkDefaultBody struct { - Req *types.MarkDefault `xml:"urn:vim25 MarkDefault,omitempty"` - Res *types.MarkDefaultResponse `xml:"MarkDefaultResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkDefaultBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkDefault(ctx context.Context, r soap.RoundTripper, req *types.MarkDefault) (*types.MarkDefaultResponse, error) { - var reqBody, resBody MarkDefaultBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkForRemovalBody struct { - Req *types.MarkForRemoval `xml:"urn:vim25 MarkForRemoval,omitempty"` - Res *types.MarkForRemovalResponse `xml:"MarkForRemovalResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkForRemovalBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkForRemoval(ctx context.Context, r soap.RoundTripper, req *types.MarkForRemoval) (*types.MarkForRemovalResponse, error) { - var reqBody, resBody MarkForRemovalBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkPerenniallyReservedBody struct { - Req *types.MarkPerenniallyReserved `xml:"urn:vim25 MarkPerenniallyReserved,omitempty"` - Res *types.MarkPerenniallyReservedResponse `xml:"MarkPerenniallyReservedResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkPerenniallyReservedBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkPerenniallyReserved(ctx context.Context, r soap.RoundTripper, req *types.MarkPerenniallyReserved) (*types.MarkPerenniallyReservedResponse, error) { - var reqBody, resBody MarkPerenniallyReservedBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkPerenniallyReservedEx_TaskBody struct { - Req *types.MarkPerenniallyReservedEx_Task `xml:"urn:vim25 MarkPerenniallyReservedEx_Task,omitempty"` - Res *types.MarkPerenniallyReservedEx_TaskResponse `xml:"MarkPerenniallyReservedEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkPerenniallyReservedEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkPerenniallyReservedEx_Task(ctx context.Context, r soap.RoundTripper, req *types.MarkPerenniallyReservedEx_Task) (*types.MarkPerenniallyReservedEx_TaskResponse, error) { - var reqBody, resBody MarkPerenniallyReservedEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MarkServiceProviderEntitiesBody struct { - Req *types.MarkServiceProviderEntities `xml:"urn:vim25 MarkServiceProviderEntities,omitempty"` - Res *types.MarkServiceProviderEntitiesResponse `xml:"MarkServiceProviderEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MarkServiceProviderEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func MarkServiceProviderEntities(ctx context.Context, r soap.RoundTripper, req *types.MarkServiceProviderEntities) (*types.MarkServiceProviderEntitiesResponse, error) { - var reqBody, resBody MarkServiceProviderEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MergeDvs_TaskBody struct { - Req *types.MergeDvs_Task `xml:"urn:vim25 MergeDvs_Task,omitempty"` - Res *types.MergeDvs_TaskResponse `xml:"MergeDvs_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MergeDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MergeDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.MergeDvs_Task) (*types.MergeDvs_TaskResponse, error) { - var reqBody, resBody MergeDvs_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MergePermissionsBody struct { - Req *types.MergePermissions `xml:"urn:vim25 MergePermissions,omitempty"` - Res *types.MergePermissionsResponse `xml:"MergePermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MergePermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func MergePermissions(ctx context.Context, r soap.RoundTripper, req *types.MergePermissions) (*types.MergePermissionsResponse, error) { - var reqBody, resBody MergePermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MigrateVM_TaskBody struct { - Req *types.MigrateVM_Task `xml:"urn:vim25 MigrateVM_Task,omitempty"` - Res *types.MigrateVM_TaskResponse `xml:"MigrateVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MigrateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MigrateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.MigrateVM_Task) (*types.MigrateVM_TaskResponse, error) { - var reqBody, resBody MigrateVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ModifyListViewBody struct { - Req *types.ModifyListView `xml:"urn:vim25 ModifyListView,omitempty"` - Res *types.ModifyListViewResponse `xml:"ModifyListViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ModifyListViewBody) Fault() *soap.Fault { return b.Fault_ } - -func ModifyListView(ctx context.Context, r soap.RoundTripper, req *types.ModifyListView) (*types.ModifyListViewResponse, error) { - var reqBody, resBody ModifyListViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MountToolsInstallerBody struct { - Req *types.MountToolsInstaller `xml:"urn:vim25 MountToolsInstaller,omitempty"` - Res *types.MountToolsInstallerResponse `xml:"MountToolsInstallerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ } - -func MountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.MountToolsInstaller) (*types.MountToolsInstallerResponse, error) { - var reqBody, resBody MountToolsInstallerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MountVffsVolumeBody struct { - Req *types.MountVffsVolume `xml:"urn:vim25 MountVffsVolume,omitempty"` - Res *types.MountVffsVolumeResponse `xml:"MountVffsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func MountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVffsVolume) (*types.MountVffsVolumeResponse, error) { - var reqBody, resBody MountVffsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MountVmfsVolumeBody struct { - Req *types.MountVmfsVolume `xml:"urn:vim25 MountVmfsVolume,omitempty"` - Res *types.MountVmfsVolumeResponse `xml:"MountVmfsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func MountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolume) (*types.MountVmfsVolumeResponse, error) { - var reqBody, resBody MountVmfsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MountVmfsVolumeEx_TaskBody struct { - Req *types.MountVmfsVolumeEx_Task `xml:"urn:vim25 MountVmfsVolumeEx_Task,omitempty"` - Res *types.MountVmfsVolumeEx_TaskResponse `xml:"MountVmfsVolumeEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.MountVmfsVolumeEx_Task) (*types.MountVmfsVolumeEx_TaskResponse, error) { - var reqBody, resBody MountVmfsVolumeEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveDVPort_TaskBody struct { - Req *types.MoveDVPort_Task `xml:"urn:vim25 MoveDVPort_Task,omitempty"` - Res *types.MoveDVPort_TaskResponse `xml:"MoveDVPort_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDVPort_Task) (*types.MoveDVPort_TaskResponse, error) { - var reqBody, resBody MoveDVPort_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveDatastoreFile_TaskBody struct { - Req *types.MoveDatastoreFile_Task `xml:"urn:vim25 MoveDatastoreFile_Task,omitempty"` - Res *types.MoveDatastoreFile_TaskResponse `xml:"MoveDatastoreFile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveDatastoreFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveDatastoreFile_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveDatastoreFile_Task) (*types.MoveDatastoreFile_TaskResponse, error) { - var reqBody, resBody MoveDatastoreFile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveDirectoryInGuestBody struct { - Req *types.MoveDirectoryInGuest `xml:"urn:vim25 MoveDirectoryInGuest,omitempty"` - Res *types.MoveDirectoryInGuestResponse `xml:"MoveDirectoryInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveDirectoryInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveDirectoryInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveDirectoryInGuest) (*types.MoveDirectoryInGuestResponse, error) { - var reqBody, resBody MoveDirectoryInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveFileInGuestBody struct { - Req *types.MoveFileInGuest `xml:"urn:vim25 MoveFileInGuest,omitempty"` - Res *types.MoveFileInGuestResponse `xml:"MoveFileInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveFileInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveFileInGuest(ctx context.Context, r soap.RoundTripper, req *types.MoveFileInGuest) (*types.MoveFileInGuestResponse, error) { - var reqBody, resBody MoveFileInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveHostInto_TaskBody struct { - Req *types.MoveHostInto_Task `xml:"urn:vim25 MoveHostInto_Task,omitempty"` - Res *types.MoveHostInto_TaskResponse `xml:"MoveHostInto_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveHostInto_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveHostInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveHostInto_Task) (*types.MoveHostInto_TaskResponse, error) { - var reqBody, resBody MoveHostInto_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveIntoFolder_TaskBody struct { - Req *types.MoveIntoFolder_Task `xml:"urn:vim25 MoveIntoFolder_Task,omitempty"` - Res *types.MoveIntoFolder_TaskResponse `xml:"MoveIntoFolder_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveIntoFolder_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveIntoFolder_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoFolder_Task) (*types.MoveIntoFolder_TaskResponse, error) { - var reqBody, resBody MoveIntoFolder_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveIntoResourcePoolBody struct { - Req *types.MoveIntoResourcePool `xml:"urn:vim25 MoveIntoResourcePool,omitempty"` - Res *types.MoveIntoResourcePoolResponse `xml:"MoveIntoResourcePoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveIntoResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveIntoResourcePool(ctx context.Context, r soap.RoundTripper, req *types.MoveIntoResourcePool) (*types.MoveIntoResourcePoolResponse, error) { - var reqBody, resBody MoveIntoResourcePoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveInto_TaskBody struct { - Req *types.MoveInto_Task `xml:"urn:vim25 MoveInto_Task,omitempty"` - Res *types.MoveInto_TaskResponse `xml:"MoveInto_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveInto_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveInto_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveInto_Task) (*types.MoveInto_TaskResponse, error) { - var reqBody, resBody MoveInto_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type MoveVirtualDisk_TaskBody struct { - Req *types.MoveVirtualDisk_Task `xml:"urn:vim25 MoveVirtualDisk_Task,omitempty"` - Res *types.MoveVirtualDisk_TaskResponse `xml:"MoveVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *MoveVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func MoveVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.MoveVirtualDisk_Task) (*types.MoveVirtualDisk_TaskResponse, error) { - var reqBody, resBody MoveVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type OpenInventoryViewFolderBody struct { - Req *types.OpenInventoryViewFolder `xml:"urn:vim25 OpenInventoryViewFolder,omitempty"` - Res *types.OpenInventoryViewFolderResponse `xml:"OpenInventoryViewFolderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *OpenInventoryViewFolderBody) Fault() *soap.Fault { return b.Fault_ } - -func OpenInventoryViewFolder(ctx context.Context, r soap.RoundTripper, req *types.OpenInventoryViewFolder) (*types.OpenInventoryViewFolderResponse, error) { - var reqBody, resBody OpenInventoryViewFolderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type OverwriteCustomizationSpecBody struct { - Req *types.OverwriteCustomizationSpec `xml:"urn:vim25 OverwriteCustomizationSpec,omitempty"` - Res *types.OverwriteCustomizationSpecResponse `xml:"OverwriteCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *OverwriteCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func OverwriteCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.OverwriteCustomizationSpec) (*types.OverwriteCustomizationSpecResponse, error) { - var reqBody, resBody OverwriteCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ParseDescriptorBody struct { - Req *types.ParseDescriptor `xml:"urn:vim25 ParseDescriptor,omitempty"` - Res *types.ParseDescriptorResponse `xml:"ParseDescriptorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ParseDescriptorBody) Fault() *soap.Fault { return b.Fault_ } - -func ParseDescriptor(ctx context.Context, r soap.RoundTripper, req *types.ParseDescriptor) (*types.ParseDescriptorResponse, error) { - var reqBody, resBody ParseDescriptorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PerformDvsProductSpecOperation_TaskBody struct { - Req *types.PerformDvsProductSpecOperation_Task `xml:"urn:vim25 PerformDvsProductSpecOperation_Task,omitempty"` - Res *types.PerformDvsProductSpecOperation_TaskResponse `xml:"PerformDvsProductSpecOperation_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PerformDvsProductSpecOperation_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PerformDvsProductSpecOperation_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformDvsProductSpecOperation_Task) (*types.PerformDvsProductSpecOperation_TaskResponse, error) { - var reqBody, resBody PerformDvsProductSpecOperation_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PerformVsanUpgradePreflightCheckBody struct { - Req *types.PerformVsanUpgradePreflightCheck `xml:"urn:vim25 PerformVsanUpgradePreflightCheck,omitempty"` - Res *types.PerformVsanUpgradePreflightCheckResponse `xml:"PerformVsanUpgradePreflightCheckResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PerformVsanUpgradePreflightCheckBody) Fault() *soap.Fault { return b.Fault_ } - -func PerformVsanUpgradePreflightCheck(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgradePreflightCheck) (*types.PerformVsanUpgradePreflightCheckResponse, error) { - var reqBody, resBody PerformVsanUpgradePreflightCheckBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PerformVsanUpgrade_TaskBody struct { - Req *types.PerformVsanUpgrade_Task `xml:"urn:vim25 PerformVsanUpgrade_Task,omitempty"` - Res *types.PerformVsanUpgrade_TaskResponse `xml:"PerformVsanUpgrade_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PerformVsanUpgrade_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PerformVsanUpgrade_Task(ctx context.Context, r soap.RoundTripper, req *types.PerformVsanUpgrade_Task) (*types.PerformVsanUpgrade_TaskResponse, error) { - var reqBody, resBody PerformVsanUpgrade_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PlaceVmBody struct { - Req *types.PlaceVm `xml:"urn:vim25 PlaceVm,omitempty"` - Res *types.PlaceVmResponse `xml:"PlaceVmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PlaceVmBody) Fault() *soap.Fault { return b.Fault_ } - -func PlaceVm(ctx context.Context, r soap.RoundTripper, req *types.PlaceVm) (*types.PlaceVmResponse, error) { - var reqBody, resBody PlaceVmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PostEventBody struct { - Req *types.PostEvent `xml:"urn:vim25 PostEvent,omitempty"` - Res *types.PostEventResponse `xml:"PostEventResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PostEventBody) Fault() *soap.Fault { return b.Fault_ } - -func PostEvent(ctx context.Context, r soap.RoundTripper, req *types.PostEvent) (*types.PostEventResponse, error) { - var reqBody, resBody PostEventBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PostHealthUpdatesBody struct { - Req *types.PostHealthUpdates `xml:"urn:vim25 PostHealthUpdates,omitempty"` - Res *types.PostHealthUpdatesResponse `xml:"PostHealthUpdatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PostHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ } - -func PostHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.PostHealthUpdates) (*types.PostHealthUpdatesResponse, error) { - var reqBody, resBody PostHealthUpdatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerDownHostToStandBy_TaskBody struct { - Req *types.PowerDownHostToStandBy_Task `xml:"urn:vim25 PowerDownHostToStandBy_Task,omitempty"` - Res *types.PowerDownHostToStandBy_TaskResponse `xml:"PowerDownHostToStandBy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerDownHostToStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerDownHostToStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerDownHostToStandBy_Task) (*types.PowerDownHostToStandBy_TaskResponse, error) { - var reqBody, resBody PowerDownHostToStandBy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerOffVApp_TaskBody struct { - Req *types.PowerOffVApp_Task `xml:"urn:vim25 PowerOffVApp_Task,omitempty"` - Res *types.PowerOffVApp_TaskResponse `xml:"PowerOffVApp_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerOffVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerOffVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVApp_Task) (*types.PowerOffVApp_TaskResponse, error) { - var reqBody, resBody PowerOffVApp_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerOffVM_TaskBody struct { - Req *types.PowerOffVM_Task `xml:"urn:vim25 PowerOffVM_Task,omitempty"` - Res *types.PowerOffVM_TaskResponse `xml:"PowerOffVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerOffVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerOffVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOffVM_Task) (*types.PowerOffVM_TaskResponse, error) { - var reqBody, resBody PowerOffVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerOnMultiVM_TaskBody struct { - Req *types.PowerOnMultiVM_Task `xml:"urn:vim25 PowerOnMultiVM_Task,omitempty"` - Res *types.PowerOnMultiVM_TaskResponse `xml:"PowerOnMultiVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerOnMultiVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerOnMultiVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnMultiVM_Task) (*types.PowerOnMultiVM_TaskResponse, error) { - var reqBody, resBody PowerOnMultiVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerOnVApp_TaskBody struct { - Req *types.PowerOnVApp_Task `xml:"urn:vim25 PowerOnVApp_Task,omitempty"` - Res *types.PowerOnVApp_TaskResponse `xml:"PowerOnVApp_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerOnVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerOnVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVApp_Task) (*types.PowerOnVApp_TaskResponse, error) { - var reqBody, resBody PowerOnVApp_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerOnVM_TaskBody struct { - Req *types.PowerOnVM_Task `xml:"urn:vim25 PowerOnVM_Task,omitempty"` - Res *types.PowerOnVM_TaskResponse `xml:"PowerOnVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerOnVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerOnVM_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerOnVM_Task) (*types.PowerOnVM_TaskResponse, error) { - var reqBody, resBody PowerOnVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PowerUpHostFromStandBy_TaskBody struct { - Req *types.PowerUpHostFromStandBy_Task `xml:"urn:vim25 PowerUpHostFromStandBy_Task,omitempty"` - Res *types.PowerUpHostFromStandBy_TaskResponse `xml:"PowerUpHostFromStandBy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PowerUpHostFromStandBy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PowerUpHostFromStandBy_Task(ctx context.Context, r soap.RoundTripper, req *types.PowerUpHostFromStandBy_Task) (*types.PowerUpHostFromStandBy_TaskResponse, error) { - var reqBody, resBody PowerUpHostFromStandBy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PrepareCryptoBody struct { - Req *types.PrepareCrypto `xml:"urn:vim25 PrepareCrypto,omitempty"` - Res *types.PrepareCryptoResponse `xml:"PrepareCryptoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PrepareCryptoBody) Fault() *soap.Fault { return b.Fault_ } - -func PrepareCrypto(ctx context.Context, r soap.RoundTripper, req *types.PrepareCrypto) (*types.PrepareCryptoResponse, error) { - var reqBody, resBody PrepareCryptoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PromoteDisks_TaskBody struct { - Req *types.PromoteDisks_Task `xml:"urn:vim25 PromoteDisks_Task,omitempty"` - Res *types.PromoteDisks_TaskResponse `xml:"PromoteDisks_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PromoteDisks_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PromoteDisks_Task(ctx context.Context, r soap.RoundTripper, req *types.PromoteDisks_Task) (*types.PromoteDisks_TaskResponse, error) { - var reqBody, resBody PromoteDisks_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PutUsbScanCodesBody struct { - Req *types.PutUsbScanCodes `xml:"urn:vim25 PutUsbScanCodes,omitempty"` - Res *types.PutUsbScanCodesResponse `xml:"PutUsbScanCodesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PutUsbScanCodesBody) Fault() *soap.Fault { return b.Fault_ } - -func PutUsbScanCodes(ctx context.Context, r soap.RoundTripper, req *types.PutUsbScanCodes) (*types.PutUsbScanCodesResponse, error) { - var reqBody, resBody PutUsbScanCodesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAnswerFileStatusBody struct { - Req *types.QueryAnswerFileStatus `xml:"urn:vim25 QueryAnswerFileStatus,omitempty"` - Res *types.QueryAnswerFileStatusResponse `xml:"QueryAnswerFileStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAnswerFileStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAnswerFileStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryAnswerFileStatus) (*types.QueryAnswerFileStatusResponse, error) { - var reqBody, resBody QueryAnswerFileStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAssignedLicensesBody struct { - Req *types.QueryAssignedLicenses `xml:"urn:vim25 QueryAssignedLicenses,omitempty"` - Res *types.QueryAssignedLicensesResponse `xml:"QueryAssignedLicensesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAssignedLicensesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAssignedLicenses(ctx context.Context, r soap.RoundTripper, req *types.QueryAssignedLicenses) (*types.QueryAssignedLicensesResponse, error) { - var reqBody, resBody QueryAssignedLicensesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailableDisksForVmfsBody struct { - Req *types.QueryAvailableDisksForVmfs `xml:"urn:vim25 QueryAvailableDisksForVmfs,omitempty"` - Res *types.QueryAvailableDisksForVmfsResponse `xml:"QueryAvailableDisksForVmfsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailableDisksForVmfsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailableDisksForVmfs(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDisksForVmfs) (*types.QueryAvailableDisksForVmfsResponse, error) { - var reqBody, resBody QueryAvailableDisksForVmfsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailableDvsSpecBody struct { - Req *types.QueryAvailableDvsSpec `xml:"urn:vim25 QueryAvailableDvsSpec,omitempty"` - Res *types.QueryAvailableDvsSpecResponse `xml:"QueryAvailableDvsSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailableDvsSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailableDvsSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableDvsSpec) (*types.QueryAvailableDvsSpecResponse, error) { - var reqBody, resBody QueryAvailableDvsSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailablePartitionBody struct { - Req *types.QueryAvailablePartition `xml:"urn:vim25 QueryAvailablePartition,omitempty"` - Res *types.QueryAvailablePartitionResponse `xml:"QueryAvailablePartitionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailablePartitionBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailablePartition(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePartition) (*types.QueryAvailablePartitionResponse, error) { - var reqBody, resBody QueryAvailablePartitionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailablePerfMetricBody struct { - Req *types.QueryAvailablePerfMetric `xml:"urn:vim25 QueryAvailablePerfMetric,omitempty"` - Res *types.QueryAvailablePerfMetricResponse `xml:"QueryAvailablePerfMetricResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailablePerfMetricBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailablePerfMetric(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailablePerfMetric) (*types.QueryAvailablePerfMetricResponse, error) { - var reqBody, resBody QueryAvailablePerfMetricBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailableSsdsBody struct { - Req *types.QueryAvailableSsds `xml:"urn:vim25 QueryAvailableSsds,omitempty"` - Res *types.QueryAvailableSsdsResponse `xml:"QueryAvailableSsdsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailableSsdsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailableSsds(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableSsds) (*types.QueryAvailableSsdsResponse, error) { - var reqBody, resBody QueryAvailableSsdsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryAvailableTimeZonesBody struct { - Req *types.QueryAvailableTimeZones `xml:"urn:vim25 QueryAvailableTimeZones,omitempty"` - Res *types.QueryAvailableTimeZonesResponse `xml:"QueryAvailableTimeZonesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryAvailableTimeZonesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryAvailableTimeZones(ctx context.Context, r soap.RoundTripper, req *types.QueryAvailableTimeZones) (*types.QueryAvailableTimeZonesResponse, error) { - var reqBody, resBody QueryAvailableTimeZonesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryBootDevicesBody struct { - Req *types.QueryBootDevices `xml:"urn:vim25 QueryBootDevices,omitempty"` - Res *types.QueryBootDevicesResponse `xml:"QueryBootDevicesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryBootDevicesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryBootDevices(ctx context.Context, r soap.RoundTripper, req *types.QueryBootDevices) (*types.QueryBootDevicesResponse, error) { - var reqBody, resBody QueryBootDevicesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryBoundVnicsBody struct { - Req *types.QueryBoundVnics `xml:"urn:vim25 QueryBoundVnics,omitempty"` - Res *types.QueryBoundVnicsResponse `xml:"QueryBoundVnicsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryBoundVnicsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryBoundVnics(ctx context.Context, r soap.RoundTripper, req *types.QueryBoundVnics) (*types.QueryBoundVnicsResponse, error) { - var reqBody, resBody QueryBoundVnicsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCandidateNicsBody struct { - Req *types.QueryCandidateNics `xml:"urn:vim25 QueryCandidateNics,omitempty"` - Res *types.QueryCandidateNicsResponse `xml:"QueryCandidateNicsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCandidateNicsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCandidateNics(ctx context.Context, r soap.RoundTripper, req *types.QueryCandidateNics) (*types.QueryCandidateNicsResponse, error) { - var reqBody, resBody QueryCandidateNicsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryChangedDiskAreasBody struct { - Req *types.QueryChangedDiskAreas `xml:"urn:vim25 QueryChangedDiskAreas,omitempty"` - Res *types.QueryChangedDiskAreasResponse `xml:"QueryChangedDiskAreasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryChangedDiskAreasBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryChangedDiskAreas(ctx context.Context, r soap.RoundTripper, req *types.QueryChangedDiskAreas) (*types.QueryChangedDiskAreasResponse, error) { - var reqBody, resBody QueryChangedDiskAreasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCmmdsBody struct { - Req *types.QueryCmmds `xml:"urn:vim25 QueryCmmds,omitempty"` - Res *types.QueryCmmdsResponse `xml:"QueryCmmdsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCmmdsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCmmds(ctx context.Context, r soap.RoundTripper, req *types.QueryCmmds) (*types.QueryCmmdsResponse, error) { - var reqBody, resBody QueryCmmdsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCompatibleHostForExistingDvsBody struct { - Req *types.QueryCompatibleHostForExistingDvs `xml:"urn:vim25 QueryCompatibleHostForExistingDvs,omitempty"` - Res *types.QueryCompatibleHostForExistingDvsResponse `xml:"QueryCompatibleHostForExistingDvsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCompatibleHostForExistingDvsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCompatibleHostForExistingDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForExistingDvs) (*types.QueryCompatibleHostForExistingDvsResponse, error) { - var reqBody, resBody QueryCompatibleHostForExistingDvsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCompatibleHostForNewDvsBody struct { - Req *types.QueryCompatibleHostForNewDvs `xml:"urn:vim25 QueryCompatibleHostForNewDvs,omitempty"` - Res *types.QueryCompatibleHostForNewDvsResponse `xml:"QueryCompatibleHostForNewDvsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCompatibleHostForNewDvsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCompatibleHostForNewDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleHostForNewDvs) (*types.QueryCompatibleHostForNewDvsResponse, error) { - var reqBody, resBody QueryCompatibleHostForNewDvsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCompatibleVmnicsFromHostsBody struct { - Req *types.QueryCompatibleVmnicsFromHosts `xml:"urn:vim25 QueryCompatibleVmnicsFromHosts,omitempty"` - Res *types.QueryCompatibleVmnicsFromHostsResponse `xml:"QueryCompatibleVmnicsFromHostsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCompatibleVmnicsFromHostsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCompatibleVmnicsFromHosts(ctx context.Context, r soap.RoundTripper, req *types.QueryCompatibleVmnicsFromHosts) (*types.QueryCompatibleVmnicsFromHostsResponse, error) { - var reqBody, resBody QueryCompatibleVmnicsFromHostsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryComplianceStatusBody struct { - Req *types.QueryComplianceStatus `xml:"urn:vim25 QueryComplianceStatus,omitempty"` - Res *types.QueryComplianceStatusResponse `xml:"QueryComplianceStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryComplianceStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryComplianceStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryComplianceStatus) (*types.QueryComplianceStatusResponse, error) { - var reqBody, resBody QueryComplianceStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConfigOptionBody struct { - Req *types.QueryConfigOption `xml:"urn:vim25 QueryConfigOption,omitempty"` - Res *types.QueryConfigOptionResponse `xml:"QueryConfigOptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOption) (*types.QueryConfigOptionResponse, error) { - var reqBody, resBody QueryConfigOptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConfigOptionDescriptorBody struct { - Req *types.QueryConfigOptionDescriptor `xml:"urn:vim25 QueryConfigOptionDescriptor,omitempty"` - Res *types.QueryConfigOptionDescriptorResponse `xml:"QueryConfigOptionDescriptorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConfigOptionDescriptorBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConfigOptionDescriptor(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionDescriptor) (*types.QueryConfigOptionDescriptorResponse, error) { - var reqBody, resBody QueryConfigOptionDescriptorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConfigOptionExBody struct { - Req *types.QueryConfigOptionEx `xml:"urn:vim25 QueryConfigOptionEx,omitempty"` - Res *types.QueryConfigOptionExResponse `xml:"QueryConfigOptionExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConfigOptionExBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConfigOptionEx(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigOptionEx) (*types.QueryConfigOptionExResponse, error) { - var reqBody, resBody QueryConfigOptionExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConfigTargetBody struct { - Req *types.QueryConfigTarget `xml:"urn:vim25 QueryConfigTarget,omitempty"` - Res *types.QueryConfigTargetResponse `xml:"QueryConfigTargetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConfigTargetBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryConfigTarget) (*types.QueryConfigTargetResponse, error) { - var reqBody, resBody QueryConfigTargetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConfiguredModuleOptionStringBody struct { - Req *types.QueryConfiguredModuleOptionString `xml:"urn:vim25 QueryConfiguredModuleOptionString,omitempty"` - Res *types.QueryConfiguredModuleOptionStringResponse `xml:"QueryConfiguredModuleOptionStringResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConfiguredModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConfiguredModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.QueryConfiguredModuleOptionString) (*types.QueryConfiguredModuleOptionStringResponse, error) { - var reqBody, resBody QueryConfiguredModuleOptionStringBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConnectionInfoBody struct { - Req *types.QueryConnectionInfo `xml:"urn:vim25 QueryConnectionInfo,omitempty"` - Res *types.QueryConnectionInfoResponse `xml:"QueryConnectionInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfo) (*types.QueryConnectionInfoResponse, error) { - var reqBody, resBody QueryConnectionInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConnectionInfoViaSpecBody struct { - Req *types.QueryConnectionInfoViaSpec `xml:"urn:vim25 QueryConnectionInfoViaSpec,omitempty"` - Res *types.QueryConnectionInfoViaSpecResponse `xml:"QueryConnectionInfoViaSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConnectionInfoViaSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConnectionInfoViaSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryConnectionInfoViaSpec) (*types.QueryConnectionInfoViaSpecResponse, error) { - var reqBody, resBody QueryConnectionInfoViaSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryConnectionsBody struct { - Req *types.QueryConnections `xml:"urn:vim25 QueryConnections,omitempty"` - Res *types.QueryConnectionsResponse `xml:"QueryConnectionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryConnectionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryConnections(ctx context.Context, r soap.RoundTripper, req *types.QueryConnections) (*types.QueryConnectionsResponse, error) { - var reqBody, resBody QueryConnectionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryCryptoKeyStatusBody struct { - Req *types.QueryCryptoKeyStatus `xml:"urn:vim25 QueryCryptoKeyStatus,omitempty"` - Res *types.QueryCryptoKeyStatusResponse `xml:"QueryCryptoKeyStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryCryptoKeyStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryCryptoKeyStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryCryptoKeyStatus) (*types.QueryCryptoKeyStatusResponse, error) { - var reqBody, resBody QueryCryptoKeyStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDatastorePerformanceSummaryBody struct { - Req *types.QueryDatastorePerformanceSummary `xml:"urn:vim25 QueryDatastorePerformanceSummary,omitempty"` - Res *types.QueryDatastorePerformanceSummaryResponse `xml:"QueryDatastorePerformanceSummaryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDatastorePerformanceSummaryBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDatastorePerformanceSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryDatastorePerformanceSummary) (*types.QueryDatastorePerformanceSummaryResponse, error) { - var reqBody, resBody QueryDatastorePerformanceSummaryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDateTimeBody struct { - Req *types.QueryDateTime `xml:"urn:vim25 QueryDateTime,omitempty"` - Res *types.QueryDateTimeResponse `xml:"QueryDateTimeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDateTimeBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDateTime(ctx context.Context, r soap.RoundTripper, req *types.QueryDateTime) (*types.QueryDateTimeResponse, error) { - var reqBody, resBody QueryDateTimeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDescriptionsBody struct { - Req *types.QueryDescriptions `xml:"urn:vim25 QueryDescriptions,omitempty"` - Res *types.QueryDescriptionsResponse `xml:"QueryDescriptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDescriptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDescriptions(ctx context.Context, r soap.RoundTripper, req *types.QueryDescriptions) (*types.QueryDescriptionsResponse, error) { - var reqBody, resBody QueryDescriptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDisksForVsanBody struct { - Req *types.QueryDisksForVsan `xml:"urn:vim25 QueryDisksForVsan,omitempty"` - Res *types.QueryDisksForVsanResponse `xml:"QueryDisksForVsanResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDisksForVsanBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDisksForVsan(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksForVsan) (*types.QueryDisksForVsanResponse, error) { - var reqBody, resBody QueryDisksForVsanBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDisksUsingFilterBody struct { - Req *types.QueryDisksUsingFilter `xml:"urn:vim25 QueryDisksUsingFilter,omitempty"` - Res *types.QueryDisksUsingFilterResponse `xml:"QueryDisksUsingFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDisksUsingFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDisksUsingFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryDisksUsingFilter) (*types.QueryDisksUsingFilterResponse, error) { - var reqBody, resBody QueryDisksUsingFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDvsByUuidBody struct { - Req *types.QueryDvsByUuid `xml:"urn:vim25 QueryDvsByUuid,omitempty"` - Res *types.QueryDvsByUuidResponse `xml:"QueryDvsByUuidResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDvsByUuidBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDvsByUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsByUuid) (*types.QueryDvsByUuidResponse, error) { - var reqBody, resBody QueryDvsByUuidBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDvsCheckCompatibilityBody struct { - Req *types.QueryDvsCheckCompatibility `xml:"urn:vim25 QueryDvsCheckCompatibility,omitempty"` - Res *types.QueryDvsCheckCompatibilityResponse `xml:"QueryDvsCheckCompatibilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDvsCheckCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDvsCheckCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCheckCompatibility) (*types.QueryDvsCheckCompatibilityResponse, error) { - var reqBody, resBody QueryDvsCheckCompatibilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDvsCompatibleHostSpecBody struct { - Req *types.QueryDvsCompatibleHostSpec `xml:"urn:vim25 QueryDvsCompatibleHostSpec,omitempty"` - Res *types.QueryDvsCompatibleHostSpecResponse `xml:"QueryDvsCompatibleHostSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDvsCompatibleHostSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDvsCompatibleHostSpec(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsCompatibleHostSpec) (*types.QueryDvsCompatibleHostSpecResponse, error) { - var reqBody, resBody QueryDvsCompatibleHostSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDvsConfigTargetBody struct { - Req *types.QueryDvsConfigTarget `xml:"urn:vim25 QueryDvsConfigTarget,omitempty"` - Res *types.QueryDvsConfigTargetResponse `xml:"QueryDvsConfigTargetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDvsConfigTargetBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDvsConfigTarget(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsConfigTarget) (*types.QueryDvsConfigTargetResponse, error) { - var reqBody, resBody QueryDvsConfigTargetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDvsFeatureCapabilityBody struct { - Req *types.QueryDvsFeatureCapability `xml:"urn:vim25 QueryDvsFeatureCapability,omitempty"` - Res *types.QueryDvsFeatureCapabilityResponse `xml:"QueryDvsFeatureCapabilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDvsFeatureCapabilityBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDvsFeatureCapability(ctx context.Context, r soap.RoundTripper, req *types.QueryDvsFeatureCapability) (*types.QueryDvsFeatureCapabilityResponse, error) { - var reqBody, resBody QueryDvsFeatureCapabilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryEventsBody struct { - Req *types.QueryEvents `xml:"urn:vim25 QueryEvents,omitempty"` - Res *types.QueryEventsResponse `xml:"QueryEventsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryEventsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryEvents(ctx context.Context, r soap.RoundTripper, req *types.QueryEvents) (*types.QueryEventsResponse, error) { - var reqBody, resBody QueryEventsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryExpressionMetadataBody struct { - Req *types.QueryExpressionMetadata `xml:"urn:vim25 QueryExpressionMetadata,omitempty"` - Res *types.QueryExpressionMetadataResponse `xml:"QueryExpressionMetadataResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryExpressionMetadataBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryExpressionMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryExpressionMetadata) (*types.QueryExpressionMetadataResponse, error) { - var reqBody, resBody QueryExpressionMetadataBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryExtensionIpAllocationUsageBody struct { - Req *types.QueryExtensionIpAllocationUsage `xml:"urn:vim25 QueryExtensionIpAllocationUsage,omitempty"` - Res *types.QueryExtensionIpAllocationUsageResponse `xml:"QueryExtensionIpAllocationUsageResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryExtensionIpAllocationUsageBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryExtensionIpAllocationUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryExtensionIpAllocationUsage) (*types.QueryExtensionIpAllocationUsageResponse, error) { - var reqBody, resBody QueryExtensionIpAllocationUsageBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFaultToleranceCompatibilityBody struct { - Req *types.QueryFaultToleranceCompatibility `xml:"urn:vim25 QueryFaultToleranceCompatibility,omitempty"` - Res *types.QueryFaultToleranceCompatibilityResponse `xml:"QueryFaultToleranceCompatibilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFaultToleranceCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFaultToleranceCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibility) (*types.QueryFaultToleranceCompatibilityResponse, error) { - var reqBody, resBody QueryFaultToleranceCompatibilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFaultToleranceCompatibilityExBody struct { - Req *types.QueryFaultToleranceCompatibilityEx `xml:"urn:vim25 QueryFaultToleranceCompatibilityEx,omitempty"` - Res *types.QueryFaultToleranceCompatibilityExResponse `xml:"QueryFaultToleranceCompatibilityExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFaultToleranceCompatibilityExBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFaultToleranceCompatibilityEx(ctx context.Context, r soap.RoundTripper, req *types.QueryFaultToleranceCompatibilityEx) (*types.QueryFaultToleranceCompatibilityExResponse, error) { - var reqBody, resBody QueryFaultToleranceCompatibilityExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFilterEntitiesBody struct { - Req *types.QueryFilterEntities `xml:"urn:vim25 QueryFilterEntities,omitempty"` - Res *types.QueryFilterEntitiesResponse `xml:"QueryFilterEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterEntities) (*types.QueryFilterEntitiesResponse, error) { - var reqBody, resBody QueryFilterEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFilterInfoIdsBody struct { - Req *types.QueryFilterInfoIds `xml:"urn:vim25 QueryFilterInfoIds,omitempty"` - Res *types.QueryFilterInfoIdsResponse `xml:"QueryFilterInfoIdsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFilterInfoIdsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFilterInfoIds(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterInfoIds) (*types.QueryFilterInfoIdsResponse, error) { - var reqBody, resBody QueryFilterInfoIdsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFilterListBody struct { - Req *types.QueryFilterList `xml:"urn:vim25 QueryFilterList,omitempty"` - Res *types.QueryFilterListResponse `xml:"QueryFilterListResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFilterListBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFilterList(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterList) (*types.QueryFilterListResponse, error) { - var reqBody, resBody QueryFilterListBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFilterNameBody struct { - Req *types.QueryFilterName `xml:"urn:vim25 QueryFilterName,omitempty"` - Res *types.QueryFilterNameResponse `xml:"QueryFilterNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFilterNameBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFilterName(ctx context.Context, r soap.RoundTripper, req *types.QueryFilterName) (*types.QueryFilterNameResponse, error) { - var reqBody, resBody QueryFilterNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryFirmwareConfigUploadURLBody struct { - Req *types.QueryFirmwareConfigUploadURL `xml:"urn:vim25 QueryFirmwareConfigUploadURL,omitempty"` - Res *types.QueryFirmwareConfigUploadURLResponse `xml:"QueryFirmwareConfigUploadURLResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryFirmwareConfigUploadURLBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryFirmwareConfigUploadURL(ctx context.Context, r soap.RoundTripper, req *types.QueryFirmwareConfigUploadURL) (*types.QueryFirmwareConfigUploadURLResponse, error) { - var reqBody, resBody QueryFirmwareConfigUploadURLBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHealthUpdateInfosBody struct { - Req *types.QueryHealthUpdateInfos `xml:"urn:vim25 QueryHealthUpdateInfos,omitempty"` - Res *types.QueryHealthUpdateInfosResponse `xml:"QueryHealthUpdateInfosResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHealthUpdateInfosBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHealthUpdateInfos(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdateInfos) (*types.QueryHealthUpdateInfosResponse, error) { - var reqBody, resBody QueryHealthUpdateInfosBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHealthUpdatesBody struct { - Req *types.QueryHealthUpdates `xml:"urn:vim25 QueryHealthUpdates,omitempty"` - Res *types.QueryHealthUpdatesResponse `xml:"QueryHealthUpdatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHealthUpdatesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHealthUpdates(ctx context.Context, r soap.RoundTripper, req *types.QueryHealthUpdates) (*types.QueryHealthUpdatesResponse, error) { - var reqBody, resBody QueryHealthUpdatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHostConnectionInfoBody struct { - Req *types.QueryHostConnectionInfo `xml:"urn:vim25 QueryHostConnectionInfo,omitempty"` - Res *types.QueryHostConnectionInfoResponse `xml:"QueryHostConnectionInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHostConnectionInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHostConnectionInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryHostConnectionInfo) (*types.QueryHostConnectionInfoResponse, error) { - var reqBody, resBody QueryHostConnectionInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHostPatch_TaskBody struct { - Req *types.QueryHostPatch_Task `xml:"urn:vim25 QueryHostPatch_Task,omitempty"` - Res *types.QueryHostPatch_TaskResponse `xml:"QueryHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryHostPatch_Task) (*types.QueryHostPatch_TaskResponse, error) { - var reqBody, resBody QueryHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHostProfileMetadataBody struct { - Req *types.QueryHostProfileMetadata `xml:"urn:vim25 QueryHostProfileMetadata,omitempty"` - Res *types.QueryHostProfileMetadataResponse `xml:"QueryHostProfileMetadataResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHostProfileMetadataBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHostProfileMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryHostProfileMetadata) (*types.QueryHostProfileMetadataResponse, error) { - var reqBody, resBody QueryHostProfileMetadataBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHostStatusBody struct { - Req *types.QueryHostStatus `xml:"urn:vim25 QueryHostStatus,omitempty"` - Res *types.QueryHostStatusResponse `xml:"QueryHostStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHostStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHostStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryHostStatus) (*types.QueryHostStatusResponse, error) { - var reqBody, resBody QueryHostStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryHostsWithAttachedLunBody struct { - Req *types.QueryHostsWithAttachedLun `xml:"urn:vim25 QueryHostsWithAttachedLun,omitempty"` - Res *types.QueryHostsWithAttachedLunResponse `xml:"QueryHostsWithAttachedLunResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryHostsWithAttachedLunBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryHostsWithAttachedLun(ctx context.Context, r soap.RoundTripper, req *types.QueryHostsWithAttachedLun) (*types.QueryHostsWithAttachedLunResponse, error) { - var reqBody, resBody QueryHostsWithAttachedLunBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryIORMConfigOptionBody struct { - Req *types.QueryIORMConfigOption `xml:"urn:vim25 QueryIORMConfigOption,omitempty"` - Res *types.QueryIORMConfigOptionResponse `xml:"QueryIORMConfigOptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryIORMConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryIORMConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryIORMConfigOption) (*types.QueryIORMConfigOptionResponse, error) { - var reqBody, resBody QueryIORMConfigOptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryIPAllocationsBody struct { - Req *types.QueryIPAllocations `xml:"urn:vim25 QueryIPAllocations,omitempty"` - Res *types.QueryIPAllocationsResponse `xml:"QueryIPAllocationsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryIPAllocationsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryIPAllocations(ctx context.Context, r soap.RoundTripper, req *types.QueryIPAllocations) (*types.QueryIPAllocationsResponse, error) { - var reqBody, resBody QueryIPAllocationsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryIoFilterInfoBody struct { - Req *types.QueryIoFilterInfo `xml:"urn:vim25 QueryIoFilterInfo,omitempty"` - Res *types.QueryIoFilterInfoResponse `xml:"QueryIoFilterInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryIoFilterInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryIoFilterInfo(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterInfo) (*types.QueryIoFilterInfoResponse, error) { - var reqBody, resBody QueryIoFilterInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryIoFilterIssuesBody struct { - Req *types.QueryIoFilterIssues `xml:"urn:vim25 QueryIoFilterIssues,omitempty"` - Res *types.QueryIoFilterIssuesResponse `xml:"QueryIoFilterIssuesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryIoFilterIssuesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryIoFilterIssues(ctx context.Context, r soap.RoundTripper, req *types.QueryIoFilterIssues) (*types.QueryIoFilterIssuesResponse, error) { - var reqBody, resBody QueryIoFilterIssuesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryIpPoolsBody struct { - Req *types.QueryIpPools `xml:"urn:vim25 QueryIpPools,omitempty"` - Res *types.QueryIpPoolsResponse `xml:"QueryIpPoolsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryIpPoolsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryIpPools(ctx context.Context, r soap.RoundTripper, req *types.QueryIpPools) (*types.QueryIpPoolsResponse, error) { - var reqBody, resBody QueryIpPoolsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryLicenseSourceAvailabilityBody struct { - Req *types.QueryLicenseSourceAvailability `xml:"urn:vim25 QueryLicenseSourceAvailability,omitempty"` - Res *types.QueryLicenseSourceAvailabilityResponse `xml:"QueryLicenseSourceAvailabilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryLicenseSourceAvailabilityBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryLicenseSourceAvailability(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseSourceAvailability) (*types.QueryLicenseSourceAvailabilityResponse, error) { - var reqBody, resBody QueryLicenseSourceAvailabilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryLicenseUsageBody struct { - Req *types.QueryLicenseUsage `xml:"urn:vim25 QueryLicenseUsage,omitempty"` - Res *types.QueryLicenseUsageResponse `xml:"QueryLicenseUsageResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryLicenseUsageBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryLicenseUsage(ctx context.Context, r soap.RoundTripper, req *types.QueryLicenseUsage) (*types.QueryLicenseUsageResponse, error) { - var reqBody, resBody QueryLicenseUsageBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryLockdownExceptionsBody struct { - Req *types.QueryLockdownExceptions `xml:"urn:vim25 QueryLockdownExceptions,omitempty"` - Res *types.QueryLockdownExceptionsResponse `xml:"QueryLockdownExceptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.QueryLockdownExceptions) (*types.QueryLockdownExceptionsResponse, error) { - var reqBody, resBody QueryLockdownExceptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryManagedByBody struct { - Req *types.QueryManagedBy `xml:"urn:vim25 QueryManagedBy,omitempty"` - Res *types.QueryManagedByResponse `xml:"QueryManagedByResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryManagedByBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryManagedBy(ctx context.Context, r soap.RoundTripper, req *types.QueryManagedBy) (*types.QueryManagedByResponse, error) { - var reqBody, resBody QueryManagedByBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryMaxQueueDepthBody struct { - Req *types.QueryMaxQueueDepth `xml:"urn:vim25 QueryMaxQueueDepth,omitempty"` - Res *types.QueryMaxQueueDepthResponse `xml:"QueryMaxQueueDepthResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryMaxQueueDepthBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryMaxQueueDepth(ctx context.Context, r soap.RoundTripper, req *types.QueryMaxQueueDepth) (*types.QueryMaxQueueDepthResponse, error) { - var reqBody, resBody QueryMaxQueueDepthBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryMemoryOverheadBody struct { - Req *types.QueryMemoryOverhead `xml:"urn:vim25 QueryMemoryOverhead,omitempty"` - Res *types.QueryMemoryOverheadResponse `xml:"QueryMemoryOverheadResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryMemoryOverheadBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryMemoryOverhead(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverhead) (*types.QueryMemoryOverheadResponse, error) { - var reqBody, resBody QueryMemoryOverheadBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryMemoryOverheadExBody struct { - Req *types.QueryMemoryOverheadEx `xml:"urn:vim25 QueryMemoryOverheadEx,omitempty"` - Res *types.QueryMemoryOverheadExResponse `xml:"QueryMemoryOverheadExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryMemoryOverheadExBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryMemoryOverheadEx(ctx context.Context, r soap.RoundTripper, req *types.QueryMemoryOverheadEx) (*types.QueryMemoryOverheadExResponse, error) { - var reqBody, resBody QueryMemoryOverheadExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryMigrationDependenciesBody struct { - Req *types.QueryMigrationDependencies `xml:"urn:vim25 QueryMigrationDependencies,omitempty"` - Res *types.QueryMigrationDependenciesResponse `xml:"QueryMigrationDependenciesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryMigrationDependenciesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryMigrationDependencies(ctx context.Context, r soap.RoundTripper, req *types.QueryMigrationDependencies) (*types.QueryMigrationDependenciesResponse, error) { - var reqBody, resBody QueryMigrationDependenciesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryModulesBody struct { - Req *types.QueryModules `xml:"urn:vim25 QueryModules,omitempty"` - Res *types.QueryModulesResponse `xml:"QueryModulesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryModulesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryModules(ctx context.Context, r soap.RoundTripper, req *types.QueryModules) (*types.QueryModulesResponse, error) { - var reqBody, resBody QueryModulesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryMonitoredEntitiesBody struct { - Req *types.QueryMonitoredEntities `xml:"urn:vim25 QueryMonitoredEntities,omitempty"` - Res *types.QueryMonitoredEntitiesResponse `xml:"QueryMonitoredEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.QueryMonitoredEntities) (*types.QueryMonitoredEntitiesResponse, error) { - var reqBody, resBody QueryMonitoredEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryNFSUserBody struct { - Req *types.QueryNFSUser `xml:"urn:vim25 QueryNFSUser,omitempty"` - Res *types.QueryNFSUserResponse `xml:"QueryNFSUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryNFSUserBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryNFSUser(ctx context.Context, r soap.RoundTripper, req *types.QueryNFSUser) (*types.QueryNFSUserResponse, error) { - var reqBody, resBody QueryNFSUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryNetConfigBody struct { - Req *types.QueryNetConfig `xml:"urn:vim25 QueryNetConfig,omitempty"` - Res *types.QueryNetConfigResponse `xml:"QueryNetConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryNetConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryNetConfig(ctx context.Context, r soap.RoundTripper, req *types.QueryNetConfig) (*types.QueryNetConfigResponse, error) { - var reqBody, resBody QueryNetConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryNetworkHintBody struct { - Req *types.QueryNetworkHint `xml:"urn:vim25 QueryNetworkHint,omitempty"` - Res *types.QueryNetworkHintResponse `xml:"QueryNetworkHintResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryNetworkHintBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryNetworkHint(ctx context.Context, r soap.RoundTripper, req *types.QueryNetworkHint) (*types.QueryNetworkHintResponse, error) { - var reqBody, resBody QueryNetworkHintBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryObjectsOnPhysicalVsanDiskBody struct { - Req *types.QueryObjectsOnPhysicalVsanDisk `xml:"urn:vim25 QueryObjectsOnPhysicalVsanDisk,omitempty"` - Res *types.QueryObjectsOnPhysicalVsanDiskResponse `xml:"QueryObjectsOnPhysicalVsanDiskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryObjectsOnPhysicalVsanDiskBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryObjectsOnPhysicalVsanDisk(ctx context.Context, r soap.RoundTripper, req *types.QueryObjectsOnPhysicalVsanDisk) (*types.QueryObjectsOnPhysicalVsanDiskResponse, error) { - var reqBody, resBody QueryObjectsOnPhysicalVsanDiskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryOptionsBody struct { - Req *types.QueryOptions `xml:"urn:vim25 QueryOptions,omitempty"` - Res *types.QueryOptionsResponse `xml:"QueryOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryOptions) (*types.QueryOptionsResponse, error) { - var reqBody, resBody QueryOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPartitionCreateDescBody struct { - Req *types.QueryPartitionCreateDesc `xml:"urn:vim25 QueryPartitionCreateDesc,omitempty"` - Res *types.QueryPartitionCreateDescResponse `xml:"QueryPartitionCreateDescResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPartitionCreateDescBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPartitionCreateDesc(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateDesc) (*types.QueryPartitionCreateDescResponse, error) { - var reqBody, resBody QueryPartitionCreateDescBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPartitionCreateOptionsBody struct { - Req *types.QueryPartitionCreateOptions `xml:"urn:vim25 QueryPartitionCreateOptions,omitempty"` - Res *types.QueryPartitionCreateOptionsResponse `xml:"QueryPartitionCreateOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPartitionCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPartitionCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPartitionCreateOptions) (*types.QueryPartitionCreateOptionsResponse, error) { - var reqBody, resBody QueryPartitionCreateOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPathSelectionPolicyOptionsBody struct { - Req *types.QueryPathSelectionPolicyOptions `xml:"urn:vim25 QueryPathSelectionPolicyOptions,omitempty"` - Res *types.QueryPathSelectionPolicyOptionsResponse `xml:"QueryPathSelectionPolicyOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPathSelectionPolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPathSelectionPolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryPathSelectionPolicyOptions) (*types.QueryPathSelectionPolicyOptionsResponse, error) { - var reqBody, resBody QueryPathSelectionPolicyOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPerfBody struct { - Req *types.QueryPerf `xml:"urn:vim25 QueryPerf,omitempty"` - Res *types.QueryPerfResponse `xml:"QueryPerfResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPerfBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPerf(ctx context.Context, r soap.RoundTripper, req *types.QueryPerf) (*types.QueryPerfResponse, error) { - var reqBody, resBody QueryPerfBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPerfCompositeBody struct { - Req *types.QueryPerfComposite `xml:"urn:vim25 QueryPerfComposite,omitempty"` - Res *types.QueryPerfCompositeResponse `xml:"QueryPerfCompositeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPerfCompositeBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPerfComposite(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfComposite) (*types.QueryPerfCompositeResponse, error) { - var reqBody, resBody QueryPerfCompositeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPerfCounterBody struct { - Req *types.QueryPerfCounter `xml:"urn:vim25 QueryPerfCounter,omitempty"` - Res *types.QueryPerfCounterResponse `xml:"QueryPerfCounterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPerfCounterBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPerfCounter(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounter) (*types.QueryPerfCounterResponse, error) { - var reqBody, resBody QueryPerfCounterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPerfCounterByLevelBody struct { - Req *types.QueryPerfCounterByLevel `xml:"urn:vim25 QueryPerfCounterByLevel,omitempty"` - Res *types.QueryPerfCounterByLevelResponse `xml:"QueryPerfCounterByLevelResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPerfCounterByLevelBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPerfCounterByLevel(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfCounterByLevel) (*types.QueryPerfCounterByLevelResponse, error) { - var reqBody, resBody QueryPerfCounterByLevelBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPerfProviderSummaryBody struct { - Req *types.QueryPerfProviderSummary `xml:"urn:vim25 QueryPerfProviderSummary,omitempty"` - Res *types.QueryPerfProviderSummaryResponse `xml:"QueryPerfProviderSummaryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPerfProviderSummaryBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPerfProviderSummary(ctx context.Context, r soap.RoundTripper, req *types.QueryPerfProviderSummary) (*types.QueryPerfProviderSummaryResponse, error) { - var reqBody, resBody QueryPerfProviderSummaryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPhysicalVsanDisksBody struct { - Req *types.QueryPhysicalVsanDisks `xml:"urn:vim25 QueryPhysicalVsanDisks,omitempty"` - Res *types.QueryPhysicalVsanDisksResponse `xml:"QueryPhysicalVsanDisksResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPhysicalVsanDisksBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPhysicalVsanDisks(ctx context.Context, r soap.RoundTripper, req *types.QueryPhysicalVsanDisks) (*types.QueryPhysicalVsanDisksResponse, error) { - var reqBody, resBody QueryPhysicalVsanDisksBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPnicStatusBody struct { - Req *types.QueryPnicStatus `xml:"urn:vim25 QueryPnicStatus,omitempty"` - Res *types.QueryPnicStatusResponse `xml:"QueryPnicStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPnicStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryPnicStatus) (*types.QueryPnicStatusResponse, error) { - var reqBody, resBody QueryPnicStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryPolicyMetadataBody struct { - Req *types.QueryPolicyMetadata `xml:"urn:vim25 QueryPolicyMetadata,omitempty"` - Res *types.QueryPolicyMetadataResponse `xml:"QueryPolicyMetadataResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryPolicyMetadataBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryPolicyMetadata(ctx context.Context, r soap.RoundTripper, req *types.QueryPolicyMetadata) (*types.QueryPolicyMetadataResponse, error) { - var reqBody, resBody QueryPolicyMetadataBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryProductLockerLocationBody struct { - Req *types.QueryProductLockerLocation `xml:"urn:vim25 QueryProductLockerLocation,omitempty"` - Res *types.QueryProductLockerLocationResponse `xml:"QueryProductLockerLocationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryProductLockerLocationBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryProductLockerLocation(ctx context.Context, r soap.RoundTripper, req *types.QueryProductLockerLocation) (*types.QueryProductLockerLocationResponse, error) { - var reqBody, resBody QueryProductLockerLocationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryProfileStructureBody struct { - Req *types.QueryProfileStructure `xml:"urn:vim25 QueryProfileStructure,omitempty"` - Res *types.QueryProfileStructureResponse `xml:"QueryProfileStructureResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryProfileStructureBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryProfileStructure(ctx context.Context, r soap.RoundTripper, req *types.QueryProfileStructure) (*types.QueryProfileStructureResponse, error) { - var reqBody, resBody QueryProfileStructureBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryProviderListBody struct { - Req *types.QueryProviderList `xml:"urn:vim25 QueryProviderList,omitempty"` - Res *types.QueryProviderListResponse `xml:"QueryProviderListResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryProviderListBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryProviderList(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderList) (*types.QueryProviderListResponse, error) { - var reqBody, resBody QueryProviderListBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryProviderNameBody struct { - Req *types.QueryProviderName `xml:"urn:vim25 QueryProviderName,omitempty"` - Res *types.QueryProviderNameResponse `xml:"QueryProviderNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryProviderNameBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryProviderName(ctx context.Context, r soap.RoundTripper, req *types.QueryProviderName) (*types.QueryProviderNameResponse, error) { - var reqBody, resBody QueryProviderNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryResourceConfigOptionBody struct { - Req *types.QueryResourceConfigOption `xml:"urn:vim25 QueryResourceConfigOption,omitempty"` - Res *types.QueryResourceConfigOptionResponse `xml:"QueryResourceConfigOptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryResourceConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryResourceConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryResourceConfigOption) (*types.QueryResourceConfigOptionResponse, error) { - var reqBody, resBody QueryResourceConfigOptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryServiceListBody struct { - Req *types.QueryServiceList `xml:"urn:vim25 QueryServiceList,omitempty"` - Res *types.QueryServiceListResponse `xml:"QueryServiceListResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryServiceListBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryServiceList(ctx context.Context, r soap.RoundTripper, req *types.QueryServiceList) (*types.QueryServiceListResponse, error) { - var reqBody, resBody QueryServiceListBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryStorageArrayTypePolicyOptionsBody struct { - Req *types.QueryStorageArrayTypePolicyOptions `xml:"urn:vim25 QueryStorageArrayTypePolicyOptions,omitempty"` - Res *types.QueryStorageArrayTypePolicyOptionsResponse `xml:"QueryStorageArrayTypePolicyOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryStorageArrayTypePolicyOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryStorageArrayTypePolicyOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryStorageArrayTypePolicyOptions) (*types.QueryStorageArrayTypePolicyOptionsResponse, error) { - var reqBody, resBody QueryStorageArrayTypePolicyOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QuerySupportedFeaturesBody struct { - Req *types.QuerySupportedFeatures `xml:"urn:vim25 QuerySupportedFeatures,omitempty"` - Res *types.QuerySupportedFeaturesResponse `xml:"QuerySupportedFeaturesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QuerySupportedFeaturesBody) Fault() *soap.Fault { return b.Fault_ } - -func QuerySupportedFeatures(ctx context.Context, r soap.RoundTripper, req *types.QuerySupportedFeatures) (*types.QuerySupportedFeaturesResponse, error) { - var reqBody, resBody QuerySupportedFeaturesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QuerySupportedNetworkOffloadSpecBody struct { - Req *types.QuerySupportedNetworkOffloadSpec `xml:"urn:vim25 QuerySupportedNetworkOffloadSpec,omitempty"` - Res *types.QuerySupportedNetworkOffloadSpecResponse `xml:"QuerySupportedNetworkOffloadSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QuerySupportedNetworkOffloadSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func QuerySupportedNetworkOffloadSpec(ctx context.Context, r soap.RoundTripper, req *types.QuerySupportedNetworkOffloadSpec) (*types.QuerySupportedNetworkOffloadSpecResponse, error) { - var reqBody, resBody QuerySupportedNetworkOffloadSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QuerySyncingVsanObjectsBody struct { - Req *types.QuerySyncingVsanObjects `xml:"urn:vim25 QuerySyncingVsanObjects,omitempty"` - Res *types.QuerySyncingVsanObjectsResponse `xml:"QuerySyncingVsanObjectsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QuerySyncingVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } - -func QuerySyncingVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QuerySyncingVsanObjects) (*types.QuerySyncingVsanObjectsResponse, error) { - var reqBody, resBody QuerySyncingVsanObjectsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QuerySystemUsersBody struct { - Req *types.QuerySystemUsers `xml:"urn:vim25 QuerySystemUsers,omitempty"` - Res *types.QuerySystemUsersResponse `xml:"QuerySystemUsersResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QuerySystemUsersBody) Fault() *soap.Fault { return b.Fault_ } - -func QuerySystemUsers(ctx context.Context, r soap.RoundTripper, req *types.QuerySystemUsers) (*types.QuerySystemUsersResponse, error) { - var reqBody, resBody QuerySystemUsersBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryTargetCapabilitiesBody struct { - Req *types.QueryTargetCapabilities `xml:"urn:vim25 QueryTargetCapabilities,omitempty"` - Res *types.QueryTargetCapabilitiesResponse `xml:"QueryTargetCapabilitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryTargetCapabilitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryTargetCapabilities(ctx context.Context, r soap.RoundTripper, req *types.QueryTargetCapabilities) (*types.QueryTargetCapabilitiesResponse, error) { - var reqBody, resBody QueryTargetCapabilitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryTpmAttestationReportBody struct { - Req *types.QueryTpmAttestationReport `xml:"urn:vim25 QueryTpmAttestationReport,omitempty"` - Res *types.QueryTpmAttestationReportResponse `xml:"QueryTpmAttestationReportResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryTpmAttestationReportBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryTpmAttestationReport(ctx context.Context, r soap.RoundTripper, req *types.QueryTpmAttestationReport) (*types.QueryTpmAttestationReportResponse, error) { - var reqBody, resBody QueryTpmAttestationReportBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryUnmonitoredHostsBody struct { - Req *types.QueryUnmonitoredHosts `xml:"urn:vim25 QueryUnmonitoredHosts,omitempty"` - Res *types.QueryUnmonitoredHostsResponse `xml:"QueryUnmonitoredHostsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryUnmonitoredHostsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryUnmonitoredHosts(ctx context.Context, r soap.RoundTripper, req *types.QueryUnmonitoredHosts) (*types.QueryUnmonitoredHostsResponse, error) { - var reqBody, resBody QueryUnmonitoredHostsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryUnownedFilesBody struct { - Req *types.QueryUnownedFiles `xml:"urn:vim25 QueryUnownedFiles,omitempty"` - Res *types.QueryUnownedFilesResponse `xml:"QueryUnownedFilesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryUnownedFilesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryUnownedFiles(ctx context.Context, r soap.RoundTripper, req *types.QueryUnownedFiles) (*types.QueryUnownedFilesResponse, error) { - var reqBody, resBody QueryUnownedFilesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryUnresolvedVmfsVolumeBody struct { - Req *types.QueryUnresolvedVmfsVolume `xml:"urn:vim25 QueryUnresolvedVmfsVolume,omitempty"` - Res *types.QueryUnresolvedVmfsVolumeResponse `xml:"QueryUnresolvedVmfsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryUnresolvedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryUnresolvedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolume) (*types.QueryUnresolvedVmfsVolumeResponse, error) { - var reqBody, resBody QueryUnresolvedVmfsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryUnresolvedVmfsVolumesBody struct { - Req *types.QueryUnresolvedVmfsVolumes `xml:"urn:vim25 QueryUnresolvedVmfsVolumes,omitempty"` - Res *types.QueryUnresolvedVmfsVolumesResponse `xml:"QueryUnresolvedVmfsVolumesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.QueryUnresolvedVmfsVolumes) (*types.QueryUnresolvedVmfsVolumesResponse, error) { - var reqBody, resBody QueryUnresolvedVmfsVolumesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryUsedVlanIdInDvsBody struct { - Req *types.QueryUsedVlanIdInDvs `xml:"urn:vim25 QueryUsedVlanIdInDvs,omitempty"` - Res *types.QueryUsedVlanIdInDvsResponse `xml:"QueryUsedVlanIdInDvsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryUsedVlanIdInDvsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryUsedVlanIdInDvs(ctx context.Context, r soap.RoundTripper, req *types.QueryUsedVlanIdInDvs) (*types.QueryUsedVlanIdInDvsResponse, error) { - var reqBody, resBody QueryUsedVlanIdInDvsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVMotionCompatibilityBody struct { - Req *types.QueryVMotionCompatibility `xml:"urn:vim25 QueryVMotionCompatibility,omitempty"` - Res *types.QueryVMotionCompatibilityResponse `xml:"QueryVMotionCompatibilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVMotionCompatibilityBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVMotionCompatibility(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibility) (*types.QueryVMotionCompatibilityResponse, error) { - var reqBody, resBody QueryVMotionCompatibilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVMotionCompatibilityEx_TaskBody struct { - Req *types.QueryVMotionCompatibilityEx_Task `xml:"urn:vim25 QueryVMotionCompatibilityEx_Task,omitempty"` - Res *types.QueryVMotionCompatibilityEx_TaskResponse `xml:"QueryVMotionCompatibilityEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVMotionCompatibilityEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVMotionCompatibilityEx_Task(ctx context.Context, r soap.RoundTripper, req *types.QueryVMotionCompatibilityEx_Task) (*types.QueryVMotionCompatibilityEx_TaskResponse, error) { - var reqBody, resBody QueryVMotionCompatibilityEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVirtualDiskFragmentationBody struct { - Req *types.QueryVirtualDiskFragmentation `xml:"urn:vim25 QueryVirtualDiskFragmentation,omitempty"` - Res *types.QueryVirtualDiskFragmentationResponse `xml:"QueryVirtualDiskFragmentationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVirtualDiskFragmentationBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVirtualDiskFragmentation(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskFragmentation) (*types.QueryVirtualDiskFragmentationResponse, error) { - var reqBody, resBody QueryVirtualDiskFragmentationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVirtualDiskGeometryBody struct { - Req *types.QueryVirtualDiskGeometry `xml:"urn:vim25 QueryVirtualDiskGeometry,omitempty"` - Res *types.QueryVirtualDiskGeometryResponse `xml:"QueryVirtualDiskGeometryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVirtualDiskGeometryBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVirtualDiskGeometry(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskGeometry) (*types.QueryVirtualDiskGeometryResponse, error) { - var reqBody, resBody QueryVirtualDiskGeometryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVirtualDiskUuidBody struct { - Req *types.QueryVirtualDiskUuid `xml:"urn:vim25 QueryVirtualDiskUuid,omitempty"` - Res *types.QueryVirtualDiskUuidResponse `xml:"QueryVirtualDiskUuidResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.QueryVirtualDiskUuid) (*types.QueryVirtualDiskUuidResponse, error) { - var reqBody, resBody QueryVirtualDiskUuidBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVmfsConfigOptionBody struct { - Req *types.QueryVmfsConfigOption `xml:"urn:vim25 QueryVmfsConfigOption,omitempty"` - Res *types.QueryVmfsConfigOptionResponse `xml:"QueryVmfsConfigOptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVmfsConfigOptionBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVmfsConfigOption(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsConfigOption) (*types.QueryVmfsConfigOptionResponse, error) { - var reqBody, resBody QueryVmfsConfigOptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVmfsDatastoreCreateOptionsBody struct { - Req *types.QueryVmfsDatastoreCreateOptions `xml:"urn:vim25 QueryVmfsDatastoreCreateOptions,omitempty"` - Res *types.QueryVmfsDatastoreCreateOptionsResponse `xml:"QueryVmfsDatastoreCreateOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVmfsDatastoreCreateOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVmfsDatastoreCreateOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreCreateOptions) (*types.QueryVmfsDatastoreCreateOptionsResponse, error) { - var reqBody, resBody QueryVmfsDatastoreCreateOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVmfsDatastoreExpandOptionsBody struct { - Req *types.QueryVmfsDatastoreExpandOptions `xml:"urn:vim25 QueryVmfsDatastoreExpandOptions,omitempty"` - Res *types.QueryVmfsDatastoreExpandOptionsResponse `xml:"QueryVmfsDatastoreExpandOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVmfsDatastoreExpandOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVmfsDatastoreExpandOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExpandOptions) (*types.QueryVmfsDatastoreExpandOptionsResponse, error) { - var reqBody, resBody QueryVmfsDatastoreExpandOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVmfsDatastoreExtendOptionsBody struct { - Req *types.QueryVmfsDatastoreExtendOptions `xml:"urn:vim25 QueryVmfsDatastoreExtendOptions,omitempty"` - Res *types.QueryVmfsDatastoreExtendOptionsResponse `xml:"QueryVmfsDatastoreExtendOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVmfsDatastoreExtendOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVmfsDatastoreExtendOptions(ctx context.Context, r soap.RoundTripper, req *types.QueryVmfsDatastoreExtendOptions) (*types.QueryVmfsDatastoreExtendOptionsResponse, error) { - var reqBody, resBody QueryVmfsDatastoreExtendOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVnicStatusBody struct { - Req *types.QueryVnicStatus `xml:"urn:vim25 QueryVnicStatus,omitempty"` - Res *types.QueryVnicStatusResponse `xml:"QueryVnicStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVnicStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVnicStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVnicStatus) (*types.QueryVnicStatusResponse, error) { - var reqBody, resBody QueryVnicStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVsanObjectUuidsByFilterBody struct { - Req *types.QueryVsanObjectUuidsByFilter `xml:"urn:vim25 QueryVsanObjectUuidsByFilter,omitempty"` - Res *types.QueryVsanObjectUuidsByFilterResponse `xml:"QueryVsanObjectUuidsByFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVsanObjectUuidsByFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVsanObjectUuidsByFilter(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjectUuidsByFilter) (*types.QueryVsanObjectUuidsByFilterResponse, error) { - var reqBody, resBody QueryVsanObjectUuidsByFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVsanObjectsBody struct { - Req *types.QueryVsanObjects `xml:"urn:vim25 QueryVsanObjects,omitempty"` - Res *types.QueryVsanObjectsResponse `xml:"QueryVsanObjectsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanObjects) (*types.QueryVsanObjectsResponse, error) { - var reqBody, resBody QueryVsanObjectsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVsanStatisticsBody struct { - Req *types.QueryVsanStatistics `xml:"urn:vim25 QueryVsanStatistics,omitempty"` - Res *types.QueryVsanStatisticsResponse `xml:"QueryVsanStatisticsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVsanStatisticsBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVsanStatistics(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanStatistics) (*types.QueryVsanStatisticsResponse, error) { - var reqBody, resBody QueryVsanStatisticsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryVsanUpgradeStatusBody struct { - Req *types.QueryVsanUpgradeStatus `xml:"urn:vim25 QueryVsanUpgradeStatus,omitempty"` - Res *types.QueryVsanUpgradeStatusResponse `xml:"QueryVsanUpgradeStatusResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryVsanUpgradeStatusBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryVsanUpgradeStatus(ctx context.Context, r soap.RoundTripper, req *types.QueryVsanUpgradeStatus) (*types.QueryVsanUpgradeStatusResponse, error) { - var reqBody, resBody QueryVsanUpgradeStatusBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReadEnvironmentVariableInGuestBody struct { - Req *types.ReadEnvironmentVariableInGuest `xml:"urn:vim25 ReadEnvironmentVariableInGuest,omitempty"` - Res *types.ReadEnvironmentVariableInGuestResponse `xml:"ReadEnvironmentVariableInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReadEnvironmentVariableInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ReadEnvironmentVariableInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReadEnvironmentVariableInGuest) (*types.ReadEnvironmentVariableInGuestResponse, error) { - var reqBody, resBody ReadEnvironmentVariableInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReadNextEventsBody struct { - Req *types.ReadNextEvents `xml:"urn:vim25 ReadNextEvents,omitempty"` - Res *types.ReadNextEventsResponse `xml:"ReadNextEventsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReadNextEventsBody) Fault() *soap.Fault { return b.Fault_ } - -func ReadNextEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadNextEvents) (*types.ReadNextEventsResponse, error) { - var reqBody, resBody ReadNextEventsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReadNextTasksBody struct { - Req *types.ReadNextTasks `xml:"urn:vim25 ReadNextTasks,omitempty"` - Res *types.ReadNextTasksResponse `xml:"ReadNextTasksResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReadNextTasksBody) Fault() *soap.Fault { return b.Fault_ } - -func ReadNextTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadNextTasks) (*types.ReadNextTasksResponse, error) { - var reqBody, resBody ReadNextTasksBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReadPreviousEventsBody struct { - Req *types.ReadPreviousEvents `xml:"urn:vim25 ReadPreviousEvents,omitempty"` - Res *types.ReadPreviousEventsResponse `xml:"ReadPreviousEventsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReadPreviousEventsBody) Fault() *soap.Fault { return b.Fault_ } - -func ReadPreviousEvents(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousEvents) (*types.ReadPreviousEventsResponse, error) { - var reqBody, resBody ReadPreviousEventsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReadPreviousTasksBody struct { - Req *types.ReadPreviousTasks `xml:"urn:vim25 ReadPreviousTasks,omitempty"` - Res *types.ReadPreviousTasksResponse `xml:"ReadPreviousTasksResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReadPreviousTasksBody) Fault() *soap.Fault { return b.Fault_ } - -func ReadPreviousTasks(ctx context.Context, r soap.RoundTripper, req *types.ReadPreviousTasks) (*types.ReadPreviousTasksResponse, error) { - var reqBody, resBody ReadPreviousTasksBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RebootGuestBody struct { - Req *types.RebootGuest `xml:"urn:vim25 RebootGuest,omitempty"` - Res *types.RebootGuestResponse `xml:"RebootGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RebootGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func RebootGuest(ctx context.Context, r soap.RoundTripper, req *types.RebootGuest) (*types.RebootGuestResponse, error) { - var reqBody, resBody RebootGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RebootHost_TaskBody struct { - Req *types.RebootHost_Task `xml:"urn:vim25 RebootHost_Task,omitempty"` - Res *types.RebootHost_TaskResponse `xml:"RebootHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RebootHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RebootHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RebootHost_Task) (*types.RebootHost_TaskResponse, error) { - var reqBody, resBody RebootHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RecommendDatastoresBody struct { - Req *types.RecommendDatastores `xml:"urn:vim25 RecommendDatastores,omitempty"` - Res *types.RecommendDatastoresResponse `xml:"RecommendDatastoresResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RecommendDatastoresBody) Fault() *soap.Fault { return b.Fault_ } - -func RecommendDatastores(ctx context.Context, r soap.RoundTripper, req *types.RecommendDatastores) (*types.RecommendDatastoresResponse, error) { - var reqBody, resBody RecommendDatastoresBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RecommendHostsForVmBody struct { - Req *types.RecommendHostsForVm `xml:"urn:vim25 RecommendHostsForVm,omitempty"` - Res *types.RecommendHostsForVmResponse `xml:"RecommendHostsForVmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RecommendHostsForVmBody) Fault() *soap.Fault { return b.Fault_ } - -func RecommendHostsForVm(ctx context.Context, r soap.RoundTripper, req *types.RecommendHostsForVm) (*types.RecommendHostsForVmResponse, error) { - var reqBody, resBody RecommendHostsForVmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RecommissionVsanNode_TaskBody struct { - Req *types.RecommissionVsanNode_Task `xml:"urn:vim25 RecommissionVsanNode_Task,omitempty"` - Res *types.RecommissionVsanNode_TaskResponse `xml:"RecommissionVsanNode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RecommissionVsanNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RecommissionVsanNode_Task(ctx context.Context, r soap.RoundTripper, req *types.RecommissionVsanNode_Task) (*types.RecommissionVsanNode_TaskResponse, error) { - var reqBody, resBody RecommissionVsanNode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconcileDatastoreInventory_TaskBody struct { - Req *types.ReconcileDatastoreInventory_Task `xml:"urn:vim25 ReconcileDatastoreInventory_Task,omitempty"` - Res *types.ReconcileDatastoreInventory_TaskResponse `xml:"ReconcileDatastoreInventory_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconcileDatastoreInventory_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconcileDatastoreInventory_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconcileDatastoreInventory_Task) (*types.ReconcileDatastoreInventory_TaskResponse, error) { - var reqBody, resBody ReconcileDatastoreInventory_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigVM_TaskBody struct { - Req *types.ReconfigVM_Task `xml:"urn:vim25 ReconfigVM_Task,omitempty"` - Res *types.ReconfigVM_TaskResponse `xml:"ReconfigVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigVM_Task) (*types.ReconfigVM_TaskResponse, error) { - var reqBody, resBody ReconfigVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigurationSatisfiableBody struct { - Req *types.ReconfigurationSatisfiable `xml:"urn:vim25 ReconfigurationSatisfiable,omitempty"` - Res *types.ReconfigurationSatisfiableResponse `xml:"ReconfigurationSatisfiableResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigurationSatisfiableBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigurationSatisfiable(ctx context.Context, r soap.RoundTripper, req *types.ReconfigurationSatisfiable) (*types.ReconfigurationSatisfiableResponse, error) { - var reqBody, resBody ReconfigurationSatisfiableBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureAlarmBody struct { - Req *types.ReconfigureAlarm `xml:"urn:vim25 ReconfigureAlarm,omitempty"` - Res *types.ReconfigureAlarmResponse `xml:"ReconfigureAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureAlarm(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAlarm) (*types.ReconfigureAlarmResponse, error) { - var reqBody, resBody ReconfigureAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureAutostartBody struct { - Req *types.ReconfigureAutostart `xml:"urn:vim25 ReconfigureAutostart,omitempty"` - Res *types.ReconfigureAutostartResponse `xml:"ReconfigureAutostartResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureAutostartBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureAutostart(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureAutostart) (*types.ReconfigureAutostartResponse, error) { - var reqBody, resBody ReconfigureAutostartBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureCluster_TaskBody struct { - Req *types.ReconfigureCluster_Task `xml:"urn:vim25 ReconfigureCluster_Task,omitempty"` - Res *types.ReconfigureCluster_TaskResponse `xml:"ReconfigureCluster_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureCluster_Task) (*types.ReconfigureCluster_TaskResponse, error) { - var reqBody, resBody ReconfigureCluster_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureComputeResource_TaskBody struct { - Req *types.ReconfigureComputeResource_Task `xml:"urn:vim25 ReconfigureComputeResource_Task,omitempty"` - Res *types.ReconfigureComputeResource_TaskResponse `xml:"ReconfigureComputeResource_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureComputeResource_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureComputeResource_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureComputeResource_Task) (*types.ReconfigureComputeResource_TaskResponse, error) { - var reqBody, resBody ReconfigureComputeResource_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureDVPort_TaskBody struct { - Req *types.ReconfigureDVPort_Task `xml:"urn:vim25 ReconfigureDVPort_Task,omitempty"` - Res *types.ReconfigureDVPort_TaskResponse `xml:"ReconfigureDVPort_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureDVPort_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureDVPort_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPort_Task) (*types.ReconfigureDVPort_TaskResponse, error) { - var reqBody, resBody ReconfigureDVPort_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureDVPortgroup_TaskBody struct { - Req *types.ReconfigureDVPortgroup_Task `xml:"urn:vim25 ReconfigureDVPortgroup_Task,omitempty"` - Res *types.ReconfigureDVPortgroup_TaskResponse `xml:"ReconfigureDVPortgroup_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureDVPortgroup_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureDVPortgroup_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDVPortgroup_Task) (*types.ReconfigureDVPortgroup_TaskResponse, error) { - var reqBody, resBody ReconfigureDVPortgroup_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureDatacenter_TaskBody struct { - Req *types.ReconfigureDatacenter_Task `xml:"urn:vim25 ReconfigureDatacenter_Task,omitempty"` - Res *types.ReconfigureDatacenter_TaskResponse `xml:"ReconfigureDatacenter_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureDatacenter_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureDatacenter_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDatacenter_Task) (*types.ReconfigureDatacenter_TaskResponse, error) { - var reqBody, resBody ReconfigureDatacenter_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureDomObjectBody struct { - Req *types.ReconfigureDomObject `xml:"urn:vim25 ReconfigureDomObject,omitempty"` - Res *types.ReconfigureDomObjectResponse `xml:"ReconfigureDomObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureDomObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureDomObject(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDomObject) (*types.ReconfigureDomObjectResponse, error) { - var reqBody, resBody ReconfigureDomObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureDvs_TaskBody struct { - Req *types.ReconfigureDvs_Task `xml:"urn:vim25 ReconfigureDvs_Task,omitempty"` - Res *types.ReconfigureDvs_TaskResponse `xml:"ReconfigureDvs_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureDvs_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureDvs_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureDvs_Task) (*types.ReconfigureDvs_TaskResponse, error) { - var reqBody, resBody ReconfigureDvs_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureHostForDAS_TaskBody struct { - Req *types.ReconfigureHostForDAS_Task `xml:"urn:vim25 ReconfigureHostForDAS_Task,omitempty"` - Res *types.ReconfigureHostForDAS_TaskResponse `xml:"ReconfigureHostForDAS_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureHostForDAS_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureHostForDAS_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureHostForDAS_Task) (*types.ReconfigureHostForDAS_TaskResponse, error) { - var reqBody, resBody ReconfigureHostForDAS_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureScheduledTaskBody struct { - Req *types.ReconfigureScheduledTask `xml:"urn:vim25 ReconfigureScheduledTask,omitempty"` - Res *types.ReconfigureScheduledTaskResponse `xml:"ReconfigureScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureScheduledTask) (*types.ReconfigureScheduledTaskResponse, error) { - var reqBody, resBody ReconfigureScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureServiceConsoleReservationBody struct { - Req *types.ReconfigureServiceConsoleReservation `xml:"urn:vim25 ReconfigureServiceConsoleReservation,omitempty"` - Res *types.ReconfigureServiceConsoleReservationResponse `xml:"ReconfigureServiceConsoleReservationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureServiceConsoleReservationBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureServiceConsoleReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureServiceConsoleReservation) (*types.ReconfigureServiceConsoleReservationResponse, error) { - var reqBody, resBody ReconfigureServiceConsoleReservationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureSnmpAgentBody struct { - Req *types.ReconfigureSnmpAgent `xml:"urn:vim25 ReconfigureSnmpAgent,omitempty"` - Res *types.ReconfigureSnmpAgentResponse `xml:"ReconfigureSnmpAgentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureSnmpAgentBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureSnmpAgent(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureSnmpAgent) (*types.ReconfigureSnmpAgentResponse, error) { - var reqBody, resBody ReconfigureSnmpAgentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconfigureVirtualMachineReservationBody struct { - Req *types.ReconfigureVirtualMachineReservation `xml:"urn:vim25 ReconfigureVirtualMachineReservation,omitempty"` - Res *types.ReconfigureVirtualMachineReservationResponse `xml:"ReconfigureVirtualMachineReservationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconfigureVirtualMachineReservationBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconfigureVirtualMachineReservation(ctx context.Context, r soap.RoundTripper, req *types.ReconfigureVirtualMachineReservation) (*types.ReconfigureVirtualMachineReservationResponse, error) { - var reqBody, resBody ReconfigureVirtualMachineReservationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReconnectHost_TaskBody struct { - Req *types.ReconnectHost_Task `xml:"urn:vim25 ReconnectHost_Task,omitempty"` - Res *types.ReconnectHost_TaskResponse `xml:"ReconnectHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReconnectHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReconnectHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ReconnectHost_Task) (*types.ReconnectHost_TaskResponse, error) { - var reqBody, resBody ReconnectHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RectifyDvsHost_TaskBody struct { - Req *types.RectifyDvsHost_Task `xml:"urn:vim25 RectifyDvsHost_Task,omitempty"` - Res *types.RectifyDvsHost_TaskResponse `xml:"RectifyDvsHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RectifyDvsHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RectifyDvsHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsHost_Task) (*types.RectifyDvsHost_TaskResponse, error) { - var reqBody, resBody RectifyDvsHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RectifyDvsOnHost_TaskBody struct { - Req *types.RectifyDvsOnHost_Task `xml:"urn:vim25 RectifyDvsOnHost_Task,omitempty"` - Res *types.RectifyDvsOnHost_TaskResponse `xml:"RectifyDvsOnHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RectifyDvsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RectifyDvsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.RectifyDvsOnHost_Task) (*types.RectifyDvsOnHost_TaskResponse, error) { - var reqBody, resBody RectifyDvsOnHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshBody struct { - Req *types.Refresh `xml:"urn:vim25 Refresh,omitempty"` - Res *types.RefreshResponse `xml:"RefreshResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshBody) Fault() *soap.Fault { return b.Fault_ } - -func Refresh(ctx context.Context, r soap.RoundTripper, req *types.Refresh) (*types.RefreshResponse, error) { - var reqBody, resBody RefreshBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshDVPortStateBody struct { - Req *types.RefreshDVPortState `xml:"urn:vim25 RefreshDVPortState,omitempty"` - Res *types.RefreshDVPortStateResponse `xml:"RefreshDVPortStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshDVPortStateBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshDVPortState(ctx context.Context, r soap.RoundTripper, req *types.RefreshDVPortState) (*types.RefreshDVPortStateResponse, error) { - var reqBody, resBody RefreshDVPortStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshDatastoreBody struct { - Req *types.RefreshDatastore `xml:"urn:vim25 RefreshDatastore,omitempty"` - Res *types.RefreshDatastoreResponse `xml:"RefreshDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshDatastore(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastore) (*types.RefreshDatastoreResponse, error) { - var reqBody, resBody RefreshDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshDatastoreStorageInfoBody struct { - Req *types.RefreshDatastoreStorageInfo `xml:"urn:vim25 RefreshDatastoreStorageInfo,omitempty"` - Res *types.RefreshDatastoreStorageInfoResponse `xml:"RefreshDatastoreStorageInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshDatastoreStorageInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshDatastoreStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshDatastoreStorageInfo) (*types.RefreshDatastoreStorageInfoResponse, error) { - var reqBody, resBody RefreshDatastoreStorageInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshDateTimeSystemBody struct { - Req *types.RefreshDateTimeSystem `xml:"urn:vim25 RefreshDateTimeSystem,omitempty"` - Res *types.RefreshDateTimeSystemResponse `xml:"RefreshDateTimeSystemResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshDateTimeSystemBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshDateTimeSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshDateTimeSystem) (*types.RefreshDateTimeSystemResponse, error) { - var reqBody, resBody RefreshDateTimeSystemBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshFirewallBody struct { - Req *types.RefreshFirewall `xml:"urn:vim25 RefreshFirewall,omitempty"` - Res *types.RefreshFirewallResponse `xml:"RefreshFirewallResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshFirewallBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshFirewall(ctx context.Context, r soap.RoundTripper, req *types.RefreshFirewall) (*types.RefreshFirewallResponse, error) { - var reqBody, resBody RefreshFirewallBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshGraphicsManagerBody struct { - Req *types.RefreshGraphicsManager `xml:"urn:vim25 RefreshGraphicsManager,omitempty"` - Res *types.RefreshGraphicsManagerResponse `xml:"RefreshGraphicsManagerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshGraphicsManagerBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshGraphicsManager(ctx context.Context, r soap.RoundTripper, req *types.RefreshGraphicsManager) (*types.RefreshGraphicsManagerResponse, error) { - var reqBody, resBody RefreshGraphicsManagerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshHealthStatusSystemBody struct { - Req *types.RefreshHealthStatusSystem `xml:"urn:vim25 RefreshHealthStatusSystem,omitempty"` - Res *types.RefreshHealthStatusSystemResponse `xml:"RefreshHealthStatusSystemResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshHealthStatusSystemBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshHealthStatusSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshHealthStatusSystem) (*types.RefreshHealthStatusSystemResponse, error) { - var reqBody, resBody RefreshHealthStatusSystemBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshNetworkSystemBody struct { - Req *types.RefreshNetworkSystem `xml:"urn:vim25 RefreshNetworkSystem,omitempty"` - Res *types.RefreshNetworkSystemResponse `xml:"RefreshNetworkSystemResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshNetworkSystemBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshNetworkSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshNetworkSystem) (*types.RefreshNetworkSystemResponse, error) { - var reqBody, resBody RefreshNetworkSystemBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshRecommendationBody struct { - Req *types.RefreshRecommendation `xml:"urn:vim25 RefreshRecommendation,omitempty"` - Res *types.RefreshRecommendationResponse `xml:"RefreshRecommendationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshRecommendationBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshRecommendation) (*types.RefreshRecommendationResponse, error) { - var reqBody, resBody RefreshRecommendationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshRuntimeBody struct { - Req *types.RefreshRuntime `xml:"urn:vim25 RefreshRuntime,omitempty"` - Res *types.RefreshRuntimeResponse `xml:"RefreshRuntimeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshRuntimeBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshRuntime(ctx context.Context, r soap.RoundTripper, req *types.RefreshRuntime) (*types.RefreshRuntimeResponse, error) { - var reqBody, resBody RefreshRuntimeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshServicesBody struct { - Req *types.RefreshServices `xml:"urn:vim25 RefreshServices,omitempty"` - Res *types.RefreshServicesResponse `xml:"RefreshServicesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshServicesBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshServices(ctx context.Context, r soap.RoundTripper, req *types.RefreshServices) (*types.RefreshServicesResponse, error) { - var reqBody, resBody RefreshServicesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshStorageDrsRecommendationBody struct { - Req *types.RefreshStorageDrsRecommendation `xml:"urn:vim25 RefreshStorageDrsRecommendation,omitempty"` - Res *types.RefreshStorageDrsRecommendationResponse `xml:"RefreshStorageDrsRecommendationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshStorageDrsRecommendationBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshStorageDrsRecommendation(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageDrsRecommendation) (*types.RefreshStorageDrsRecommendationResponse, error) { - var reqBody, resBody RefreshStorageDrsRecommendationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshStorageDrsRecommendationsForPod_TaskBody struct { - Req *types.RefreshStorageDrsRecommendationsForPod_Task `xml:"urn:vim25 RefreshStorageDrsRecommendationsForPod_Task,omitempty"` - Res *types.RefreshStorageDrsRecommendationsForPod_TaskResponse `xml:"RefreshStorageDrsRecommendationsForPod_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshStorageDrsRecommendationsForPod_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshStorageDrsRecommendationsForPod_Task(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageDrsRecommendationsForPod_Task) (*types.RefreshStorageDrsRecommendationsForPod_TaskResponse, error) { - var reqBody, resBody RefreshStorageDrsRecommendationsForPod_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshStorageInfoBody struct { - Req *types.RefreshStorageInfo `xml:"urn:vim25 RefreshStorageInfo,omitempty"` - Res *types.RefreshStorageInfoResponse `xml:"RefreshStorageInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshStorageInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshStorageInfo(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageInfo) (*types.RefreshStorageInfoResponse, error) { - var reqBody, resBody RefreshStorageInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RefreshStorageSystemBody struct { - Req *types.RefreshStorageSystem `xml:"urn:vim25 RefreshStorageSystem,omitempty"` - Res *types.RefreshStorageSystemResponse `xml:"RefreshStorageSystemResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RefreshStorageSystemBody) Fault() *soap.Fault { return b.Fault_ } - -func RefreshStorageSystem(ctx context.Context, r soap.RoundTripper, req *types.RefreshStorageSystem) (*types.RefreshStorageSystemResponse, error) { - var reqBody, resBody RefreshStorageSystemBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterChildVM_TaskBody struct { - Req *types.RegisterChildVM_Task `xml:"urn:vim25 RegisterChildVM_Task,omitempty"` - Res *types.RegisterChildVM_TaskResponse `xml:"RegisterChildVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterChildVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterChildVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterChildVM_Task) (*types.RegisterChildVM_TaskResponse, error) { - var reqBody, resBody RegisterChildVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterDiskBody struct { - Req *types.RegisterDisk `xml:"urn:vim25 RegisterDisk,omitempty"` - Res *types.RegisterDiskResponse `xml:"RegisterDiskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterDiskBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterDisk(ctx context.Context, r soap.RoundTripper, req *types.RegisterDisk) (*types.RegisterDiskResponse, error) { - var reqBody, resBody RegisterDiskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterExtensionBody struct { - Req *types.RegisterExtension `xml:"urn:vim25 RegisterExtension,omitempty"` - Res *types.RegisterExtensionResponse `xml:"RegisterExtensionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterExtensionBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterExtension(ctx context.Context, r soap.RoundTripper, req *types.RegisterExtension) (*types.RegisterExtensionResponse, error) { - var reqBody, resBody RegisterExtensionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterHealthUpdateProviderBody struct { - Req *types.RegisterHealthUpdateProvider `xml:"urn:vim25 RegisterHealthUpdateProvider,omitempty"` - Res *types.RegisterHealthUpdateProviderResponse `xml:"RegisterHealthUpdateProviderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.RegisterHealthUpdateProvider) (*types.RegisterHealthUpdateProviderResponse, error) { - var reqBody, resBody RegisterHealthUpdateProviderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterKmipServerBody struct { - Req *types.RegisterKmipServer `xml:"urn:vim25 RegisterKmipServer,omitempty"` - Res *types.RegisterKmipServerResponse `xml:"RegisterKmipServerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterKmipServerBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RegisterKmipServer) (*types.RegisterKmipServerResponse, error) { - var reqBody, resBody RegisterKmipServerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterKmsClusterBody struct { - Req *types.RegisterKmsCluster `xml:"urn:vim25 RegisterKmsCluster,omitempty"` - Res *types.RegisterKmsClusterResponse `xml:"RegisterKmsClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterKmsClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterKmsCluster(ctx context.Context, r soap.RoundTripper, req *types.RegisterKmsCluster) (*types.RegisterKmsClusterResponse, error) { - var reqBody, resBody RegisterKmsClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RegisterVM_TaskBody struct { - Req *types.RegisterVM_Task `xml:"urn:vim25 RegisterVM_Task,omitempty"` - Res *types.RegisterVM_TaskResponse `xml:"RegisterVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RegisterVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RegisterVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RegisterVM_Task) (*types.RegisterVM_TaskResponse, error) { - var reqBody, resBody RegisterVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReleaseCredentialsInGuestBody struct { - Req *types.ReleaseCredentialsInGuest `xml:"urn:vim25 ReleaseCredentialsInGuest,omitempty"` - Res *types.ReleaseCredentialsInGuestResponse `xml:"ReleaseCredentialsInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReleaseCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ReleaseCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ReleaseCredentialsInGuest) (*types.ReleaseCredentialsInGuestResponse, error) { - var reqBody, resBody ReleaseCredentialsInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReleaseIpAllocationBody struct { - Req *types.ReleaseIpAllocation `xml:"urn:vim25 ReleaseIpAllocation,omitempty"` - Res *types.ReleaseIpAllocationResponse `xml:"ReleaseIpAllocationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReleaseIpAllocationBody) Fault() *soap.Fault { return b.Fault_ } - -func ReleaseIpAllocation(ctx context.Context, r soap.RoundTripper, req *types.ReleaseIpAllocation) (*types.ReleaseIpAllocationResponse, error) { - var reqBody, resBody ReleaseIpAllocationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReleaseManagedSnapshotBody struct { - Req *types.ReleaseManagedSnapshot `xml:"urn:vim25 ReleaseManagedSnapshot,omitempty"` - Res *types.ReleaseManagedSnapshotResponse `xml:"ReleaseManagedSnapshotResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReleaseManagedSnapshotBody) Fault() *soap.Fault { return b.Fault_ } - -func ReleaseManagedSnapshot(ctx context.Context, r soap.RoundTripper, req *types.ReleaseManagedSnapshot) (*types.ReleaseManagedSnapshotResponse, error) { - var reqBody, resBody ReleaseManagedSnapshotBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReloadBody struct { - Req *types.Reload `xml:"urn:vim25 Reload,omitempty"` - Res *types.ReloadResponse `xml:"ReloadResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReloadBody) Fault() *soap.Fault { return b.Fault_ } - -func Reload(ctx context.Context, r soap.RoundTripper, req *types.Reload) (*types.ReloadResponse, error) { - var reqBody, resBody ReloadBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RelocateVM_TaskBody struct { - Req *types.RelocateVM_Task `xml:"urn:vim25 RelocateVM_Task,omitempty"` - Res *types.RelocateVM_TaskResponse `xml:"RelocateVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RelocateVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RelocateVM_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVM_Task) (*types.RelocateVM_TaskResponse, error) { - var reqBody, resBody RelocateVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RelocateVStorageObject_TaskBody struct { - Req *types.RelocateVStorageObject_Task `xml:"urn:vim25 RelocateVStorageObject_Task,omitempty"` - Res *types.RelocateVStorageObject_TaskResponse `xml:"RelocateVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RelocateVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RelocateVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.RelocateVStorageObject_Task) (*types.RelocateVStorageObject_TaskResponse, error) { - var reqBody, resBody RelocateVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveAlarmBody struct { - Req *types.RemoveAlarm `xml:"urn:vim25 RemoveAlarm,omitempty"` - Res *types.RemoveAlarmResponse `xml:"RemoveAlarmResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveAlarmBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveAlarm(ctx context.Context, r soap.RoundTripper, req *types.RemoveAlarm) (*types.RemoveAlarmResponse, error) { - var reqBody, resBody RemoveAlarmBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveAllSnapshots_TaskBody struct { - Req *types.RemoveAllSnapshots_Task `xml:"urn:vim25 RemoveAllSnapshots_Task,omitempty"` - Res *types.RemoveAllSnapshots_TaskResponse `xml:"RemoveAllSnapshots_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveAllSnapshots_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveAllSnapshots_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveAllSnapshots_Task) (*types.RemoveAllSnapshots_TaskResponse, error) { - var reqBody, resBody RemoveAllSnapshots_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveAssignedLicenseBody struct { - Req *types.RemoveAssignedLicense `xml:"urn:vim25 RemoveAssignedLicense,omitempty"` - Res *types.RemoveAssignedLicenseResponse `xml:"RemoveAssignedLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveAssignedLicense) (*types.RemoveAssignedLicenseResponse, error) { - var reqBody, resBody RemoveAssignedLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveAuthorizationRoleBody struct { - Req *types.RemoveAuthorizationRole `xml:"urn:vim25 RemoveAuthorizationRole,omitempty"` - Res *types.RemoveAuthorizationRoleResponse `xml:"RemoveAuthorizationRoleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.RemoveAuthorizationRole) (*types.RemoveAuthorizationRoleResponse, error) { - var reqBody, resBody RemoveAuthorizationRoleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveCustomFieldDefBody struct { - Req *types.RemoveCustomFieldDef `xml:"urn:vim25 RemoveCustomFieldDef,omitempty"` - Res *types.RemoveCustomFieldDefResponse `xml:"RemoveCustomFieldDefResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RemoveCustomFieldDef) (*types.RemoveCustomFieldDefResponse, error) { - var reqBody, resBody RemoveCustomFieldDefBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveDatastoreBody struct { - Req *types.RemoveDatastore `xml:"urn:vim25 RemoveDatastore,omitempty"` - Res *types.RemoveDatastoreResponse `xml:"RemoveDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveDatastore(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastore) (*types.RemoveDatastoreResponse, error) { - var reqBody, resBody RemoveDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveDatastoreEx_TaskBody struct { - Req *types.RemoveDatastoreEx_Task `xml:"urn:vim25 RemoveDatastoreEx_Task,omitempty"` - Res *types.RemoveDatastoreEx_TaskResponse `xml:"RemoveDatastoreEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveDatastoreEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveDatastoreEx_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDatastoreEx_Task) (*types.RemoveDatastoreEx_TaskResponse, error) { - var reqBody, resBody RemoveDatastoreEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveDiskMapping_TaskBody struct { - Req *types.RemoveDiskMapping_Task `xml:"urn:vim25 RemoveDiskMapping_Task,omitempty"` - Res *types.RemoveDiskMapping_TaskResponse `xml:"RemoveDiskMapping_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDiskMapping_Task) (*types.RemoveDiskMapping_TaskResponse, error) { - var reqBody, resBody RemoveDiskMapping_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveDisk_TaskBody struct { - Req *types.RemoveDisk_Task `xml:"urn:vim25 RemoveDisk_Task,omitempty"` - Res *types.RemoveDisk_TaskResponse `xml:"RemoveDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveDisk_Task) (*types.RemoveDisk_TaskResponse, error) { - var reqBody, resBody RemoveDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveEntityPermissionBody struct { - Req *types.RemoveEntityPermission `xml:"urn:vim25 RemoveEntityPermission,omitempty"` - Res *types.RemoveEntityPermissionResponse `xml:"RemoveEntityPermissionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveEntityPermissionBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveEntityPermission(ctx context.Context, r soap.RoundTripper, req *types.RemoveEntityPermission) (*types.RemoveEntityPermissionResponse, error) { - var reqBody, resBody RemoveEntityPermissionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveFilterBody struct { - Req *types.RemoveFilter `xml:"urn:vim25 RemoveFilter,omitempty"` - Res *types.RemoveFilterResponse `xml:"RemoveFilterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveFilterBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveFilter(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilter) (*types.RemoveFilterResponse, error) { - var reqBody, resBody RemoveFilterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveFilterEntitiesBody struct { - Req *types.RemoveFilterEntities `xml:"urn:vim25 RemoveFilterEntities,omitempty"` - Res *types.RemoveFilterEntitiesResponse `xml:"RemoveFilterEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveFilterEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveFilterEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveFilterEntities) (*types.RemoveFilterEntitiesResponse, error) { - var reqBody, resBody RemoveFilterEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveGroupBody struct { - Req *types.RemoveGroup `xml:"urn:vim25 RemoveGroup,omitempty"` - Res *types.RemoveGroupResponse `xml:"RemoveGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveGroup(ctx context.Context, r soap.RoundTripper, req *types.RemoveGroup) (*types.RemoveGroupResponse, error) { - var reqBody, resBody RemoveGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveGuestAliasBody struct { - Req *types.RemoveGuestAlias `xml:"urn:vim25 RemoveGuestAlias,omitempty"` - Res *types.RemoveGuestAliasResponse `xml:"RemoveGuestAliasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveGuestAliasBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveGuestAlias(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAlias) (*types.RemoveGuestAliasResponse, error) { - var reqBody, resBody RemoveGuestAliasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveGuestAliasByCertBody struct { - Req *types.RemoveGuestAliasByCert `xml:"urn:vim25 RemoveGuestAliasByCert,omitempty"` - Res *types.RemoveGuestAliasByCertResponse `xml:"RemoveGuestAliasByCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveGuestAliasByCertBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveGuestAliasByCert(ctx context.Context, r soap.RoundTripper, req *types.RemoveGuestAliasByCert) (*types.RemoveGuestAliasByCertResponse, error) { - var reqBody, resBody RemoveGuestAliasByCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveInternetScsiSendTargetsBody struct { - Req *types.RemoveInternetScsiSendTargets `xml:"urn:vim25 RemoveInternetScsiSendTargets,omitempty"` - Res *types.RemoveInternetScsiSendTargetsResponse `xml:"RemoveInternetScsiSendTargetsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveInternetScsiSendTargetsBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveInternetScsiSendTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiSendTargets) (*types.RemoveInternetScsiSendTargetsResponse, error) { - var reqBody, resBody RemoveInternetScsiSendTargetsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveInternetScsiStaticTargetsBody struct { - Req *types.RemoveInternetScsiStaticTargets `xml:"urn:vim25 RemoveInternetScsiStaticTargets,omitempty"` - Res *types.RemoveInternetScsiStaticTargetsResponse `xml:"RemoveInternetScsiStaticTargetsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveInternetScsiStaticTargetsBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveInternetScsiStaticTargets(ctx context.Context, r soap.RoundTripper, req *types.RemoveInternetScsiStaticTargets) (*types.RemoveInternetScsiStaticTargetsResponse, error) { - var reqBody, resBody RemoveInternetScsiStaticTargetsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveKeyBody struct { - Req *types.RemoveKey `xml:"urn:vim25 RemoveKey,omitempty"` - Res *types.RemoveKeyResponse `xml:"RemoveKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveKey(ctx context.Context, r soap.RoundTripper, req *types.RemoveKey) (*types.RemoveKeyResponse, error) { - var reqBody, resBody RemoveKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveKeysBody struct { - Req *types.RemoveKeys `xml:"urn:vim25 RemoveKeys,omitempty"` - Res *types.RemoveKeysResponse `xml:"RemoveKeysResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveKeysBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveKeys(ctx context.Context, r soap.RoundTripper, req *types.RemoveKeys) (*types.RemoveKeysResponse, error) { - var reqBody, resBody RemoveKeysBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveKmipServerBody struct { - Req *types.RemoveKmipServer `xml:"urn:vim25 RemoveKmipServer,omitempty"` - Res *types.RemoveKmipServerResponse `xml:"RemoveKmipServerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveKmipServerBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveKmipServer(ctx context.Context, r soap.RoundTripper, req *types.RemoveKmipServer) (*types.RemoveKmipServerResponse, error) { - var reqBody, resBody RemoveKmipServerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveLicenseBody struct { - Req *types.RemoveLicense `xml:"urn:vim25 RemoveLicense,omitempty"` - Res *types.RemoveLicenseResponse `xml:"RemoveLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveLicense(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicense) (*types.RemoveLicenseResponse, error) { - var reqBody, resBody RemoveLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveLicenseLabelBody struct { - Req *types.RemoveLicenseLabel `xml:"urn:vim25 RemoveLicenseLabel,omitempty"` - Res *types.RemoveLicenseLabelResponse `xml:"RemoveLicenseLabelResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.RemoveLicenseLabel) (*types.RemoveLicenseLabelResponse, error) { - var reqBody, resBody RemoveLicenseLabelBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveMonitoredEntitiesBody struct { - Req *types.RemoveMonitoredEntities `xml:"urn:vim25 RemoveMonitoredEntities,omitempty"` - Res *types.RemoveMonitoredEntitiesResponse `xml:"RemoveMonitoredEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveMonitoredEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveMonitoredEntities(ctx context.Context, r soap.RoundTripper, req *types.RemoveMonitoredEntities) (*types.RemoveMonitoredEntitiesResponse, error) { - var reqBody, resBody RemoveMonitoredEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveNetworkResourcePoolBody struct { - Req *types.RemoveNetworkResourcePool `xml:"urn:vim25 RemoveNetworkResourcePool,omitempty"` - Res *types.RemoveNetworkResourcePoolResponse `xml:"RemoveNetworkResourcePoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.RemoveNetworkResourcePool) (*types.RemoveNetworkResourcePoolResponse, error) { - var reqBody, resBody RemoveNetworkResourcePoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveNvmeOverRdmaAdapterBody struct { - Req *types.RemoveNvmeOverRdmaAdapter `xml:"urn:vim25 RemoveNvmeOverRdmaAdapter,omitempty"` - Res *types.RemoveNvmeOverRdmaAdapterResponse `xml:"RemoveNvmeOverRdmaAdapterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveNvmeOverRdmaAdapterBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveNvmeOverRdmaAdapter(ctx context.Context, r soap.RoundTripper, req *types.RemoveNvmeOverRdmaAdapter) (*types.RemoveNvmeOverRdmaAdapterResponse, error) { - var reqBody, resBody RemoveNvmeOverRdmaAdapterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemovePerfIntervalBody struct { - Req *types.RemovePerfInterval `xml:"urn:vim25 RemovePerfInterval,omitempty"` - Res *types.RemovePerfIntervalResponse `xml:"RemovePerfIntervalResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemovePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } - -func RemovePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.RemovePerfInterval) (*types.RemovePerfIntervalResponse, error) { - var reqBody, resBody RemovePerfIntervalBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemovePortGroupBody struct { - Req *types.RemovePortGroup `xml:"urn:vim25 RemovePortGroup,omitempty"` - Res *types.RemovePortGroupResponse `xml:"RemovePortGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemovePortGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func RemovePortGroup(ctx context.Context, r soap.RoundTripper, req *types.RemovePortGroup) (*types.RemovePortGroupResponse, error) { - var reqBody, resBody RemovePortGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveScheduledTaskBody struct { - Req *types.RemoveScheduledTask `xml:"urn:vim25 RemoveScheduledTask,omitempty"` - Res *types.RemoveScheduledTaskResponse `xml:"RemoveScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RemoveScheduledTask) (*types.RemoveScheduledTaskResponse, error) { - var reqBody, resBody RemoveScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveServiceConsoleVirtualNicBody struct { - Req *types.RemoveServiceConsoleVirtualNic `xml:"urn:vim25 RemoveServiceConsoleVirtualNic,omitempty"` - Res *types.RemoveServiceConsoleVirtualNicResponse `xml:"RemoveServiceConsoleVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveServiceConsoleVirtualNic) (*types.RemoveServiceConsoleVirtualNicResponse, error) { - var reqBody, resBody RemoveServiceConsoleVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveSmartCardTrustAnchorBody struct { - Req *types.RemoveSmartCardTrustAnchor `xml:"urn:vim25 RemoveSmartCardTrustAnchor,omitempty"` - Res *types.RemoveSmartCardTrustAnchorResponse `xml:"RemoveSmartCardTrustAnchorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveSmartCardTrustAnchorBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveSmartCardTrustAnchor(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchor) (*types.RemoveSmartCardTrustAnchorResponse, error) { - var reqBody, resBody RemoveSmartCardTrustAnchorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveSmartCardTrustAnchorByFingerprintBody struct { - Req *types.RemoveSmartCardTrustAnchorByFingerprint `xml:"urn:vim25 RemoveSmartCardTrustAnchorByFingerprint,omitempty"` - Res *types.RemoveSmartCardTrustAnchorByFingerprintResponse `xml:"RemoveSmartCardTrustAnchorByFingerprintResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveSmartCardTrustAnchorByFingerprintBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveSmartCardTrustAnchorByFingerprint(ctx context.Context, r soap.RoundTripper, req *types.RemoveSmartCardTrustAnchorByFingerprint) (*types.RemoveSmartCardTrustAnchorByFingerprintResponse, error) { - var reqBody, resBody RemoveSmartCardTrustAnchorByFingerprintBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveSnapshot_TaskBody struct { - Req *types.RemoveSnapshot_Task `xml:"urn:vim25 RemoveSnapshot_Task,omitempty"` - Res *types.RemoveSnapshot_TaskResponse `xml:"RemoveSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RemoveSnapshot_Task) (*types.RemoveSnapshot_TaskResponse, error) { - var reqBody, resBody RemoveSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveSoftwareAdapterBody struct { - Req *types.RemoveSoftwareAdapter `xml:"urn:vim25 RemoveSoftwareAdapter,omitempty"` - Res *types.RemoveSoftwareAdapterResponse `xml:"RemoveSoftwareAdapterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveSoftwareAdapterBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveSoftwareAdapter(ctx context.Context, r soap.RoundTripper, req *types.RemoveSoftwareAdapter) (*types.RemoveSoftwareAdapterResponse, error) { - var reqBody, resBody RemoveSoftwareAdapterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveUserBody struct { - Req *types.RemoveUser `xml:"urn:vim25 RemoveUser,omitempty"` - Res *types.RemoveUserResponse `xml:"RemoveUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveUserBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveUser(ctx context.Context, r soap.RoundTripper, req *types.RemoveUser) (*types.RemoveUserResponse, error) { - var reqBody, resBody RemoveUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveVirtualNicBody struct { - Req *types.RemoveVirtualNic `xml:"urn:vim25 RemoveVirtualNic,omitempty"` - Res *types.RemoveVirtualNicResponse `xml:"RemoveVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualNic) (*types.RemoveVirtualNicResponse, error) { - var reqBody, resBody RemoveVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RemoveVirtualSwitchBody struct { - Req *types.RemoveVirtualSwitch `xml:"urn:vim25 RemoveVirtualSwitch,omitempty"` - Res *types.RemoveVirtualSwitchResponse `xml:"RemoveVirtualSwitchResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RemoveVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } - -func RemoveVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.RemoveVirtualSwitch) (*types.RemoveVirtualSwitchResponse, error) { - var reqBody, resBody RemoveVirtualSwitchBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenameCustomFieldDefBody struct { - Req *types.RenameCustomFieldDef `xml:"urn:vim25 RenameCustomFieldDef,omitempty"` - Res *types.RenameCustomFieldDefResponse `xml:"RenameCustomFieldDefResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenameCustomFieldDefBody) Fault() *soap.Fault { return b.Fault_ } - -func RenameCustomFieldDef(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomFieldDef) (*types.RenameCustomFieldDefResponse, error) { - var reqBody, resBody RenameCustomFieldDefBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenameCustomizationSpecBody struct { - Req *types.RenameCustomizationSpec `xml:"urn:vim25 RenameCustomizationSpec,omitempty"` - Res *types.RenameCustomizationSpecResponse `xml:"RenameCustomizationSpecResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenameCustomizationSpecBody) Fault() *soap.Fault { return b.Fault_ } - -func RenameCustomizationSpec(ctx context.Context, r soap.RoundTripper, req *types.RenameCustomizationSpec) (*types.RenameCustomizationSpecResponse, error) { - var reqBody, resBody RenameCustomizationSpecBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenameDatastoreBody struct { - Req *types.RenameDatastore `xml:"urn:vim25 RenameDatastore,omitempty"` - Res *types.RenameDatastoreResponse `xml:"RenameDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenameDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func RenameDatastore(ctx context.Context, r soap.RoundTripper, req *types.RenameDatastore) (*types.RenameDatastoreResponse, error) { - var reqBody, resBody RenameDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenameSnapshotBody struct { - Req *types.RenameSnapshot `xml:"urn:vim25 RenameSnapshot,omitempty"` - Res *types.RenameSnapshotResponse `xml:"RenameSnapshotResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenameSnapshotBody) Fault() *soap.Fault { return b.Fault_ } - -func RenameSnapshot(ctx context.Context, r soap.RoundTripper, req *types.RenameSnapshot) (*types.RenameSnapshotResponse, error) { - var reqBody, resBody RenameSnapshotBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RenameVStorageObjectBody struct { - Req *types.RenameVStorageObject `xml:"urn:vim25 RenameVStorageObject,omitempty"` - Res *types.RenameVStorageObjectResponse `xml:"RenameVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RenameVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func RenameVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RenameVStorageObject) (*types.RenameVStorageObjectResponse, error) { - var reqBody, resBody RenameVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type Rename_TaskBody struct { - Req *types.Rename_Task `xml:"urn:vim25 Rename_Task,omitempty"` - Res *types.Rename_TaskResponse `xml:"Rename_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *Rename_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func Rename_Task(ctx context.Context, r soap.RoundTripper, req *types.Rename_Task) (*types.Rename_TaskResponse, error) { - var reqBody, resBody Rename_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReplaceCACertificatesAndCRLsBody struct { - Req *types.ReplaceCACertificatesAndCRLs `xml:"urn:vim25 ReplaceCACertificatesAndCRLs,omitempty"` - Res *types.ReplaceCACertificatesAndCRLsResponse `xml:"ReplaceCACertificatesAndCRLsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReplaceCACertificatesAndCRLsBody) Fault() *soap.Fault { return b.Fault_ } - -func ReplaceCACertificatesAndCRLs(ctx context.Context, r soap.RoundTripper, req *types.ReplaceCACertificatesAndCRLs) (*types.ReplaceCACertificatesAndCRLsResponse, error) { - var reqBody, resBody ReplaceCACertificatesAndCRLsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReplaceSmartCardTrustAnchorsBody struct { - Req *types.ReplaceSmartCardTrustAnchors `xml:"urn:vim25 ReplaceSmartCardTrustAnchors,omitempty"` - Res *types.ReplaceSmartCardTrustAnchorsResponse `xml:"ReplaceSmartCardTrustAnchorsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReplaceSmartCardTrustAnchorsBody) Fault() *soap.Fault { return b.Fault_ } - -func ReplaceSmartCardTrustAnchors(ctx context.Context, r soap.RoundTripper, req *types.ReplaceSmartCardTrustAnchors) (*types.ReplaceSmartCardTrustAnchorsResponse, error) { - var reqBody, resBody ReplaceSmartCardTrustAnchorsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RescanAllHbaBody struct { - Req *types.RescanAllHba `xml:"urn:vim25 RescanAllHba,omitempty"` - Res *types.RescanAllHbaResponse `xml:"RescanAllHbaResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RescanAllHbaBody) Fault() *soap.Fault { return b.Fault_ } - -func RescanAllHba(ctx context.Context, r soap.RoundTripper, req *types.RescanAllHba) (*types.RescanAllHbaResponse, error) { - var reqBody, resBody RescanAllHbaBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RescanHbaBody struct { - Req *types.RescanHba `xml:"urn:vim25 RescanHba,omitempty"` - Res *types.RescanHbaResponse `xml:"RescanHbaResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RescanHbaBody) Fault() *soap.Fault { return b.Fault_ } - -func RescanHba(ctx context.Context, r soap.RoundTripper, req *types.RescanHba) (*types.RescanHbaResponse, error) { - var reqBody, resBody RescanHbaBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RescanVffsBody struct { - Req *types.RescanVffs `xml:"urn:vim25 RescanVffs,omitempty"` - Res *types.RescanVffsResponse `xml:"RescanVffsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RescanVffsBody) Fault() *soap.Fault { return b.Fault_ } - -func RescanVffs(ctx context.Context, r soap.RoundTripper, req *types.RescanVffs) (*types.RescanVffsResponse, error) { - var reqBody, resBody RescanVffsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RescanVmfsBody struct { - Req *types.RescanVmfs `xml:"urn:vim25 RescanVmfs,omitempty"` - Res *types.RescanVmfsResponse `xml:"RescanVmfsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RescanVmfsBody) Fault() *soap.Fault { return b.Fault_ } - -func RescanVmfs(ctx context.Context, r soap.RoundTripper, req *types.RescanVmfs) (*types.RescanVmfsResponse, error) { - var reqBody, resBody RescanVmfsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetCollectorBody struct { - Req *types.ResetCollector `xml:"urn:vim25 ResetCollector,omitempty"` - Res *types.ResetCollectorResponse `xml:"ResetCollectorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetCollectorBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetCollector(ctx context.Context, r soap.RoundTripper, req *types.ResetCollector) (*types.ResetCollectorResponse, error) { - var reqBody, resBody ResetCollectorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetCounterLevelMappingBody struct { - Req *types.ResetCounterLevelMapping `xml:"urn:vim25 ResetCounterLevelMapping,omitempty"` - Res *types.ResetCounterLevelMappingResponse `xml:"ResetCounterLevelMappingResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.ResetCounterLevelMapping) (*types.ResetCounterLevelMappingResponse, error) { - var reqBody, resBody ResetCounterLevelMappingBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetEntityPermissionsBody struct { - Req *types.ResetEntityPermissions `xml:"urn:vim25 ResetEntityPermissions,omitempty"` - Res *types.ResetEntityPermissionsResponse `xml:"ResetEntityPermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.ResetEntityPermissions) (*types.ResetEntityPermissionsResponse, error) { - var reqBody, resBody ResetEntityPermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetFirmwareToFactoryDefaultsBody struct { - Req *types.ResetFirmwareToFactoryDefaults `xml:"urn:vim25 ResetFirmwareToFactoryDefaults,omitempty"` - Res *types.ResetFirmwareToFactoryDefaultsResponse `xml:"ResetFirmwareToFactoryDefaultsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetFirmwareToFactoryDefaultsBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetFirmwareToFactoryDefaults(ctx context.Context, r soap.RoundTripper, req *types.ResetFirmwareToFactoryDefaults) (*types.ResetFirmwareToFactoryDefaultsResponse, error) { - var reqBody, resBody ResetFirmwareToFactoryDefaultsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetGuestInformationBody struct { - Req *types.ResetGuestInformation `xml:"urn:vim25 ResetGuestInformation,omitempty"` - Res *types.ResetGuestInformationResponse `xml:"ResetGuestInformationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetGuestInformationBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetGuestInformation(ctx context.Context, r soap.RoundTripper, req *types.ResetGuestInformation) (*types.ResetGuestInformationResponse, error) { - var reqBody, resBody ResetGuestInformationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetListViewBody struct { - Req *types.ResetListView `xml:"urn:vim25 ResetListView,omitempty"` - Res *types.ResetListViewResponse `xml:"ResetListViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetListViewBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetListView(ctx context.Context, r soap.RoundTripper, req *types.ResetListView) (*types.ResetListViewResponse, error) { - var reqBody, resBody ResetListViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetListViewFromViewBody struct { - Req *types.ResetListViewFromView `xml:"urn:vim25 ResetListViewFromView,omitempty"` - Res *types.ResetListViewFromViewResponse `xml:"ResetListViewFromViewResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetListViewFromViewBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetListViewFromView(ctx context.Context, r soap.RoundTripper, req *types.ResetListViewFromView) (*types.ResetListViewFromViewResponse, error) { - var reqBody, resBody ResetListViewFromViewBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetSystemHealthInfoBody struct { - Req *types.ResetSystemHealthInfo `xml:"urn:vim25 ResetSystemHealthInfo,omitempty"` - Res *types.ResetSystemHealthInfoResponse `xml:"ResetSystemHealthInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetSystemHealthInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetSystemHealthInfo(ctx context.Context, r soap.RoundTripper, req *types.ResetSystemHealthInfo) (*types.ResetSystemHealthInfoResponse, error) { - var reqBody, resBody ResetSystemHealthInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResetVM_TaskBody struct { - Req *types.ResetVM_Task `xml:"urn:vim25 ResetVM_Task,omitempty"` - Res *types.ResetVM_TaskResponse `xml:"ResetVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResetVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ResetVM_Task(ctx context.Context, r soap.RoundTripper, req *types.ResetVM_Task) (*types.ResetVM_TaskResponse, error) { - var reqBody, resBody ResetVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResignatureUnresolvedVmfsVolume_TaskBody struct { - Req *types.ResignatureUnresolvedVmfsVolume_Task `xml:"urn:vim25 ResignatureUnresolvedVmfsVolume_Task,omitempty"` - Res *types.ResignatureUnresolvedVmfsVolume_TaskResponse `xml:"ResignatureUnresolvedVmfsVolume_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResignatureUnresolvedVmfsVolume_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ResignatureUnresolvedVmfsVolume_Task(ctx context.Context, r soap.RoundTripper, req *types.ResignatureUnresolvedVmfsVolume_Task) (*types.ResignatureUnresolvedVmfsVolume_TaskResponse, error) { - var reqBody, resBody ResignatureUnresolvedVmfsVolume_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResolveInstallationErrorsOnCluster_TaskBody struct { - Req *types.ResolveInstallationErrorsOnCluster_Task `xml:"urn:vim25 ResolveInstallationErrorsOnCluster_Task,omitempty"` - Res *types.ResolveInstallationErrorsOnCluster_TaskResponse `xml:"ResolveInstallationErrorsOnCluster_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResolveInstallationErrorsOnCluster_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ResolveInstallationErrorsOnCluster_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnCluster_Task) (*types.ResolveInstallationErrorsOnCluster_TaskResponse, error) { - var reqBody, resBody ResolveInstallationErrorsOnCluster_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResolveInstallationErrorsOnHost_TaskBody struct { - Req *types.ResolveInstallationErrorsOnHost_Task `xml:"urn:vim25 ResolveInstallationErrorsOnHost_Task,omitempty"` - Res *types.ResolveInstallationErrorsOnHost_TaskResponse `xml:"ResolveInstallationErrorsOnHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResolveInstallationErrorsOnHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ResolveInstallationErrorsOnHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveInstallationErrorsOnHost_Task) (*types.ResolveInstallationErrorsOnHost_TaskResponse, error) { - var reqBody, resBody ResolveInstallationErrorsOnHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResolveMultipleUnresolvedVmfsVolumesBody struct { - Req *types.ResolveMultipleUnresolvedVmfsVolumes `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumes,omitempty"` - Res *types.ResolveMultipleUnresolvedVmfsVolumesResponse `xml:"ResolveMultipleUnresolvedVmfsVolumesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResolveMultipleUnresolvedVmfsVolumesBody) Fault() *soap.Fault { return b.Fault_ } - -func ResolveMultipleUnresolvedVmfsVolumes(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumes) (*types.ResolveMultipleUnresolvedVmfsVolumesResponse, error) { - var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody struct { - Req *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task `xml:"urn:vim25 ResolveMultipleUnresolvedVmfsVolumesEx_Task,omitempty"` - Res *types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse `xml:"ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ResolveMultipleUnresolvedVmfsVolumesEx_Task(ctx context.Context, r soap.RoundTripper, req *types.ResolveMultipleUnresolvedVmfsVolumesEx_Task) (*types.ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse, error) { - var reqBody, resBody ResolveMultipleUnresolvedVmfsVolumesEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RestartServiceBody struct { - Req *types.RestartService `xml:"urn:vim25 RestartService,omitempty"` - Res *types.RestartServiceResponse `xml:"RestartServiceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RestartServiceBody) Fault() *soap.Fault { return b.Fault_ } - -func RestartService(ctx context.Context, r soap.RoundTripper, req *types.RestartService) (*types.RestartServiceResponse, error) { - var reqBody, resBody RestartServiceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RestartServiceConsoleVirtualNicBody struct { - Req *types.RestartServiceConsoleVirtualNic `xml:"urn:vim25 RestartServiceConsoleVirtualNic,omitempty"` - Res *types.RestartServiceConsoleVirtualNicResponse `xml:"RestartServiceConsoleVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RestartServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func RestartServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.RestartServiceConsoleVirtualNic) (*types.RestartServiceConsoleVirtualNicResponse, error) { - var reqBody, resBody RestartServiceConsoleVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RestoreFirmwareConfigurationBody struct { - Req *types.RestoreFirmwareConfiguration `xml:"urn:vim25 RestoreFirmwareConfiguration,omitempty"` - Res *types.RestoreFirmwareConfigurationResponse `xml:"RestoreFirmwareConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RestoreFirmwareConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func RestoreFirmwareConfiguration(ctx context.Context, r soap.RoundTripper, req *types.RestoreFirmwareConfiguration) (*types.RestoreFirmwareConfigurationResponse, error) { - var reqBody, resBody RestoreFirmwareConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveAllPermissionsBody struct { - Req *types.RetrieveAllPermissions `xml:"urn:vim25 RetrieveAllPermissions,omitempty"` - Res *types.RetrieveAllPermissionsResponse `xml:"RetrieveAllPermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveAllPermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveAllPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAllPermissions) (*types.RetrieveAllPermissionsResponse, error) { - var reqBody, resBody RetrieveAllPermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveAnswerFileBody struct { - Req *types.RetrieveAnswerFile `xml:"urn:vim25 RetrieveAnswerFile,omitempty"` - Res *types.RetrieveAnswerFileResponse `xml:"RetrieveAnswerFileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveAnswerFileBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveAnswerFile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFile) (*types.RetrieveAnswerFileResponse, error) { - var reqBody, resBody RetrieveAnswerFileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveAnswerFileForProfileBody struct { - Req *types.RetrieveAnswerFileForProfile `xml:"urn:vim25 RetrieveAnswerFileForProfile,omitempty"` - Res *types.RetrieveAnswerFileForProfileResponse `xml:"RetrieveAnswerFileForProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveAnswerFileForProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveAnswerFileForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveAnswerFileForProfile) (*types.RetrieveAnswerFileForProfileResponse, error) { - var reqBody, resBody RetrieveAnswerFileForProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveArgumentDescriptionBody struct { - Req *types.RetrieveArgumentDescription `xml:"urn:vim25 RetrieveArgumentDescription,omitempty"` - Res *types.RetrieveArgumentDescriptionResponse `xml:"RetrieveArgumentDescriptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveArgumentDescriptionBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveArgumentDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveArgumentDescription) (*types.RetrieveArgumentDescriptionResponse, error) { - var reqBody, resBody RetrieveArgumentDescriptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveClientCertBody struct { - Req *types.RetrieveClientCert `xml:"urn:vim25 RetrieveClientCert,omitempty"` - Res *types.RetrieveClientCertResponse `xml:"RetrieveClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCert) (*types.RetrieveClientCertResponse, error) { - var reqBody, resBody RetrieveClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveClientCsrBody struct { - Req *types.RetrieveClientCsr `xml:"urn:vim25 RetrieveClientCsr,omitempty"` - Res *types.RetrieveClientCsrResponse `xml:"RetrieveClientCsrResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveClientCsrBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveClientCsr(ctx context.Context, r soap.RoundTripper, req *types.RetrieveClientCsr) (*types.RetrieveClientCsrResponse, error) { - var reqBody, resBody RetrieveClientCsrBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveDasAdvancedRuntimeInfoBody struct { - Req *types.RetrieveDasAdvancedRuntimeInfo `xml:"urn:vim25 RetrieveDasAdvancedRuntimeInfo,omitempty"` - Res *types.RetrieveDasAdvancedRuntimeInfoResponse `xml:"RetrieveDasAdvancedRuntimeInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveDasAdvancedRuntimeInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveDasAdvancedRuntimeInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDasAdvancedRuntimeInfo) (*types.RetrieveDasAdvancedRuntimeInfoResponse, error) { - var reqBody, resBody RetrieveDasAdvancedRuntimeInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveDescriptionBody struct { - Req *types.RetrieveDescription `xml:"urn:vim25 RetrieveDescription,omitempty"` - Res *types.RetrieveDescriptionResponse `xml:"RetrieveDescriptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveDescriptionBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveDescription(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDescription) (*types.RetrieveDescriptionResponse, error) { - var reqBody, resBody RetrieveDescriptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveDiskPartitionInfoBody struct { - Req *types.RetrieveDiskPartitionInfo `xml:"urn:vim25 RetrieveDiskPartitionInfo,omitempty"` - Res *types.RetrieveDiskPartitionInfoResponse `xml:"RetrieveDiskPartitionInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveDiskPartitionInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveDiskPartitionInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDiskPartitionInfo) (*types.RetrieveDiskPartitionInfoResponse, error) { - var reqBody, resBody RetrieveDiskPartitionInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveDynamicPassthroughInfoBody struct { - Req *types.RetrieveDynamicPassthroughInfo `xml:"urn:vim25 RetrieveDynamicPassthroughInfo,omitempty"` - Res *types.RetrieveDynamicPassthroughInfoResponse `xml:"RetrieveDynamicPassthroughInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveDynamicPassthroughInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveDynamicPassthroughInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveDynamicPassthroughInfo) (*types.RetrieveDynamicPassthroughInfoResponse, error) { - var reqBody, resBody RetrieveDynamicPassthroughInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveEntityPermissionsBody struct { - Req *types.RetrieveEntityPermissions `xml:"urn:vim25 RetrieveEntityPermissions,omitempty"` - Res *types.RetrieveEntityPermissionsResponse `xml:"RetrieveEntityPermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityPermissions) (*types.RetrieveEntityPermissionsResponse, error) { - var reqBody, resBody RetrieveEntityPermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveEntityScheduledTaskBody struct { - Req *types.RetrieveEntityScheduledTask `xml:"urn:vim25 RetrieveEntityScheduledTask,omitempty"` - Res *types.RetrieveEntityScheduledTaskResponse `xml:"RetrieveEntityScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveEntityScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveEntityScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveEntityScheduledTask) (*types.RetrieveEntityScheduledTaskResponse, error) { - var reqBody, resBody RetrieveEntityScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveFreeEpcMemoryBody struct { - Req *types.RetrieveFreeEpcMemory `xml:"urn:vim25 RetrieveFreeEpcMemory,omitempty"` - Res *types.RetrieveFreeEpcMemoryResponse `xml:"RetrieveFreeEpcMemoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveFreeEpcMemoryBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveFreeEpcMemory(ctx context.Context, r soap.RoundTripper, req *types.RetrieveFreeEpcMemory) (*types.RetrieveFreeEpcMemoryResponse, error) { - var reqBody, resBody RetrieveFreeEpcMemoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHardwareUptimeBody struct { - Req *types.RetrieveHardwareUptime `xml:"urn:vim25 RetrieveHardwareUptime,omitempty"` - Res *types.RetrieveHardwareUptimeResponse `xml:"RetrieveHardwareUptimeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHardwareUptimeBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHardwareUptime(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHardwareUptime) (*types.RetrieveHardwareUptimeResponse, error) { - var reqBody, resBody RetrieveHardwareUptimeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHostAccessControlEntriesBody struct { - Req *types.RetrieveHostAccessControlEntries `xml:"urn:vim25 RetrieveHostAccessControlEntries,omitempty"` - Res *types.RetrieveHostAccessControlEntriesResponse `xml:"RetrieveHostAccessControlEntriesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHostAccessControlEntriesBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHostAccessControlEntries(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostAccessControlEntries) (*types.RetrieveHostAccessControlEntriesResponse, error) { - var reqBody, resBody RetrieveHostAccessControlEntriesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHostCustomizationsBody struct { - Req *types.RetrieveHostCustomizations `xml:"urn:vim25 RetrieveHostCustomizations,omitempty"` - Res *types.RetrieveHostCustomizationsResponse `xml:"RetrieveHostCustomizationsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHostCustomizationsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHostCustomizations(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizations) (*types.RetrieveHostCustomizationsResponse, error) { - var reqBody, resBody RetrieveHostCustomizationsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHostCustomizationsForProfileBody struct { - Req *types.RetrieveHostCustomizationsForProfile `xml:"urn:vim25 RetrieveHostCustomizationsForProfile,omitempty"` - Res *types.RetrieveHostCustomizationsForProfileResponse `xml:"RetrieveHostCustomizationsForProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHostCustomizationsForProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHostCustomizationsForProfile(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostCustomizationsForProfile) (*types.RetrieveHostCustomizationsForProfileResponse, error) { - var reqBody, resBody RetrieveHostCustomizationsForProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveHostSpecificationBody struct { - Req *types.RetrieveHostSpecification `xml:"urn:vim25 RetrieveHostSpecification,omitempty"` - Res *types.RetrieveHostSpecificationResponse `xml:"RetrieveHostSpecificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.RetrieveHostSpecification) (*types.RetrieveHostSpecificationResponse, error) { - var reqBody, resBody RetrieveHostSpecificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveKmipServerCertBody struct { - Req *types.RetrieveKmipServerCert `xml:"urn:vim25 RetrieveKmipServerCert,omitempty"` - Res *types.RetrieveKmipServerCertResponse `xml:"RetrieveKmipServerCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServerCert) (*types.RetrieveKmipServerCertResponse, error) { - var reqBody, resBody RetrieveKmipServerCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveKmipServersStatus_TaskBody struct { - Req *types.RetrieveKmipServersStatus_Task `xml:"urn:vim25 RetrieveKmipServersStatus_Task,omitempty"` - Res *types.RetrieveKmipServersStatus_TaskResponse `xml:"RetrieveKmipServersStatus_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveKmipServersStatus_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveKmipServersStatus_Task(ctx context.Context, r soap.RoundTripper, req *types.RetrieveKmipServersStatus_Task) (*types.RetrieveKmipServersStatus_TaskResponse, error) { - var reqBody, resBody RetrieveKmipServersStatus_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveObjectScheduledTaskBody struct { - Req *types.RetrieveObjectScheduledTask `xml:"urn:vim25 RetrieveObjectScheduledTask,omitempty"` - Res *types.RetrieveObjectScheduledTaskResponse `xml:"RetrieveObjectScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveObjectScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveObjectScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RetrieveObjectScheduledTask) (*types.RetrieveObjectScheduledTaskResponse, error) { - var reqBody, resBody RetrieveObjectScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveProductComponentsBody struct { - Req *types.RetrieveProductComponents `xml:"urn:vim25 RetrieveProductComponents,omitempty"` - Res *types.RetrieveProductComponentsResponse `xml:"RetrieveProductComponentsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveProductComponentsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveProductComponents(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProductComponents) (*types.RetrieveProductComponentsResponse, error) { - var reqBody, resBody RetrieveProductComponentsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrievePropertiesBody struct { - Req *types.RetrieveProperties `xml:"urn:vim25 RetrieveProperties,omitempty"` - Res *types.RetrievePropertiesResponse `xml:"RetrievePropertiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrievePropertiesBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveProperties(ctx context.Context, r soap.RoundTripper, req *types.RetrieveProperties) (*types.RetrievePropertiesResponse, error) { - var reqBody, resBody RetrievePropertiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrievePropertiesExBody struct { - Req *types.RetrievePropertiesEx `xml:"urn:vim25 RetrievePropertiesEx,omitempty"` - Res *types.RetrievePropertiesExResponse `xml:"RetrievePropertiesExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrievePropertiesExBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrievePropertiesEx(ctx context.Context, r soap.RoundTripper, req *types.RetrievePropertiesEx) (*types.RetrievePropertiesExResponse, error) { - var reqBody, resBody RetrievePropertiesExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveRolePermissionsBody struct { - Req *types.RetrieveRolePermissions `xml:"urn:vim25 RetrieveRolePermissions,omitempty"` - Res *types.RetrieveRolePermissionsResponse `xml:"RetrieveRolePermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveRolePermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveRolePermissions(ctx context.Context, r soap.RoundTripper, req *types.RetrieveRolePermissions) (*types.RetrieveRolePermissionsResponse, error) { - var reqBody, resBody RetrieveRolePermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveSelfSignedClientCertBody struct { - Req *types.RetrieveSelfSignedClientCert `xml:"urn:vim25 RetrieveSelfSignedClientCert,omitempty"` - Res *types.RetrieveSelfSignedClientCertResponse `xml:"RetrieveSelfSignedClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSelfSignedClientCert) (*types.RetrieveSelfSignedClientCertResponse, error) { - var reqBody, resBody RetrieveSelfSignedClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveServiceContentBody struct { - Req *types.RetrieveServiceContent `xml:"urn:vim25 RetrieveServiceContent,omitempty"` - Res *types.RetrieveServiceContentResponse `xml:"RetrieveServiceContentResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveServiceContentBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveServiceContent(ctx context.Context, r soap.RoundTripper, req *types.RetrieveServiceContent) (*types.RetrieveServiceContentResponse, error) { - var reqBody, resBody RetrieveServiceContentBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveServiceProviderEntitiesBody struct { - Req *types.RetrieveServiceProviderEntities `xml:"urn:vim25 RetrieveServiceProviderEntities,omitempty"` - Res *types.RetrieveServiceProviderEntitiesResponse `xml:"RetrieveServiceProviderEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveServiceProviderEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveServiceProviderEntities(ctx context.Context, r soap.RoundTripper, req *types.RetrieveServiceProviderEntities) (*types.RetrieveServiceProviderEntitiesResponse, error) { - var reqBody, resBody RetrieveServiceProviderEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveSnapshotDetailsBody struct { - Req *types.RetrieveSnapshotDetails `xml:"urn:vim25 RetrieveSnapshotDetails,omitempty"` - Res *types.RetrieveSnapshotDetailsResponse `xml:"RetrieveSnapshotDetailsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveSnapshotDetailsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveSnapshotDetails(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSnapshotDetails) (*types.RetrieveSnapshotDetailsResponse, error) { - var reqBody, resBody RetrieveSnapshotDetailsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveSnapshotInfoBody struct { - Req *types.RetrieveSnapshotInfo `xml:"urn:vim25 RetrieveSnapshotInfo,omitempty"` - Res *types.RetrieveSnapshotInfoResponse `xml:"RetrieveSnapshotInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveSnapshotInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveSnapshotInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveSnapshotInfo) (*types.RetrieveSnapshotInfoResponse, error) { - var reqBody, resBody RetrieveSnapshotInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveUserGroupsBody struct { - Req *types.RetrieveUserGroups `xml:"urn:vim25 RetrieveUserGroups,omitempty"` - Res *types.RetrieveUserGroupsResponse `xml:"RetrieveUserGroupsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveUserGroupsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveUserGroups(ctx context.Context, r soap.RoundTripper, req *types.RetrieveUserGroups) (*types.RetrieveUserGroupsResponse, error) { - var reqBody, resBody RetrieveUserGroupsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVStorageInfrastructureObjectPolicyBody struct { - Req *types.RetrieveVStorageInfrastructureObjectPolicy `xml:"urn:vim25 RetrieveVStorageInfrastructureObjectPolicy,omitempty"` - Res *types.RetrieveVStorageInfrastructureObjectPolicyResponse `xml:"RetrieveVStorageInfrastructureObjectPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVStorageInfrastructureObjectPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVStorageInfrastructureObjectPolicy(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageInfrastructureObjectPolicy) (*types.RetrieveVStorageInfrastructureObjectPolicyResponse, error) { - var reqBody, resBody RetrieveVStorageInfrastructureObjectPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVStorageObjectBody struct { - Req *types.RetrieveVStorageObject `xml:"urn:vim25 RetrieveVStorageObject,omitempty"` - Res *types.RetrieveVStorageObjectResponse `xml:"RetrieveVStorageObjectResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVStorageObjectBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVStorageObject(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObject) (*types.RetrieveVStorageObjectResponse, error) { - var reqBody, resBody RetrieveVStorageObjectBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVStorageObjectAssociationsBody struct { - Req *types.RetrieveVStorageObjectAssociations `xml:"urn:vim25 RetrieveVStorageObjectAssociations,omitempty"` - Res *types.RetrieveVStorageObjectAssociationsResponse `xml:"RetrieveVStorageObjectAssociationsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVStorageObjectAssociationsBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVStorageObjectAssociations(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObjectAssociations) (*types.RetrieveVStorageObjectAssociationsResponse, error) { - var reqBody, resBody RetrieveVStorageObjectAssociationsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVStorageObjectStateBody struct { - Req *types.RetrieveVStorageObjectState `xml:"urn:vim25 RetrieveVStorageObjectState,omitempty"` - Res *types.RetrieveVStorageObjectStateResponse `xml:"RetrieveVStorageObjectStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVStorageObjectStateBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVStorageObjectState(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVStorageObjectState) (*types.RetrieveVStorageObjectStateResponse, error) { - var reqBody, resBody RetrieveVStorageObjectStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVendorDeviceGroupInfoBody struct { - Req *types.RetrieveVendorDeviceGroupInfo `xml:"urn:vim25 RetrieveVendorDeviceGroupInfo,omitempty"` - Res *types.RetrieveVendorDeviceGroupInfoResponse `xml:"RetrieveVendorDeviceGroupInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVendorDeviceGroupInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVendorDeviceGroupInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVendorDeviceGroupInfo) (*types.RetrieveVendorDeviceGroupInfoResponse, error) { - var reqBody, resBody RetrieveVendorDeviceGroupInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVgpuDeviceInfoBody struct { - Req *types.RetrieveVgpuDeviceInfo `xml:"urn:vim25 RetrieveVgpuDeviceInfo,omitempty"` - Res *types.RetrieveVgpuDeviceInfoResponse `xml:"RetrieveVgpuDeviceInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVgpuDeviceInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVgpuDeviceInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVgpuDeviceInfo) (*types.RetrieveVgpuDeviceInfoResponse, error) { - var reqBody, resBody RetrieveVgpuDeviceInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RetrieveVgpuProfileInfoBody struct { - Req *types.RetrieveVgpuProfileInfo `xml:"urn:vim25 RetrieveVgpuProfileInfo,omitempty"` - Res *types.RetrieveVgpuProfileInfoResponse `xml:"RetrieveVgpuProfileInfoResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RetrieveVgpuProfileInfoBody) Fault() *soap.Fault { return b.Fault_ } - -func RetrieveVgpuProfileInfo(ctx context.Context, r soap.RoundTripper, req *types.RetrieveVgpuProfileInfo) (*types.RetrieveVgpuProfileInfoResponse, error) { - var reqBody, resBody RetrieveVgpuProfileInfoBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RevertToCurrentSnapshot_TaskBody struct { - Req *types.RevertToCurrentSnapshot_Task `xml:"urn:vim25 RevertToCurrentSnapshot_Task,omitempty"` - Res *types.RevertToCurrentSnapshot_TaskResponse `xml:"RevertToCurrentSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RevertToCurrentSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RevertToCurrentSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToCurrentSnapshot_Task) (*types.RevertToCurrentSnapshot_TaskResponse, error) { - var reqBody, resBody RevertToCurrentSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RevertToSnapshot_TaskBody struct { - Req *types.RevertToSnapshot_Task `xml:"urn:vim25 RevertToSnapshot_Task,omitempty"` - Res *types.RevertToSnapshot_TaskResponse `xml:"RevertToSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RevertToSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RevertToSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertToSnapshot_Task) (*types.RevertToSnapshot_TaskResponse, error) { - var reqBody, resBody RevertToSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RevertVStorageObject_TaskBody struct { - Req *types.RevertVStorageObject_Task `xml:"urn:vim25 RevertVStorageObject_Task,omitempty"` - Res *types.RevertVStorageObject_TaskResponse `xml:"RevertVStorageObject_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RevertVStorageObject_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RevertVStorageObject_Task(ctx context.Context, r soap.RoundTripper, req *types.RevertVStorageObject_Task) (*types.RevertVStorageObject_TaskResponse, error) { - var reqBody, resBody RevertVStorageObject_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RewindCollectorBody struct { - Req *types.RewindCollector `xml:"urn:vim25 RewindCollector,omitempty"` - Res *types.RewindCollectorResponse `xml:"RewindCollectorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RewindCollectorBody) Fault() *soap.Fault { return b.Fault_ } - -func RewindCollector(ctx context.Context, r soap.RoundTripper, req *types.RewindCollector) (*types.RewindCollectorResponse, error) { - var reqBody, resBody RewindCollectorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RunScheduledTaskBody struct { - Req *types.RunScheduledTask `xml:"urn:vim25 RunScheduledTask,omitempty"` - Res *types.RunScheduledTaskResponse `xml:"RunScheduledTaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RunScheduledTaskBody) Fault() *soap.Fault { return b.Fault_ } - -func RunScheduledTask(ctx context.Context, r soap.RoundTripper, req *types.RunScheduledTask) (*types.RunScheduledTaskResponse, error) { - var reqBody, resBody RunScheduledTaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type RunVsanPhysicalDiskDiagnosticsBody struct { - Req *types.RunVsanPhysicalDiskDiagnostics `xml:"urn:vim25 RunVsanPhysicalDiskDiagnostics,omitempty"` - Res *types.RunVsanPhysicalDiskDiagnosticsResponse `xml:"RunVsanPhysicalDiskDiagnosticsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *RunVsanPhysicalDiskDiagnosticsBody) Fault() *soap.Fault { return b.Fault_ } - -func RunVsanPhysicalDiskDiagnostics(ctx context.Context, r soap.RoundTripper, req *types.RunVsanPhysicalDiskDiagnostics) (*types.RunVsanPhysicalDiskDiagnosticsResponse, error) { - var reqBody, resBody RunVsanPhysicalDiskDiagnosticsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ScanHostPatchV2_TaskBody struct { - Req *types.ScanHostPatchV2_Task `xml:"urn:vim25 ScanHostPatchV2_Task,omitempty"` - Res *types.ScanHostPatchV2_TaskResponse `xml:"ScanHostPatchV2_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ScanHostPatchV2_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ScanHostPatchV2_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatchV2_Task) (*types.ScanHostPatchV2_TaskResponse, error) { - var reqBody, resBody ScanHostPatchV2_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ScanHostPatch_TaskBody struct { - Req *types.ScanHostPatch_Task `xml:"urn:vim25 ScanHostPatch_Task,omitempty"` - Res *types.ScanHostPatch_TaskResponse `xml:"ScanHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ScanHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ScanHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.ScanHostPatch_Task) (*types.ScanHostPatch_TaskResponse, error) { - var reqBody, resBody ScanHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ScheduleReconcileDatastoreInventoryBody struct { - Req *types.ScheduleReconcileDatastoreInventory `xml:"urn:vim25 ScheduleReconcileDatastoreInventory,omitempty"` - Res *types.ScheduleReconcileDatastoreInventoryResponse `xml:"ScheduleReconcileDatastoreInventoryResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ScheduleReconcileDatastoreInventoryBody) Fault() *soap.Fault { return b.Fault_ } - -func ScheduleReconcileDatastoreInventory(ctx context.Context, r soap.RoundTripper, req *types.ScheduleReconcileDatastoreInventory) (*types.ScheduleReconcileDatastoreInventoryResponse, error) { - var reqBody, resBody ScheduleReconcileDatastoreInventoryBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SearchDatastoreSubFolders_TaskBody struct { - Req *types.SearchDatastoreSubFolders_Task `xml:"urn:vim25 SearchDatastoreSubFolders_Task,omitempty"` - Res *types.SearchDatastoreSubFolders_TaskResponse `xml:"SearchDatastoreSubFolders_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SearchDatastoreSubFolders_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func SearchDatastoreSubFolders_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastoreSubFolders_Task) (*types.SearchDatastoreSubFolders_TaskResponse, error) { - var reqBody, resBody SearchDatastoreSubFolders_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SearchDatastore_TaskBody struct { - Req *types.SearchDatastore_Task `xml:"urn:vim25 SearchDatastore_Task,omitempty"` - Res *types.SearchDatastore_TaskResponse `xml:"SearchDatastore_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SearchDatastore_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func SearchDatastore_Task(ctx context.Context, r soap.RoundTripper, req *types.SearchDatastore_Task) (*types.SearchDatastore_TaskResponse, error) { - var reqBody, resBody SearchDatastore_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SelectActivePartitionBody struct { - Req *types.SelectActivePartition `xml:"urn:vim25 SelectActivePartition,omitempty"` - Res *types.SelectActivePartitionResponse `xml:"SelectActivePartitionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SelectActivePartitionBody) Fault() *soap.Fault { return b.Fault_ } - -func SelectActivePartition(ctx context.Context, r soap.RoundTripper, req *types.SelectActivePartition) (*types.SelectActivePartitionResponse, error) { - var reqBody, resBody SelectActivePartitionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SelectVnicBody struct { - Req *types.SelectVnic `xml:"urn:vim25 SelectVnic,omitempty"` - Res *types.SelectVnicResponse `xml:"SelectVnicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SelectVnicBody) Fault() *soap.Fault { return b.Fault_ } - -func SelectVnic(ctx context.Context, r soap.RoundTripper, req *types.SelectVnic) (*types.SelectVnicResponse, error) { - var reqBody, resBody SelectVnicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SelectVnicForNicTypeBody struct { - Req *types.SelectVnicForNicType `xml:"urn:vim25 SelectVnicForNicType,omitempty"` - Res *types.SelectVnicForNicTypeResponse `xml:"SelectVnicForNicTypeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SelectVnicForNicTypeBody) Fault() *soap.Fault { return b.Fault_ } - -func SelectVnicForNicType(ctx context.Context, r soap.RoundTripper, req *types.SelectVnicForNicType) (*types.SelectVnicForNicTypeResponse, error) { - var reqBody, resBody SelectVnicForNicTypeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SendNMIBody struct { - Req *types.SendNMI `xml:"urn:vim25 SendNMI,omitempty"` - Res *types.SendNMIResponse `xml:"SendNMIResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SendNMIBody) Fault() *soap.Fault { return b.Fault_ } - -func SendNMI(ctx context.Context, r soap.RoundTripper, req *types.SendNMI) (*types.SendNMIResponse, error) { - var reqBody, resBody SendNMIBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SendTestNotificationBody struct { - Req *types.SendTestNotification `xml:"urn:vim25 SendTestNotification,omitempty"` - Res *types.SendTestNotificationResponse `xml:"SendTestNotificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SendTestNotificationBody) Fault() *soap.Fault { return b.Fault_ } - -func SendTestNotification(ctx context.Context, r soap.RoundTripper, req *types.SendTestNotification) (*types.SendTestNotificationResponse, error) { - var reqBody, resBody SendTestNotificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SessionIsActiveBody struct { - Req *types.SessionIsActive `xml:"urn:vim25 SessionIsActive,omitempty"` - Res *types.SessionIsActiveResponse `xml:"SessionIsActiveResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SessionIsActiveBody) Fault() *soap.Fault { return b.Fault_ } - -func SessionIsActive(ctx context.Context, r soap.RoundTripper, req *types.SessionIsActive) (*types.SessionIsActiveResponse, error) { - var reqBody, resBody SessionIsActiveBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetCollectorPageSizeBody struct { - Req *types.SetCollectorPageSize `xml:"urn:vim25 SetCollectorPageSize,omitempty"` - Res *types.SetCollectorPageSizeResponse `xml:"SetCollectorPageSizeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetCollectorPageSizeBody) Fault() *soap.Fault { return b.Fault_ } - -func SetCollectorPageSize(ctx context.Context, r soap.RoundTripper, req *types.SetCollectorPageSize) (*types.SetCollectorPageSizeResponse, error) { - var reqBody, resBody SetCollectorPageSizeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetCryptoModeBody struct { - Req *types.SetCryptoMode `xml:"urn:vim25 SetCryptoMode,omitempty"` - Res *types.SetCryptoModeResponse `xml:"SetCryptoModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetCryptoModeBody) Fault() *soap.Fault { return b.Fault_ } - -func SetCryptoMode(ctx context.Context, r soap.RoundTripper, req *types.SetCryptoMode) (*types.SetCryptoModeResponse, error) { - var reqBody, resBody SetCryptoModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetDefaultKmsClusterBody struct { - Req *types.SetDefaultKmsCluster `xml:"urn:vim25 SetDefaultKmsCluster,omitempty"` - Res *types.SetDefaultKmsClusterResponse `xml:"SetDefaultKmsClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetDefaultKmsClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func SetDefaultKmsCluster(ctx context.Context, r soap.RoundTripper, req *types.SetDefaultKmsCluster) (*types.SetDefaultKmsClusterResponse, error) { - var reqBody, resBody SetDefaultKmsClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetDisplayTopologyBody struct { - Req *types.SetDisplayTopology `xml:"urn:vim25 SetDisplayTopology,omitempty"` - Res *types.SetDisplayTopologyResponse `xml:"SetDisplayTopologyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetDisplayTopologyBody) Fault() *soap.Fault { return b.Fault_ } - -func SetDisplayTopology(ctx context.Context, r soap.RoundTripper, req *types.SetDisplayTopology) (*types.SetDisplayTopologyResponse, error) { - var reqBody, resBody SetDisplayTopologyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetEntityPermissionsBody struct { - Req *types.SetEntityPermissions `xml:"urn:vim25 SetEntityPermissions,omitempty"` - Res *types.SetEntityPermissionsResponse `xml:"SetEntityPermissionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetEntityPermissionsBody) Fault() *soap.Fault { return b.Fault_ } - -func SetEntityPermissions(ctx context.Context, r soap.RoundTripper, req *types.SetEntityPermissions) (*types.SetEntityPermissionsResponse, error) { - var reqBody, resBody SetEntityPermissionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetExtensionCertificateBody struct { - Req *types.SetExtensionCertificate `xml:"urn:vim25 SetExtensionCertificate,omitempty"` - Res *types.SetExtensionCertificateResponse `xml:"SetExtensionCertificateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetExtensionCertificateBody) Fault() *soap.Fault { return b.Fault_ } - -func SetExtensionCertificate(ctx context.Context, r soap.RoundTripper, req *types.SetExtensionCertificate) (*types.SetExtensionCertificateResponse, error) { - var reqBody, resBody SetExtensionCertificateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetFieldBody struct { - Req *types.SetField `xml:"urn:vim25 SetField,omitempty"` - Res *types.SetFieldResponse `xml:"SetFieldResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetFieldBody) Fault() *soap.Fault { return b.Fault_ } - -func SetField(ctx context.Context, r soap.RoundTripper, req *types.SetField) (*types.SetFieldResponse, error) { - var reqBody, resBody SetFieldBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetLicenseEditionBody struct { - Req *types.SetLicenseEdition `xml:"urn:vim25 SetLicenseEdition,omitempty"` - Res *types.SetLicenseEditionResponse `xml:"SetLicenseEditionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetLicenseEditionBody) Fault() *soap.Fault { return b.Fault_ } - -func SetLicenseEdition(ctx context.Context, r soap.RoundTripper, req *types.SetLicenseEdition) (*types.SetLicenseEditionResponse, error) { - var reqBody, resBody SetLicenseEditionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetLocaleBody struct { - Req *types.SetLocale `xml:"urn:vim25 SetLocale,omitempty"` - Res *types.SetLocaleResponse `xml:"SetLocaleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetLocaleBody) Fault() *soap.Fault { return b.Fault_ } - -func SetLocale(ctx context.Context, r soap.RoundTripper, req *types.SetLocale) (*types.SetLocaleResponse, error) { - var reqBody, resBody SetLocaleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetMaxQueueDepthBody struct { - Req *types.SetMaxQueueDepth `xml:"urn:vim25 SetMaxQueueDepth,omitempty"` - Res *types.SetMaxQueueDepthResponse `xml:"SetMaxQueueDepthResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetMaxQueueDepthBody) Fault() *soap.Fault { return b.Fault_ } - -func SetMaxQueueDepth(ctx context.Context, r soap.RoundTripper, req *types.SetMaxQueueDepth) (*types.SetMaxQueueDepthResponse, error) { - var reqBody, resBody SetMaxQueueDepthBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetMultipathLunPolicyBody struct { - Req *types.SetMultipathLunPolicy `xml:"urn:vim25 SetMultipathLunPolicy,omitempty"` - Res *types.SetMultipathLunPolicyResponse `xml:"SetMultipathLunPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetMultipathLunPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func SetMultipathLunPolicy(ctx context.Context, r soap.RoundTripper, req *types.SetMultipathLunPolicy) (*types.SetMultipathLunPolicyResponse, error) { - var reqBody, resBody SetMultipathLunPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetNFSUserBody struct { - Req *types.SetNFSUser `xml:"urn:vim25 SetNFSUser,omitempty"` - Res *types.SetNFSUserResponse `xml:"SetNFSUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetNFSUserBody) Fault() *soap.Fault { return b.Fault_ } - -func SetNFSUser(ctx context.Context, r soap.RoundTripper, req *types.SetNFSUser) (*types.SetNFSUserResponse, error) { - var reqBody, resBody SetNFSUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetPublicKeyBody struct { - Req *types.SetPublicKey `xml:"urn:vim25 SetPublicKey,omitempty"` - Res *types.SetPublicKeyResponse `xml:"SetPublicKeyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetPublicKeyBody) Fault() *soap.Fault { return b.Fault_ } - -func SetPublicKey(ctx context.Context, r soap.RoundTripper, req *types.SetPublicKey) (*types.SetPublicKeyResponse, error) { - var reqBody, resBody SetPublicKeyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetRegistryValueInGuestBody struct { - Req *types.SetRegistryValueInGuest `xml:"urn:vim25 SetRegistryValueInGuest,omitempty"` - Res *types.SetRegistryValueInGuestResponse `xml:"SetRegistryValueInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetRegistryValueInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func SetRegistryValueInGuest(ctx context.Context, r soap.RoundTripper, req *types.SetRegistryValueInGuest) (*types.SetRegistryValueInGuestResponse, error) { - var reqBody, resBody SetRegistryValueInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetScreenResolutionBody struct { - Req *types.SetScreenResolution `xml:"urn:vim25 SetScreenResolution,omitempty"` - Res *types.SetScreenResolutionResponse `xml:"SetScreenResolutionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetScreenResolutionBody) Fault() *soap.Fault { return b.Fault_ } - -func SetScreenResolution(ctx context.Context, r soap.RoundTripper, req *types.SetScreenResolution) (*types.SetScreenResolutionResponse, error) { - var reqBody, resBody SetScreenResolutionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetTaskDescriptionBody struct { - Req *types.SetTaskDescription `xml:"urn:vim25 SetTaskDescription,omitempty"` - Res *types.SetTaskDescriptionResponse `xml:"SetTaskDescriptionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetTaskDescriptionBody) Fault() *soap.Fault { return b.Fault_ } - -func SetTaskDescription(ctx context.Context, r soap.RoundTripper, req *types.SetTaskDescription) (*types.SetTaskDescriptionResponse, error) { - var reqBody, resBody SetTaskDescriptionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetTaskStateBody struct { - Req *types.SetTaskState `xml:"urn:vim25 SetTaskState,omitempty"` - Res *types.SetTaskStateResponse `xml:"SetTaskStateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetTaskStateBody) Fault() *soap.Fault { return b.Fault_ } - -func SetTaskState(ctx context.Context, r soap.RoundTripper, req *types.SetTaskState) (*types.SetTaskStateResponse, error) { - var reqBody, resBody SetTaskStateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetVStorageObjectControlFlagsBody struct { - Req *types.SetVStorageObjectControlFlags `xml:"urn:vim25 SetVStorageObjectControlFlags,omitempty"` - Res *types.SetVStorageObjectControlFlagsResponse `xml:"SetVStorageObjectControlFlagsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetVStorageObjectControlFlagsBody) Fault() *soap.Fault { return b.Fault_ } - -func SetVStorageObjectControlFlags(ctx context.Context, r soap.RoundTripper, req *types.SetVStorageObjectControlFlags) (*types.SetVStorageObjectControlFlagsResponse, error) { - var reqBody, resBody SetVStorageObjectControlFlagsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetVirtualDiskUuidBody struct { - Req *types.SetVirtualDiskUuid `xml:"urn:vim25 SetVirtualDiskUuid,omitempty"` - Res *types.SetVirtualDiskUuidResponse `xml:"SetVirtualDiskUuidResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetVirtualDiskUuidBody) Fault() *soap.Fault { return b.Fault_ } - -func SetVirtualDiskUuid(ctx context.Context, r soap.RoundTripper, req *types.SetVirtualDiskUuid) (*types.SetVirtualDiskUuidResponse, error) { - var reqBody, resBody SetVirtualDiskUuidBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ShrinkVirtualDisk_TaskBody struct { - Req *types.ShrinkVirtualDisk_Task `xml:"urn:vim25 ShrinkVirtualDisk_Task,omitempty"` - Res *types.ShrinkVirtualDisk_TaskResponse `xml:"ShrinkVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ShrinkVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ShrinkVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ShrinkVirtualDisk_Task) (*types.ShrinkVirtualDisk_TaskResponse, error) { - var reqBody, resBody ShrinkVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ShutdownGuestBody struct { - Req *types.ShutdownGuest `xml:"urn:vim25 ShutdownGuest,omitempty"` - Res *types.ShutdownGuestResponse `xml:"ShutdownGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ShutdownGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ShutdownGuest(ctx context.Context, r soap.RoundTripper, req *types.ShutdownGuest) (*types.ShutdownGuestResponse, error) { - var reqBody, resBody ShutdownGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ShutdownHost_TaskBody struct { - Req *types.ShutdownHost_Task `xml:"urn:vim25 ShutdownHost_Task,omitempty"` - Res *types.ShutdownHost_TaskResponse `xml:"ShutdownHost_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ShutdownHost_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ShutdownHost_Task(ctx context.Context, r soap.RoundTripper, req *types.ShutdownHost_Task) (*types.ShutdownHost_TaskResponse, error) { - var reqBody, resBody ShutdownHost_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StageHostPatch_TaskBody struct { - Req *types.StageHostPatch_Task `xml:"urn:vim25 StageHostPatch_Task,omitempty"` - Res *types.StageHostPatch_TaskResponse `xml:"StageHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StageHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StageHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.StageHostPatch_Task) (*types.StageHostPatch_TaskResponse, error) { - var reqBody, resBody StageHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StampAllRulesWithUuid_TaskBody struct { - Req *types.StampAllRulesWithUuid_Task `xml:"urn:vim25 StampAllRulesWithUuid_Task,omitempty"` - Res *types.StampAllRulesWithUuid_TaskResponse `xml:"StampAllRulesWithUuid_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StampAllRulesWithUuid_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StampAllRulesWithUuid_Task(ctx context.Context, r soap.RoundTripper, req *types.StampAllRulesWithUuid_Task) (*types.StampAllRulesWithUuid_TaskResponse, error) { - var reqBody, resBody StampAllRulesWithUuid_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StandbyGuestBody struct { - Req *types.StandbyGuest `xml:"urn:vim25 StandbyGuest,omitempty"` - Res *types.StandbyGuestResponse `xml:"StandbyGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StandbyGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func StandbyGuest(ctx context.Context, r soap.RoundTripper, req *types.StandbyGuest) (*types.StandbyGuestResponse, error) { - var reqBody, resBody StandbyGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StartGuestNetwork_TaskBody struct { - Req *types.StartGuestNetwork_Task `xml:"urn:vim25 StartGuestNetwork_Task,omitempty"` - Res *types.StartGuestNetwork_TaskResponse `xml:"StartGuestNetwork_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StartGuestNetwork_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StartGuestNetwork_Task(ctx context.Context, r soap.RoundTripper, req *types.StartGuestNetwork_Task) (*types.StartGuestNetwork_TaskResponse, error) { - var reqBody, resBody StartGuestNetwork_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StartProgramInGuestBody struct { - Req *types.StartProgramInGuest `xml:"urn:vim25 StartProgramInGuest,omitempty"` - Res *types.StartProgramInGuestResponse `xml:"StartProgramInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StartProgramInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func StartProgramInGuest(ctx context.Context, r soap.RoundTripper, req *types.StartProgramInGuest) (*types.StartProgramInGuestResponse, error) { - var reqBody, resBody StartProgramInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StartRecording_TaskBody struct { - Req *types.StartRecording_Task `xml:"urn:vim25 StartRecording_Task,omitempty"` - Res *types.StartRecording_TaskResponse `xml:"StartRecording_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StartRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StartRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StartRecording_Task) (*types.StartRecording_TaskResponse, error) { - var reqBody, resBody StartRecording_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StartReplaying_TaskBody struct { - Req *types.StartReplaying_Task `xml:"urn:vim25 StartReplaying_Task,omitempty"` - Res *types.StartReplaying_TaskResponse `xml:"StartReplaying_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StartReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StartReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StartReplaying_Task) (*types.StartReplaying_TaskResponse, error) { - var reqBody, resBody StartReplaying_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StartServiceBody struct { - Req *types.StartService `xml:"urn:vim25 StartService,omitempty"` - Res *types.StartServiceResponse `xml:"StartServiceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StartServiceBody) Fault() *soap.Fault { return b.Fault_ } - -func StartService(ctx context.Context, r soap.RoundTripper, req *types.StartService) (*types.StartServiceResponse, error) { - var reqBody, resBody StartServiceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StopRecording_TaskBody struct { - Req *types.StopRecording_Task `xml:"urn:vim25 StopRecording_Task,omitempty"` - Res *types.StopRecording_TaskResponse `xml:"StopRecording_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StopRecording_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StopRecording_Task(ctx context.Context, r soap.RoundTripper, req *types.StopRecording_Task) (*types.StopRecording_TaskResponse, error) { - var reqBody, resBody StopRecording_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StopReplaying_TaskBody struct { - Req *types.StopReplaying_Task `xml:"urn:vim25 StopReplaying_Task,omitempty"` - Res *types.StopReplaying_TaskResponse `xml:"StopReplaying_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StopReplaying_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func StopReplaying_Task(ctx context.Context, r soap.RoundTripper, req *types.StopReplaying_Task) (*types.StopReplaying_TaskResponse, error) { - var reqBody, resBody StopReplaying_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type StopServiceBody struct { - Req *types.StopService `xml:"urn:vim25 StopService,omitempty"` - Res *types.StopServiceResponse `xml:"StopServiceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *StopServiceBody) Fault() *soap.Fault { return b.Fault_ } - -func StopService(ctx context.Context, r soap.RoundTripper, req *types.StopService) (*types.StopServiceResponse, error) { - var reqBody, resBody StopServiceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SuspendVApp_TaskBody struct { - Req *types.SuspendVApp_Task `xml:"urn:vim25 SuspendVApp_Task,omitempty"` - Res *types.SuspendVApp_TaskResponse `xml:"SuspendVApp_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SuspendVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func SuspendVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVApp_Task) (*types.SuspendVApp_TaskResponse, error) { - var reqBody, resBody SuspendVApp_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SuspendVM_TaskBody struct { - Req *types.SuspendVM_Task `xml:"urn:vim25 SuspendVM_Task,omitempty"` - Res *types.SuspendVM_TaskResponse `xml:"SuspendVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SuspendVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func SuspendVM_Task(ctx context.Context, r soap.RoundTripper, req *types.SuspendVM_Task) (*types.SuspendVM_TaskResponse, error) { - var reqBody, resBody SuspendVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TerminateFaultTolerantVM_TaskBody struct { - Req *types.TerminateFaultTolerantVM_Task `xml:"urn:vim25 TerminateFaultTolerantVM_Task,omitempty"` - Res *types.TerminateFaultTolerantVM_TaskResponse `xml:"TerminateFaultTolerantVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TerminateFaultTolerantVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func TerminateFaultTolerantVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TerminateFaultTolerantVM_Task) (*types.TerminateFaultTolerantVM_TaskResponse, error) { - var reqBody, resBody TerminateFaultTolerantVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TerminateProcessInGuestBody struct { - Req *types.TerminateProcessInGuest `xml:"urn:vim25 TerminateProcessInGuest,omitempty"` - Res *types.TerminateProcessInGuestResponse `xml:"TerminateProcessInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TerminateProcessInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func TerminateProcessInGuest(ctx context.Context, r soap.RoundTripper, req *types.TerminateProcessInGuest) (*types.TerminateProcessInGuestResponse, error) { - var reqBody, resBody TerminateProcessInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TerminateSessionBody struct { - Req *types.TerminateSession `xml:"urn:vim25 TerminateSession,omitempty"` - Res *types.TerminateSessionResponse `xml:"TerminateSessionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TerminateSessionBody) Fault() *soap.Fault { return b.Fault_ } - -func TerminateSession(ctx context.Context, r soap.RoundTripper, req *types.TerminateSession) (*types.TerminateSessionResponse, error) { - var reqBody, resBody TerminateSessionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TerminateVMBody struct { - Req *types.TerminateVM `xml:"urn:vim25 TerminateVM,omitempty"` - Res *types.TerminateVMResponse `xml:"TerminateVMResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TerminateVMBody) Fault() *soap.Fault { return b.Fault_ } - -func TerminateVM(ctx context.Context, r soap.RoundTripper, req *types.TerminateVM) (*types.TerminateVMResponse, error) { - var reqBody, resBody TerminateVMBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TestTimeServiceBody struct { - Req *types.TestTimeService `xml:"urn:vim25 TestTimeService,omitempty"` - Res *types.TestTimeServiceResponse `xml:"TestTimeServiceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TestTimeServiceBody) Fault() *soap.Fault { return b.Fault_ } - -func TestTimeService(ctx context.Context, r soap.RoundTripper, req *types.TestTimeService) (*types.TestTimeServiceResponse, error) { - var reqBody, resBody TestTimeServiceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TurnDiskLocatorLedOff_TaskBody struct { - Req *types.TurnDiskLocatorLedOff_Task `xml:"urn:vim25 TurnDiskLocatorLedOff_Task,omitempty"` - Res *types.TurnDiskLocatorLedOff_TaskResponse `xml:"TurnDiskLocatorLedOff_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TurnDiskLocatorLedOff_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func TurnDiskLocatorLedOff_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOff_Task) (*types.TurnDiskLocatorLedOff_TaskResponse, error) { - var reqBody, resBody TurnDiskLocatorLedOff_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TurnDiskLocatorLedOn_TaskBody struct { - Req *types.TurnDiskLocatorLedOn_Task `xml:"urn:vim25 TurnDiskLocatorLedOn_Task,omitempty"` - Res *types.TurnDiskLocatorLedOn_TaskResponse `xml:"TurnDiskLocatorLedOn_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TurnDiskLocatorLedOn_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func TurnDiskLocatorLedOn_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnDiskLocatorLedOn_Task) (*types.TurnDiskLocatorLedOn_TaskResponse, error) { - var reqBody, resBody TurnDiskLocatorLedOn_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type TurnOffFaultToleranceForVM_TaskBody struct { - Req *types.TurnOffFaultToleranceForVM_Task `xml:"urn:vim25 TurnOffFaultToleranceForVM_Task,omitempty"` - Res *types.TurnOffFaultToleranceForVM_TaskResponse `xml:"TurnOffFaultToleranceForVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *TurnOffFaultToleranceForVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func TurnOffFaultToleranceForVM_Task(ctx context.Context, r soap.RoundTripper, req *types.TurnOffFaultToleranceForVM_Task) (*types.TurnOffFaultToleranceForVM_TaskResponse, error) { - var reqBody, resBody TurnOffFaultToleranceForVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnassignUserFromGroupBody struct { - Req *types.UnassignUserFromGroup `xml:"urn:vim25 UnassignUserFromGroup,omitempty"` - Res *types.UnassignUserFromGroupResponse `xml:"UnassignUserFromGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnassignUserFromGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func UnassignUserFromGroup(ctx context.Context, r soap.RoundTripper, req *types.UnassignUserFromGroup) (*types.UnassignUserFromGroupResponse, error) { - var reqBody, resBody UnassignUserFromGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnbindVnicBody struct { - Req *types.UnbindVnic `xml:"urn:vim25 UnbindVnic,omitempty"` - Res *types.UnbindVnicResponse `xml:"UnbindVnicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnbindVnicBody) Fault() *soap.Fault { return b.Fault_ } - -func UnbindVnic(ctx context.Context, r soap.RoundTripper, req *types.UnbindVnic) (*types.UnbindVnicResponse, error) { - var reqBody, resBody UnbindVnicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UninstallHostPatch_TaskBody struct { - Req *types.UninstallHostPatch_Task `xml:"urn:vim25 UninstallHostPatch_Task,omitempty"` - Res *types.UninstallHostPatch_TaskResponse `xml:"UninstallHostPatch_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UninstallHostPatch_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UninstallHostPatch_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallHostPatch_Task) (*types.UninstallHostPatch_TaskResponse, error) { - var reqBody, resBody UninstallHostPatch_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UninstallIoFilter_TaskBody struct { - Req *types.UninstallIoFilter_Task `xml:"urn:vim25 UninstallIoFilter_Task,omitempty"` - Res *types.UninstallIoFilter_TaskResponse `xml:"UninstallIoFilter_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UninstallIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UninstallIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UninstallIoFilter_Task) (*types.UninstallIoFilter_TaskResponse, error) { - var reqBody, resBody UninstallIoFilter_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UninstallServiceBody struct { - Req *types.UninstallService `xml:"urn:vim25 UninstallService,omitempty"` - Res *types.UninstallServiceResponse `xml:"UninstallServiceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UninstallServiceBody) Fault() *soap.Fault { return b.Fault_ } - -func UninstallService(ctx context.Context, r soap.RoundTripper, req *types.UninstallService) (*types.UninstallServiceResponse, error) { - var reqBody, resBody UninstallServiceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmapVmfsVolumeEx_TaskBody struct { - Req *types.UnmapVmfsVolumeEx_Task `xml:"urn:vim25 UnmapVmfsVolumeEx_Task,omitempty"` - Res *types.UnmapVmfsVolumeEx_TaskResponse `xml:"UnmapVmfsVolumeEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmapVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmapVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmapVmfsVolumeEx_Task) (*types.UnmapVmfsVolumeEx_TaskResponse, error) { - var reqBody, resBody UnmapVmfsVolumeEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmarkServiceProviderEntitiesBody struct { - Req *types.UnmarkServiceProviderEntities `xml:"urn:vim25 UnmarkServiceProviderEntities,omitempty"` - Res *types.UnmarkServiceProviderEntitiesResponse `xml:"UnmarkServiceProviderEntitiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmarkServiceProviderEntitiesBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmarkServiceProviderEntities(ctx context.Context, r soap.RoundTripper, req *types.UnmarkServiceProviderEntities) (*types.UnmarkServiceProviderEntitiesResponse, error) { - var reqBody, resBody UnmarkServiceProviderEntitiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountDiskMapping_TaskBody struct { - Req *types.UnmountDiskMapping_Task `xml:"urn:vim25 UnmountDiskMapping_Task,omitempty"` - Res *types.UnmountDiskMapping_TaskResponse `xml:"UnmountDiskMapping_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountDiskMapping_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountDiskMapping_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountDiskMapping_Task) (*types.UnmountDiskMapping_TaskResponse, error) { - var reqBody, resBody UnmountDiskMapping_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountForceMountedVmfsVolumeBody struct { - Req *types.UnmountForceMountedVmfsVolume `xml:"urn:vim25 UnmountForceMountedVmfsVolume,omitempty"` - Res *types.UnmountForceMountedVmfsVolumeResponse `xml:"UnmountForceMountedVmfsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountForceMountedVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountForceMountedVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountForceMountedVmfsVolume) (*types.UnmountForceMountedVmfsVolumeResponse, error) { - var reqBody, resBody UnmountForceMountedVmfsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountToolsInstallerBody struct { - Req *types.UnmountToolsInstaller `xml:"urn:vim25 UnmountToolsInstaller,omitempty"` - Res *types.UnmountToolsInstallerResponse `xml:"UnmountToolsInstallerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountToolsInstallerBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountToolsInstaller(ctx context.Context, r soap.RoundTripper, req *types.UnmountToolsInstaller) (*types.UnmountToolsInstallerResponse, error) { - var reqBody, resBody UnmountToolsInstallerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountVffsVolumeBody struct { - Req *types.UnmountVffsVolume `xml:"urn:vim25 UnmountVffsVolume,omitempty"` - Res *types.UnmountVffsVolumeResponse `xml:"UnmountVffsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountVffsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountVffsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVffsVolume) (*types.UnmountVffsVolumeResponse, error) { - var reqBody, resBody UnmountVffsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountVmfsVolumeBody struct { - Req *types.UnmountVmfsVolume `xml:"urn:vim25 UnmountVmfsVolume,omitempty"` - Res *types.UnmountVmfsVolumeResponse `xml:"UnmountVmfsVolumeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountVmfsVolumeBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountVmfsVolume(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolume) (*types.UnmountVmfsVolumeResponse, error) { - var reqBody, resBody UnmountVmfsVolumeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnmountVmfsVolumeEx_TaskBody struct { - Req *types.UnmountVmfsVolumeEx_Task `xml:"urn:vim25 UnmountVmfsVolumeEx_Task,omitempty"` - Res *types.UnmountVmfsVolumeEx_TaskResponse `xml:"UnmountVmfsVolumeEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnmountVmfsVolumeEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UnmountVmfsVolumeEx_Task(ctx context.Context, r soap.RoundTripper, req *types.UnmountVmfsVolumeEx_Task) (*types.UnmountVmfsVolumeEx_TaskResponse, error) { - var reqBody, resBody UnmountVmfsVolumeEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterAndDestroy_TaskBody struct { - Req *types.UnregisterAndDestroy_Task `xml:"urn:vim25 UnregisterAndDestroy_Task,omitempty"` - Res *types.UnregisterAndDestroy_TaskResponse `xml:"UnregisterAndDestroy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterAndDestroy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterAndDestroy_Task(ctx context.Context, r soap.RoundTripper, req *types.UnregisterAndDestroy_Task) (*types.UnregisterAndDestroy_TaskResponse, error) { - var reqBody, resBody UnregisterAndDestroy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterExtensionBody struct { - Req *types.UnregisterExtension `xml:"urn:vim25 UnregisterExtension,omitempty"` - Res *types.UnregisterExtensionResponse `xml:"UnregisterExtensionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterExtensionBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterExtension(ctx context.Context, r soap.RoundTripper, req *types.UnregisterExtension) (*types.UnregisterExtensionResponse, error) { - var reqBody, resBody UnregisterExtensionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterHealthUpdateProviderBody struct { - Req *types.UnregisterHealthUpdateProvider `xml:"urn:vim25 UnregisterHealthUpdateProvider,omitempty"` - Res *types.UnregisterHealthUpdateProviderResponse `xml:"UnregisterHealthUpdateProviderResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterHealthUpdateProviderBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterHealthUpdateProvider(ctx context.Context, r soap.RoundTripper, req *types.UnregisterHealthUpdateProvider) (*types.UnregisterHealthUpdateProviderResponse, error) { - var reqBody, resBody UnregisterHealthUpdateProviderBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterKmsClusterBody struct { - Req *types.UnregisterKmsCluster `xml:"urn:vim25 UnregisterKmsCluster,omitempty"` - Res *types.UnregisterKmsClusterResponse `xml:"UnregisterKmsClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterKmsClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterKmsCluster(ctx context.Context, r soap.RoundTripper, req *types.UnregisterKmsCluster) (*types.UnregisterKmsClusterResponse, error) { - var reqBody, resBody UnregisterKmsClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterVMBody struct { - Req *types.UnregisterVM `xml:"urn:vim25 UnregisterVM,omitempty"` - Res *types.UnregisterVMResponse `xml:"UnregisterVMResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterVMBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterVM(ctx context.Context, r soap.RoundTripper, req *types.UnregisterVM) (*types.UnregisterVMResponse, error) { - var reqBody, resBody UnregisterVMBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateAnswerFile_TaskBody struct { - Req *types.UpdateAnswerFile_Task `xml:"urn:vim25 UpdateAnswerFile_Task,omitempty"` - Res *types.UpdateAnswerFile_TaskResponse `xml:"UpdateAnswerFile_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateAnswerFile_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateAnswerFile_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateAnswerFile_Task) (*types.UpdateAnswerFile_TaskResponse, error) { - var reqBody, resBody UpdateAnswerFile_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateAssignableHardwareConfigBody struct { - Req *types.UpdateAssignableHardwareConfig `xml:"urn:vim25 UpdateAssignableHardwareConfig,omitempty"` - Res *types.UpdateAssignableHardwareConfigResponse `xml:"UpdateAssignableHardwareConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateAssignableHardwareConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateAssignableHardwareConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateAssignableHardwareConfig) (*types.UpdateAssignableHardwareConfigResponse, error) { - var reqBody, resBody UpdateAssignableHardwareConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateAssignedLicenseBody struct { - Req *types.UpdateAssignedLicense `xml:"urn:vim25 UpdateAssignedLicense,omitempty"` - Res *types.UpdateAssignedLicenseResponse `xml:"UpdateAssignedLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateAssignedLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateAssignedLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateAssignedLicense) (*types.UpdateAssignedLicenseResponse, error) { - var reqBody, resBody UpdateAssignedLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateAuthorizationRoleBody struct { - Req *types.UpdateAuthorizationRole `xml:"urn:vim25 UpdateAuthorizationRole,omitempty"` - Res *types.UpdateAuthorizationRoleResponse `xml:"UpdateAuthorizationRoleResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateAuthorizationRoleBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateAuthorizationRole(ctx context.Context, r soap.RoundTripper, req *types.UpdateAuthorizationRole) (*types.UpdateAuthorizationRoleResponse, error) { - var reqBody, resBody UpdateAuthorizationRoleBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateBootDeviceBody struct { - Req *types.UpdateBootDevice `xml:"urn:vim25 UpdateBootDevice,omitempty"` - Res *types.UpdateBootDeviceResponse `xml:"UpdateBootDeviceResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateBootDeviceBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateBootDevice(ctx context.Context, r soap.RoundTripper, req *types.UpdateBootDevice) (*types.UpdateBootDeviceResponse, error) { - var reqBody, resBody UpdateBootDeviceBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateChildResourceConfigurationBody struct { - Req *types.UpdateChildResourceConfiguration `xml:"urn:vim25 UpdateChildResourceConfiguration,omitempty"` - Res *types.UpdateChildResourceConfigurationResponse `xml:"UpdateChildResourceConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateChildResourceConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateChildResourceConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateChildResourceConfiguration) (*types.UpdateChildResourceConfigurationResponse, error) { - var reqBody, resBody UpdateChildResourceConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateClusterProfileBody struct { - Req *types.UpdateClusterProfile `xml:"urn:vim25 UpdateClusterProfile,omitempty"` - Res *types.UpdateClusterProfileResponse `xml:"UpdateClusterProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateClusterProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateClusterProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateClusterProfile) (*types.UpdateClusterProfileResponse, error) { - var reqBody, resBody UpdateClusterProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateConfigBody struct { - Req *types.UpdateConfig `xml:"urn:vim25 UpdateConfig,omitempty"` - Res *types.UpdateConfigResponse `xml:"UpdateConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConfig) (*types.UpdateConfigResponse, error) { - var reqBody, resBody UpdateConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateConsoleIpRouteConfigBody struct { - Req *types.UpdateConsoleIpRouteConfig `xml:"urn:vim25 UpdateConsoleIpRouteConfig,omitempty"` - Res *types.UpdateConsoleIpRouteConfigResponse `xml:"UpdateConsoleIpRouteConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateConsoleIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateConsoleIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateConsoleIpRouteConfig) (*types.UpdateConsoleIpRouteConfigResponse, error) { - var reqBody, resBody UpdateConsoleIpRouteConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateCounterLevelMappingBody struct { - Req *types.UpdateCounterLevelMapping `xml:"urn:vim25 UpdateCounterLevelMapping,omitempty"` - Res *types.UpdateCounterLevelMappingResponse `xml:"UpdateCounterLevelMappingResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateCounterLevelMappingBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateCounterLevelMapping(ctx context.Context, r soap.RoundTripper, req *types.UpdateCounterLevelMapping) (*types.UpdateCounterLevelMappingResponse, error) { - var reqBody, resBody UpdateCounterLevelMappingBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDVSHealthCheckConfig_TaskBody struct { - Req *types.UpdateDVSHealthCheckConfig_Task `xml:"urn:vim25 UpdateDVSHealthCheckConfig_Task,omitempty"` - Res *types.UpdateDVSHealthCheckConfig_TaskResponse `xml:"UpdateDVSHealthCheckConfig_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDVSHealthCheckConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDVSHealthCheckConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSHealthCheckConfig_Task) (*types.UpdateDVSHealthCheckConfig_TaskResponse, error) { - var reqBody, resBody UpdateDVSHealthCheckConfig_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDVSLacpGroupConfig_TaskBody struct { - Req *types.UpdateDVSLacpGroupConfig_Task `xml:"urn:vim25 UpdateDVSLacpGroupConfig_Task,omitempty"` - Res *types.UpdateDVSLacpGroupConfig_TaskResponse `xml:"UpdateDVSLacpGroupConfig_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDVSLacpGroupConfig_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDVSLacpGroupConfig_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateDVSLacpGroupConfig_Task) (*types.UpdateDVSLacpGroupConfig_TaskResponse, error) { - var reqBody, resBody UpdateDVSLacpGroupConfig_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDateTimeBody struct { - Req *types.UpdateDateTime `xml:"urn:vim25 UpdateDateTime,omitempty"` - Res *types.UpdateDateTimeResponse `xml:"UpdateDateTimeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDateTimeBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDateTime(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTime) (*types.UpdateDateTimeResponse, error) { - var reqBody, resBody UpdateDateTimeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDateTimeConfigBody struct { - Req *types.UpdateDateTimeConfig `xml:"urn:vim25 UpdateDateTimeConfig,omitempty"` - Res *types.UpdateDateTimeConfigResponse `xml:"UpdateDateTimeConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDateTimeConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDateTimeConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDateTimeConfig) (*types.UpdateDateTimeConfigResponse, error) { - var reqBody, resBody UpdateDateTimeConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDefaultPolicyBody struct { - Req *types.UpdateDefaultPolicy `xml:"urn:vim25 UpdateDefaultPolicy,omitempty"` - Res *types.UpdateDefaultPolicyResponse `xml:"UpdateDefaultPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDefaultPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDefaultPolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateDefaultPolicy) (*types.UpdateDefaultPolicyResponse, error) { - var reqBody, resBody UpdateDefaultPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDiskPartitionsBody struct { - Req *types.UpdateDiskPartitions `xml:"urn:vim25 UpdateDiskPartitions,omitempty"` - Res *types.UpdateDiskPartitionsResponse `xml:"UpdateDiskPartitionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDiskPartitionsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDiskPartitions(ctx context.Context, r soap.RoundTripper, req *types.UpdateDiskPartitions) (*types.UpdateDiskPartitionsResponse, error) { - var reqBody, resBody UpdateDiskPartitionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDnsConfigBody struct { - Req *types.UpdateDnsConfig `xml:"urn:vim25 UpdateDnsConfig,omitempty"` - Res *types.UpdateDnsConfigResponse `xml:"UpdateDnsConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDnsConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDnsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateDnsConfig) (*types.UpdateDnsConfigResponse, error) { - var reqBody, resBody UpdateDnsConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateDvsCapabilityBody struct { - Req *types.UpdateDvsCapability `xml:"urn:vim25 UpdateDvsCapability,omitempty"` - Res *types.UpdateDvsCapabilityResponse `xml:"UpdateDvsCapabilityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateDvsCapabilityBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateDvsCapability(ctx context.Context, r soap.RoundTripper, req *types.UpdateDvsCapability) (*types.UpdateDvsCapabilityResponse, error) { - var reqBody, resBody UpdateDvsCapabilityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateExtensionBody struct { - Req *types.UpdateExtension `xml:"urn:vim25 UpdateExtension,omitempty"` - Res *types.UpdateExtensionResponse `xml:"UpdateExtensionResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateExtensionBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateExtension(ctx context.Context, r soap.RoundTripper, req *types.UpdateExtension) (*types.UpdateExtensionResponse, error) { - var reqBody, resBody UpdateExtensionBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateFlagsBody struct { - Req *types.UpdateFlags `xml:"urn:vim25 UpdateFlags,omitempty"` - Res *types.UpdateFlagsResponse `xml:"UpdateFlagsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateFlagsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateFlags(ctx context.Context, r soap.RoundTripper, req *types.UpdateFlags) (*types.UpdateFlagsResponse, error) { - var reqBody, resBody UpdateFlagsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateGraphicsConfigBody struct { - Req *types.UpdateGraphicsConfig `xml:"urn:vim25 UpdateGraphicsConfig,omitempty"` - Res *types.UpdateGraphicsConfigResponse `xml:"UpdateGraphicsConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateGraphicsConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateGraphicsConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateGraphicsConfig) (*types.UpdateGraphicsConfigResponse, error) { - var reqBody, resBody UpdateGraphicsConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHostCustomizations_TaskBody struct { - Req *types.UpdateHostCustomizations_Task `xml:"urn:vim25 UpdateHostCustomizations_Task,omitempty"` - Res *types.UpdateHostCustomizations_TaskResponse `xml:"UpdateHostCustomizations_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHostCustomizations_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHostCustomizations_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostCustomizations_Task) (*types.UpdateHostCustomizations_TaskResponse, error) { - var reqBody, resBody UpdateHostCustomizations_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHostImageAcceptanceLevelBody struct { - Req *types.UpdateHostImageAcceptanceLevel `xml:"urn:vim25 UpdateHostImageAcceptanceLevel,omitempty"` - Res *types.UpdateHostImageAcceptanceLevelResponse `xml:"UpdateHostImageAcceptanceLevelResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHostImageAcceptanceLevelBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHostImageAcceptanceLevel(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostImageAcceptanceLevel) (*types.UpdateHostImageAcceptanceLevelResponse, error) { - var reqBody, resBody UpdateHostImageAcceptanceLevelBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHostProfileBody struct { - Req *types.UpdateHostProfile `xml:"urn:vim25 UpdateHostProfile,omitempty"` - Res *types.UpdateHostProfileResponse `xml:"UpdateHostProfileResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHostProfileBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHostProfile(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostProfile) (*types.UpdateHostProfileResponse, error) { - var reqBody, resBody UpdateHostProfileBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHostSpecificationBody struct { - Req *types.UpdateHostSpecification `xml:"urn:vim25 UpdateHostSpecification,omitempty"` - Res *types.UpdateHostSpecificationResponse `xml:"UpdateHostSpecificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHostSpecificationBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHostSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSpecification) (*types.UpdateHostSpecificationResponse, error) { - var reqBody, resBody UpdateHostSpecificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHostSubSpecificationBody struct { - Req *types.UpdateHostSubSpecification `xml:"urn:vim25 UpdateHostSubSpecification,omitempty"` - Res *types.UpdateHostSubSpecificationResponse `xml:"UpdateHostSubSpecificationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHostSubSpecificationBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHostSubSpecification(ctx context.Context, r soap.RoundTripper, req *types.UpdateHostSubSpecification) (*types.UpdateHostSubSpecificationResponse, error) { - var reqBody, resBody UpdateHostSubSpecificationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateHppMultipathLunPolicyBody struct { - Req *types.UpdateHppMultipathLunPolicy `xml:"urn:vim25 UpdateHppMultipathLunPolicy,omitempty"` - Res *types.UpdateHppMultipathLunPolicyResponse `xml:"UpdateHppMultipathLunPolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateHppMultipathLunPolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateHppMultipathLunPolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateHppMultipathLunPolicy) (*types.UpdateHppMultipathLunPolicyResponse, error) { - var reqBody, resBody UpdateHppMultipathLunPolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiAdvancedOptionsBody struct { - Req *types.UpdateInternetScsiAdvancedOptions `xml:"urn:vim25 UpdateInternetScsiAdvancedOptions,omitempty"` - Res *types.UpdateInternetScsiAdvancedOptionsResponse `xml:"UpdateInternetScsiAdvancedOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiAdvancedOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiAdvancedOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAdvancedOptions) (*types.UpdateInternetScsiAdvancedOptionsResponse, error) { - var reqBody, resBody UpdateInternetScsiAdvancedOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiAliasBody struct { - Req *types.UpdateInternetScsiAlias `xml:"urn:vim25 UpdateInternetScsiAlias,omitempty"` - Res *types.UpdateInternetScsiAliasResponse `xml:"UpdateInternetScsiAliasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiAliasBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiAlias(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAlias) (*types.UpdateInternetScsiAliasResponse, error) { - var reqBody, resBody UpdateInternetScsiAliasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiAuthenticationPropertiesBody struct { - Req *types.UpdateInternetScsiAuthenticationProperties `xml:"urn:vim25 UpdateInternetScsiAuthenticationProperties,omitempty"` - Res *types.UpdateInternetScsiAuthenticationPropertiesResponse `xml:"UpdateInternetScsiAuthenticationPropertiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiAuthenticationPropertiesBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiAuthenticationProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiAuthenticationProperties) (*types.UpdateInternetScsiAuthenticationPropertiesResponse, error) { - var reqBody, resBody UpdateInternetScsiAuthenticationPropertiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiDigestPropertiesBody struct { - Req *types.UpdateInternetScsiDigestProperties `xml:"urn:vim25 UpdateInternetScsiDigestProperties,omitempty"` - Res *types.UpdateInternetScsiDigestPropertiesResponse `xml:"UpdateInternetScsiDigestPropertiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiDigestPropertiesBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiDigestProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDigestProperties) (*types.UpdateInternetScsiDigestPropertiesResponse, error) { - var reqBody, resBody UpdateInternetScsiDigestPropertiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiDiscoveryPropertiesBody struct { - Req *types.UpdateInternetScsiDiscoveryProperties `xml:"urn:vim25 UpdateInternetScsiDiscoveryProperties,omitempty"` - Res *types.UpdateInternetScsiDiscoveryPropertiesResponse `xml:"UpdateInternetScsiDiscoveryPropertiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiDiscoveryPropertiesBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiDiscoveryProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiDiscoveryProperties) (*types.UpdateInternetScsiDiscoveryPropertiesResponse, error) { - var reqBody, resBody UpdateInternetScsiDiscoveryPropertiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiIPPropertiesBody struct { - Req *types.UpdateInternetScsiIPProperties `xml:"urn:vim25 UpdateInternetScsiIPProperties,omitempty"` - Res *types.UpdateInternetScsiIPPropertiesResponse `xml:"UpdateInternetScsiIPPropertiesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiIPPropertiesBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiIPProperties(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiIPProperties) (*types.UpdateInternetScsiIPPropertiesResponse, error) { - var reqBody, resBody UpdateInternetScsiIPPropertiesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateInternetScsiNameBody struct { - Req *types.UpdateInternetScsiName `xml:"urn:vim25 UpdateInternetScsiName,omitempty"` - Res *types.UpdateInternetScsiNameResponse `xml:"UpdateInternetScsiNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateInternetScsiNameBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateInternetScsiName(ctx context.Context, r soap.RoundTripper, req *types.UpdateInternetScsiName) (*types.UpdateInternetScsiNameResponse, error) { - var reqBody, resBody UpdateInternetScsiNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateIpConfigBody struct { - Req *types.UpdateIpConfig `xml:"urn:vim25 UpdateIpConfig,omitempty"` - Res *types.UpdateIpConfigResponse `xml:"UpdateIpConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateIpConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateIpConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpConfig) (*types.UpdateIpConfigResponse, error) { - var reqBody, resBody UpdateIpConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateIpPoolBody struct { - Req *types.UpdateIpPool `xml:"urn:vim25 UpdateIpPool,omitempty"` - Res *types.UpdateIpPoolResponse `xml:"UpdateIpPoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateIpPoolBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateIpPool(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpPool) (*types.UpdateIpPoolResponse, error) { - var reqBody, resBody UpdateIpPoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateIpRouteConfigBody struct { - Req *types.UpdateIpRouteConfig `xml:"urn:vim25 UpdateIpRouteConfig,omitempty"` - Res *types.UpdateIpRouteConfigResponse `xml:"UpdateIpRouteConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateIpRouteConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateIpRouteConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteConfig) (*types.UpdateIpRouteConfigResponse, error) { - var reqBody, resBody UpdateIpRouteConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateIpRouteTableConfigBody struct { - Req *types.UpdateIpRouteTableConfig `xml:"urn:vim25 UpdateIpRouteTableConfig,omitempty"` - Res *types.UpdateIpRouteTableConfigResponse `xml:"UpdateIpRouteTableConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateIpRouteTableConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateIpRouteTableConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpRouteTableConfig) (*types.UpdateIpRouteTableConfigResponse, error) { - var reqBody, resBody UpdateIpRouteTableConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateIpmiBody struct { - Req *types.UpdateIpmi `xml:"urn:vim25 UpdateIpmi,omitempty"` - Res *types.UpdateIpmiResponse `xml:"UpdateIpmiResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateIpmiBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateIpmi(ctx context.Context, r soap.RoundTripper, req *types.UpdateIpmi) (*types.UpdateIpmiResponse, error) { - var reqBody, resBody UpdateIpmiBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateKmipServerBody struct { - Req *types.UpdateKmipServer `xml:"urn:vim25 UpdateKmipServer,omitempty"` - Res *types.UpdateKmipServerResponse `xml:"UpdateKmipServerResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateKmipServerBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateKmipServer(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmipServer) (*types.UpdateKmipServerResponse, error) { - var reqBody, resBody UpdateKmipServerBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateKmsSignedCsrClientCertBody struct { - Req *types.UpdateKmsSignedCsrClientCert `xml:"urn:vim25 UpdateKmsSignedCsrClientCert,omitempty"` - Res *types.UpdateKmsSignedCsrClientCertResponse `xml:"UpdateKmsSignedCsrClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateKmsSignedCsrClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateKmsSignedCsrClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateKmsSignedCsrClientCert) (*types.UpdateKmsSignedCsrClientCertResponse, error) { - var reqBody, resBody UpdateKmsSignedCsrClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateLicenseBody struct { - Req *types.UpdateLicense `xml:"urn:vim25 UpdateLicense,omitempty"` - Res *types.UpdateLicenseResponse `xml:"UpdateLicenseResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateLicenseBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateLicense(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicense) (*types.UpdateLicenseResponse, error) { - var reqBody, resBody UpdateLicenseBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateLicenseLabelBody struct { - Req *types.UpdateLicenseLabel `xml:"urn:vim25 UpdateLicenseLabel,omitempty"` - Res *types.UpdateLicenseLabelResponse `xml:"UpdateLicenseLabelResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateLicenseLabelBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateLicenseLabel(ctx context.Context, r soap.RoundTripper, req *types.UpdateLicenseLabel) (*types.UpdateLicenseLabelResponse, error) { - var reqBody, resBody UpdateLicenseLabelBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateLinkedChildrenBody struct { - Req *types.UpdateLinkedChildren `xml:"urn:vim25 UpdateLinkedChildren,omitempty"` - Res *types.UpdateLinkedChildrenResponse `xml:"UpdateLinkedChildrenResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateLinkedChildrenBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateLinkedChildren(ctx context.Context, r soap.RoundTripper, req *types.UpdateLinkedChildren) (*types.UpdateLinkedChildrenResponse, error) { - var reqBody, resBody UpdateLinkedChildrenBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateLocalSwapDatastoreBody struct { - Req *types.UpdateLocalSwapDatastore `xml:"urn:vim25 UpdateLocalSwapDatastore,omitempty"` - Res *types.UpdateLocalSwapDatastoreResponse `xml:"UpdateLocalSwapDatastoreResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateLocalSwapDatastoreBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateLocalSwapDatastore(ctx context.Context, r soap.RoundTripper, req *types.UpdateLocalSwapDatastore) (*types.UpdateLocalSwapDatastoreResponse, error) { - var reqBody, resBody UpdateLocalSwapDatastoreBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateLockdownExceptionsBody struct { - Req *types.UpdateLockdownExceptions `xml:"urn:vim25 UpdateLockdownExceptions,omitempty"` - Res *types.UpdateLockdownExceptionsResponse `xml:"UpdateLockdownExceptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateLockdownExceptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateLockdownExceptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateLockdownExceptions) (*types.UpdateLockdownExceptionsResponse, error) { - var reqBody, resBody UpdateLockdownExceptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateModuleOptionStringBody struct { - Req *types.UpdateModuleOptionString `xml:"urn:vim25 UpdateModuleOptionString,omitempty"` - Res *types.UpdateModuleOptionStringResponse `xml:"UpdateModuleOptionStringResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateModuleOptionStringBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateModuleOptionString(ctx context.Context, r soap.RoundTripper, req *types.UpdateModuleOptionString) (*types.UpdateModuleOptionStringResponse, error) { - var reqBody, resBody UpdateModuleOptionStringBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateNetworkConfigBody struct { - Req *types.UpdateNetworkConfig `xml:"urn:vim25 UpdateNetworkConfig,omitempty"` - Res *types.UpdateNetworkConfigResponse `xml:"UpdateNetworkConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateNetworkConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateNetworkConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkConfig) (*types.UpdateNetworkConfigResponse, error) { - var reqBody, resBody UpdateNetworkConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateNetworkResourcePoolBody struct { - Req *types.UpdateNetworkResourcePool `xml:"urn:vim25 UpdateNetworkResourcePool,omitempty"` - Res *types.UpdateNetworkResourcePoolResponse `xml:"UpdateNetworkResourcePoolResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateNetworkResourcePoolBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateNetworkResourcePool(ctx context.Context, r soap.RoundTripper, req *types.UpdateNetworkResourcePool) (*types.UpdateNetworkResourcePoolResponse, error) { - var reqBody, resBody UpdateNetworkResourcePoolBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateOptionsBody struct { - Req *types.UpdateOptions `xml:"urn:vim25 UpdateOptions,omitempty"` - Res *types.UpdateOptionsResponse `xml:"UpdateOptionsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateOptionsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateOptions(ctx context.Context, r soap.RoundTripper, req *types.UpdateOptions) (*types.UpdateOptionsResponse, error) { - var reqBody, resBody UpdateOptionsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdatePassthruConfigBody struct { - Req *types.UpdatePassthruConfig `xml:"urn:vim25 UpdatePassthruConfig,omitempty"` - Res *types.UpdatePassthruConfigResponse `xml:"UpdatePassthruConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdatePassthruConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdatePassthruConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdatePassthruConfig) (*types.UpdatePassthruConfigResponse, error) { - var reqBody, resBody UpdatePassthruConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdatePerfIntervalBody struct { - Req *types.UpdatePerfInterval `xml:"urn:vim25 UpdatePerfInterval,omitempty"` - Res *types.UpdatePerfIntervalResponse `xml:"UpdatePerfIntervalResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdatePerfIntervalBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdatePerfInterval(ctx context.Context, r soap.RoundTripper, req *types.UpdatePerfInterval) (*types.UpdatePerfIntervalResponse, error) { - var reqBody, resBody UpdatePerfIntervalBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdatePhysicalNicLinkSpeedBody struct { - Req *types.UpdatePhysicalNicLinkSpeed `xml:"urn:vim25 UpdatePhysicalNicLinkSpeed,omitempty"` - Res *types.UpdatePhysicalNicLinkSpeedResponse `xml:"UpdatePhysicalNicLinkSpeedResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdatePhysicalNicLinkSpeedBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdatePhysicalNicLinkSpeed(ctx context.Context, r soap.RoundTripper, req *types.UpdatePhysicalNicLinkSpeed) (*types.UpdatePhysicalNicLinkSpeedResponse, error) { - var reqBody, resBody UpdatePhysicalNicLinkSpeedBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdatePortGroupBody struct { - Req *types.UpdatePortGroup `xml:"urn:vim25 UpdatePortGroup,omitempty"` - Res *types.UpdatePortGroupResponse `xml:"UpdatePortGroupResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdatePortGroupBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdatePortGroup(ctx context.Context, r soap.RoundTripper, req *types.UpdatePortGroup) (*types.UpdatePortGroupResponse, error) { - var reqBody, resBody UpdatePortGroupBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateProductLockerLocation_TaskBody struct { - Req *types.UpdateProductLockerLocation_Task `xml:"urn:vim25 UpdateProductLockerLocation_Task,omitempty"` - Res *types.UpdateProductLockerLocation_TaskResponse `xml:"UpdateProductLockerLocation_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateProductLockerLocation_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateProductLockerLocation_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateProductLockerLocation_Task) (*types.UpdateProductLockerLocation_TaskResponse, error) { - var reqBody, resBody UpdateProductLockerLocation_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateProgressBody struct { - Req *types.UpdateProgress `xml:"urn:vim25 UpdateProgress,omitempty"` - Res *types.UpdateProgressResponse `xml:"UpdateProgressResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateProgressBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateProgress(ctx context.Context, r soap.RoundTripper, req *types.UpdateProgress) (*types.UpdateProgressResponse, error) { - var reqBody, resBody UpdateProgressBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateReferenceHostBody struct { - Req *types.UpdateReferenceHost `xml:"urn:vim25 UpdateReferenceHost,omitempty"` - Res *types.UpdateReferenceHostResponse `xml:"UpdateReferenceHostResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateReferenceHostBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateReferenceHost(ctx context.Context, r soap.RoundTripper, req *types.UpdateReferenceHost) (*types.UpdateReferenceHostResponse, error) { - var reqBody, resBody UpdateReferenceHostBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateRulesetBody struct { - Req *types.UpdateRuleset `xml:"urn:vim25 UpdateRuleset,omitempty"` - Res *types.UpdateRulesetResponse `xml:"UpdateRulesetResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateRulesetBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateRuleset(ctx context.Context, r soap.RoundTripper, req *types.UpdateRuleset) (*types.UpdateRulesetResponse, error) { - var reqBody, resBody UpdateRulesetBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateScsiLunDisplayNameBody struct { - Req *types.UpdateScsiLunDisplayName `xml:"urn:vim25 UpdateScsiLunDisplayName,omitempty"` - Res *types.UpdateScsiLunDisplayNameResponse `xml:"UpdateScsiLunDisplayNameResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateScsiLunDisplayNameBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateScsiLunDisplayName(ctx context.Context, r soap.RoundTripper, req *types.UpdateScsiLunDisplayName) (*types.UpdateScsiLunDisplayNameResponse, error) { - var reqBody, resBody UpdateScsiLunDisplayNameBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateSelfSignedClientCertBody struct { - Req *types.UpdateSelfSignedClientCert `xml:"urn:vim25 UpdateSelfSignedClientCert,omitempty"` - Res *types.UpdateSelfSignedClientCertResponse `xml:"UpdateSelfSignedClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateSelfSignedClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateSelfSignedClientCert(ctx context.Context, r soap.RoundTripper, req *types.UpdateSelfSignedClientCert) (*types.UpdateSelfSignedClientCertResponse, error) { - var reqBody, resBody UpdateSelfSignedClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateServiceConsoleVirtualNicBody struct { - Req *types.UpdateServiceConsoleVirtualNic `xml:"urn:vim25 UpdateServiceConsoleVirtualNic,omitempty"` - Res *types.UpdateServiceConsoleVirtualNicResponse `xml:"UpdateServiceConsoleVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateServiceConsoleVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateServiceConsoleVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceConsoleVirtualNic) (*types.UpdateServiceConsoleVirtualNicResponse, error) { - var reqBody, resBody UpdateServiceConsoleVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateServiceMessageBody struct { - Req *types.UpdateServiceMessage `xml:"urn:vim25 UpdateServiceMessage,omitempty"` - Res *types.UpdateServiceMessageResponse `xml:"UpdateServiceMessageResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateServiceMessageBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateServiceMessage(ctx context.Context, r soap.RoundTripper, req *types.UpdateServiceMessage) (*types.UpdateServiceMessageResponse, error) { - var reqBody, resBody UpdateServiceMessageBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateServicePolicyBody struct { - Req *types.UpdateServicePolicy `xml:"urn:vim25 UpdateServicePolicy,omitempty"` - Res *types.UpdateServicePolicyResponse `xml:"UpdateServicePolicyResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateServicePolicyBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateServicePolicy(ctx context.Context, r soap.RoundTripper, req *types.UpdateServicePolicy) (*types.UpdateServicePolicyResponse, error) { - var reqBody, resBody UpdateServicePolicyBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateSoftwareInternetScsiEnabledBody struct { - Req *types.UpdateSoftwareInternetScsiEnabled `xml:"urn:vim25 UpdateSoftwareInternetScsiEnabled,omitempty"` - Res *types.UpdateSoftwareInternetScsiEnabledResponse `xml:"UpdateSoftwareInternetScsiEnabledResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateSoftwareInternetScsiEnabledBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateSoftwareInternetScsiEnabled(ctx context.Context, r soap.RoundTripper, req *types.UpdateSoftwareInternetScsiEnabled) (*types.UpdateSoftwareInternetScsiEnabledResponse, error) { - var reqBody, resBody UpdateSoftwareInternetScsiEnabledBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateSystemResourcesBody struct { - Req *types.UpdateSystemResources `xml:"urn:vim25 UpdateSystemResources,omitempty"` - Res *types.UpdateSystemResourcesResponse `xml:"UpdateSystemResourcesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateSystemResourcesBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateSystemResources(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemResources) (*types.UpdateSystemResourcesResponse, error) { - var reqBody, resBody UpdateSystemResourcesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateSystemSwapConfigurationBody struct { - Req *types.UpdateSystemSwapConfiguration `xml:"urn:vim25 UpdateSystemSwapConfiguration,omitempty"` - Res *types.UpdateSystemSwapConfigurationResponse `xml:"UpdateSystemSwapConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateSystemSwapConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateSystemSwapConfiguration(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemSwapConfiguration) (*types.UpdateSystemSwapConfigurationResponse, error) { - var reqBody, resBody UpdateSystemSwapConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateSystemUsersBody struct { - Req *types.UpdateSystemUsers `xml:"urn:vim25 UpdateSystemUsers,omitempty"` - Res *types.UpdateSystemUsersResponse `xml:"UpdateSystemUsersResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateSystemUsersBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateSystemUsers(ctx context.Context, r soap.RoundTripper, req *types.UpdateSystemUsers) (*types.UpdateSystemUsersResponse, error) { - var reqBody, resBody UpdateSystemUsersBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateUserBody struct { - Req *types.UpdateUser `xml:"urn:vim25 UpdateUser,omitempty"` - Res *types.UpdateUserResponse `xml:"UpdateUserResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateUserBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateUser(ctx context.Context, r soap.RoundTripper, req *types.UpdateUser) (*types.UpdateUserResponse, error) { - var reqBody, resBody UpdateUserBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVAppConfigBody struct { - Req *types.UpdateVAppConfig `xml:"urn:vim25 UpdateVAppConfig,omitempty"` - Res *types.UpdateVAppConfigResponse `xml:"UpdateVAppConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVAppConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVAppConfig(ctx context.Context, r soap.RoundTripper, req *types.UpdateVAppConfig) (*types.UpdateVAppConfigResponse, error) { - var reqBody, resBody UpdateVAppConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVStorageInfrastructureObjectPolicy_TaskBody struct { - Req *types.UpdateVStorageInfrastructureObjectPolicy_Task `xml:"urn:vim25 UpdateVStorageInfrastructureObjectPolicy_Task,omitempty"` - Res *types.UpdateVStorageInfrastructureObjectPolicy_TaskResponse `xml:"UpdateVStorageInfrastructureObjectPolicy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVStorageInfrastructureObjectPolicy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVStorageInfrastructureObjectPolicy_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVStorageInfrastructureObjectPolicy_Task) (*types.UpdateVStorageInfrastructureObjectPolicy_TaskResponse, error) { - var reqBody, resBody UpdateVStorageInfrastructureObjectPolicy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVStorageObjectCrypto_TaskBody struct { - Req *types.UpdateVStorageObjectCrypto_Task `xml:"urn:vim25 UpdateVStorageObjectCrypto_Task,omitempty"` - Res *types.UpdateVStorageObjectCrypto_TaskResponse `xml:"UpdateVStorageObjectCrypto_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVStorageObjectCrypto_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVStorageObjectCrypto_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVStorageObjectCrypto_Task) (*types.UpdateVStorageObjectCrypto_TaskResponse, error) { - var reqBody, resBody UpdateVStorageObjectCrypto_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVStorageObjectPolicy_TaskBody struct { - Req *types.UpdateVStorageObjectPolicy_Task `xml:"urn:vim25 UpdateVStorageObjectPolicy_Task,omitempty"` - Res *types.UpdateVStorageObjectPolicy_TaskResponse `xml:"UpdateVStorageObjectPolicy_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVStorageObjectPolicy_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVStorageObjectPolicy_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVStorageObjectPolicy_Task) (*types.UpdateVStorageObjectPolicy_TaskResponse, error) { - var reqBody, resBody UpdateVStorageObjectPolicy_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVVolVirtualMachineFiles_TaskBody struct { - Req *types.UpdateVVolVirtualMachineFiles_Task `xml:"urn:vim25 UpdateVVolVirtualMachineFiles_Task,omitempty"` - Res *types.UpdateVVolVirtualMachineFiles_TaskResponse `xml:"UpdateVVolVirtualMachineFiles_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVVolVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVVolVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVVolVirtualMachineFiles_Task) (*types.UpdateVVolVirtualMachineFiles_TaskResponse, error) { - var reqBody, resBody UpdateVVolVirtualMachineFiles_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVirtualMachineFiles_TaskBody struct { - Req *types.UpdateVirtualMachineFiles_Task `xml:"urn:vim25 UpdateVirtualMachineFiles_Task,omitempty"` - Res *types.UpdateVirtualMachineFiles_TaskResponse `xml:"UpdateVirtualMachineFiles_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVirtualMachineFiles_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVirtualMachineFiles_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualMachineFiles_Task) (*types.UpdateVirtualMachineFiles_TaskResponse, error) { - var reqBody, resBody UpdateVirtualMachineFiles_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVirtualNicBody struct { - Req *types.UpdateVirtualNic `xml:"urn:vim25 UpdateVirtualNic,omitempty"` - Res *types.UpdateVirtualNicResponse `xml:"UpdateVirtualNicResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVirtualNicBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVirtualNic(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualNic) (*types.UpdateVirtualNicResponse, error) { - var reqBody, resBody UpdateVirtualNicBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVirtualSwitchBody struct { - Req *types.UpdateVirtualSwitch `xml:"urn:vim25 UpdateVirtualSwitch,omitempty"` - Res *types.UpdateVirtualSwitchResponse `xml:"UpdateVirtualSwitchResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVirtualSwitchBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVirtualSwitch(ctx context.Context, r soap.RoundTripper, req *types.UpdateVirtualSwitch) (*types.UpdateVirtualSwitchResponse, error) { - var reqBody, resBody UpdateVirtualSwitchBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVmfsUnmapBandwidthBody struct { - Req *types.UpdateVmfsUnmapBandwidth `xml:"urn:vim25 UpdateVmfsUnmapBandwidth,omitempty"` - Res *types.UpdateVmfsUnmapBandwidthResponse `xml:"UpdateVmfsUnmapBandwidthResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVmfsUnmapBandwidthBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVmfsUnmapBandwidth(ctx context.Context, r soap.RoundTripper, req *types.UpdateVmfsUnmapBandwidth) (*types.UpdateVmfsUnmapBandwidthResponse, error) { - var reqBody, resBody UpdateVmfsUnmapBandwidthBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVmfsUnmapPriorityBody struct { - Req *types.UpdateVmfsUnmapPriority `xml:"urn:vim25 UpdateVmfsUnmapPriority,omitempty"` - Res *types.UpdateVmfsUnmapPriorityResponse `xml:"UpdateVmfsUnmapPriorityResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVmfsUnmapPriorityBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVmfsUnmapPriority(ctx context.Context, r soap.RoundTripper, req *types.UpdateVmfsUnmapPriority) (*types.UpdateVmfsUnmapPriorityResponse, error) { - var reqBody, resBody UpdateVmfsUnmapPriorityBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpdateVsan_TaskBody struct { - Req *types.UpdateVsan_Task `xml:"urn:vim25 UpdateVsan_Task,omitempty"` - Res *types.UpdateVsan_TaskResponse `xml:"UpdateVsan_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpdateVsan_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpdateVsan_Task(ctx context.Context, r soap.RoundTripper, req *types.UpdateVsan_Task) (*types.UpdateVsan_TaskResponse, error) { - var reqBody, resBody UpdateVsan_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeIoFilter_TaskBody struct { - Req *types.UpgradeIoFilter_Task `xml:"urn:vim25 UpgradeIoFilter_Task,omitempty"` - Res *types.UpgradeIoFilter_TaskResponse `xml:"UpgradeIoFilter_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeIoFilter_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeIoFilter_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeIoFilter_Task) (*types.UpgradeIoFilter_TaskResponse, error) { - var reqBody, resBody UpgradeIoFilter_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeTools_TaskBody struct { - Req *types.UpgradeTools_Task `xml:"urn:vim25 UpgradeTools_Task,omitempty"` - Res *types.UpgradeTools_TaskResponse `xml:"UpgradeTools_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeTools_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeTools_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeTools_Task) (*types.UpgradeTools_TaskResponse, error) { - var reqBody, resBody UpgradeTools_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeVM_TaskBody struct { - Req *types.UpgradeVM_Task `xml:"urn:vim25 UpgradeVM_Task,omitempty"` - Res *types.UpgradeVM_TaskResponse `xml:"UpgradeVM_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeVM_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeVM_Task(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVM_Task) (*types.UpgradeVM_TaskResponse, error) { - var reqBody, resBody UpgradeVM_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeVmLayoutBody struct { - Req *types.UpgradeVmLayout `xml:"urn:vim25 UpgradeVmLayout,omitempty"` - Res *types.UpgradeVmLayoutResponse `xml:"UpgradeVmLayoutResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeVmLayoutBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeVmLayout(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmLayout) (*types.UpgradeVmLayoutResponse, error) { - var reqBody, resBody UpgradeVmLayoutBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeVmfsBody struct { - Req *types.UpgradeVmfs `xml:"urn:vim25 UpgradeVmfs,omitempty"` - Res *types.UpgradeVmfsResponse `xml:"UpgradeVmfsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeVmfsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeVmfs(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVmfs) (*types.UpgradeVmfsResponse, error) { - var reqBody, resBody UpgradeVmfsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UpgradeVsanObjectsBody struct { - Req *types.UpgradeVsanObjects `xml:"urn:vim25 UpgradeVsanObjects,omitempty"` - Res *types.UpgradeVsanObjectsResponse `xml:"UpgradeVsanObjectsResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UpgradeVsanObjectsBody) Fault() *soap.Fault { return b.Fault_ } - -func UpgradeVsanObjects(ctx context.Context, r soap.RoundTripper, req *types.UpgradeVsanObjects) (*types.UpgradeVsanObjectsResponse, error) { - var reqBody, resBody UpgradeVsanObjectsBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UploadClientCertBody struct { - Req *types.UploadClientCert `xml:"urn:vim25 UploadClientCert,omitempty"` - Res *types.UploadClientCertResponse `xml:"UploadClientCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UploadClientCertBody) Fault() *soap.Fault { return b.Fault_ } - -func UploadClientCert(ctx context.Context, r soap.RoundTripper, req *types.UploadClientCert) (*types.UploadClientCertResponse, error) { - var reqBody, resBody UploadClientCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UploadKmipServerCertBody struct { - Req *types.UploadKmipServerCert `xml:"urn:vim25 UploadKmipServerCert,omitempty"` - Res *types.UploadKmipServerCertResponse `xml:"UploadKmipServerCertResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UploadKmipServerCertBody) Fault() *soap.Fault { return b.Fault_ } - -func UploadKmipServerCert(ctx context.Context, r soap.RoundTripper, req *types.UploadKmipServerCert) (*types.UploadKmipServerCertResponse, error) { - var reqBody, resBody UploadKmipServerCertBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type VCenterUpdateVStorageObjectMetadataEx_TaskBody struct { - Req *types.VCenterUpdateVStorageObjectMetadataEx_Task `xml:"urn:vim25 VCenterUpdateVStorageObjectMetadataEx_Task,omitempty"` - Res *types.VCenterUpdateVStorageObjectMetadataEx_TaskResponse `xml:"VCenterUpdateVStorageObjectMetadataEx_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *VCenterUpdateVStorageObjectMetadataEx_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func VCenterUpdateVStorageObjectMetadataEx_Task(ctx context.Context, r soap.RoundTripper, req *types.VCenterUpdateVStorageObjectMetadataEx_Task) (*types.VCenterUpdateVStorageObjectMetadataEx_TaskResponse, error) { - var reqBody, resBody VCenterUpdateVStorageObjectMetadataEx_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type VStorageObjectCreateSnapshot_TaskBody struct { - Req *types.VStorageObjectCreateSnapshot_Task `xml:"urn:vim25 VStorageObjectCreateSnapshot_Task,omitempty"` - Res *types.VStorageObjectCreateSnapshot_TaskResponse `xml:"VStorageObjectCreateSnapshot_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *VStorageObjectCreateSnapshot_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func VStorageObjectCreateSnapshot_Task(ctx context.Context, r soap.RoundTripper, req *types.VStorageObjectCreateSnapshot_Task) (*types.VStorageObjectCreateSnapshot_TaskResponse, error) { - var reqBody, resBody VStorageObjectCreateSnapshot_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateCredentialsInGuestBody struct { - Req *types.ValidateCredentialsInGuest `xml:"urn:vim25 ValidateCredentialsInGuest,omitempty"` - Res *types.ValidateCredentialsInGuestResponse `xml:"ValidateCredentialsInGuestResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateCredentialsInGuestBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateCredentialsInGuest(ctx context.Context, r soap.RoundTripper, req *types.ValidateCredentialsInGuest) (*types.ValidateCredentialsInGuestResponse, error) { - var reqBody, resBody ValidateCredentialsInGuestBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateHCIConfigurationBody struct { - Req *types.ValidateHCIConfiguration `xml:"urn:vim25 ValidateHCIConfiguration,omitempty"` - Res *types.ValidateHCIConfigurationResponse `xml:"ValidateHCIConfigurationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateHCIConfigurationBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateHCIConfiguration(ctx context.Context, r soap.RoundTripper, req *types.ValidateHCIConfiguration) (*types.ValidateHCIConfigurationResponse, error) { - var reqBody, resBody ValidateHCIConfigurationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateHostBody struct { - Req *types.ValidateHost `xml:"urn:vim25 ValidateHost,omitempty"` - Res *types.ValidateHostResponse `xml:"ValidateHostResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateHostBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateHost(ctx context.Context, r soap.RoundTripper, req *types.ValidateHost) (*types.ValidateHostResponse, error) { - var reqBody, resBody ValidateHostBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateHostProfileComposition_TaskBody struct { - Req *types.ValidateHostProfileComposition_Task `xml:"urn:vim25 ValidateHostProfileComposition_Task,omitempty"` - Res *types.ValidateHostProfileComposition_TaskResponse `xml:"ValidateHostProfileComposition_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateHostProfileComposition_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateHostProfileComposition_Task(ctx context.Context, r soap.RoundTripper, req *types.ValidateHostProfileComposition_Task) (*types.ValidateHostProfileComposition_TaskResponse, error) { - var reqBody, resBody ValidateHostProfileComposition_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateMigrationBody struct { - Req *types.ValidateMigration `xml:"urn:vim25 ValidateMigration,omitempty"` - Res *types.ValidateMigrationResponse `xml:"ValidateMigrationResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateMigrationBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateMigration(ctx context.Context, r soap.RoundTripper, req *types.ValidateMigration) (*types.ValidateMigrationResponse, error) { - var reqBody, resBody ValidateMigrationBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ValidateStoragePodConfigBody struct { - Req *types.ValidateStoragePodConfig `xml:"urn:vim25 ValidateStoragePodConfig,omitempty"` - Res *types.ValidateStoragePodConfigResponse `xml:"ValidateStoragePodConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ValidateStoragePodConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func ValidateStoragePodConfig(ctx context.Context, r soap.RoundTripper, req *types.ValidateStoragePodConfig) (*types.ValidateStoragePodConfigResponse, error) { - var reqBody, resBody ValidateStoragePodConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type VstorageObjectVCenterQueryChangedDiskAreasBody struct { - Req *types.VstorageObjectVCenterQueryChangedDiskAreas `xml:"urn:vim25 VstorageObjectVCenterQueryChangedDiskAreas,omitempty"` - Res *types.VstorageObjectVCenterQueryChangedDiskAreasResponse `xml:"VstorageObjectVCenterQueryChangedDiskAreasResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *VstorageObjectVCenterQueryChangedDiskAreasBody) Fault() *soap.Fault { return b.Fault_ } - -func VstorageObjectVCenterQueryChangedDiskAreas(ctx context.Context, r soap.RoundTripper, req *types.VstorageObjectVCenterQueryChangedDiskAreas) (*types.VstorageObjectVCenterQueryChangedDiskAreasResponse, error) { - var reqBody, resBody VstorageObjectVCenterQueryChangedDiskAreasBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type WaitForUpdatesBody struct { - Req *types.WaitForUpdates `xml:"urn:vim25 WaitForUpdates,omitempty"` - Res *types.WaitForUpdatesResponse `xml:"WaitForUpdatesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *WaitForUpdatesBody) Fault() *soap.Fault { return b.Fault_ } - -func WaitForUpdates(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdates) (*types.WaitForUpdatesResponse, error) { - var reqBody, resBody WaitForUpdatesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type WaitForUpdatesExBody struct { - Req *types.WaitForUpdatesEx `xml:"urn:vim25 WaitForUpdatesEx,omitempty"` - Res *types.WaitForUpdatesExResponse `xml:"WaitForUpdatesExResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *WaitForUpdatesExBody) Fault() *soap.Fault { return b.Fault_ } - -func WaitForUpdatesEx(ctx context.Context, r soap.RoundTripper, req *types.WaitForUpdatesEx) (*types.WaitForUpdatesExResponse, error) { - var reqBody, resBody WaitForUpdatesExBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type XmlToCustomizationSpecItemBody struct { - Req *types.XmlToCustomizationSpecItem `xml:"urn:vim25 XmlToCustomizationSpecItem,omitempty"` - Res *types.XmlToCustomizationSpecItemResponse `xml:"XmlToCustomizationSpecItemResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *XmlToCustomizationSpecItemBody) Fault() *soap.Fault { return b.Fault_ } - -func XmlToCustomizationSpecItem(ctx context.Context, r soap.RoundTripper, req *types.XmlToCustomizationSpecItem) (*types.XmlToCustomizationSpecItemResponse, error) { - var reqBody, resBody XmlToCustomizationSpecItemBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ZeroFillVirtualDisk_TaskBody struct { - Req *types.ZeroFillVirtualDisk_Task `xml:"urn:vim25 ZeroFillVirtualDisk_Task,omitempty"` - Res *types.ZeroFillVirtualDisk_TaskResponse `xml:"ZeroFillVirtualDisk_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ZeroFillVirtualDisk_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ZeroFillVirtualDisk_Task(ctx context.Context, r soap.RoundTripper, req *types.ZeroFillVirtualDisk_Task) (*types.ZeroFillVirtualDisk_TaskResponse, error) { - var reqBody, resBody ZeroFillVirtualDisk_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ConfigureVcha_TaskBody struct { - Req *types.ConfigureVcha_Task `xml:"urn:vim25 configureVcha_Task,omitempty"` - Res *types.ConfigureVcha_TaskResponse `xml:"configureVcha_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ConfigureVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ConfigureVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.ConfigureVcha_Task) (*types.ConfigureVcha_TaskResponse, error) { - var reqBody, resBody ConfigureVcha_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreatePassiveNode_TaskBody struct { - Req *types.CreatePassiveNode_Task `xml:"urn:vim25 createPassiveNode_Task,omitempty"` - Res *types.CreatePassiveNode_TaskResponse `xml:"createPassiveNode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreatePassiveNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreatePassiveNode_Task(ctx context.Context, r soap.RoundTripper, req *types.CreatePassiveNode_Task) (*types.CreatePassiveNode_TaskResponse, error) { - var reqBody, resBody CreatePassiveNode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type CreateWitnessNode_TaskBody struct { - Req *types.CreateWitnessNode_Task `xml:"urn:vim25 createWitnessNode_Task,omitempty"` - Res *types.CreateWitnessNode_TaskResponse `xml:"createWitnessNode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *CreateWitnessNode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func CreateWitnessNode_Task(ctx context.Context, r soap.RoundTripper, req *types.CreateWitnessNode_Task) (*types.CreateWitnessNode_TaskResponse, error) { - var reqBody, resBody CreateWitnessNode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DeployVcha_TaskBody struct { - Req *types.DeployVcha_Task `xml:"urn:vim25 deployVcha_Task,omitempty"` - Res *types.DeployVcha_TaskResponse `xml:"deployVcha_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DeployVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DeployVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.DeployVcha_Task) (*types.DeployVcha_TaskResponse, error) { - var reqBody, resBody DeployVcha_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type DestroyVcha_TaskBody struct { - Req *types.DestroyVcha_Task `xml:"urn:vim25 destroyVcha_Task,omitempty"` - Res *types.DestroyVcha_TaskResponse `xml:"destroyVcha_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *DestroyVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func DestroyVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.DestroyVcha_Task) (*types.DestroyVcha_TaskResponse, error) { - var reqBody, resBody DestroyVcha_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type FetchSoftwarePackagesBody struct { - Req *types.FetchSoftwarePackages `xml:"urn:vim25 fetchSoftwarePackages,omitempty"` - Res *types.FetchSoftwarePackagesResponse `xml:"fetchSoftwarePackagesResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *FetchSoftwarePackagesBody) Fault() *soap.Fault { return b.Fault_ } - -func FetchSoftwarePackages(ctx context.Context, r soap.RoundTripper, req *types.FetchSoftwarePackages) (*types.FetchSoftwarePackagesResponse, error) { - var reqBody, resBody FetchSoftwarePackagesBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetClusterModeBody struct { - Req *types.GetClusterMode `xml:"urn:vim25 getClusterMode,omitempty"` - Res *types.GetClusterModeResponse `xml:"getClusterModeResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetClusterModeBody) Fault() *soap.Fault { return b.Fault_ } - -func GetClusterMode(ctx context.Context, r soap.RoundTripper, req *types.GetClusterMode) (*types.GetClusterModeResponse, error) { - var reqBody, resBody GetClusterModeBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type GetVchaConfigBody struct { - Req *types.GetVchaConfig `xml:"urn:vim25 getVchaConfig,omitempty"` - Res *types.GetVchaConfigResponse `xml:"getVchaConfigResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *GetVchaConfigBody) Fault() *soap.Fault { return b.Fault_ } - -func GetVchaConfig(ctx context.Context, r soap.RoundTripper, req *types.GetVchaConfig) (*types.GetVchaConfigResponse, error) { - var reqBody, resBody GetVchaConfigBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InitiateFailover_TaskBody struct { - Req *types.InitiateFailover_Task `xml:"urn:vim25 initiateFailover_Task,omitempty"` - Res *types.InitiateFailover_TaskResponse `xml:"initiateFailover_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InitiateFailover_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func InitiateFailover_Task(ctx context.Context, r soap.RoundTripper, req *types.InitiateFailover_Task) (*types.InitiateFailover_TaskResponse, error) { - var reqBody, resBody InitiateFailover_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type InstallDateBody struct { - Req *types.InstallDate `xml:"urn:vim25 installDate,omitempty"` - Res *types.InstallDateResponse `xml:"installDateResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *InstallDateBody) Fault() *soap.Fault { return b.Fault_ } - -func InstallDate(ctx context.Context, r soap.RoundTripper, req *types.InstallDate) (*types.InstallDateResponse, error) { - var reqBody, resBody InstallDateBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type PrepareVcha_TaskBody struct { - Req *types.PrepareVcha_Task `xml:"urn:vim25 prepareVcha_Task,omitempty"` - Res *types.PrepareVcha_TaskResponse `xml:"prepareVcha_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PrepareVcha_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func PrepareVcha_Task(ctx context.Context, r soap.RoundTripper, req *types.PrepareVcha_Task) (*types.PrepareVcha_TaskResponse, error) { - var reqBody, resBody PrepareVcha_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type QueryDatacenterConfigOptionDescriptorBody struct { - Req *types.QueryDatacenterConfigOptionDescriptor `xml:"urn:vim25 queryDatacenterConfigOptionDescriptor,omitempty"` - Res *types.QueryDatacenterConfigOptionDescriptorResponse `xml:"queryDatacenterConfigOptionDescriptorResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *QueryDatacenterConfigOptionDescriptorBody) Fault() *soap.Fault { return b.Fault_ } - -func QueryDatacenterConfigOptionDescriptor(ctx context.Context, r soap.RoundTripper, req *types.QueryDatacenterConfigOptionDescriptor) (*types.QueryDatacenterConfigOptionDescriptorResponse, error) { - var reqBody, resBody QueryDatacenterConfigOptionDescriptorBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type ReloadVirtualMachineFromPath_TaskBody struct { - Req *types.ReloadVirtualMachineFromPath_Task `xml:"urn:vim25 reloadVirtualMachineFromPath_Task,omitempty"` - Res *types.ReloadVirtualMachineFromPath_TaskResponse `xml:"reloadVirtualMachineFromPath_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *ReloadVirtualMachineFromPath_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func ReloadVirtualMachineFromPath_Task(ctx context.Context, r soap.RoundTripper, req *types.ReloadVirtualMachineFromPath_Task) (*types.ReloadVirtualMachineFromPath_TaskResponse, error) { - var reqBody, resBody ReloadVirtualMachineFromPath_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetClusterMode_TaskBody struct { - Req *types.SetClusterMode_Task `xml:"urn:vim25 setClusterMode_Task,omitempty"` - Res *types.SetClusterMode_TaskResponse `xml:"setClusterMode_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetClusterMode_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func SetClusterMode_Task(ctx context.Context, r soap.RoundTripper, req *types.SetClusterMode_Task) (*types.SetClusterMode_TaskResponse, error) { - var reqBody, resBody SetClusterMode_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type SetCustomValueBody struct { - Req *types.SetCustomValue `xml:"urn:vim25 setCustomValue,omitempty"` - Res *types.SetCustomValueResponse `xml:"setCustomValueResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *SetCustomValueBody) Fault() *soap.Fault { return b.Fault_ } - -func SetCustomValue(ctx context.Context, r soap.RoundTripper, req *types.SetCustomValue) (*types.SetCustomValueResponse, error) { - var reqBody, resBody SetCustomValueBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} - -type UnregisterVApp_TaskBody struct { - Req *types.UnregisterVApp_Task `xml:"urn:vim25 unregisterVApp_Task,omitempty"` - Res *types.UnregisterVApp_TaskResponse `xml:"unregisterVApp_TaskResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *UnregisterVApp_TaskBody) Fault() *soap.Fault { return b.Fault_ } - -func UnregisterVApp_Task(ctx context.Context, r soap.RoundTripper, req *types.UnregisterVApp_Task) (*types.UnregisterVApp_TaskResponse, error) { - var reqBody, resBody UnregisterVApp_TaskBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go deleted file mode 100644 index 401646598d44..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/service_content.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package methods - -import ( - "context" - "time" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// copy of vim25.ServiceInstance to avoid import cycle -var serviceInstance = types.ManagedObjectReference{ - Type: "ServiceInstance", - Value: "ServiceInstance", -} - -func GetServiceContent(ctx context.Context, r soap.RoundTripper) (types.ServiceContent, error) { - req := types.RetrieveServiceContent{ - This: serviceInstance, - } - - res, err := RetrieveServiceContent(ctx, r, &req) - if err != nil { - return types.ServiceContent{}, err - } - - return res.Returnval, nil -} - -func GetCurrentTime(ctx context.Context, r soap.RoundTripper) (*time.Time, error) { - req := types.CurrentTime{ - This: serviceInstance, - } - - res, err := CurrentTime(ctx, r, &req) - if err != nil { - return nil, err - } - - return &res.Returnval, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/unreleased.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/unreleased.go deleted file mode 100644 index a0ffff8c3270..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/methods/unreleased.go +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (c) 2022 VMware, Inc. 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. -*/ - -package methods - -import ( - "context" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -type PlaceVmsXClusterBody struct { - Req *types.PlaceVmsXCluster `xml:"urn:vim25 PlaceVmsXCluster,omitempty"` - Res *types.PlaceVmsXClusterResponse `xml:"PlaceVmsXClusterResponse,omitempty"` - Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` -} - -func (b *PlaceVmsXClusterBody) Fault() *soap.Fault { return b.Fault_ } - -func PlaceVmsXCluster(ctx context.Context, r soap.RoundTripper, req *types.PlaceVmsXCluster) (*types.PlaceVmsXClusterResponse, error) { - var reqBody, resBody PlaceVmsXClusterBody - - reqBody.Req = req - - if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil { - return nil, err - } - - return resBody.Res, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go deleted file mode 100644 index d3da5b1847c9..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/ancestors.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package mo - -import ( - "context" - "fmt" - - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -// Ancestors returns the entire ancestry tree of a specified managed object. -// The return value includes the root node and the specified object itself. -func Ancestors(ctx context.Context, rt soap.RoundTripper, pc, obj types.ManagedObjectReference) ([]ManagedEntity, error) { - ospec := types.ObjectSpec{ - Obj: obj, - SelectSet: []types.BaseSelectionSpec{ - &types.TraversalSpec{ - SelectionSpec: types.SelectionSpec{Name: "traverseParent"}, - Type: "ManagedEntity", - Path: "parent", - Skip: types.NewBool(false), - SelectSet: []types.BaseSelectionSpec{ - &types.SelectionSpec{Name: "traverseParent"}, - }, - }, - &types.TraversalSpec{ - SelectionSpec: types.SelectionSpec{}, - Type: "VirtualMachine", - Path: "parentVApp", - Skip: types.NewBool(false), - SelectSet: []types.BaseSelectionSpec{ - &types.SelectionSpec{Name: "traverseParent"}, - }, - }, - }, - Skip: types.NewBool(false), - } - - pspec := []types.PropertySpec{ - { - Type: "ManagedEntity", - PathSet: []string{"name", "parent"}, - }, - { - Type: "VirtualMachine", - PathSet: []string{"parentVApp"}, - }, - } - - req := types.RetrieveProperties{ - This: pc, - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ospec}, - PropSet: pspec, - }, - }, - } - - var ifaces []interface{} - err := RetrievePropertiesForRequest(ctx, rt, req, &ifaces) - if err != nil { - return nil, err - } - - var out []ManagedEntity - - // Build ancestry tree by iteratively finding a new child. - for len(out) < len(ifaces) { - var find types.ManagedObjectReference - - if len(out) > 0 { - find = out[len(out)-1].Self - } - - // Find entity we're looking for given the last entity in the current tree. - for _, iface := range ifaces { - me := iface.(IsManagedEntity).GetManagedEntity() - - if me.Name == "" { - // The types below have their own 'Name' field, so ManagedEntity.Name (me.Name) is empty. - // We only hit this case when the 'obj' param is one of these types. - // In most cases, 'obj' is a Folder so Name isn't collected in this call. - switch x := iface.(type) { - case Network: - me.Name = x.Name - case DistributedVirtualSwitch: - me.Name = x.Name - case DistributedVirtualPortgroup: - me.Name = x.Name - case OpaqueNetwork: - me.Name = x.Name - default: - // ManagedEntity always has a Name, if we hit this point we missed a case above. - panic(fmt.Sprintf("%#v Name is empty", me.Reference())) - } - } - - if me.Parent == nil { - // Special case for VirtualMachine within VirtualApp, - // unlikely to hit this other than via Finder.Element() - switch x := iface.(type) { - case VirtualMachine: - me.Parent = x.ParentVApp - } - } - - if me.Parent == nil { - out = append(out, me) - break - } - - if *me.Parent == find { - out = append(out, me) - break - } - } - } - - return out, nil -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/entity.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/entity.go deleted file mode 100644 index 193e6f71ea10..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/entity.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright (c) 2016 VMware, Inc. 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. -*/ - -package mo - -// Entity is the interface that is implemented by all managed objects -// that extend ManagedEntity. -type Entity interface { - Reference - Entity() *ManagedEntity -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/extra.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/extra.go deleted file mode 100644 index 254ef35949bd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/extra.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package mo - -type IsManagedEntity interface { - GetManagedEntity() ManagedEntity -} - -func (m ComputeResource) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m Datacenter) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m Datastore) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m DistributedVirtualSwitch) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m DistributedVirtualPortgroup) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m Folder) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m HostSystem) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m Network) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m ResourcePool) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} - -func (m VirtualMachine) GetManagedEntity() ManagedEntity { - return m.ManagedEntity -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/mo.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/mo.go deleted file mode 100644 index f3dcb5e29926..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/mo.go +++ /dev/null @@ -1,1868 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package mo - -import ( - "reflect" - "time" - - "github.com/vmware/govmomi/vim25/types" -) - -type Alarm struct { - ExtensibleManagedObject - - Info types.AlarmInfo `mo:"info"` -} - -func init() { - t["Alarm"] = reflect.TypeOf((*Alarm)(nil)).Elem() -} - -type AlarmManager struct { - Self types.ManagedObjectReference - - DefaultExpression []types.BaseAlarmExpression `mo:"defaultExpression"` - Description types.AlarmDescription `mo:"description"` -} - -func (m AlarmManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["AlarmManager"] = reflect.TypeOf((*AlarmManager)(nil)).Elem() -} - -type AuthorizationManager struct { - Self types.ManagedObjectReference - - PrivilegeList []types.AuthorizationPrivilege `mo:"privilegeList"` - RoleList []types.AuthorizationRole `mo:"roleList"` - Description types.AuthorizationDescription `mo:"description"` -} - -func (m AuthorizationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["AuthorizationManager"] = reflect.TypeOf((*AuthorizationManager)(nil)).Elem() -} - -type CertificateManager struct { - Self types.ManagedObjectReference -} - -func (m CertificateManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["CertificateManager"] = reflect.TypeOf((*CertificateManager)(nil)).Elem() -} - -type ClusterComputeResource struct { - ComputeResource - - Configuration types.ClusterConfigInfo `mo:"configuration"` - Recommendation []types.ClusterRecommendation `mo:"recommendation"` - DrsRecommendation []types.ClusterDrsRecommendation `mo:"drsRecommendation"` - HciConfig *types.ClusterComputeResourceHCIConfigInfo `mo:"hciConfig"` - MigrationHistory []types.ClusterDrsMigration `mo:"migrationHistory"` - ActionHistory []types.ClusterActionHistory `mo:"actionHistory"` - DrsFault []types.ClusterDrsFaults `mo:"drsFault"` -} - -func init() { - t["ClusterComputeResource"] = reflect.TypeOf((*ClusterComputeResource)(nil)).Elem() -} - -type ClusterEVCManager struct { - ExtensibleManagedObject - - ManagedCluster types.ManagedObjectReference `mo:"managedCluster"` - EvcState types.ClusterEVCManagerEVCState `mo:"evcState"` -} - -func init() { - t["ClusterEVCManager"] = reflect.TypeOf((*ClusterEVCManager)(nil)).Elem() -} - -type ClusterProfile struct { - Profile -} - -func init() { - t["ClusterProfile"] = reflect.TypeOf((*ClusterProfile)(nil)).Elem() -} - -type ClusterProfileManager struct { - ProfileManager -} - -func init() { - t["ClusterProfileManager"] = reflect.TypeOf((*ClusterProfileManager)(nil)).Elem() -} - -type ComputeResource struct { - ManagedEntity - - ResourcePool *types.ManagedObjectReference `mo:"resourcePool"` - Host []types.ManagedObjectReference `mo:"host"` - Datastore []types.ManagedObjectReference `mo:"datastore"` - Network []types.ManagedObjectReference `mo:"network"` - Summary types.BaseComputeResourceSummary `mo:"summary"` - EnvironmentBrowser *types.ManagedObjectReference `mo:"environmentBrowser"` - ConfigurationEx types.BaseComputeResourceConfigInfo `mo:"configurationEx"` - LifecycleManaged *bool `mo:"lifecycleManaged"` -} - -func (m *ComputeResource) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["ComputeResource"] = reflect.TypeOf((*ComputeResource)(nil)).Elem() -} - -type ContainerView struct { - ManagedObjectView - - Container types.ManagedObjectReference `mo:"container"` - Type []string `mo:"type"` - Recursive bool `mo:"recursive"` -} - -func init() { - t["ContainerView"] = reflect.TypeOf((*ContainerView)(nil)).Elem() -} - -type CryptoManager struct { - Self types.ManagedObjectReference - - Enabled bool `mo:"enabled"` -} - -func (m CryptoManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["CryptoManager"] = reflect.TypeOf((*CryptoManager)(nil)).Elem() -} - -type CryptoManagerHost struct { - CryptoManager -} - -func init() { - t["CryptoManagerHost"] = reflect.TypeOf((*CryptoManagerHost)(nil)).Elem() -} - -type CryptoManagerHostKMS struct { - CryptoManagerHost -} - -func init() { - t["CryptoManagerHostKMS"] = reflect.TypeOf((*CryptoManagerHostKMS)(nil)).Elem() -} - -type CryptoManagerKmip struct { - CryptoManager - - KmipServers []types.KmipClusterInfo `mo:"kmipServers"` -} - -func init() { - t["CryptoManagerKmip"] = reflect.TypeOf((*CryptoManagerKmip)(nil)).Elem() -} - -type CustomFieldsManager struct { - Self types.ManagedObjectReference - - Field []types.CustomFieldDef `mo:"field"` -} - -func (m CustomFieldsManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["CustomFieldsManager"] = reflect.TypeOf((*CustomFieldsManager)(nil)).Elem() -} - -type CustomizationSpecManager struct { - Self types.ManagedObjectReference - - Info []types.CustomizationSpecInfo `mo:"info"` - EncryptionKey []byte `mo:"encryptionKey"` -} - -func (m CustomizationSpecManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["CustomizationSpecManager"] = reflect.TypeOf((*CustomizationSpecManager)(nil)).Elem() -} - -type Datacenter struct { - ManagedEntity - - VmFolder types.ManagedObjectReference `mo:"vmFolder"` - HostFolder types.ManagedObjectReference `mo:"hostFolder"` - DatastoreFolder types.ManagedObjectReference `mo:"datastoreFolder"` - NetworkFolder types.ManagedObjectReference `mo:"networkFolder"` - Datastore []types.ManagedObjectReference `mo:"datastore"` - Network []types.ManagedObjectReference `mo:"network"` - Configuration types.DatacenterConfigInfo `mo:"configuration"` -} - -func (m *Datacenter) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["Datacenter"] = reflect.TypeOf((*Datacenter)(nil)).Elem() -} - -type Datastore struct { - ManagedEntity - - Info types.BaseDatastoreInfo `mo:"info"` - Summary types.DatastoreSummary `mo:"summary"` - Host []types.DatastoreHostMount `mo:"host"` - Vm []types.ManagedObjectReference `mo:"vm"` - Browser types.ManagedObjectReference `mo:"browser"` - Capability types.DatastoreCapability `mo:"capability"` - IormConfiguration *types.StorageIORMInfo `mo:"iormConfiguration"` -} - -func (m *Datastore) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["Datastore"] = reflect.TypeOf((*Datastore)(nil)).Elem() -} - -type DatastoreNamespaceManager struct { - Self types.ManagedObjectReference -} - -func (m DatastoreNamespaceManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["DatastoreNamespaceManager"] = reflect.TypeOf((*DatastoreNamespaceManager)(nil)).Elem() -} - -type DiagnosticManager struct { - Self types.ManagedObjectReference -} - -func (m DiagnosticManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["DiagnosticManager"] = reflect.TypeOf((*DiagnosticManager)(nil)).Elem() -} - -type DistributedVirtualPortgroup struct { - Network - - Key string `mo:"key"` - Config types.DVPortgroupConfigInfo `mo:"config"` - PortKeys []string `mo:"portKeys"` -} - -func init() { - t["DistributedVirtualPortgroup"] = reflect.TypeOf((*DistributedVirtualPortgroup)(nil)).Elem() -} - -type DistributedVirtualSwitch struct { - ManagedEntity - - Uuid string `mo:"uuid"` - Capability types.DVSCapability `mo:"capability"` - Summary types.DVSSummary `mo:"summary"` - Config types.BaseDVSConfigInfo `mo:"config"` - NetworkResourcePool []types.DVSNetworkResourcePool `mo:"networkResourcePool"` - Portgroup []types.ManagedObjectReference `mo:"portgroup"` - Runtime *types.DVSRuntimeInfo `mo:"runtime"` -} - -func (m *DistributedVirtualSwitch) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["DistributedVirtualSwitch"] = reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem() -} - -type DistributedVirtualSwitchManager struct { - Self types.ManagedObjectReference -} - -func (m DistributedVirtualSwitchManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["DistributedVirtualSwitchManager"] = reflect.TypeOf((*DistributedVirtualSwitchManager)(nil)).Elem() -} - -type EnvironmentBrowser struct { - Self types.ManagedObjectReference - - DatastoreBrowser *types.ManagedObjectReference `mo:"datastoreBrowser"` -} - -func (m EnvironmentBrowser) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["EnvironmentBrowser"] = reflect.TypeOf((*EnvironmentBrowser)(nil)).Elem() -} - -type EventHistoryCollector struct { - HistoryCollector - - LatestPage []types.BaseEvent `mo:"latestPage"` -} - -func init() { - t["EventHistoryCollector"] = reflect.TypeOf((*EventHistoryCollector)(nil)).Elem() -} - -type EventManager struct { - Self types.ManagedObjectReference - - Description types.EventDescription `mo:"description"` - LatestEvent types.BaseEvent `mo:"latestEvent"` - MaxCollector int32 `mo:"maxCollector"` -} - -func (m EventManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["EventManager"] = reflect.TypeOf((*EventManager)(nil)).Elem() -} - -type ExtensibleManagedObject struct { - Self types.ManagedObjectReference - - Value []types.BaseCustomFieldValue `mo:"value"` - AvailableField []types.CustomFieldDef `mo:"availableField"` -} - -func (m ExtensibleManagedObject) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ExtensibleManagedObject"] = reflect.TypeOf((*ExtensibleManagedObject)(nil)).Elem() -} - -type ExtensionManager struct { - Self types.ManagedObjectReference - - ExtensionList []types.Extension `mo:"extensionList"` -} - -func (m ExtensionManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ExtensionManager"] = reflect.TypeOf((*ExtensionManager)(nil)).Elem() -} - -type FailoverClusterConfigurator struct { - Self types.ManagedObjectReference - - DisabledConfigureMethod []string `mo:"disabledConfigureMethod"` -} - -func (m FailoverClusterConfigurator) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["FailoverClusterConfigurator"] = reflect.TypeOf((*FailoverClusterConfigurator)(nil)).Elem() -} - -type FailoverClusterManager struct { - Self types.ManagedObjectReference - - DisabledClusterMethod []string `mo:"disabledClusterMethod"` -} - -func (m FailoverClusterManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["FailoverClusterManager"] = reflect.TypeOf((*FailoverClusterManager)(nil)).Elem() -} - -type FileManager struct { - Self types.ManagedObjectReference -} - -func (m FileManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["FileManager"] = reflect.TypeOf((*FileManager)(nil)).Elem() -} - -type Folder struct { - ManagedEntity - - ChildType []string `mo:"childType"` - ChildEntity []types.ManagedObjectReference `mo:"childEntity"` - Namespace *string `mo:"namespace"` -} - -func (m *Folder) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["Folder"] = reflect.TypeOf((*Folder)(nil)).Elem() -} - -type GuestAliasManager struct { - Self types.ManagedObjectReference -} - -func (m GuestAliasManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestAliasManager"] = reflect.TypeOf((*GuestAliasManager)(nil)).Elem() -} - -type GuestAuthManager struct { - Self types.ManagedObjectReference -} - -func (m GuestAuthManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestAuthManager"] = reflect.TypeOf((*GuestAuthManager)(nil)).Elem() -} - -type GuestFileManager struct { - Self types.ManagedObjectReference -} - -func (m GuestFileManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestFileManager"] = reflect.TypeOf((*GuestFileManager)(nil)).Elem() -} - -type GuestOperationsManager struct { - Self types.ManagedObjectReference - - AuthManager *types.ManagedObjectReference `mo:"authManager"` - FileManager *types.ManagedObjectReference `mo:"fileManager"` - ProcessManager *types.ManagedObjectReference `mo:"processManager"` - GuestWindowsRegistryManager *types.ManagedObjectReference `mo:"guestWindowsRegistryManager"` - AliasManager *types.ManagedObjectReference `mo:"aliasManager"` -} - -func (m GuestOperationsManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestOperationsManager"] = reflect.TypeOf((*GuestOperationsManager)(nil)).Elem() -} - -type GuestProcessManager struct { - Self types.ManagedObjectReference -} - -func (m GuestProcessManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestProcessManager"] = reflect.TypeOf((*GuestProcessManager)(nil)).Elem() -} - -type GuestWindowsRegistryManager struct { - Self types.ManagedObjectReference -} - -func (m GuestWindowsRegistryManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["GuestWindowsRegistryManager"] = reflect.TypeOf((*GuestWindowsRegistryManager)(nil)).Elem() -} - -type HealthUpdateManager struct { - Self types.ManagedObjectReference -} - -func (m HealthUpdateManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HealthUpdateManager"] = reflect.TypeOf((*HealthUpdateManager)(nil)).Elem() -} - -type HistoryCollector struct { - Self types.ManagedObjectReference - - Filter types.AnyType `mo:"filter"` -} - -func (m HistoryCollector) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HistoryCollector"] = reflect.TypeOf((*HistoryCollector)(nil)).Elem() -} - -type HostAccessManager struct { - Self types.ManagedObjectReference - - LockdownMode types.HostLockdownMode `mo:"lockdownMode"` -} - -func (m HostAccessManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostAccessManager"] = reflect.TypeOf((*HostAccessManager)(nil)).Elem() -} - -type HostActiveDirectoryAuthentication struct { - HostDirectoryStore -} - -func init() { - t["HostActiveDirectoryAuthentication"] = reflect.TypeOf((*HostActiveDirectoryAuthentication)(nil)).Elem() -} - -type HostAssignableHardwareManager struct { - Self types.ManagedObjectReference - - Binding []types.HostAssignableHardwareBinding `mo:"binding"` - Config types.HostAssignableHardwareConfig `mo:"config"` -} - -func (m HostAssignableHardwareManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostAssignableHardwareManager"] = reflect.TypeOf((*HostAssignableHardwareManager)(nil)).Elem() -} - -type HostAuthenticationManager struct { - Self types.ManagedObjectReference - - Info types.HostAuthenticationManagerInfo `mo:"info"` - SupportedStore []types.ManagedObjectReference `mo:"supportedStore"` -} - -func (m HostAuthenticationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostAuthenticationManager"] = reflect.TypeOf((*HostAuthenticationManager)(nil)).Elem() -} - -type HostAuthenticationStore struct { - Self types.ManagedObjectReference - - Info types.BaseHostAuthenticationStoreInfo `mo:"info"` -} - -func (m HostAuthenticationStore) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostAuthenticationStore"] = reflect.TypeOf((*HostAuthenticationStore)(nil)).Elem() -} - -type HostAutoStartManager struct { - Self types.ManagedObjectReference - - Config types.HostAutoStartManagerConfig `mo:"config"` -} - -func (m HostAutoStartManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostAutoStartManager"] = reflect.TypeOf((*HostAutoStartManager)(nil)).Elem() -} - -type HostBootDeviceSystem struct { - Self types.ManagedObjectReference -} - -func (m HostBootDeviceSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostBootDeviceSystem"] = reflect.TypeOf((*HostBootDeviceSystem)(nil)).Elem() -} - -type HostCacheConfigurationManager struct { - Self types.ManagedObjectReference - - CacheConfigurationInfo []types.HostCacheConfigurationInfo `mo:"cacheConfigurationInfo"` -} - -func (m HostCacheConfigurationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostCacheConfigurationManager"] = reflect.TypeOf((*HostCacheConfigurationManager)(nil)).Elem() -} - -type HostCertificateManager struct { - Self types.ManagedObjectReference - - CertificateInfo types.HostCertificateManagerCertificateInfo `mo:"certificateInfo"` -} - -func (m HostCertificateManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostCertificateManager"] = reflect.TypeOf((*HostCertificateManager)(nil)).Elem() -} - -type HostCpuSchedulerSystem struct { - ExtensibleManagedObject - - HyperthreadInfo *types.HostHyperThreadScheduleInfo `mo:"hyperthreadInfo"` -} - -func init() { - t["HostCpuSchedulerSystem"] = reflect.TypeOf((*HostCpuSchedulerSystem)(nil)).Elem() -} - -type HostDatastoreBrowser struct { - Self types.ManagedObjectReference - - Datastore []types.ManagedObjectReference `mo:"datastore"` - SupportedType []types.BaseFileQuery `mo:"supportedType"` -} - -func (m HostDatastoreBrowser) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostDatastoreBrowser"] = reflect.TypeOf((*HostDatastoreBrowser)(nil)).Elem() -} - -type HostDatastoreSystem struct { - Self types.ManagedObjectReference - - Datastore []types.ManagedObjectReference `mo:"datastore"` - Capabilities types.HostDatastoreSystemCapabilities `mo:"capabilities"` -} - -func (m HostDatastoreSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostDatastoreSystem"] = reflect.TypeOf((*HostDatastoreSystem)(nil)).Elem() -} - -type HostDateTimeSystem struct { - Self types.ManagedObjectReference - - DateTimeInfo types.HostDateTimeInfo `mo:"dateTimeInfo"` -} - -func (m HostDateTimeSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostDateTimeSystem"] = reflect.TypeOf((*HostDateTimeSystem)(nil)).Elem() -} - -type HostDiagnosticSystem struct { - Self types.ManagedObjectReference - - ActivePartition *types.HostDiagnosticPartition `mo:"activePartition"` -} - -func (m HostDiagnosticSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostDiagnosticSystem"] = reflect.TypeOf((*HostDiagnosticSystem)(nil)).Elem() -} - -type HostDirectoryStore struct { - HostAuthenticationStore -} - -func init() { - t["HostDirectoryStore"] = reflect.TypeOf((*HostDirectoryStore)(nil)).Elem() -} - -type HostEsxAgentHostManager struct { - Self types.ManagedObjectReference - - ConfigInfo types.HostEsxAgentHostManagerConfigInfo `mo:"configInfo"` -} - -func (m HostEsxAgentHostManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostEsxAgentHostManager"] = reflect.TypeOf((*HostEsxAgentHostManager)(nil)).Elem() -} - -type HostFirewallSystem struct { - ExtensibleManagedObject - - FirewallInfo *types.HostFirewallInfo `mo:"firewallInfo"` -} - -func init() { - t["HostFirewallSystem"] = reflect.TypeOf((*HostFirewallSystem)(nil)).Elem() -} - -type HostFirmwareSystem struct { - Self types.ManagedObjectReference -} - -func (m HostFirmwareSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostFirmwareSystem"] = reflect.TypeOf((*HostFirmwareSystem)(nil)).Elem() -} - -type HostGraphicsManager struct { - ExtensibleManagedObject - - GraphicsInfo []types.HostGraphicsInfo `mo:"graphicsInfo"` - GraphicsConfig *types.HostGraphicsConfig `mo:"graphicsConfig"` - SharedPassthruGpuTypes []string `mo:"sharedPassthruGpuTypes"` - SharedGpuCapabilities []types.HostSharedGpuCapabilities `mo:"sharedGpuCapabilities"` -} - -func init() { - t["HostGraphicsManager"] = reflect.TypeOf((*HostGraphicsManager)(nil)).Elem() -} - -type HostHealthStatusSystem struct { - Self types.ManagedObjectReference - - Runtime types.HealthSystemRuntime `mo:"runtime"` -} - -func (m HostHealthStatusSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostHealthStatusSystem"] = reflect.TypeOf((*HostHealthStatusSystem)(nil)).Elem() -} - -type HostImageConfigManager struct { - Self types.ManagedObjectReference -} - -func (m HostImageConfigManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostImageConfigManager"] = reflect.TypeOf((*HostImageConfigManager)(nil)).Elem() -} - -type HostKernelModuleSystem struct { - Self types.ManagedObjectReference -} - -func (m HostKernelModuleSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostKernelModuleSystem"] = reflect.TypeOf((*HostKernelModuleSystem)(nil)).Elem() -} - -type HostLocalAccountManager struct { - Self types.ManagedObjectReference -} - -func (m HostLocalAccountManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostLocalAccountManager"] = reflect.TypeOf((*HostLocalAccountManager)(nil)).Elem() -} - -type HostLocalAuthentication struct { - HostAuthenticationStore -} - -func init() { - t["HostLocalAuthentication"] = reflect.TypeOf((*HostLocalAuthentication)(nil)).Elem() -} - -type HostMemorySystem struct { - ExtensibleManagedObject - - ConsoleReservationInfo *types.ServiceConsoleReservationInfo `mo:"consoleReservationInfo"` - VirtualMachineReservationInfo *types.VirtualMachineMemoryReservationInfo `mo:"virtualMachineReservationInfo"` -} - -func init() { - t["HostMemorySystem"] = reflect.TypeOf((*HostMemorySystem)(nil)).Elem() -} - -type HostNetworkSystem struct { - ExtensibleManagedObject - - Capabilities *types.HostNetCapabilities `mo:"capabilities"` - NetworkInfo *types.HostNetworkInfo `mo:"networkInfo"` - OffloadCapabilities *types.HostNetOffloadCapabilities `mo:"offloadCapabilities"` - NetworkConfig *types.HostNetworkConfig `mo:"networkConfig"` - DnsConfig types.BaseHostDnsConfig `mo:"dnsConfig"` - IpRouteConfig types.BaseHostIpRouteConfig `mo:"ipRouteConfig"` - ConsoleIpRouteConfig types.BaseHostIpRouteConfig `mo:"consoleIpRouteConfig"` -} - -func init() { - t["HostNetworkSystem"] = reflect.TypeOf((*HostNetworkSystem)(nil)).Elem() -} - -type HostNvdimmSystem struct { - Self types.ManagedObjectReference - - NvdimmSystemInfo types.NvdimmSystemInfo `mo:"nvdimmSystemInfo"` -} - -func (m HostNvdimmSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostNvdimmSystem"] = reflect.TypeOf((*HostNvdimmSystem)(nil)).Elem() -} - -type HostPatchManager struct { - Self types.ManagedObjectReference -} - -func (m HostPatchManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostPatchManager"] = reflect.TypeOf((*HostPatchManager)(nil)).Elem() -} - -type HostPciPassthruSystem struct { - ExtensibleManagedObject - - PciPassthruInfo []types.BaseHostPciPassthruInfo `mo:"pciPassthruInfo"` - SriovDevicePoolInfo []types.BaseHostSriovDevicePoolInfo `mo:"sriovDevicePoolInfo"` -} - -func init() { - t["HostPciPassthruSystem"] = reflect.TypeOf((*HostPciPassthruSystem)(nil)).Elem() -} - -type HostPowerSystem struct { - Self types.ManagedObjectReference - - Capability types.PowerSystemCapability `mo:"capability"` - Info types.PowerSystemInfo `mo:"info"` -} - -func (m HostPowerSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostPowerSystem"] = reflect.TypeOf((*HostPowerSystem)(nil)).Elem() -} - -type HostProfile struct { - Profile - - ValidationState *string `mo:"validationState"` - ValidationStateUpdateTime *time.Time `mo:"validationStateUpdateTime"` - ValidationFailureInfo *types.HostProfileValidationFailureInfo `mo:"validationFailureInfo"` - ReferenceHost *types.ManagedObjectReference `mo:"referenceHost"` -} - -func init() { - t["HostProfile"] = reflect.TypeOf((*HostProfile)(nil)).Elem() -} - -type HostProfileManager struct { - ProfileManager -} - -func init() { - t["HostProfileManager"] = reflect.TypeOf((*HostProfileManager)(nil)).Elem() -} - -type HostServiceSystem struct { - ExtensibleManagedObject - - ServiceInfo types.HostServiceInfo `mo:"serviceInfo"` -} - -func init() { - t["HostServiceSystem"] = reflect.TypeOf((*HostServiceSystem)(nil)).Elem() -} - -type HostSnmpSystem struct { - Self types.ManagedObjectReference - - Configuration types.HostSnmpConfigSpec `mo:"configuration"` - Limits types.HostSnmpSystemAgentLimits `mo:"limits"` -} - -func (m HostSnmpSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostSnmpSystem"] = reflect.TypeOf((*HostSnmpSystem)(nil)).Elem() -} - -type HostSpecificationManager struct { - Self types.ManagedObjectReference -} - -func (m HostSpecificationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostSpecificationManager"] = reflect.TypeOf((*HostSpecificationManager)(nil)).Elem() -} - -type HostStorageSystem struct { - ExtensibleManagedObject - - StorageDeviceInfo *types.HostStorageDeviceInfo `mo:"storageDeviceInfo"` - FileSystemVolumeInfo types.HostFileSystemVolumeInfo `mo:"fileSystemVolumeInfo"` - SystemFile []string `mo:"systemFile"` - MultipathStateInfo *types.HostMultipathStateInfo `mo:"multipathStateInfo"` -} - -func init() { - t["HostStorageSystem"] = reflect.TypeOf((*HostStorageSystem)(nil)).Elem() -} - -type HostSystem struct { - ManagedEntity - - Runtime types.HostRuntimeInfo `mo:"runtime"` - Summary types.HostListSummary `mo:"summary"` - Hardware *types.HostHardwareInfo `mo:"hardware"` - Capability *types.HostCapability `mo:"capability"` - LicensableResource types.HostLicensableResourceInfo `mo:"licensableResource"` - RemediationState *types.HostSystemRemediationState `mo:"remediationState"` - PrecheckRemediationResult *types.ApplyHostProfileConfigurationSpec `mo:"precheckRemediationResult"` - RemediationResult *types.ApplyHostProfileConfigurationResult `mo:"remediationResult"` - ComplianceCheckState *types.HostSystemComplianceCheckState `mo:"complianceCheckState"` - ComplianceCheckResult *types.ComplianceResult `mo:"complianceCheckResult"` - ConfigManager types.HostConfigManager `mo:"configManager"` - Config *types.HostConfigInfo `mo:"config"` - Vm []types.ManagedObjectReference `mo:"vm"` - Datastore []types.ManagedObjectReference `mo:"datastore"` - Network []types.ManagedObjectReference `mo:"network"` - DatastoreBrowser types.ManagedObjectReference `mo:"datastoreBrowser"` - SystemResources *types.HostSystemResourceInfo `mo:"systemResources"` - AnswerFileValidationState *types.AnswerFileStatusResult `mo:"answerFileValidationState"` - AnswerFileValidationResult *types.AnswerFileStatusResult `mo:"answerFileValidationResult"` -} - -func (m *HostSystem) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["HostSystem"] = reflect.TypeOf((*HostSystem)(nil)).Elem() -} - -type HostVFlashManager struct { - Self types.ManagedObjectReference - - VFlashConfigInfo *types.HostVFlashManagerVFlashConfigInfo `mo:"vFlashConfigInfo"` -} - -func (m HostVFlashManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostVFlashManager"] = reflect.TypeOf((*HostVFlashManager)(nil)).Elem() -} - -type HostVMotionSystem struct { - ExtensibleManagedObject - - NetConfig *types.HostVMotionNetConfig `mo:"netConfig"` - IpConfig *types.HostIpConfig `mo:"ipConfig"` -} - -func init() { - t["HostVMotionSystem"] = reflect.TypeOf((*HostVMotionSystem)(nil)).Elem() -} - -type HostVStorageObjectManager struct { - VStorageObjectManagerBase -} - -func init() { - t["HostVStorageObjectManager"] = reflect.TypeOf((*HostVStorageObjectManager)(nil)).Elem() -} - -type HostVirtualNicManager struct { - ExtensibleManagedObject - - Info types.HostVirtualNicManagerInfo `mo:"info"` -} - -func init() { - t["HostVirtualNicManager"] = reflect.TypeOf((*HostVirtualNicManager)(nil)).Elem() -} - -type HostVsanInternalSystem struct { - Self types.ManagedObjectReference -} - -func (m HostVsanInternalSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostVsanInternalSystem"] = reflect.TypeOf((*HostVsanInternalSystem)(nil)).Elem() -} - -type HostVsanSystem struct { - Self types.ManagedObjectReference - - Config types.VsanHostConfigInfo `mo:"config"` -} - -func (m HostVsanSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HostVsanSystem"] = reflect.TypeOf((*HostVsanSystem)(nil)).Elem() -} - -type HttpNfcLease struct { - Self types.ManagedObjectReference - - InitializeProgress int32 `mo:"initializeProgress"` - TransferProgress int32 `mo:"transferProgress"` - Mode string `mo:"mode"` - Capabilities types.HttpNfcLeaseCapabilities `mo:"capabilities"` - Info *types.HttpNfcLeaseInfo `mo:"info"` - State types.HttpNfcLeaseState `mo:"state"` - Error *types.LocalizedMethodFault `mo:"error"` -} - -func (m HttpNfcLease) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["HttpNfcLease"] = reflect.TypeOf((*HttpNfcLease)(nil)).Elem() -} - -type InventoryView struct { - ManagedObjectView -} - -func init() { - t["InventoryView"] = reflect.TypeOf((*InventoryView)(nil)).Elem() -} - -type IoFilterManager struct { - Self types.ManagedObjectReference -} - -func (m IoFilterManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["IoFilterManager"] = reflect.TypeOf((*IoFilterManager)(nil)).Elem() -} - -type IpPoolManager struct { - Self types.ManagedObjectReference -} - -func (m IpPoolManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["IpPoolManager"] = reflect.TypeOf((*IpPoolManager)(nil)).Elem() -} - -type IscsiManager struct { - Self types.ManagedObjectReference -} - -func (m IscsiManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["IscsiManager"] = reflect.TypeOf((*IscsiManager)(nil)).Elem() -} - -type LicenseAssignmentManager struct { - Self types.ManagedObjectReference -} - -func (m LicenseAssignmentManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["LicenseAssignmentManager"] = reflect.TypeOf((*LicenseAssignmentManager)(nil)).Elem() -} - -type LicenseManager struct { - Self types.ManagedObjectReference - - Source types.BaseLicenseSource `mo:"source"` - SourceAvailable bool `mo:"sourceAvailable"` - Diagnostics *types.LicenseDiagnostics `mo:"diagnostics"` - FeatureInfo []types.LicenseFeatureInfo `mo:"featureInfo"` - LicensedEdition string `mo:"licensedEdition"` - Licenses []types.LicenseManagerLicenseInfo `mo:"licenses"` - LicenseAssignmentManager *types.ManagedObjectReference `mo:"licenseAssignmentManager"` - Evaluation types.LicenseManagerEvaluationInfo `mo:"evaluation"` -} - -func (m LicenseManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["LicenseManager"] = reflect.TypeOf((*LicenseManager)(nil)).Elem() -} - -type ListView struct { - ManagedObjectView -} - -func init() { - t["ListView"] = reflect.TypeOf((*ListView)(nil)).Elem() -} - -type LocalizationManager struct { - Self types.ManagedObjectReference - - Catalog []types.LocalizationManagerMessageCatalog `mo:"catalog"` -} - -func (m LocalizationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["LocalizationManager"] = reflect.TypeOf((*LocalizationManager)(nil)).Elem() -} - -type ManagedEntity struct { - ExtensibleManagedObject - - Parent *types.ManagedObjectReference `mo:"parent"` - CustomValue []types.BaseCustomFieldValue `mo:"customValue"` - OverallStatus types.ManagedEntityStatus `mo:"overallStatus"` - ConfigStatus types.ManagedEntityStatus `mo:"configStatus"` - ConfigIssue []types.BaseEvent `mo:"configIssue"` - EffectiveRole []int32 `mo:"effectiveRole"` - Permission []types.Permission `mo:"permission"` - Name string `mo:"name"` - DisabledMethod []string `mo:"disabledMethod"` - RecentTask []types.ManagedObjectReference `mo:"recentTask"` - DeclaredAlarmState []types.AlarmState `mo:"declaredAlarmState"` - TriggeredAlarmState []types.AlarmState `mo:"triggeredAlarmState"` - AlarmActionsEnabled *bool `mo:"alarmActionsEnabled"` - Tag []types.Tag `mo:"tag"` -} - -func init() { - t["ManagedEntity"] = reflect.TypeOf((*ManagedEntity)(nil)).Elem() -} - -type ManagedObjectView struct { - Self types.ManagedObjectReference - - View []types.ManagedObjectReference `mo:"view"` -} - -func (m ManagedObjectView) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ManagedObjectView"] = reflect.TypeOf((*ManagedObjectView)(nil)).Elem() -} - -type MessageBusProxy struct { - Self types.ManagedObjectReference -} - -func (m MessageBusProxy) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["MessageBusProxy"] = reflect.TypeOf((*MessageBusProxy)(nil)).Elem() -} - -type Network struct { - ManagedEntity - - Summary types.BaseNetworkSummary `mo:"summary"` - Host []types.ManagedObjectReference `mo:"host"` - Vm []types.ManagedObjectReference `mo:"vm"` - Name string `mo:"name"` -} - -func (m *Network) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["Network"] = reflect.TypeOf((*Network)(nil)).Elem() -} - -type OpaqueNetwork struct { - Network - - Capability *types.OpaqueNetworkCapability `mo:"capability"` - ExtraConfig []types.BaseOptionValue `mo:"extraConfig"` -} - -func init() { - t["OpaqueNetwork"] = reflect.TypeOf((*OpaqueNetwork)(nil)).Elem() -} - -type OptionManager struct { - Self types.ManagedObjectReference - - SupportedOption []types.OptionDef `mo:"supportedOption"` - Setting []types.BaseOptionValue `mo:"setting"` -} - -func (m OptionManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["OptionManager"] = reflect.TypeOf((*OptionManager)(nil)).Elem() -} - -type OverheadMemoryManager struct { - Self types.ManagedObjectReference -} - -func (m OverheadMemoryManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["OverheadMemoryManager"] = reflect.TypeOf((*OverheadMemoryManager)(nil)).Elem() -} - -type OvfManager struct { - Self types.ManagedObjectReference - - OvfImportOption []types.OvfOptionInfo `mo:"ovfImportOption"` - OvfExportOption []types.OvfOptionInfo `mo:"ovfExportOption"` -} - -func (m OvfManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["OvfManager"] = reflect.TypeOf((*OvfManager)(nil)).Elem() -} - -type PerformanceManager struct { - Self types.ManagedObjectReference - - Description types.PerformanceDescription `mo:"description"` - HistoricalInterval []types.PerfInterval `mo:"historicalInterval"` - PerfCounter []types.PerfCounterInfo `mo:"perfCounter"` -} - -func (m PerformanceManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["PerformanceManager"] = reflect.TypeOf((*PerformanceManager)(nil)).Elem() -} - -type Profile struct { - Self types.ManagedObjectReference - - Config types.BaseProfileConfigInfo `mo:"config"` - Description *types.ProfileDescription `mo:"description"` - Name string `mo:"name"` - CreatedTime time.Time `mo:"createdTime"` - ModifiedTime time.Time `mo:"modifiedTime"` - Entity []types.ManagedObjectReference `mo:"entity"` - ComplianceStatus string `mo:"complianceStatus"` -} - -func (m Profile) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["Profile"] = reflect.TypeOf((*Profile)(nil)).Elem() -} - -type ProfileComplianceManager struct { - Self types.ManagedObjectReference -} - -func (m ProfileComplianceManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ProfileComplianceManager"] = reflect.TypeOf((*ProfileComplianceManager)(nil)).Elem() -} - -type ProfileManager struct { - Self types.ManagedObjectReference - - Profile []types.ManagedObjectReference `mo:"profile"` -} - -func (m ProfileManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ProfileManager"] = reflect.TypeOf((*ProfileManager)(nil)).Elem() -} - -type PropertyCollector struct { - Self types.ManagedObjectReference - - Filter []types.ManagedObjectReference `mo:"filter"` -} - -func (m PropertyCollector) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["PropertyCollector"] = reflect.TypeOf((*PropertyCollector)(nil)).Elem() -} - -type PropertyFilter struct { - Self types.ManagedObjectReference - - Spec types.PropertyFilterSpec `mo:"spec"` - PartialUpdates bool `mo:"partialUpdates"` -} - -func (m PropertyFilter) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["PropertyFilter"] = reflect.TypeOf((*PropertyFilter)(nil)).Elem() -} - -type ResourcePlanningManager struct { - Self types.ManagedObjectReference -} - -func (m ResourcePlanningManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ResourcePlanningManager"] = reflect.TypeOf((*ResourcePlanningManager)(nil)).Elem() -} - -type ResourcePool struct { - ManagedEntity - - Summary types.BaseResourcePoolSummary `mo:"summary"` - Runtime types.ResourcePoolRuntimeInfo `mo:"runtime"` - Owner types.ManagedObjectReference `mo:"owner"` - ResourcePool []types.ManagedObjectReference `mo:"resourcePool"` - Vm []types.ManagedObjectReference `mo:"vm"` - Config types.ResourceConfigSpec `mo:"config"` - Namespace *string `mo:"namespace"` - ChildConfiguration []types.ResourceConfigSpec `mo:"childConfiguration"` -} - -func (m *ResourcePool) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["ResourcePool"] = reflect.TypeOf((*ResourcePool)(nil)).Elem() -} - -type ScheduledTask struct { - ExtensibleManagedObject - - Info types.ScheduledTaskInfo `mo:"info"` -} - -func init() { - t["ScheduledTask"] = reflect.TypeOf((*ScheduledTask)(nil)).Elem() -} - -type ScheduledTaskManager struct { - Self types.ManagedObjectReference - - ScheduledTask []types.ManagedObjectReference `mo:"scheduledTask"` - Description types.ScheduledTaskDescription `mo:"description"` -} - -func (m ScheduledTaskManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ScheduledTaskManager"] = reflect.TypeOf((*ScheduledTaskManager)(nil)).Elem() -} - -type SearchIndex struct { - Self types.ManagedObjectReference -} - -func (m SearchIndex) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["SearchIndex"] = reflect.TypeOf((*SearchIndex)(nil)).Elem() -} - -type ServiceInstance struct { - Self types.ManagedObjectReference - - ServerClock time.Time `mo:"serverClock"` - Capability types.Capability `mo:"capability"` - Content types.ServiceContent `mo:"content"` -} - -func (m ServiceInstance) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ServiceInstance"] = reflect.TypeOf((*ServiceInstance)(nil)).Elem() -} - -type ServiceManager struct { - Self types.ManagedObjectReference - - Service []types.ServiceManagerServiceInfo `mo:"service"` -} - -func (m ServiceManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ServiceManager"] = reflect.TypeOf((*ServiceManager)(nil)).Elem() -} - -type SessionManager struct { - Self types.ManagedObjectReference - - SessionList []types.UserSession `mo:"sessionList"` - CurrentSession *types.UserSession `mo:"currentSession"` - Message *string `mo:"message"` - MessageLocaleList []string `mo:"messageLocaleList"` - SupportedLocaleList []string `mo:"supportedLocaleList"` - DefaultLocale string `mo:"defaultLocale"` -} - -func (m SessionManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["SessionManager"] = reflect.TypeOf((*SessionManager)(nil)).Elem() -} - -type SimpleCommand struct { - Self types.ManagedObjectReference - - EncodingType types.SimpleCommandEncoding `mo:"encodingType"` - Entity types.ServiceManagerServiceInfo `mo:"entity"` -} - -func (m SimpleCommand) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["SimpleCommand"] = reflect.TypeOf((*SimpleCommand)(nil)).Elem() -} - -type SiteInfoManager struct { - Self types.ManagedObjectReference -} - -func (m SiteInfoManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["SiteInfoManager"] = reflect.TypeOf((*SiteInfoManager)(nil)).Elem() -} - -type StoragePod struct { - Folder - - Summary *types.StoragePodSummary `mo:"summary"` - PodStorageDrsEntry *types.PodStorageDrsEntry `mo:"podStorageDrsEntry"` -} - -func init() { - t["StoragePod"] = reflect.TypeOf((*StoragePod)(nil)).Elem() -} - -type StorageQueryManager struct { - Self types.ManagedObjectReference -} - -func (m StorageQueryManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["StorageQueryManager"] = reflect.TypeOf((*StorageQueryManager)(nil)).Elem() -} - -type StorageResourceManager struct { - Self types.ManagedObjectReference -} - -func (m StorageResourceManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["StorageResourceManager"] = reflect.TypeOf((*StorageResourceManager)(nil)).Elem() -} - -type Task struct { - ExtensibleManagedObject - - Info types.TaskInfo `mo:"info"` -} - -func init() { - t["Task"] = reflect.TypeOf((*Task)(nil)).Elem() -} - -type TaskHistoryCollector struct { - HistoryCollector - - LatestPage []types.TaskInfo `mo:"latestPage"` -} - -func init() { - t["TaskHistoryCollector"] = reflect.TypeOf((*TaskHistoryCollector)(nil)).Elem() -} - -type TaskManager struct { - Self types.ManagedObjectReference - - RecentTask []types.ManagedObjectReference `mo:"recentTask"` - Description types.TaskDescription `mo:"description"` - MaxCollector int32 `mo:"maxCollector"` -} - -func (m TaskManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["TaskManager"] = reflect.TypeOf((*TaskManager)(nil)).Elem() -} - -type TenantTenantManager struct { - Self types.ManagedObjectReference -} - -func (m TenantTenantManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["TenantTenantManager"] = reflect.TypeOf((*TenantTenantManager)(nil)).Elem() -} - -type UserDirectory struct { - Self types.ManagedObjectReference - - DomainList []string `mo:"domainList"` -} - -func (m UserDirectory) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["UserDirectory"] = reflect.TypeOf((*UserDirectory)(nil)).Elem() -} - -type VStorageObjectManagerBase struct { - Self types.ManagedObjectReference -} - -func (m VStorageObjectManagerBase) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VStorageObjectManagerBase"] = reflect.TypeOf((*VStorageObjectManagerBase)(nil)).Elem() -} - -type VcenterVStorageObjectManager struct { - VStorageObjectManagerBase -} - -func init() { - t["VcenterVStorageObjectManager"] = reflect.TypeOf((*VcenterVStorageObjectManager)(nil)).Elem() -} - -type View struct { - Self types.ManagedObjectReference -} - -func (m View) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["View"] = reflect.TypeOf((*View)(nil)).Elem() -} - -type ViewManager struct { - Self types.ManagedObjectReference - - ViewList []types.ManagedObjectReference `mo:"viewList"` -} - -func (m ViewManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["ViewManager"] = reflect.TypeOf((*ViewManager)(nil)).Elem() -} - -type VirtualApp struct { - ResourcePool - - ParentFolder *types.ManagedObjectReference `mo:"parentFolder"` - Datastore []types.ManagedObjectReference `mo:"datastore"` - Network []types.ManagedObjectReference `mo:"network"` - VAppConfig *types.VAppConfigInfo `mo:"vAppConfig"` - ParentVApp *types.ManagedObjectReference `mo:"parentVApp"` - ChildLink []types.VirtualAppLinkInfo `mo:"childLink"` -} - -func init() { - t["VirtualApp"] = reflect.TypeOf((*VirtualApp)(nil)).Elem() -} - -type VirtualDiskManager struct { - Self types.ManagedObjectReference -} - -func (m VirtualDiskManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VirtualDiskManager"] = reflect.TypeOf((*VirtualDiskManager)(nil)).Elem() -} - -type VirtualMachine struct { - ManagedEntity - - Capability types.VirtualMachineCapability `mo:"capability"` - Config *types.VirtualMachineConfigInfo `mo:"config"` - Layout *types.VirtualMachineFileLayout `mo:"layout"` - LayoutEx *types.VirtualMachineFileLayoutEx `mo:"layoutEx"` - Storage *types.VirtualMachineStorageInfo `mo:"storage"` - EnvironmentBrowser types.ManagedObjectReference `mo:"environmentBrowser"` - ResourcePool *types.ManagedObjectReference `mo:"resourcePool"` - ParentVApp *types.ManagedObjectReference `mo:"parentVApp"` - ResourceConfig *types.ResourceConfigSpec `mo:"resourceConfig"` - Runtime types.VirtualMachineRuntimeInfo `mo:"runtime"` - Guest *types.GuestInfo `mo:"guest"` - Summary types.VirtualMachineSummary `mo:"summary"` - Datastore []types.ManagedObjectReference `mo:"datastore"` - Network []types.ManagedObjectReference `mo:"network"` - Snapshot *types.VirtualMachineSnapshotInfo `mo:"snapshot"` - RootSnapshot []types.ManagedObjectReference `mo:"rootSnapshot"` - GuestHeartbeatStatus types.ManagedEntityStatus `mo:"guestHeartbeatStatus"` -} - -func (m *VirtualMachine) Entity() *ManagedEntity { - return &m.ManagedEntity -} - -func init() { - t["VirtualMachine"] = reflect.TypeOf((*VirtualMachine)(nil)).Elem() -} - -type VirtualMachineCompatibilityChecker struct { - Self types.ManagedObjectReference -} - -func (m VirtualMachineCompatibilityChecker) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VirtualMachineCompatibilityChecker"] = reflect.TypeOf((*VirtualMachineCompatibilityChecker)(nil)).Elem() -} - -type VirtualMachineGuestCustomizationManager struct { - Self types.ManagedObjectReference -} - -func (m VirtualMachineGuestCustomizationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VirtualMachineGuestCustomizationManager"] = reflect.TypeOf((*VirtualMachineGuestCustomizationManager)(nil)).Elem() -} - -type VirtualMachineProvisioningChecker struct { - Self types.ManagedObjectReference -} - -func (m VirtualMachineProvisioningChecker) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VirtualMachineProvisioningChecker"] = reflect.TypeOf((*VirtualMachineProvisioningChecker)(nil)).Elem() -} - -type VirtualMachineSnapshot struct { - ExtensibleManagedObject - - Config types.VirtualMachineConfigInfo `mo:"config"` - ChildSnapshot []types.ManagedObjectReference `mo:"childSnapshot"` - Vm types.ManagedObjectReference `mo:"vm"` -} - -func init() { - t["VirtualMachineSnapshot"] = reflect.TypeOf((*VirtualMachineSnapshot)(nil)).Elem() -} - -type VirtualizationManager struct { - Self types.ManagedObjectReference -} - -func (m VirtualizationManager) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VirtualizationManager"] = reflect.TypeOf((*VirtualizationManager)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitch struct { - DistributedVirtualSwitch -} - -func init() { - t["VmwareDistributedVirtualSwitch"] = reflect.TypeOf((*VmwareDistributedVirtualSwitch)(nil)).Elem() -} - -type VsanUpgradeSystem struct { - Self types.ManagedObjectReference -} - -func (m VsanUpgradeSystem) Reference() types.ManagedObjectReference { - return m.Self -} - -func init() { - t["VsanUpgradeSystem"] = reflect.TypeOf((*VsanUpgradeSystem)(nil)).Elem() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/reference.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/reference.go deleted file mode 100644 index 465edbe8072d..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/reference.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package mo - -import "github.com/vmware/govmomi/vim25/types" - -// Reference is the interface that is implemented by all the managed objects -// defined in this package. It specifies that these managed objects have a -// function that returns the managed object reference to themselves. -type Reference interface { - Reference() types.ManagedObjectReference -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/registry.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/registry.go deleted file mode 100644 index deacf508bba7..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/registry.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package mo - -import "reflect" - -var t = map[string]reflect.Type{} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go deleted file mode 100644 index e877da063a38..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/retrieve.go +++ /dev/null @@ -1,255 +0,0 @@ -/* -Copyright (c) 2014-2015 VMware, Inc. 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. -*/ - -package mo - -import ( - "context" - "reflect" - - "github.com/vmware/govmomi/vim25/methods" - "github.com/vmware/govmomi/vim25/soap" - "github.com/vmware/govmomi/vim25/types" -) - -func ignoreMissingProperty(ref types.ManagedObjectReference, p types.MissingProperty) bool { - switch ref.Type { - case "VirtualMachine": - switch p.Path { - case "environmentBrowser": - // See https://github.com/vmware/govmomi/pull/242 - return true - case "alarmActionsEnabled": - // Seen with vApp child VM - return true - } - } - - return false -} - -// ObjectContentToType loads an ObjectContent value into the value it -// represents. If the ObjectContent value has a non-empty 'MissingSet' field, -// it returns the first fault it finds there as error. If the 'MissingSet' -// field is empty, it returns a pointer to a reflect.Value. It handles contain -// nested properties, such as 'guest.ipAddress' or 'config.hardware'. -func ObjectContentToType(o types.ObjectContent, ptr ...bool) (interface{}, error) { - // Expect no properties in the missing set - for _, p := range o.MissingSet { - if ignoreMissingProperty(o.Obj, p) { - continue - } - - return nil, soap.WrapVimFault(p.Fault.Fault) - } - - ti := typeInfoForType(o.Obj.Type) - v, err := ti.LoadFromObjectContent(o) - if err != nil { - return nil, err - } - - if len(ptr) == 1 && ptr[0] { - return v.Interface(), nil - } - return v.Elem().Interface(), nil -} - -// ApplyPropertyChange converts the response of a call to WaitForUpdates -// and applies it to the given managed object. -func ApplyPropertyChange(obj Reference, changes []types.PropertyChange) { - t := typeInfoForType(obj.Reference().Type) - v := reflect.ValueOf(obj) - - for _, p := range changes { - rv, ok := t.props[p.Name] - if !ok { - continue - } - - assignValue(v, rv, reflect.ValueOf(p.Val)) - } -} - -// LoadObjectContent converts the response of a call to -// RetrieveProperties{Ex} to one or more managed objects. -func LoadObjectContent(content []types.ObjectContent, dst interface{}) error { - rt := reflect.TypeOf(dst) - if rt == nil || rt.Kind() != reflect.Ptr { - panic("need pointer") - } - - rv := reflect.ValueOf(dst).Elem() - if !rv.CanSet() { - panic("cannot set dst") - } - - isSlice := false - switch rt.Elem().Kind() { - case reflect.Struct: - case reflect.Slice: - isSlice = true - default: - panic("unexpected type") - } - - if isSlice { - for _, p := range content { - v, err := ObjectContentToType(p) - if err != nil { - return err - } - - vt := reflect.TypeOf(v) - - if !rv.Type().AssignableTo(vt) { - // For example: dst is []ManagedEntity, res is []HostSystem - if field, ok := vt.FieldByName(rt.Elem().Elem().Name()); ok && field.Anonymous { - rv.Set(reflect.Append(rv, reflect.ValueOf(v).FieldByIndex(field.Index))) - continue - } - } - - rv.Set(reflect.Append(rv, reflect.ValueOf(v))) - } - } else { - switch len(content) { - case 0: - case 1: - v, err := ObjectContentToType(content[0]) - if err != nil { - return err - } - - vt := reflect.TypeOf(v) - - if !rv.Type().AssignableTo(vt) { - // For example: dst is ComputeResource, res is ClusterComputeResource - if field, ok := vt.FieldByName(rt.Elem().Name()); ok && field.Anonymous { - rv.Set(reflect.ValueOf(v).FieldByIndex(field.Index)) - return nil - } - } - - rv.Set(reflect.ValueOf(v)) - default: - // If dst is not a slice, expect to receive 0 or 1 results - panic("more than 1 result") - } - } - - return nil -} - -// RetrievePropertiesForRequest calls the RetrieveProperties method with the -// specified request and decodes the response struct into the value pointed to -// by dst. -func RetrievePropertiesForRequest(ctx context.Context, r soap.RoundTripper, req types.RetrieveProperties, dst interface{}) error { - res, err := methods.RetrieveProperties(ctx, r, &req) - if err != nil { - return err - } - - return LoadObjectContent(res.Returnval, dst) -} - -// RetrieveProperties retrieves the properties of the managed object specified -// as obj and decodes the response struct into the value pointed to by dst. -func RetrieveProperties(ctx context.Context, r soap.RoundTripper, pc, obj types.ManagedObjectReference, dst interface{}) error { - req := types.RetrieveProperties{ - This: pc, - SpecSet: []types.PropertyFilterSpec{ - { - ObjectSet: []types.ObjectSpec{ - { - Obj: obj, - Skip: types.NewBool(false), - }, - }, - PropSet: []types.PropertySpec{ - { - All: types.NewBool(true), - Type: obj.Type, - }, - }, - }, - }, - } - - return RetrievePropertiesForRequest(ctx, r, req, dst) -} - -var morType = reflect.TypeOf((*types.ManagedObjectReference)(nil)).Elem() - -// References returns all non-nil moref field values in the given struct. -// Only Anonymous struct fields are followed by default. The optional follow -// param will follow any struct fields when true. -func References(s interface{}, follow ...bool) []types.ManagedObjectReference { - var refs []types.ManagedObjectReference - rval := reflect.ValueOf(s) - rtype := rval.Type() - - if rval.Kind() == reflect.Ptr { - rval = rval.Elem() - rtype = rval.Type() - } - - for i := 0; i < rval.NumField(); i++ { - val := rval.Field(i) - finfo := rtype.Field(i) - - if finfo.Anonymous { - refs = append(refs, References(val.Interface(), follow...)...) - continue - } - if finfo.Name == "Self" { - continue - } - - ftype := val.Type() - - if ftype.Kind() == reflect.Slice { - if ftype.Elem() == morType { - s := val.Interface().([]types.ManagedObjectReference) - for i := range s { - refs = append(refs, s[i]) - } - } - continue - } - - if ftype.Kind() == reflect.Ptr { - if val.IsNil() { - continue - } - val = val.Elem() - ftype = val.Type() - } - - if ftype == morType { - refs = append(refs, val.Interface().(types.ManagedObjectReference)) - continue - } - - if len(follow) != 0 && follow[0] { - if ftype.Kind() == reflect.Struct && val.CanSet() { - refs = append(refs, References(val.Interface(), follow...)...) - } - } - } - - return refs -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go deleted file mode 100644 index aeb7d4a7980a..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/mo/type_info.go +++ /dev/null @@ -1,263 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package mo - -import ( - "fmt" - "reflect" - "regexp" - "strings" - "sync" - - "github.com/vmware/govmomi/vim25/types" -) - -type typeInfo struct { - typ reflect.Type - - // Field indices of "Self" field. - self []int - - // Map property names to field indices. - props map[string][]int -} - -var typeInfoLock sync.RWMutex -var typeInfoMap = make(map[string]*typeInfo) - -func typeInfoForType(tname string) *typeInfo { - typeInfoLock.RLock() - ti, ok := typeInfoMap[tname] - typeInfoLock.RUnlock() - - if ok { - return ti - } - - // Create new typeInfo for type. - if typ, ok := t[tname]; !ok { - panic("unknown type: " + tname) - } else { - // Multiple routines may race to set it, but the result is the same. - typeInfoLock.Lock() - ti = newTypeInfo(typ) - typeInfoMap[tname] = ti - typeInfoLock.Unlock() - } - - return ti -} - -func newTypeInfo(typ reflect.Type) *typeInfo { - t := typeInfo{ - typ: typ, - props: make(map[string][]int), - } - - t.build(typ, "", []int{}) - - return &t -} - -var managedObjectRefType = reflect.TypeOf((*types.ManagedObjectReference)(nil)).Elem() - -func buildName(fn string, f reflect.StructField) string { - if fn != "" { - fn += "." - } - - motag := f.Tag.Get("mo") - if motag != "" { - return fn + motag - } - - xmltag := f.Tag.Get("xml") - if xmltag != "" { - tokens := strings.Split(xmltag, ",") - if tokens[0] != "" { - return fn + tokens[0] - } - } - - return "" -} - -func (t *typeInfo) build(typ reflect.Type, fn string, fi []int) { - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - if typ.Kind() != reflect.Struct { - panic("need struct") - } - - for i := 0; i < typ.NumField(); i++ { - f := typ.Field(i) - ftyp := f.Type - - // Copy field indices so they can be passed along. - fic := make([]int, len(fi)+1) - copy(fic, fi) - fic[len(fi)] = i - - // Recurse into embedded field. - if f.Anonymous { - t.build(ftyp, fn, fic) - continue - } - - // Top level type has a "Self" field. - if f.Name == "Self" && ftyp == managedObjectRefType { - t.self = fic - continue - } - - fnc := buildName(fn, f) - if fnc == "" { - continue - } - - t.props[fnc] = fic - - // Dereference pointer. - if ftyp.Kind() == reflect.Ptr { - ftyp = ftyp.Elem() - } - - // Slices are not addressable by `foo.bar.qux`. - if ftyp.Kind() == reflect.Slice { - continue - } - - // Skip the managed reference type. - if ftyp == managedObjectRefType { - continue - } - - // Recurse into structs. - if ftyp.Kind() == reflect.Struct { - t.build(ftyp, fnc, fic) - } - } -} - -var nilValue reflect.Value - -// assignValue assigns a value 'pv' to the struct pointed to by 'val', given a -// slice of field indices. It recurses into the struct until it finds the field -// specified by the indices. It creates new values for pointer types where -// needed. -func assignValue(val reflect.Value, fi []int, pv reflect.Value) { - // Create new value if necessary. - if val.Kind() == reflect.Ptr { - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - - val = val.Elem() - } - - rv := val.Field(fi[0]) - fi = fi[1:] - if len(fi) == 0 { - if pv == nilValue { - pv = reflect.Zero(rv.Type()) - rv.Set(pv) - return - } - rt := rv.Type() - pt := pv.Type() - - // If type is a pointer, create new instance of type. - if rt.Kind() == reflect.Ptr { - rv.Set(reflect.New(rt.Elem())) - rv = rv.Elem() - rt = rv.Type() - } - - // If the target type is a slice, but the source is not, deference any ArrayOfXYZ type - if rt.Kind() == reflect.Slice && pt.Kind() != reflect.Slice { - if pt.Kind() == reflect.Ptr { - pv = pv.Elem() - pt = pt.Elem() - } - - m := arrayOfRegexp.FindStringSubmatch(pt.Name()) - if len(m) > 0 { - pv = pv.FieldByName(m[1]) // ArrayOfXYZ type has single field named XYZ - pt = pv.Type() - - if !pv.IsValid() { - panic(fmt.Sprintf("expected %s type to have field %s", m[0], m[1])) - } - } - } - - // If type is an interface, check if pv implements it. - if rt.Kind() == reflect.Interface && !pt.Implements(rt) { - // Check if pointer to pv implements it. - if reflect.PtrTo(pt).Implements(rt) { - npv := reflect.New(pt) - npv.Elem().Set(pv) - pv = npv - pt = pv.Type() - } else { - panic(fmt.Sprintf("type %s doesn't implement %s", pt.Name(), rt.Name())) - } - } else if rt.Kind() == reflect.Struct && pt.Kind() == reflect.Ptr { - pv = pv.Elem() - pt = pv.Type() - } - - if pt.AssignableTo(rt) { - rv.Set(pv) - } else if rt.ConvertibleTo(pt) { - rv.Set(pv.Convert(rt)) - } else { - panic(fmt.Sprintf("cannot assign %q (%s) to %q (%s)", rt.Name(), rt.Kind(), pt.Name(), pt.Kind())) - } - - return - } - - assignValue(rv, fi, pv) -} - -var arrayOfRegexp = regexp.MustCompile("ArrayOf(.*)$") - -// LoadObjectFromContent loads properties from the 'PropSet' field in the -// specified ObjectContent value into the value it represents, which is -// returned as a reflect.Value. -func (t *typeInfo) LoadFromObjectContent(o types.ObjectContent) (reflect.Value, error) { - v := reflect.New(t.typ) - assignValue(v, t.self, reflect.ValueOf(o.Obj)) - - for _, p := range o.PropSet { - rv, ok := t.props[p.Name] - if !ok { - continue - } - assignValue(v, rv, reflect.ValueOf(p.Val)) - } - - return v, nil -} - -func IsManagedObjectType(kind string) bool { - _, ok := t[kind] - return ok -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go deleted file mode 100644 index 24cb3d59a97e..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/aggregator.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -import "sync" - -type Aggregator struct { - downstream Sinker - upstream chan (<-chan Report) - - done chan struct{} - w sync.WaitGroup -} - -func NewAggregator(s Sinker) *Aggregator { - a := &Aggregator{ - downstream: s, - upstream: make(chan (<-chan Report)), - - done: make(chan struct{}), - } - - a.w.Add(1) - go a.loop() - - return a -} - -func (a *Aggregator) loop() { - defer a.w.Done() - - dch := a.downstream.Sink() - defer close(dch) - - for { - select { - case uch := <-a.upstream: - // Drain upstream channel - for e := range uch { - dch <- e - } - case <-a.done: - return - } - } -} - -func (a *Aggregator) Sink() chan<- Report { - ch := make(chan Report) - a.upstream <- ch - return ch -} - -// Done marks the aggregator as done. No more calls to Sink() may be made and -// the downstream progress report channel will be closed when Done() returns. -func (a *Aggregator) Done() { - close(a.done) - a.w.Wait() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/doc.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/doc.go deleted file mode 100644 index a0458dd5cc95..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/doc.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -/* -The progress package contains functionality to deal with progress reporting. -The functionality is built to serve progress reporting for infrastructure -operations when talking the vSphere API, but is generic enough to be used -elsewhere. - -At the core of this progress reporting API lies the Sinker interface. This -interface is implemented by any object that can act as a sink for progress -reports. Callers of the Sink() function receives a send-only channel for -progress reports. They are responsible for closing the channel when done. -This semantic makes it easy to keep track of multiple progress report channels; -they are only created when Sink() is called and assumed closed when any -function that receives a Sinker parameter returns. -*/ diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go deleted file mode 100644 index 4f842ad951f8..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/prefix.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -import "fmt" - -type prefixedReport struct { - Report - prefix string -} - -func (r prefixedReport) Detail() string { - if d := r.Report.Detail(); d != "" { - return fmt.Sprintf("%s: %s", r.prefix, d) - } - - return r.prefix -} - -func prefixLoop(upstream <-chan Report, downstream chan<- Report, prefix string) { - defer close(downstream) - - for r := range upstream { - downstream <- prefixedReport{ - Report: r, - prefix: prefix, - } - } -} - -func Prefix(s Sinker, prefix string) Sinker { - fn := func() chan<- Report { - upstream := make(chan Report) - downstream := s.Sink() - go prefixLoop(upstream, downstream, prefix) - return upstream - } - - return SinkFunc(fn) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/reader.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/reader.go deleted file mode 100644 index 201333ee4b59..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/reader.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright (c) 2014-2015 VMware, Inc. 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. -*/ - -package progress - -import ( - "container/list" - "context" - "fmt" - "io" - "sync/atomic" - "time" -) - -type readerReport struct { - pos int64 // Keep first to ensure 64-bit alignment - size int64 // Keep first to ensure 64-bit alignment - bps *uint64 // Keep first to ensure 64-bit alignment - - t time.Time - - err error -} - -func (r readerReport) Percentage() float32 { - if r.size <= 0 { - return 0 - } - return 100.0 * float32(r.pos) / float32(r.size) -} - -func (r readerReport) Detail() string { - const ( - KiB = 1024 - MiB = 1024 * KiB - GiB = 1024 * MiB - ) - - // Use the reader's bps field, so this report returns an up-to-date number. - // - // For example: if there hasn't been progress for the last 5 seconds, the - // most recent report should return "0B/s". - // - bps := atomic.LoadUint64(r.bps) - - switch { - case bps >= GiB: - return fmt.Sprintf("%.1fGiB/s", float32(bps)/float32(GiB)) - case bps >= MiB: - return fmt.Sprintf("%.1fMiB/s", float32(bps)/float32(MiB)) - case bps >= KiB: - return fmt.Sprintf("%.1fKiB/s", float32(bps)/float32(KiB)) - default: - return fmt.Sprintf("%dB/s", bps) - } -} - -func (p readerReport) Error() error { - return p.err -} - -// reader wraps an io.Reader and sends a progress report over a channel for -// every read it handles. -type reader struct { - r io.Reader - - pos int64 - size int64 - bps uint64 - - ch chan<- Report - ctx context.Context -} - -func NewReader(ctx context.Context, s Sinker, r io.Reader, size int64) *reader { - pr := reader{ - r: r, - ctx: ctx, - size: size, - } - - // Reports must be sent downstream and to the bps computation loop. - pr.ch = Tee(s, newBpsLoop(&pr.bps)).Sink() - - return &pr -} - -// Read calls the Read function on the underlying io.Reader. Additionally, -// every read causes a progress report to be sent to the progress reader's -// underlying channel. -func (r *reader) Read(b []byte) (int, error) { - n, err := r.r.Read(b) - r.pos += int64(n) - - if err != nil && err != io.EOF { - return n, err - } - - q := readerReport{ - t: time.Now(), - pos: r.pos, - size: r.size, - bps: &r.bps, - } - - select { - case r.ch <- q: - case <-r.ctx.Done(): - } - - return n, err -} - -// Done marks the progress reader as done, optionally including an error in the -// progress report. After sending it, the underlying channel is closed. -func (r *reader) Done(err error) { - q := readerReport{ - t: time.Now(), - pos: r.pos, - size: r.size, - bps: &r.bps, - err: err, - } - - select { - case r.ch <- q: - close(r.ch) - case <-r.ctx.Done(): - } -} - -// newBpsLoop returns a sink that monitors and stores throughput. -func newBpsLoop(dst *uint64) SinkFunc { - fn := func() chan<- Report { - sink := make(chan Report) - go bpsLoop(sink, dst) - return sink - } - - return fn -} - -func bpsLoop(ch <-chan Report, dst *uint64) { - l := list.New() - - for { - var tch <-chan time.Time - - // Setup timer for front of list to become stale. - if e := l.Front(); e != nil { - dt := time.Second - time.Since(e.Value.(readerReport).t) - tch = time.After(dt) - } - - select { - case q, ok := <-ch: - if !ok { - return - } - - l.PushBack(q) - case <-tch: - l.Remove(l.Front()) - } - - // Compute new bps - if l.Len() == 0 { - atomic.StoreUint64(dst, 0) - } else { - f := l.Front().Value.(readerReport) - b := l.Back().Value.(readerReport) - atomic.StoreUint64(dst, uint64(b.pos-f.pos)) - } - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/report.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/report.go deleted file mode 100644 index bf80263ff5cb..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/report.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -// Report defines the interface for types that can deliver progress reports. -// Examples include uploads/downloads in the http client and the task info -// field in the task managed object. -type Report interface { - Percentage() float32 - Detail() string - Error() error -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/scale.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/scale.go deleted file mode 100644 index 98808392068e..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/scale.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -type scaledReport struct { - Report - n int - i int -} - -func (r scaledReport) Percentage() float32 { - b := 100 * float32(r.i) / float32(r.n) - return b + (r.Report.Percentage() / float32(r.n)) -} - -type scaleOne struct { - s Sinker - n int - i int -} - -func (s scaleOne) Sink() chan<- Report { - upstream := make(chan Report) - downstream := s.s.Sink() - go s.loop(upstream, downstream) - return upstream -} - -func (s scaleOne) loop(upstream <-chan Report, downstream chan<- Report) { - defer close(downstream) - - for r := range upstream { - downstream <- scaledReport{ - Report: r, - n: s.n, - i: s.i, - } - } -} - -type scaleMany struct { - s Sinker - n int - i int -} - -func Scale(s Sinker, n int) Sinker { - return &scaleMany{ - s: s, - n: n, - } -} - -func (s *scaleMany) Sink() chan<- Report { - if s.i == s.n { - s.n++ - } - - ch := scaleOne{s: s.s, n: s.n, i: s.i}.Sink() - s.i++ - return ch -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go deleted file mode 100644 index 0bd35a47f752..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/progress/sinker.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package progress - -// Sinker defines what is expected of a type that can act as a sink for -// progress reports. The semantics are as follows. If you call Sink(), you are -// responsible for closing the returned channel. Closing this channel means -// that the related task is done, or resulted in error. -type Sinker interface { - Sink() chan<- Report -} - -// SinkFunc defines a function that returns a progress report channel. -type SinkFunc func() chan<- Report - -// Sink makes the SinkFunc implement the Sinker interface. -func (fn SinkFunc) Sink() chan<- Report { - return fn() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/retry.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/retry.go deleted file mode 100644 index bf663a101267..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/retry.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package vim25 - -import ( - "context" - "time" - - "github.com/vmware/govmomi/vim25/soap" -) - -type RetryFunc func(err error) (retry bool, delay time.Duration) - -// TemporaryNetworkError is deprecated. Use Retry() with RetryTemporaryNetworkError and retryAttempts instead. -func TemporaryNetworkError(n int) RetryFunc { - return func(err error) (bool, time.Duration) { - if IsTemporaryNetworkError(err) { - // Don't retry if we're out of tries. - if n--; n <= 0 { - return false, 0 - } - return true, 0 - } - return false, 0 - } -} - -// RetryTemporaryNetworkError returns a RetryFunc that returns IsTemporaryNetworkError(err) -func RetryTemporaryNetworkError(err error) (bool, time.Duration) { - return IsTemporaryNetworkError(err), 0 -} - -// IsTemporaryNetworkError returns false unless the error implements -// a Temporary() bool method such as url.Error and net.Error. -// Otherwise, returns the value of the Temporary() method. -func IsTemporaryNetworkError(err error) bool { - t, ok := err.(interface { - // Temporary is implemented by url.Error and net.Error - Temporary() bool - }) - - if !ok { - // Not a Temporary error. - return false - } - - return t.Temporary() -} - -type retry struct { - roundTripper soap.RoundTripper - - // fn is a custom function that is called when an error occurs. - // It returns whether or not to retry, and if so, how long to - // delay before retrying. - fn RetryFunc - maxRetryAttempts int -} - -// Retry wraps the specified soap.RoundTripper and invokes the -// specified RetryFunc. The RetryFunc returns whether or not to -// retry the call, and if so, how long to wait before retrying. If -// the result of this function is to not retry, the original error -// is returned from the RoundTrip function. -// The soap.RoundTripper will return the original error if retryAttempts is specified and reached. -func Retry(roundTripper soap.RoundTripper, fn RetryFunc, retryAttempts ...int) soap.RoundTripper { - r := &retry{ - roundTripper: roundTripper, - fn: fn, - maxRetryAttempts: 1, - } - - if len(retryAttempts) == 1 { - r.maxRetryAttempts = retryAttempts[0] - } - - return r -} - -func (r *retry) RoundTrip(ctx context.Context, req, res soap.HasFault) error { - var err error - - for attempt := 0; attempt < r.maxRetryAttempts; attempt++ { - err = r.roundTripper.RoundTrip(ctx, req, res) - if err == nil { - break - } - - // Invoke retry function to see if another attempt should be made. - if retry, delay := r.fn(err); retry { - time.Sleep(delay) - continue - } - - break - } - - return err -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/client.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/client.go deleted file mode 100644 index 624d04cb11fd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/client.go +++ /dev/null @@ -1,891 +0,0 @@ -/* -Copyright (c) 2014-2018 VMware, Inc. 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. -*/ - -package soap - -import ( - "bufio" - "bytes" - "context" - "crypto/sha1" - "crypto/tls" - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "net" - "net/http" - "net/http/cookiejar" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "runtime" - "strings" - "sync" - "time" - - "github.com/vmware/govmomi/internal/version" - "github.com/vmware/govmomi/vim25/progress" - "github.com/vmware/govmomi/vim25/types" - "github.com/vmware/govmomi/vim25/xml" -) - -type HasFault interface { - Fault() *Fault -} - -type RoundTripper interface { - RoundTrip(ctx context.Context, req, res HasFault) error -} - -const ( - SessionCookieName = "vmware_soap_session" -) - -// defaultUserAgent is the default user agent string, e.g. -// "govmomi/0.28.0 (go1.18.3;linux;amd64)" -var defaultUserAgent = fmt.Sprintf( - "%s/%s (%s)", - version.ClientName, - version.ClientVersion, - strings.Join([]string{runtime.Version(), runtime.GOOS, runtime.GOARCH}, ";"), -) - -type Client struct { - http.Client - - u *url.URL - k bool // Named after curl's -k flag - d *debugContainer - t *http.Transport - - hostsMu sync.Mutex - hosts map[string]string - - Namespace string // Vim namespace - Version string // Vim version - Types types.Func - UserAgent string - - cookie string - insecureCookies bool -} - -var schemeMatch = regexp.MustCompile(`^\w+://`) - -type errInvalidCACertificate struct { - File string -} - -func (e errInvalidCACertificate) Error() string { - return fmt.Sprintf( - "invalid certificate '%s', cannot be used as a trusted CA certificate", - e.File, - ) -} - -// ParseURL is wrapper around url.Parse, where Scheme defaults to "https" and Path defaults to "/sdk" -func ParseURL(s string) (*url.URL, error) { - var err error - var u *url.URL - - if s != "" { - // Default the scheme to https - if !schemeMatch.MatchString(s) { - s = "https://" + s - } - - u, err = url.Parse(s) - if err != nil { - return nil, err - } - - // Default the path to /sdk - if u.Path == "" { - u.Path = "/sdk" - } - - if u.User == nil { - u.User = url.UserPassword("", "") - } - } - - return u, nil -} - -func NewClient(u *url.URL, insecure bool) *Client { - c := Client{ - u: u, - k: insecure, - d: newDebug(), - - Types: types.TypeFunc(), - } - - // Initialize http.RoundTripper on client, so we can customize it below - if t, ok := http.DefaultTransport.(*http.Transport); ok { - c.t = &http.Transport{ - Proxy: t.Proxy, - DialContext: t.DialContext, - MaxIdleConns: t.MaxIdleConns, - IdleConnTimeout: t.IdleConnTimeout, - TLSHandshakeTimeout: t.TLSHandshakeTimeout, - ExpectContinueTimeout: t.ExpectContinueTimeout, - } - } else { - c.t = new(http.Transport) - } - - c.hosts = make(map[string]string) - c.t.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.k} - - // Always set DialTLS and DialTLSContext, even if InsecureSkipVerify=true, - // because of how certificate verification has been delegated to the host's - // PKI framework in Go 1.18. Please see the following links for more info: - // - // * https://tip.golang.org/doc/go1.18 (search for "Certificate.Verify") - // * https://github.com/square/certigo/issues/264 - c.t.DialTLSContext = c.dialTLSContext - - c.Client.Transport = c.t - c.Client.Jar, _ = cookiejar.New(nil) - - // Remove user information from a copy of the URL - c.u = c.URL() - c.u.User = nil - - if c.u.Scheme == "http" { - c.insecureCookies = os.Getenv("GOVMOMI_INSECURE_COOKIES") == "true" - } - - return &c -} - -func (c *Client) DefaultTransport() *http.Transport { - return c.t -} - -// NewServiceClient creates a NewClient with the given URL.Path and namespace. -func (c *Client) NewServiceClient(path string, namespace string) *Client { - vc := c.URL() - u, err := url.Parse(path) - if err != nil { - log.Panicf("url.Parse(%q): %s", path, err) - } - if u.Host == "" { - u.Scheme = vc.Scheme - u.Host = vc.Host - } - - client := NewClient(u, c.k) - client.Namespace = "urn:" + namespace - client.DefaultTransport().TLSClientConfig = c.DefaultTransport().TLSClientConfig - if cert := c.Certificate(); cert != nil { - client.SetCertificate(*cert) - } - - // Copy the trusted thumbprints - c.hostsMu.Lock() - for k, v := range c.hosts { - client.hosts[k] = v - } - c.hostsMu.Unlock() - - // Copy the cookies - client.Client.Jar.SetCookies(u, c.Client.Jar.Cookies(u)) - - // Set SOAP Header cookie - for _, cookie := range client.Jar.Cookies(u) { - if cookie.Name == SessionCookieName { - client.cookie = cookie.Value - break - } - } - - // Copy any query params (e.g. GOVMOMI_TUNNEL_PROXY_PORT used in testing) - client.u.RawQuery = vc.RawQuery - - client.UserAgent = c.UserAgent - - vimTypes := c.Types - client.Types = func(name string) (reflect.Type, bool) { - kind, ok := vimTypes(name) - if ok { - return kind, ok - } - // vim25/xml typeToString() does not have an option to include namespace prefix. - // Workaround this by re-trying the lookup with the namespace prefix. - return vimTypes(namespace + ":" + name) - } - - return client -} - -// SetRootCAs defines the set of PEM-encoded file locations of root certificate -// authorities the client uses when verifying server certificates instead of the -// TLS defaults which uses the host's root CA set. Multiple PEM file locations -// can be specified using the OS-specific PathListSeparator. -// -// See: http.Client.Transport.TLSClientConfig.RootCAs and -// https://pkg.go.dev/os#PathListSeparator -func (c *Client) SetRootCAs(pemPaths string) error { - pool := x509.NewCertPool() - - for _, name := range filepath.SplitList(pemPaths) { - pem, err := ioutil.ReadFile(filepath.Clean(name)) - if err != nil { - return err - } - - if ok := pool.AppendCertsFromPEM(pem); !ok { - return errInvalidCACertificate{ - File: name, - } - } - } - - c.t.TLSClientConfig.RootCAs = pool - - return nil -} - -// Add default https port if missing -func hostAddr(addr string) string { - _, port := splitHostPort(addr) - if port == "" { - return addr + ":443" - } - return addr -} - -// SetThumbprint sets the known certificate thumbprint for the given host. -// A custom DialTLS function is used to support thumbprint based verification. -// We first try tls.Dial with the default tls.Config, only falling back to thumbprint verification -// if it fails with an x509.UnknownAuthorityError or x509.HostnameError -// -// See: http.Client.Transport.DialTLS -func (c *Client) SetThumbprint(host string, thumbprint string) { - host = hostAddr(host) - - c.hostsMu.Lock() - if thumbprint == "" { - delete(c.hosts, host) - } else { - c.hosts[host] = thumbprint - } - c.hostsMu.Unlock() -} - -// Thumbprint returns the certificate thumbprint for the given host if known to this client. -func (c *Client) Thumbprint(host string) string { - host = hostAddr(host) - c.hostsMu.Lock() - defer c.hostsMu.Unlock() - return c.hosts[host] -} - -// LoadThumbprints from file with the give name. -// If name is empty or name does not exist this function will return nil. -func (c *Client) LoadThumbprints(file string) error { - if file == "" { - return nil - } - - for _, name := range filepath.SplitList(file) { - err := c.loadThumbprints(name) - if err != nil { - return err - } - } - - return nil -} - -func (c *Client) loadThumbprints(name string) error { - f, err := os.Open(filepath.Clean(name)) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - - scanner := bufio.NewScanner(f) - - for scanner.Scan() { - e := strings.SplitN(scanner.Text(), " ", 2) - if len(e) != 2 { - continue - } - - c.SetThumbprint(e[0], e[1]) - } - - _ = f.Close() - - return scanner.Err() -} - -// ThumbprintSHA1 returns the thumbprint of the given cert in the same format used by the SDK and Client.SetThumbprint. -// -// See: SSLVerifyFault.Thumbprint, SessionManagerGenericServiceTicket.Thumbprint, HostConnectSpec.SslThumbprint -func ThumbprintSHA1(cert *x509.Certificate) string { - sum := sha1.Sum(cert.Raw) - hex := make([]string, len(sum)) - for i, b := range sum { - hex[i] = fmt.Sprintf("%02X", b) - } - return strings.Join(hex, ":") -} - -func (c *Client) dialTLSContext( - ctx context.Context, - network, addr string) (net.Conn, error) { - - // Would be nice if there was a tls.Config.Verify func, - // see tls.clientHandshakeState.doFullHandshake - - conn, err := tls.Dial(network, addr, c.t.TLSClientConfig) - - if err == nil { - return conn, nil - } - - // Allow a thumbprint verification attempt if the error indicates - // the failure was due to lack of trust. - if !IsCertificateUntrusted(err) { - return nil, err - } - - thumbprint := c.Thumbprint(addr) - if thumbprint == "" { - return nil, err - } - - config := &tls.Config{InsecureSkipVerify: true} - conn, err = tls.Dial(network, addr, config) - if err != nil { - return nil, err - } - - cert := conn.ConnectionState().PeerCertificates[0] - peer := ThumbprintSHA1(cert) - if thumbprint != peer { - _ = conn.Close() - - return nil, fmt.Errorf("host %q thumbprint does not match %q", addr, thumbprint) - } - - return conn, nil -} - -// splitHostPort is similar to net.SplitHostPort, -// but rather than return error if there isn't a ':port', -// return an empty string for the port. -func splitHostPort(host string) (string, string) { - ix := strings.LastIndex(host, ":") - - if ix <= strings.LastIndex(host, "]") { - return host, "" - } - - name := host[:ix] - port := host[ix+1:] - - return name, port -} - -const sdkTunnel = "sdkTunnel:8089" - -func (c *Client) Certificate() *tls.Certificate { - certs := c.t.TLSClientConfig.Certificates - if len(certs) == 0 { - return nil - } - return &certs[0] -} - -func (c *Client) SetCertificate(cert tls.Certificate) { - t := c.Client.Transport.(*http.Transport) - - // Extension or HoK certificate - t.TLSClientConfig.Certificates = []tls.Certificate{cert} -} - -// Tunnel returns a Client configured to proxy requests through vCenter's http port 80, -// to the SDK tunnel virtual host. Use of the SDK tunnel is required by LoginExtensionByCertificate() -// and optional for other methods. -func (c *Client) Tunnel() *Client { - tunnel := c.NewServiceClient(c.u.Path, c.Namespace) - t := tunnel.Client.Transport.(*http.Transport) - // Proxy to vCenter host on port 80 - host := tunnel.u.Hostname() - // Should be no reason to change the default port other than testing - key := "GOVMOMI_TUNNEL_PROXY_PORT" - - port := tunnel.URL().Query().Get(key) - if port == "" { - port = os.Getenv(key) - } - - if port != "" { - host += ":" + port - } - - t.Proxy = http.ProxyURL(&url.URL{ - Scheme: "http", - Host: host, - }) - - // Rewrite url Host to use the sdk tunnel, required for a certificate request. - tunnel.u.Host = sdkTunnel - return tunnel -} - -func (c *Client) URL() *url.URL { - urlCopy := *c.u - return &urlCopy -} - -type marshaledClient struct { - Cookies []*http.Cookie - URL *url.URL - Insecure bool - Version string -} - -func (c *Client) MarshalJSON() ([]byte, error) { - m := marshaledClient{ - Cookies: c.Jar.Cookies(c.u), - URL: c.u, - Insecure: c.k, - Version: c.Version, - } - - return json.Marshal(m) -} - -func (c *Client) UnmarshalJSON(b []byte) error { - var m marshaledClient - - err := json.Unmarshal(b, &m) - if err != nil { - return err - } - - *c = *NewClient(m.URL, m.Insecure) - c.Version = m.Version - c.Jar.SetCookies(m.URL, m.Cookies) - - return nil -} - -type kindContext struct{} - -func (c *Client) setInsecureCookies(res *http.Response) { - cookies := res.Cookies() - if len(cookies) != 0 { - for _, cookie := range cookies { - cookie.Secure = false - } - c.Jar.SetCookies(c.u, cookies) - } -} - -func (c *Client) Do(ctx context.Context, req *http.Request, f func(*http.Response) error) error { - if ctx == nil { - ctx = context.Background() - } - // Create debugging context for this round trip - d := c.d.newRoundTrip() - if d.enabled() { - defer d.done() - } - - // use default - if c.UserAgent == "" { - c.UserAgent = defaultUserAgent - } - - req.Header.Set(`User-Agent`, c.UserAgent) - - ext := "" - if d.enabled() { - ext = d.debugRequest(req) - } - - tstart := time.Now() - res, err := c.Client.Do(req.WithContext(ctx)) - tstop := time.Now() - - if d.enabled() { - var name string - if kind, ok := ctx.Value(kindContext{}).(HasFault); ok { - name = fmt.Sprintf("%T", kind) - } else { - name = fmt.Sprintf("%s %s", req.Method, req.URL) - } - d.logf("%6dms (%s)", tstop.Sub(tstart)/time.Millisecond, name) - } - - if err != nil { - return err - } - - if d.enabled() { - d.debugResponse(res, ext) - } - - if c.insecureCookies { - c.setInsecureCookies(res) - } - - defer res.Body.Close() - - return f(res) -} - -// Signer can be implemented by soap.Header.Security to sign requests. -// If the soap.Header.Security field is set to an implementation of Signer via WithHeader(), -// then Client.RoundTrip will call Sign() to marshal the SOAP request. -type Signer interface { - Sign(Envelope) ([]byte, error) -} - -type headerContext struct{} - -// WithHeader can be used to modify the outgoing request soap.Header fields. -func (c *Client) WithHeader(ctx context.Context, header Header) context.Context { - return context.WithValue(ctx, headerContext{}, header) -} - -type statusError struct { - res *http.Response -} - -// Temporary returns true for HTTP response codes that can be retried -// See vim25.IsTemporaryNetworkError -func (e *statusError) Temporary() bool { - switch e.res.StatusCode { - case http.StatusBadGateway: - return true - } - return false -} - -func (e *statusError) Error() string { - return e.res.Status -} - -func newStatusError(res *http.Response) error { - return &url.Error{ - Op: res.Request.Method, - URL: res.Request.URL.Path, - Err: &statusError{res}, - } -} - -func (c *Client) RoundTrip(ctx context.Context, reqBody, resBody HasFault) error { - var err error - var b []byte - - reqEnv := Envelope{Body: reqBody} - resEnv := Envelope{Body: resBody} - - h, ok := ctx.Value(headerContext{}).(Header) - if !ok { - h = Header{} - } - - // We added support for OperationID before soap.Header was exported. - if id, ok := ctx.Value(types.ID{}).(string); ok { - h.ID = id - } - - h.Cookie = c.cookie - if h.Cookie != "" || h.ID != "" || h.Security != nil { - reqEnv.Header = &h // XML marshal header only if a field is set - } - - if signer, ok := h.Security.(Signer); ok { - b, err = signer.Sign(reqEnv) - if err != nil { - return err - } - } else { - b, err = xml.Marshal(reqEnv) - if err != nil { - panic(err) - } - } - - rawReqBody := io.MultiReader(strings.NewReader(xml.Header), bytes.NewReader(b)) - req, err := http.NewRequest("POST", c.u.String(), rawReqBody) - if err != nil { - panic(err) - } - - req.Header.Set(`Content-Type`, `text/xml; charset="utf-8"`) - - action := h.Action - if action == "" { - action = fmt.Sprintf("%s/%s", c.Namespace, c.Version) - } - req.Header.Set(`SOAPAction`, action) - - return c.Do(context.WithValue(ctx, kindContext{}, resBody), req, func(res *http.Response) error { - switch res.StatusCode { - case http.StatusOK: - // OK - case http.StatusInternalServerError: - // Error, but typically includes a body explaining the error - default: - return newStatusError(res) - } - - dec := xml.NewDecoder(res.Body) - dec.TypeFunc = c.Types - err = dec.Decode(&resEnv) - if err != nil { - return err - } - - if f := resBody.Fault(); f != nil { - return WrapSoapFault(f) - } - - return err - }) -} - -func (c *Client) CloseIdleConnections() { - c.t.CloseIdleConnections() -} - -// ParseURL wraps url.Parse to rewrite the URL.Host field -// In the case of VM guest uploads or NFC lease URLs, a Host -// field with a value of "*" is rewritten to the Client's URL.Host. -func (c *Client) ParseURL(urlStr string) (*url.URL, error) { - u, err := url.Parse(urlStr) - if err != nil { - return nil, err - } - - host, _ := splitHostPort(u.Host) - if host == "*" { - // Also use Client's port, to support port forwarding - u.Host = c.URL().Host - } - - return u, nil -} - -type Upload struct { - Type string - Method string - ContentLength int64 - Headers map[string]string - Ticket *http.Cookie - Progress progress.Sinker -} - -var DefaultUpload = Upload{ - Type: "application/octet-stream", - Method: "PUT", -} - -// Upload PUTs the local file to the given URL -func (c *Client) Upload(ctx context.Context, f io.Reader, u *url.URL, param *Upload) error { - var err error - - if param.Progress != nil { - pr := progress.NewReader(ctx, param.Progress, f, param.ContentLength) - f = pr - - // Mark progress reader as done when returning from this function. - defer func() { - pr.Done(err) - }() - } - - req, err := http.NewRequest(param.Method, u.String(), f) - if err != nil { - return err - } - - req = req.WithContext(ctx) - - req.ContentLength = param.ContentLength - req.Header.Set("Content-Type", param.Type) - - for k, v := range param.Headers { - req.Header.Add(k, v) - } - - if param.Ticket != nil { - req.AddCookie(param.Ticket) - } - - res, err := c.Client.Do(req) - if err != nil { - return err - } - - defer res.Body.Close() - - switch res.StatusCode { - case http.StatusOK: - case http.StatusCreated: - default: - err = errors.New(res.Status) - } - - return err -} - -// UploadFile PUTs the local file to the given URL -func (c *Client) UploadFile(ctx context.Context, file string, u *url.URL, param *Upload) error { - if param == nil { - p := DefaultUpload // Copy since we set ContentLength - param = &p - } - - s, err := os.Stat(file) - if err != nil { - return err - } - - f, err := os.Open(filepath.Clean(file)) - if err != nil { - return err - } - defer f.Close() - - param.ContentLength = s.Size() - - return c.Upload(ctx, f, u, param) -} - -type Download struct { - Method string - Headers map[string]string - Ticket *http.Cookie - Progress progress.Sinker - Writer io.Writer -} - -var DefaultDownload = Download{ - Method: "GET", -} - -// DownloadRequest wraps http.Client.Do, returning the http.Response without checking its StatusCode -func (c *Client) DownloadRequest(ctx context.Context, u *url.URL, param *Download) (*http.Response, error) { - req, err := http.NewRequest(param.Method, u.String(), nil) - if err != nil { - return nil, err - } - - req = req.WithContext(ctx) - - for k, v := range param.Headers { - req.Header.Add(k, v) - } - - if param.Ticket != nil { - req.AddCookie(param.Ticket) - } - - return c.Client.Do(req) -} - -// Download GETs the remote file from the given URL -func (c *Client) Download(ctx context.Context, u *url.URL, param *Download) (io.ReadCloser, int64, error) { - res, err := c.DownloadRequest(ctx, u, param) - if err != nil { - return nil, 0, err - } - - switch res.StatusCode { - case http.StatusOK: - default: - err = fmt.Errorf("download(%s): %s", u, res.Status) - } - - if err != nil { - return nil, 0, err - } - - r := res.Body - - return r, res.ContentLength, nil -} - -func (c *Client) WriteFile(ctx context.Context, file string, src io.Reader, size int64, s progress.Sinker, w io.Writer) error { - var err error - - r := src - - fh, err := os.Create(file) - if err != nil { - return err - } - - if s != nil { - pr := progress.NewReader(ctx, s, src, size) - r = pr - - // Mark progress reader as done when returning from this function. - defer func() { - pr.Done(err) - }() - } - - if w == nil { - w = fh - } else { - w = io.MultiWriter(w, fh) - } - - _, err = io.Copy(w, r) - - cerr := fh.Close() - - if err == nil { - err = cerr - } - - return err -} - -// DownloadFile GETs the given URL to a local file -func (c *Client) DownloadFile(ctx context.Context, file string, u *url.URL, param *Download) error { - var err error - if param == nil { - param = &DefaultDownload - } - - rc, contentLength, err := c.Download(ctx, u, param) - if err != nil { - return err - } - - return c.WriteFile(ctx, file, rc, contentLength, param.Progress, param.Writer) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/debug.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/debug.go deleted file mode 100644 index bc5b902030ae..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/debug.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package soap - -import ( - "fmt" - "io" - "net/http" - "net/http/httputil" - "sync/atomic" - "time" - - "github.com/vmware/govmomi/vim25/debug" -) - -var ( - // Trace reads an http request or response from rc and writes to w. - // The content type (kind) should be one of "xml" or "json". - Trace = func(rc io.ReadCloser, w io.Writer, kind string) io.ReadCloser { - return debug.NewTeeReader(rc, w) - } -) - -// debugRoundTrip contains state and logic needed to debug a single round trip. -type debugRoundTrip struct { - cn uint64 // Client number - rn uint64 // Request number - log io.WriteCloser // Request log - cs []io.Closer // Files that need closing when done -} - -func (d *debugRoundTrip) logf(format string, a ...interface{}) { - now := time.Now().Format("2006-01-02T15-04-05.000000000") - fmt.Fprintf(d.log, "%s - %04d: ", now, d.rn) - fmt.Fprintf(d.log, format, a...) - fmt.Fprintf(d.log, "\n") -} - -func (d *debugRoundTrip) enabled() bool { - return d != nil -} - -func (d *debugRoundTrip) done() { - for _, c := range d.cs { - c.Close() - } -} - -func (d *debugRoundTrip) newFile(suffix string) io.WriteCloser { - return debug.NewFile(fmt.Sprintf("%d-%04d.%s", d.cn, d.rn, suffix)) -} - -func (d *debugRoundTrip) ext(h http.Header) string { - const json = "application/json" - ext := "xml" - if h.Get("Accept") == json || h.Get("Content-Type") == json { - ext = "json" - } - return ext -} - -func (d *debugRoundTrip) debugRequest(req *http.Request) string { - if d == nil { - return "" - } - - // Capture headers - var wc io.WriteCloser = d.newFile("req.headers") - b, _ := httputil.DumpRequest(req, false) - wc.Write(b) - wc.Close() - - ext := d.ext(req.Header) - // Capture body - wc = d.newFile("req." + ext) - if req.Body != nil { - req.Body = Trace(req.Body, wc, ext) - } - - // Delay closing until marked done - d.cs = append(d.cs, wc) - - return ext -} - -func (d *debugRoundTrip) debugResponse(res *http.Response, ext string) { - if d == nil { - return - } - - // Capture headers - var wc io.WriteCloser = d.newFile("res.headers") - b, _ := httputil.DumpResponse(res, false) - wc.Write(b) - wc.Close() - - // Capture body - wc = d.newFile("res." + ext) - res.Body = Trace(res.Body, wc, ext) - - // Delay closing until marked done - d.cs = append(d.cs, wc) -} - -var cn uint64 // Client counter - -// debugContainer wraps the debugging state for a single client. -type debugContainer struct { - cn uint64 // Client number - rn uint64 // Request counter - log io.WriteCloser // Request log -} - -func newDebug() *debugContainer { - d := debugContainer{ - cn: atomic.AddUint64(&cn, 1), - rn: 0, - } - - if !debug.Enabled() { - return nil - } - - d.log = debug.NewFile(fmt.Sprintf("%d-client.log", d.cn)) - return &d -} - -func (d *debugContainer) newRoundTrip() *debugRoundTrip { - if d == nil { - return nil - } - - drt := debugRoundTrip{ - cn: d.cn, - rn: atomic.AddUint64(&d.rn, 1), - log: d.log, - } - - return &drt -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/error.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/error.go deleted file mode 100644 index fd30e3ff8cb2..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/error.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package soap - -import ( - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "reflect" - "strings" - - "github.com/vmware/govmomi/vim25/types" -) - -type regularError struct { - err error -} - -func (r regularError) Error() string { - return r.err.Error() -} - -type soapFaultError struct { - fault *Fault -} - -func (s soapFaultError) Error() string { - msg := s.fault.String - - if msg == "" { - if s.fault.Detail.Fault == nil { - msg = "unknown fault" - } else { - msg = reflect.TypeOf(s.fault.Detail.Fault).Name() - } - } - - return fmt.Sprintf("%s: %s", s.fault.Code, msg) -} - -func (s soapFaultError) MarshalJSON() ([]byte, error) { - out := struct { - Fault *Fault - }{ - Fault: s.fault, - } - return json.Marshal(out) -} - -type vimFaultError struct { - fault types.BaseMethodFault -} - -func (v vimFaultError) Error() string { - typ := reflect.TypeOf(v.fault) - for typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - return typ.Name() -} - -func (v vimFaultError) Fault() types.BaseMethodFault { - return v.fault -} - -func Wrap(err error) error { - switch err.(type) { - case regularError: - return err - case soapFaultError: - return err - case vimFaultError: - return err - } - - return WrapRegularError(err) -} - -func WrapRegularError(err error) error { - return regularError{err} -} - -func IsRegularError(err error) bool { - _, ok := err.(regularError) - return ok -} - -func ToRegularError(err error) error { - return err.(regularError).err -} - -func WrapSoapFault(f *Fault) error { - return soapFaultError{f} -} - -func IsSoapFault(err error) bool { - _, ok := err.(soapFaultError) - return ok -} - -func ToSoapFault(err error) *Fault { - return err.(soapFaultError).fault -} - -func WrapVimFault(v types.BaseMethodFault) error { - return vimFaultError{v} -} - -func IsVimFault(err error) bool { - _, ok := err.(vimFaultError) - return ok -} - -func ToVimFault(err error) types.BaseMethodFault { - return err.(vimFaultError).fault -} - -func IsCertificateUntrusted(err error) bool { - // golang 1.20 introduce a new type to wrap 509 errors. So instead of - // casting the type, now we check the error chain contains the - // x509 error or not. - x509UnknownAuthorityErr := &x509.UnknownAuthorityError{} - ok := errors.As(err, x509UnknownAuthorityErr) - if ok { - return true - } - - x509HostNameErr := &x509.HostnameError{} - ok = errors.As(err, x509HostNameErr) - if ok { - return true - } - - // The err variable may not be a special type of x509 or HTTP - // error that can be validated by a type assertion. The err variable is - // in fact be an *errors.errorString. - - msgs := []string{ - "certificate is not trusted", - "certificate signed by unknown authority", - } - - for _, msg := range msgs { - if strings.HasSuffix(err.Error(), msg) { - return true - } - } - - return false -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/soap.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/soap.go deleted file mode 100644 index a8dc121baade..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/soap/soap.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (c) 2014-2018 VMware, Inc. 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. -*/ - -package soap - -import ( - "github.com/vmware/govmomi/vim25/types" - "github.com/vmware/govmomi/vim25/xml" -) - -// Header includes optional soap Header fields. -type Header struct { - Action string `xml:"-"` // Action is the 'SOAPAction' HTTP header value. Defaults to "Client.Namespace/Client.Version". - Cookie string `xml:"vcSessionCookie,omitempty"` // Cookie is a vCenter session cookie that can be used with other SDK endpoints (e.g. pbm). - ID string `xml:"operationID,omitempty"` // ID is the operationID used by ESX/vCenter logging for correlation. - Security interface{} `xml:",omitempty"` // Security is used for SAML token authentication and request signing. -} - -type Envelope struct { - XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"` - Header *Header `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header,omitempty"` - Body interface{} -} - -type Fault struct { - XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"` - Code string `xml:"faultcode"` - String string `xml:"faultstring"` - Detail struct { - Fault types.AnyType `xml:",any,typeattr"` - } `xml:"detail"` -} - -func (f *Fault) VimFault() types.AnyType { - return f.Detail.Fault -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/base.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/base.go deleted file mode 100644 index 3bb12b7412e1..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/base.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package types - -type AnyType interface{} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/enum.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/enum.go deleted file mode 100644 index e8da547b38cd..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/enum.go +++ /dev/null @@ -1,5547 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import "reflect" - -type ActionParameter string - -const ( - ActionParameterTargetName = ActionParameter("targetName") - ActionParameterAlarmName = ActionParameter("alarmName") - ActionParameterOldStatus = ActionParameter("oldStatus") - ActionParameterNewStatus = ActionParameter("newStatus") - ActionParameterTriggeringSummary = ActionParameter("triggeringSummary") - ActionParameterDeclaringSummary = ActionParameter("declaringSummary") - ActionParameterEventDescription = ActionParameter("eventDescription") - ActionParameterTarget = ActionParameter("target") - ActionParameterAlarm = ActionParameter("alarm") -) - -func init() { - t["ActionParameter"] = reflect.TypeOf((*ActionParameter)(nil)).Elem() -} - -type ActionType string - -const ( - ActionTypeMigrationV1 = ActionType("MigrationV1") - ActionTypeVmPowerV1 = ActionType("VmPowerV1") - ActionTypeHostPowerV1 = ActionType("HostPowerV1") - ActionTypeHostMaintenanceV1 = ActionType("HostMaintenanceV1") - ActionTypeStorageMigrationV1 = ActionType("StorageMigrationV1") - ActionTypeStoragePlacementV1 = ActionType("StoragePlacementV1") - ActionTypePlacementV1 = ActionType("PlacementV1") - ActionTypeHostInfraUpdateHaV1 = ActionType("HostInfraUpdateHaV1") -) - -func init() { - t["ActionType"] = reflect.TypeOf((*ActionType)(nil)).Elem() -} - -type AffinityType string - -const ( - AffinityTypeMemory = AffinityType("memory") - AffinityTypeCpu = AffinityType("cpu") -) - -func init() { - t["AffinityType"] = reflect.TypeOf((*AffinityType)(nil)).Elem() -} - -type AgentInstallFailedReason string - -const ( - AgentInstallFailedReasonNotEnoughSpaceOnDevice = AgentInstallFailedReason("NotEnoughSpaceOnDevice") - AgentInstallFailedReasonPrepareToUpgradeFailed = AgentInstallFailedReason("PrepareToUpgradeFailed") - AgentInstallFailedReasonAgentNotRunning = AgentInstallFailedReason("AgentNotRunning") - AgentInstallFailedReasonAgentNotReachable = AgentInstallFailedReason("AgentNotReachable") - AgentInstallFailedReasonInstallTimedout = AgentInstallFailedReason("InstallTimedout") - AgentInstallFailedReasonSignatureVerificationFailed = AgentInstallFailedReason("SignatureVerificationFailed") - AgentInstallFailedReasonAgentUploadFailed = AgentInstallFailedReason("AgentUploadFailed") - AgentInstallFailedReasonAgentUploadTimedout = AgentInstallFailedReason("AgentUploadTimedout") - AgentInstallFailedReasonUnknownInstallerError = AgentInstallFailedReason("UnknownInstallerError") -) - -func init() { - t["AgentInstallFailedReason"] = reflect.TypeOf((*AgentInstallFailedReason)(nil)).Elem() -} - -type AlarmFilterSpecAlarmTypeByEntity string - -const ( - AlarmFilterSpecAlarmTypeByEntityEntityTypeAll = AlarmFilterSpecAlarmTypeByEntity("entityTypeAll") - AlarmFilterSpecAlarmTypeByEntityEntityTypeHost = AlarmFilterSpecAlarmTypeByEntity("entityTypeHost") - AlarmFilterSpecAlarmTypeByEntityEntityTypeVm = AlarmFilterSpecAlarmTypeByEntity("entityTypeVm") -) - -func init() { - t["AlarmFilterSpecAlarmTypeByEntity"] = reflect.TypeOf((*AlarmFilterSpecAlarmTypeByEntity)(nil)).Elem() -} - -type AlarmFilterSpecAlarmTypeByTrigger string - -const ( - AlarmFilterSpecAlarmTypeByTriggerTriggerTypeAll = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeAll") - AlarmFilterSpecAlarmTypeByTriggerTriggerTypeEvent = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeEvent") - AlarmFilterSpecAlarmTypeByTriggerTriggerTypeMetric = AlarmFilterSpecAlarmTypeByTrigger("triggerTypeMetric") -) - -func init() { - t["AlarmFilterSpecAlarmTypeByTrigger"] = reflect.TypeOf((*AlarmFilterSpecAlarmTypeByTrigger)(nil)).Elem() -} - -type AnswerFileValidationInfoStatus string - -const ( - AnswerFileValidationInfoStatusSuccess = AnswerFileValidationInfoStatus("success") - AnswerFileValidationInfoStatusFailed = AnswerFileValidationInfoStatus("failed") - AnswerFileValidationInfoStatusFailed_defaults = AnswerFileValidationInfoStatus("failed_defaults") -) - -func init() { - t["AnswerFileValidationInfoStatus"] = reflect.TypeOf((*AnswerFileValidationInfoStatus)(nil)).Elem() -} - -type ApplyHostProfileConfigurationResultStatus string - -const ( - ApplyHostProfileConfigurationResultStatusSuccess = ApplyHostProfileConfigurationResultStatus("success") - ApplyHostProfileConfigurationResultStatusFailed = ApplyHostProfileConfigurationResultStatus("failed") - ApplyHostProfileConfigurationResultStatusReboot_failed = ApplyHostProfileConfigurationResultStatus("reboot_failed") - ApplyHostProfileConfigurationResultStatusStateless_reboot_failed = ApplyHostProfileConfigurationResultStatus("stateless_reboot_failed") - ApplyHostProfileConfigurationResultStatusCheck_compliance_failed = ApplyHostProfileConfigurationResultStatus("check_compliance_failed") - ApplyHostProfileConfigurationResultStatusState_not_satisfied = ApplyHostProfileConfigurationResultStatus("state_not_satisfied") - ApplyHostProfileConfigurationResultStatusExit_maintenancemode_failed = ApplyHostProfileConfigurationResultStatus("exit_maintenancemode_failed") - ApplyHostProfileConfigurationResultStatusCanceled = ApplyHostProfileConfigurationResultStatus("canceled") -) - -func init() { - t["ApplyHostProfileConfigurationResultStatus"] = reflect.TypeOf((*ApplyHostProfileConfigurationResultStatus)(nil)).Elem() -} - -type ArrayUpdateOperation string - -const ( - ArrayUpdateOperationAdd = ArrayUpdateOperation("add") - ArrayUpdateOperationRemove = ArrayUpdateOperation("remove") - ArrayUpdateOperationEdit = ArrayUpdateOperation("edit") -) - -func init() { - t["ArrayUpdateOperation"] = reflect.TypeOf((*ArrayUpdateOperation)(nil)).Elem() -} - -type AutoStartAction string - -const ( - AutoStartActionNone = AutoStartAction("none") - AutoStartActionSystemDefault = AutoStartAction("systemDefault") - AutoStartActionPowerOn = AutoStartAction("powerOn") - AutoStartActionPowerOff = AutoStartAction("powerOff") - AutoStartActionGuestShutdown = AutoStartAction("guestShutdown") - AutoStartActionSuspend = AutoStartAction("suspend") -) - -func init() { - t["AutoStartAction"] = reflect.TypeOf((*AutoStartAction)(nil)).Elem() -} - -type AutoStartWaitHeartbeatSetting string - -const ( - AutoStartWaitHeartbeatSettingYes = AutoStartWaitHeartbeatSetting("yes") - AutoStartWaitHeartbeatSettingNo = AutoStartWaitHeartbeatSetting("no") - AutoStartWaitHeartbeatSettingSystemDefault = AutoStartWaitHeartbeatSetting("systemDefault") -) - -func init() { - t["AutoStartWaitHeartbeatSetting"] = reflect.TypeOf((*AutoStartWaitHeartbeatSetting)(nil)).Elem() -} - -type BaseConfigInfoDiskFileBackingInfoProvisioningType string - -const ( - BaseConfigInfoDiskFileBackingInfoProvisioningTypeThin = BaseConfigInfoDiskFileBackingInfoProvisioningType("thin") - BaseConfigInfoDiskFileBackingInfoProvisioningTypeEagerZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("eagerZeroedThick") - BaseConfigInfoDiskFileBackingInfoProvisioningTypeLazyZeroedThick = BaseConfigInfoDiskFileBackingInfoProvisioningType("lazyZeroedThick") -) - -func init() { - t["BaseConfigInfoDiskFileBackingInfoProvisioningType"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfoProvisioningType)(nil)).Elem() -} - -type BatchResultResult string - -const ( - BatchResultResultSuccess = BatchResultResult("success") - BatchResultResultFail = BatchResultResult("fail") -) - -func init() { - t["BatchResultResult"] = reflect.TypeOf((*BatchResultResult)(nil)).Elem() -} - -type CannotEnableVmcpForClusterReason string - -const ( - CannotEnableVmcpForClusterReasonAPDTimeoutDisabled = CannotEnableVmcpForClusterReason("APDTimeoutDisabled") -) - -func init() { - t["CannotEnableVmcpForClusterReason"] = reflect.TypeOf((*CannotEnableVmcpForClusterReason)(nil)).Elem() -} - -type CannotMoveFaultToleranceVmMoveType string - -const ( - CannotMoveFaultToleranceVmMoveTypeResourcePool = CannotMoveFaultToleranceVmMoveType("resourcePool") - CannotMoveFaultToleranceVmMoveTypeCluster = CannotMoveFaultToleranceVmMoveType("cluster") -) - -func init() { - t["CannotMoveFaultToleranceVmMoveType"] = reflect.TypeOf((*CannotMoveFaultToleranceVmMoveType)(nil)).Elem() -} - -type CannotPowerOffVmInClusterOperation string - -const ( - CannotPowerOffVmInClusterOperationSuspend = CannotPowerOffVmInClusterOperation("suspend") - CannotPowerOffVmInClusterOperationPowerOff = CannotPowerOffVmInClusterOperation("powerOff") - CannotPowerOffVmInClusterOperationGuestShutdown = CannotPowerOffVmInClusterOperation("guestShutdown") - CannotPowerOffVmInClusterOperationGuestSuspend = CannotPowerOffVmInClusterOperation("guestSuspend") -) - -func init() { - t["CannotPowerOffVmInClusterOperation"] = reflect.TypeOf((*CannotPowerOffVmInClusterOperation)(nil)).Elem() -} - -type CannotUseNetworkReason string - -const ( - CannotUseNetworkReasonNetworkReservationNotSupported = CannotUseNetworkReason("NetworkReservationNotSupported") - CannotUseNetworkReasonMismatchedNetworkPolicies = CannotUseNetworkReason("MismatchedNetworkPolicies") - CannotUseNetworkReasonMismatchedDvsVersionOrVendor = CannotUseNetworkReason("MismatchedDvsVersionOrVendor") - CannotUseNetworkReasonVMotionToUnsupportedNetworkType = CannotUseNetworkReason("VMotionToUnsupportedNetworkType") - CannotUseNetworkReasonNetworkUnderMaintenance = CannotUseNetworkReason("NetworkUnderMaintenance") - CannotUseNetworkReasonMismatchedEnsMode = CannotUseNetworkReason("MismatchedEnsMode") -) - -func init() { - t["CannotUseNetworkReason"] = reflect.TypeOf((*CannotUseNetworkReason)(nil)).Elem() -} - -type CheckTestType string - -const ( - CheckTestTypeSourceTests = CheckTestType("sourceTests") - CheckTestTypeHostTests = CheckTestType("hostTests") - CheckTestTypeResourcePoolTests = CheckTestType("resourcePoolTests") - CheckTestTypeDatastoreTests = CheckTestType("datastoreTests") - CheckTestTypeNetworkTests = CheckTestType("networkTests") -) - -func init() { - t["CheckTestType"] = reflect.TypeOf((*CheckTestType)(nil)).Elem() -} - -type ClusterComputeResourceHCIWorkflowState string - -const ( - ClusterComputeResourceHCIWorkflowStateIn_progress = ClusterComputeResourceHCIWorkflowState("in_progress") - ClusterComputeResourceHCIWorkflowStateDone = ClusterComputeResourceHCIWorkflowState("done") - ClusterComputeResourceHCIWorkflowStateInvalid = ClusterComputeResourceHCIWorkflowState("invalid") -) - -func init() { - t["ClusterComputeResourceHCIWorkflowState"] = reflect.TypeOf((*ClusterComputeResourceHCIWorkflowState)(nil)).Elem() -} - -type ClusterComputeResourceVcsHealthStatus string - -const ( - ClusterComputeResourceVcsHealthStatusHealthy = ClusterComputeResourceVcsHealthStatus("healthy") - ClusterComputeResourceVcsHealthStatusDegraded = ClusterComputeResourceVcsHealthStatus("degraded") - ClusterComputeResourceVcsHealthStatusNonhealthy = ClusterComputeResourceVcsHealthStatus("nonhealthy") -) - -func init() { - t["ClusterComputeResourceVcsHealthStatus"] = reflect.TypeOf((*ClusterComputeResourceVcsHealthStatus)(nil)).Elem() -} - -type ClusterCryptoConfigInfoCryptoMode string - -const ( - ClusterCryptoConfigInfoCryptoModeOnDemand = ClusterCryptoConfigInfoCryptoMode("onDemand") - ClusterCryptoConfigInfoCryptoModeForceEnable = ClusterCryptoConfigInfoCryptoMode("forceEnable") -) - -func init() { - t["ClusterCryptoConfigInfoCryptoMode"] = reflect.TypeOf((*ClusterCryptoConfigInfoCryptoMode)(nil)).Elem() -} - -type ClusterDasAamNodeStateDasState string - -const ( - ClusterDasAamNodeStateDasStateUninitialized = ClusterDasAamNodeStateDasState("uninitialized") - ClusterDasAamNodeStateDasStateInitialized = ClusterDasAamNodeStateDasState("initialized") - ClusterDasAamNodeStateDasStateConfiguring = ClusterDasAamNodeStateDasState("configuring") - ClusterDasAamNodeStateDasStateUnconfiguring = ClusterDasAamNodeStateDasState("unconfiguring") - ClusterDasAamNodeStateDasStateRunning = ClusterDasAamNodeStateDasState("running") - ClusterDasAamNodeStateDasStateError = ClusterDasAamNodeStateDasState("error") - ClusterDasAamNodeStateDasStateAgentShutdown = ClusterDasAamNodeStateDasState("agentShutdown") - ClusterDasAamNodeStateDasStateNodeFailed = ClusterDasAamNodeStateDasState("nodeFailed") -) - -func init() { - t["ClusterDasAamNodeStateDasState"] = reflect.TypeOf((*ClusterDasAamNodeStateDasState)(nil)).Elem() -} - -type ClusterDasConfigInfoHBDatastoreCandidate string - -const ( - ClusterDasConfigInfoHBDatastoreCandidateUserSelectedDs = ClusterDasConfigInfoHBDatastoreCandidate("userSelectedDs") - ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDs = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDs") - ClusterDasConfigInfoHBDatastoreCandidateAllFeasibleDsWithUserPreference = ClusterDasConfigInfoHBDatastoreCandidate("allFeasibleDsWithUserPreference") -) - -func init() { - t["ClusterDasConfigInfoHBDatastoreCandidate"] = reflect.TypeOf((*ClusterDasConfigInfoHBDatastoreCandidate)(nil)).Elem() -} - -type ClusterDasConfigInfoServiceState string - -const ( - ClusterDasConfigInfoServiceStateDisabled = ClusterDasConfigInfoServiceState("disabled") - ClusterDasConfigInfoServiceStateEnabled = ClusterDasConfigInfoServiceState("enabled") -) - -func init() { - t["ClusterDasConfigInfoServiceState"] = reflect.TypeOf((*ClusterDasConfigInfoServiceState)(nil)).Elem() -} - -type ClusterDasConfigInfoVmMonitoringState string - -const ( - ClusterDasConfigInfoVmMonitoringStateVmMonitoringDisabled = ClusterDasConfigInfoVmMonitoringState("vmMonitoringDisabled") - ClusterDasConfigInfoVmMonitoringStateVmMonitoringOnly = ClusterDasConfigInfoVmMonitoringState("vmMonitoringOnly") - ClusterDasConfigInfoVmMonitoringStateVmAndAppMonitoring = ClusterDasConfigInfoVmMonitoringState("vmAndAppMonitoring") -) - -func init() { - t["ClusterDasConfigInfoVmMonitoringState"] = reflect.TypeOf((*ClusterDasConfigInfoVmMonitoringState)(nil)).Elem() -} - -type ClusterDasFdmAvailabilityState string - -const ( - ClusterDasFdmAvailabilityStateUninitialized = ClusterDasFdmAvailabilityState("uninitialized") - ClusterDasFdmAvailabilityStateElection = ClusterDasFdmAvailabilityState("election") - ClusterDasFdmAvailabilityStateMaster = ClusterDasFdmAvailabilityState("master") - ClusterDasFdmAvailabilityStateConnectedToMaster = ClusterDasFdmAvailabilityState("connectedToMaster") - ClusterDasFdmAvailabilityStateNetworkPartitionedFromMaster = ClusterDasFdmAvailabilityState("networkPartitionedFromMaster") - ClusterDasFdmAvailabilityStateNetworkIsolated = ClusterDasFdmAvailabilityState("networkIsolated") - ClusterDasFdmAvailabilityStateHostDown = ClusterDasFdmAvailabilityState("hostDown") - ClusterDasFdmAvailabilityStateInitializationError = ClusterDasFdmAvailabilityState("initializationError") - ClusterDasFdmAvailabilityStateUninitializationError = ClusterDasFdmAvailabilityState("uninitializationError") - ClusterDasFdmAvailabilityStateFdmUnreachable = ClusterDasFdmAvailabilityState("fdmUnreachable") - ClusterDasFdmAvailabilityStateRetry = ClusterDasFdmAvailabilityState("retry") -) - -func init() { - t["ClusterDasFdmAvailabilityState"] = reflect.TypeOf((*ClusterDasFdmAvailabilityState)(nil)).Elem() -} - -type ClusterDasVmSettingsIsolationResponse string - -const ( - ClusterDasVmSettingsIsolationResponseNone = ClusterDasVmSettingsIsolationResponse("none") - ClusterDasVmSettingsIsolationResponsePowerOff = ClusterDasVmSettingsIsolationResponse("powerOff") - ClusterDasVmSettingsIsolationResponseShutdown = ClusterDasVmSettingsIsolationResponse("shutdown") - ClusterDasVmSettingsIsolationResponseClusterIsolationResponse = ClusterDasVmSettingsIsolationResponse("clusterIsolationResponse") -) - -func init() { - t["ClusterDasVmSettingsIsolationResponse"] = reflect.TypeOf((*ClusterDasVmSettingsIsolationResponse)(nil)).Elem() -} - -type ClusterDasVmSettingsRestartPriority string - -const ( - ClusterDasVmSettingsRestartPriorityDisabled = ClusterDasVmSettingsRestartPriority("disabled") - ClusterDasVmSettingsRestartPriorityLowest = ClusterDasVmSettingsRestartPriority("lowest") - ClusterDasVmSettingsRestartPriorityLow = ClusterDasVmSettingsRestartPriority("low") - ClusterDasVmSettingsRestartPriorityMedium = ClusterDasVmSettingsRestartPriority("medium") - ClusterDasVmSettingsRestartPriorityHigh = ClusterDasVmSettingsRestartPriority("high") - ClusterDasVmSettingsRestartPriorityHighest = ClusterDasVmSettingsRestartPriority("highest") - ClusterDasVmSettingsRestartPriorityClusterRestartPriority = ClusterDasVmSettingsRestartPriority("clusterRestartPriority") -) - -func init() { - t["ClusterDasVmSettingsRestartPriority"] = reflect.TypeOf((*ClusterDasVmSettingsRestartPriority)(nil)).Elem() -} - -type ClusterHostInfraUpdateHaModeActionOperationType string - -const ( - ClusterHostInfraUpdateHaModeActionOperationTypeEnterQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("enterQuarantine") - ClusterHostInfraUpdateHaModeActionOperationTypeExitQuarantine = ClusterHostInfraUpdateHaModeActionOperationType("exitQuarantine") - ClusterHostInfraUpdateHaModeActionOperationTypeEnterMaintenance = ClusterHostInfraUpdateHaModeActionOperationType("enterMaintenance") -) - -func init() { - t["ClusterHostInfraUpdateHaModeActionOperationType"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeActionOperationType)(nil)).Elem() -} - -type ClusterInfraUpdateHaConfigInfoBehaviorType string - -const ( - ClusterInfraUpdateHaConfigInfoBehaviorTypeManual = ClusterInfraUpdateHaConfigInfoBehaviorType("Manual") - ClusterInfraUpdateHaConfigInfoBehaviorTypeAutomated = ClusterInfraUpdateHaConfigInfoBehaviorType("Automated") -) - -func init() { - t["ClusterInfraUpdateHaConfigInfoBehaviorType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoBehaviorType)(nil)).Elem() -} - -type ClusterInfraUpdateHaConfigInfoRemediationType string - -const ( - ClusterInfraUpdateHaConfigInfoRemediationTypeQuarantineMode = ClusterInfraUpdateHaConfigInfoRemediationType("QuarantineMode") - ClusterInfraUpdateHaConfigInfoRemediationTypeMaintenanceMode = ClusterInfraUpdateHaConfigInfoRemediationType("MaintenanceMode") -) - -func init() { - t["ClusterInfraUpdateHaConfigInfoRemediationType"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfoRemediationType)(nil)).Elem() -} - -type ClusterPowerOnVmOption string - -const ( - ClusterPowerOnVmOptionOverrideAutomationLevel = ClusterPowerOnVmOption("OverrideAutomationLevel") - ClusterPowerOnVmOptionReserveResources = ClusterPowerOnVmOption("ReserveResources") -) - -func init() { - t["ClusterPowerOnVmOption"] = reflect.TypeOf((*ClusterPowerOnVmOption)(nil)).Elem() -} - -type ClusterProfileServiceType string - -const ( - ClusterProfileServiceTypeDRS = ClusterProfileServiceType("DRS") - ClusterProfileServiceTypeHA = ClusterProfileServiceType("HA") - ClusterProfileServiceTypeDPM = ClusterProfileServiceType("DPM") - ClusterProfileServiceTypeFT = ClusterProfileServiceType("FT") -) - -func init() { - t["ClusterProfileServiceType"] = reflect.TypeOf((*ClusterProfileServiceType)(nil)).Elem() -} - -type ClusterVmComponentProtectionSettingsStorageVmReaction string - -const ( - ClusterVmComponentProtectionSettingsStorageVmReactionDisabled = ClusterVmComponentProtectionSettingsStorageVmReaction("disabled") - ClusterVmComponentProtectionSettingsStorageVmReactionWarning = ClusterVmComponentProtectionSettingsStorageVmReaction("warning") - ClusterVmComponentProtectionSettingsStorageVmReactionRestartConservative = ClusterVmComponentProtectionSettingsStorageVmReaction("restartConservative") - ClusterVmComponentProtectionSettingsStorageVmReactionRestartAggressive = ClusterVmComponentProtectionSettingsStorageVmReaction("restartAggressive") - ClusterVmComponentProtectionSettingsStorageVmReactionClusterDefault = ClusterVmComponentProtectionSettingsStorageVmReaction("clusterDefault") -) - -func init() { - t["ClusterVmComponentProtectionSettingsStorageVmReaction"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsStorageVmReaction)(nil)).Elem() -} - -type ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared string - -const ( - ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedNone = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("none") - ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedReset = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("reset") - ClusterVmComponentProtectionSettingsVmReactionOnAPDClearedUseClusterDefault = ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared("useClusterDefault") -) - -func init() { - t["ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared"] = reflect.TypeOf((*ClusterVmComponentProtectionSettingsVmReactionOnAPDCleared)(nil)).Elem() -} - -type ClusterVmReadinessReadyCondition string - -const ( - ClusterVmReadinessReadyConditionNone = ClusterVmReadinessReadyCondition("none") - ClusterVmReadinessReadyConditionPoweredOn = ClusterVmReadinessReadyCondition("poweredOn") - ClusterVmReadinessReadyConditionGuestHbStatusGreen = ClusterVmReadinessReadyCondition("guestHbStatusGreen") - ClusterVmReadinessReadyConditionAppHbStatusGreen = ClusterVmReadinessReadyCondition("appHbStatusGreen") - ClusterVmReadinessReadyConditionUseClusterDefault = ClusterVmReadinessReadyCondition("useClusterDefault") -) - -func init() { - t["ClusterVmReadinessReadyCondition"] = reflect.TypeOf((*ClusterVmReadinessReadyCondition)(nil)).Elem() -} - -type ComplianceResultStatus string - -const ( - ComplianceResultStatusCompliant = ComplianceResultStatus("compliant") - ComplianceResultStatusNonCompliant = ComplianceResultStatus("nonCompliant") - ComplianceResultStatusUnknown = ComplianceResultStatus("unknown") - ComplianceResultStatusRunning = ComplianceResultStatus("running") -) - -func init() { - t["ComplianceResultStatus"] = reflect.TypeOf((*ComplianceResultStatus)(nil)).Elem() -} - -type ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState string - -const ( - ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateLicensed = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("licensed") - ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnlicensed = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unlicensed") - ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseStateUnknown = ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState("unknown") -) - -func init() { - t["ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState)(nil)).Elem() -} - -type ConfigSpecOperation string - -const ( - ConfigSpecOperationAdd = ConfigSpecOperation("add") - ConfigSpecOperationEdit = ConfigSpecOperation("edit") - ConfigSpecOperationRemove = ConfigSpecOperation("remove") -) - -func init() { - t["ConfigSpecOperation"] = reflect.TypeOf((*ConfigSpecOperation)(nil)).Elem() -} - -type CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason string - -const ( - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateMissingInCache = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateMissingInCache") - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateClusterInvalid = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateClusterInvalid") - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateClusterUnreachable = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateClusterUnreachable") - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateMissingInKMS = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateMissingInKMS") - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateNotActiveOrEnabled = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateNotActiveOrEnabled") - CryptoManagerKmipCryptoKeyStatusKeyUnavailableReasonKeyStateManagedByTrustAuthority = CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason("KeyStateManagedByTrustAuthority") -) - -func init() { - t["CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason"] = reflect.TypeOf((*CryptoManagerKmipCryptoKeyStatusKeyUnavailableReason)(nil)).Elem() -} - -type CustomizationFailedReasonCode string - -const ( - CustomizationFailedReasonCodeUserDefinedScriptDisabled = CustomizationFailedReasonCode("userDefinedScriptDisabled") - CustomizationFailedReasonCodeCustomizationDisabled = CustomizationFailedReasonCode("customizationDisabled") - CustomizationFailedReasonCodeRawDataIsNotSupported = CustomizationFailedReasonCode("rawDataIsNotSupported") - CustomizationFailedReasonCodeWrongMetadataFormat = CustomizationFailedReasonCode("wrongMetadataFormat") -) - -func init() { - t["CustomizationFailedReasonCode"] = reflect.TypeOf((*CustomizationFailedReasonCode)(nil)).Elem() -} - -type CustomizationLicenseDataMode string - -const ( - CustomizationLicenseDataModePerServer = CustomizationLicenseDataMode("perServer") - CustomizationLicenseDataModePerSeat = CustomizationLicenseDataMode("perSeat") -) - -func init() { - t["CustomizationLicenseDataMode"] = reflect.TypeOf((*CustomizationLicenseDataMode)(nil)).Elem() -} - -type CustomizationNetBIOSMode string - -const ( - CustomizationNetBIOSModeEnableNetBIOSViaDhcp = CustomizationNetBIOSMode("enableNetBIOSViaDhcp") - CustomizationNetBIOSModeEnableNetBIOS = CustomizationNetBIOSMode("enableNetBIOS") - CustomizationNetBIOSModeDisableNetBIOS = CustomizationNetBIOSMode("disableNetBIOS") -) - -func init() { - t["CustomizationNetBIOSMode"] = reflect.TypeOf((*CustomizationNetBIOSMode)(nil)).Elem() -} - -type CustomizationSysprepRebootOption string - -const ( - CustomizationSysprepRebootOptionReboot = CustomizationSysprepRebootOption("reboot") - CustomizationSysprepRebootOptionNoreboot = CustomizationSysprepRebootOption("noreboot") - CustomizationSysprepRebootOptionShutdown = CustomizationSysprepRebootOption("shutdown") -) - -func init() { - t["CustomizationSysprepRebootOption"] = reflect.TypeOf((*CustomizationSysprepRebootOption)(nil)).Elem() -} - -type DVPortStatusVmDirectPathGen2InactiveReasonNetwork string - -const ( - DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptIncompatibleDvs = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptIncompatibleDvs") - DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoCompatibleNics = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoCompatibleNics") - DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptNoVirtualFunctionsAvailable = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptNoVirtualFunctionsAvailable") - DVPortStatusVmDirectPathGen2InactiveReasonNetworkPortNptDisabledForPort = DVPortStatusVmDirectPathGen2InactiveReasonNetwork("portNptDisabledForPort") -) - -func init() { - t["DVPortStatusVmDirectPathGen2InactiveReasonNetwork"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonNetwork)(nil)).Elem() -} - -type DVPortStatusVmDirectPathGen2InactiveReasonOther string - -const ( - DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleHost = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleHost") - DVPortStatusVmDirectPathGen2InactiveReasonOtherPortNptIncompatibleConnectee = DVPortStatusVmDirectPathGen2InactiveReasonOther("portNptIncompatibleConnectee") -) - -func init() { - t["DVPortStatusVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*DVPortStatusVmDirectPathGen2InactiveReasonOther)(nil)).Elem() -} - -type DVSMacLimitPolicyType string - -const ( - DVSMacLimitPolicyTypeAllow = DVSMacLimitPolicyType("allow") - DVSMacLimitPolicyTypeDrop = DVSMacLimitPolicyType("drop") -) - -func init() { - t["DVSMacLimitPolicyType"] = reflect.TypeOf((*DVSMacLimitPolicyType)(nil)).Elem() -} - -type DasConfigFaultDasConfigFaultReason string - -const ( - DasConfigFaultDasConfigFaultReasonHostNetworkMisconfiguration = DasConfigFaultDasConfigFaultReason("HostNetworkMisconfiguration") - DasConfigFaultDasConfigFaultReasonHostMisconfiguration = DasConfigFaultDasConfigFaultReason("HostMisconfiguration") - DasConfigFaultDasConfigFaultReasonInsufficientPrivileges = DasConfigFaultDasConfigFaultReason("InsufficientPrivileges") - DasConfigFaultDasConfigFaultReasonNoPrimaryAgentAvailable = DasConfigFaultDasConfigFaultReason("NoPrimaryAgentAvailable") - DasConfigFaultDasConfigFaultReasonOther = DasConfigFaultDasConfigFaultReason("Other") - DasConfigFaultDasConfigFaultReasonNoDatastoresConfigured = DasConfigFaultDasConfigFaultReason("NoDatastoresConfigured") - DasConfigFaultDasConfigFaultReasonCreateConfigVvolFailed = DasConfigFaultDasConfigFaultReason("CreateConfigVvolFailed") - DasConfigFaultDasConfigFaultReasonVSanNotSupportedOnHost = DasConfigFaultDasConfigFaultReason("VSanNotSupportedOnHost") - DasConfigFaultDasConfigFaultReasonDasNetworkMisconfiguration = DasConfigFaultDasConfigFaultReason("DasNetworkMisconfiguration") - DasConfigFaultDasConfigFaultReasonSetDesiredImageSpecFailed = DasConfigFaultDasConfigFaultReason("SetDesiredImageSpecFailed") - DasConfigFaultDasConfigFaultReasonApplyHAVibsOnClusterFailed = DasConfigFaultDasConfigFaultReason("ApplyHAVibsOnClusterFailed") -) - -func init() { - t["DasConfigFaultDasConfigFaultReason"] = reflect.TypeOf((*DasConfigFaultDasConfigFaultReason)(nil)).Elem() -} - -type DasVmPriority string - -const ( - DasVmPriorityDisabled = DasVmPriority("disabled") - DasVmPriorityLow = DasVmPriority("low") - DasVmPriorityMedium = DasVmPriority("medium") - DasVmPriorityHigh = DasVmPriority("high") -) - -func init() { - t["DasVmPriority"] = reflect.TypeOf((*DasVmPriority)(nil)).Elem() -} - -type DatastoreAccessible string - -const ( - DatastoreAccessibleTrue = DatastoreAccessible("True") - DatastoreAccessibleFalse = DatastoreAccessible("False") -) - -func init() { - t["DatastoreAccessible"] = reflect.TypeOf((*DatastoreAccessible)(nil)).Elem() -} - -type DatastoreSummaryMaintenanceModeState string - -const ( - DatastoreSummaryMaintenanceModeStateNormal = DatastoreSummaryMaintenanceModeState("normal") - DatastoreSummaryMaintenanceModeStateEnteringMaintenance = DatastoreSummaryMaintenanceModeState("enteringMaintenance") - DatastoreSummaryMaintenanceModeStateInMaintenance = DatastoreSummaryMaintenanceModeState("inMaintenance") -) - -func init() { - t["DatastoreSummaryMaintenanceModeState"] = reflect.TypeOf((*DatastoreSummaryMaintenanceModeState)(nil)).Elem() -} - -type DayOfWeek string - -const ( - DayOfWeekSunday = DayOfWeek("sunday") - DayOfWeekMonday = DayOfWeek("monday") - DayOfWeekTuesday = DayOfWeek("tuesday") - DayOfWeekWednesday = DayOfWeek("wednesday") - DayOfWeekThursday = DayOfWeek("thursday") - DayOfWeekFriday = DayOfWeek("friday") - DayOfWeekSaturday = DayOfWeek("saturday") -) - -func init() { - t["DayOfWeek"] = reflect.TypeOf((*DayOfWeek)(nil)).Elem() -} - -type DeviceNotSupportedReason string - -const ( - DeviceNotSupportedReasonHost = DeviceNotSupportedReason("host") - DeviceNotSupportedReasonGuest = DeviceNotSupportedReason("guest") -) - -func init() { - t["DeviceNotSupportedReason"] = reflect.TypeOf((*DeviceNotSupportedReason)(nil)).Elem() -} - -type DiagnosticManagerLogCreator string - -const ( - DiagnosticManagerLogCreatorVpxd = DiagnosticManagerLogCreator("vpxd") - DiagnosticManagerLogCreatorVpxa = DiagnosticManagerLogCreator("vpxa") - DiagnosticManagerLogCreatorHostd = DiagnosticManagerLogCreator("hostd") - DiagnosticManagerLogCreatorServerd = DiagnosticManagerLogCreator("serverd") - DiagnosticManagerLogCreatorInstall = DiagnosticManagerLogCreator("install") - DiagnosticManagerLogCreatorVpxClient = DiagnosticManagerLogCreator("vpxClient") - DiagnosticManagerLogCreatorRecordLog = DiagnosticManagerLogCreator("recordLog") -) - -func init() { - t["DiagnosticManagerLogCreator"] = reflect.TypeOf((*DiagnosticManagerLogCreator)(nil)).Elem() -} - -type DiagnosticManagerLogFormat string - -const ( - DiagnosticManagerLogFormatPlain = DiagnosticManagerLogFormat("plain") -) - -func init() { - t["DiagnosticManagerLogFormat"] = reflect.TypeOf((*DiagnosticManagerLogFormat)(nil)).Elem() -} - -type DiagnosticPartitionStorageType string - -const ( - DiagnosticPartitionStorageTypeDirectAttached = DiagnosticPartitionStorageType("directAttached") - DiagnosticPartitionStorageTypeNetworkAttached = DiagnosticPartitionStorageType("networkAttached") -) - -func init() { - t["DiagnosticPartitionStorageType"] = reflect.TypeOf((*DiagnosticPartitionStorageType)(nil)).Elem() -} - -type DiagnosticPartitionType string - -const ( - DiagnosticPartitionTypeSingleHost = DiagnosticPartitionType("singleHost") - DiagnosticPartitionTypeMultiHost = DiagnosticPartitionType("multiHost") -) - -func init() { - t["DiagnosticPartitionType"] = reflect.TypeOf((*DiagnosticPartitionType)(nil)).Elem() -} - -type DisallowedChangeByServiceDisallowedChange string - -const ( - DisallowedChangeByServiceDisallowedChangeHotExtendDisk = DisallowedChangeByServiceDisallowedChange("hotExtendDisk") -) - -func init() { - t["DisallowedChangeByServiceDisallowedChange"] = reflect.TypeOf((*DisallowedChangeByServiceDisallowedChange)(nil)).Elem() -} - -type DistributedVirtualPortgroupBackingType string - -const ( - DistributedVirtualPortgroupBackingTypeStandard = DistributedVirtualPortgroupBackingType("standard") - DistributedVirtualPortgroupBackingTypeNsx = DistributedVirtualPortgroupBackingType("nsx") -) - -func init() { - t["DistributedVirtualPortgroupBackingType"] = reflect.TypeOf((*DistributedVirtualPortgroupBackingType)(nil)).Elem() -} - -type DistributedVirtualPortgroupMetaTagName string - -const ( - DistributedVirtualPortgroupMetaTagNameDvsName = DistributedVirtualPortgroupMetaTagName("dvsName") - DistributedVirtualPortgroupMetaTagNamePortgroupName = DistributedVirtualPortgroupMetaTagName("portgroupName") - DistributedVirtualPortgroupMetaTagNamePortIndex = DistributedVirtualPortgroupMetaTagName("portIndex") -) - -func init() { - t["DistributedVirtualPortgroupMetaTagName"] = reflect.TypeOf((*DistributedVirtualPortgroupMetaTagName)(nil)).Elem() -} - -type DistributedVirtualPortgroupPortgroupType string - -const ( - DistributedVirtualPortgroupPortgroupTypeEarlyBinding = DistributedVirtualPortgroupPortgroupType("earlyBinding") - DistributedVirtualPortgroupPortgroupTypeLateBinding = DistributedVirtualPortgroupPortgroupType("lateBinding") - DistributedVirtualPortgroupPortgroupTypeEphemeral = DistributedVirtualPortgroupPortgroupType("ephemeral") -) - -func init() { - t["DistributedVirtualPortgroupPortgroupType"] = reflect.TypeOf((*DistributedVirtualPortgroupPortgroupType)(nil)).Elem() -} - -type DistributedVirtualSwitchHostInfrastructureTrafficClass string - -const ( - DistributedVirtualSwitchHostInfrastructureTrafficClassManagement = DistributedVirtualSwitchHostInfrastructureTrafficClass("management") - DistributedVirtualSwitchHostInfrastructureTrafficClassFaultTolerance = DistributedVirtualSwitchHostInfrastructureTrafficClass("faultTolerance") - DistributedVirtualSwitchHostInfrastructureTrafficClassVmotion = DistributedVirtualSwitchHostInfrastructureTrafficClass("vmotion") - DistributedVirtualSwitchHostInfrastructureTrafficClassVirtualMachine = DistributedVirtualSwitchHostInfrastructureTrafficClass("virtualMachine") - DistributedVirtualSwitchHostInfrastructureTrafficClassISCSI = DistributedVirtualSwitchHostInfrastructureTrafficClass("iSCSI") - DistributedVirtualSwitchHostInfrastructureTrafficClassNfs = DistributedVirtualSwitchHostInfrastructureTrafficClass("nfs") - DistributedVirtualSwitchHostInfrastructureTrafficClassHbr = DistributedVirtualSwitchHostInfrastructureTrafficClass("hbr") - DistributedVirtualSwitchHostInfrastructureTrafficClassVsan = DistributedVirtualSwitchHostInfrastructureTrafficClass("vsan") - DistributedVirtualSwitchHostInfrastructureTrafficClassVdp = DistributedVirtualSwitchHostInfrastructureTrafficClass("vdp") - DistributedVirtualSwitchHostInfrastructureTrafficClassBackupNfc = DistributedVirtualSwitchHostInfrastructureTrafficClass("backupNfc") - DistributedVirtualSwitchHostInfrastructureTrafficClassNvmetcp = DistributedVirtualSwitchHostInfrastructureTrafficClass("nvmetcp") -) - -func init() { - t["DistributedVirtualSwitchHostInfrastructureTrafficClass"] = reflect.TypeOf((*DistributedVirtualSwitchHostInfrastructureTrafficClass)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberHostComponentState string - -const ( - DistributedVirtualSwitchHostMemberHostComponentStateUp = DistributedVirtualSwitchHostMemberHostComponentState("up") - DistributedVirtualSwitchHostMemberHostComponentStatePending = DistributedVirtualSwitchHostMemberHostComponentState("pending") - DistributedVirtualSwitchHostMemberHostComponentStateOutOfSync = DistributedVirtualSwitchHostMemberHostComponentState("outOfSync") - DistributedVirtualSwitchHostMemberHostComponentStateWarning = DistributedVirtualSwitchHostMemberHostComponentState("warning") - DistributedVirtualSwitchHostMemberHostComponentStateDisconnected = DistributedVirtualSwitchHostMemberHostComponentState("disconnected") - DistributedVirtualSwitchHostMemberHostComponentStateDown = DistributedVirtualSwitchHostMemberHostComponentState("down") -) - -func init() { - t["DistributedVirtualSwitchHostMemberHostComponentState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberHostComponentState)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberTransportZoneType string - -const ( - DistributedVirtualSwitchHostMemberTransportZoneTypeVlan = DistributedVirtualSwitchHostMemberTransportZoneType("vlan") - DistributedVirtualSwitchHostMemberTransportZoneTypeOverlay = DistributedVirtualSwitchHostMemberTransportZoneType("overlay") -) - -func init() { - t["DistributedVirtualSwitchHostMemberTransportZoneType"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberTransportZoneType)(nil)).Elem() -} - -type DistributedVirtualSwitchNetworkResourceControlVersion string - -const ( - DistributedVirtualSwitchNetworkResourceControlVersionVersion2 = DistributedVirtualSwitchNetworkResourceControlVersion("version2") - DistributedVirtualSwitchNetworkResourceControlVersionVersion3 = DistributedVirtualSwitchNetworkResourceControlVersion("version3") -) - -func init() { - t["DistributedVirtualSwitchNetworkResourceControlVersion"] = reflect.TypeOf((*DistributedVirtualSwitchNetworkResourceControlVersion)(nil)).Elem() -} - -type DistributedVirtualSwitchNicTeamingPolicyMode string - -const ( - DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_ip = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_ip") - DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcmac = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcmac") - DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_srcid = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_srcid") - DistributedVirtualSwitchNicTeamingPolicyModeFailover_explicit = DistributedVirtualSwitchNicTeamingPolicyMode("failover_explicit") - DistributedVirtualSwitchNicTeamingPolicyModeLoadbalance_loadbased = DistributedVirtualSwitchNicTeamingPolicyMode("loadbalance_loadbased") -) - -func init() { - t["DistributedVirtualSwitchNicTeamingPolicyMode"] = reflect.TypeOf((*DistributedVirtualSwitchNicTeamingPolicyMode)(nil)).Elem() -} - -type DistributedVirtualSwitchPortConnecteeConnecteeType string - -const ( - DistributedVirtualSwitchPortConnecteeConnecteeTypePnic = DistributedVirtualSwitchPortConnecteeConnecteeType("pnic") - DistributedVirtualSwitchPortConnecteeConnecteeTypeVmVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("vmVnic") - DistributedVirtualSwitchPortConnecteeConnecteeTypeHostConsoleVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("hostConsoleVnic") - DistributedVirtualSwitchPortConnecteeConnecteeTypeHostVmkVnic = DistributedVirtualSwitchPortConnecteeConnecteeType("hostVmkVnic") -) - -func init() { - t["DistributedVirtualSwitchPortConnecteeConnecteeType"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnecteeConnecteeType)(nil)).Elem() -} - -type DistributedVirtualSwitchProductSpecOperationType string - -const ( - DistributedVirtualSwitchProductSpecOperationTypePreInstall = DistributedVirtualSwitchProductSpecOperationType("preInstall") - DistributedVirtualSwitchProductSpecOperationTypeUpgrade = DistributedVirtualSwitchProductSpecOperationType("upgrade") - DistributedVirtualSwitchProductSpecOperationTypeNotifyAvailableUpgrade = DistributedVirtualSwitchProductSpecOperationType("notifyAvailableUpgrade") - DistributedVirtualSwitchProductSpecOperationTypeProceedWithUpgrade = DistributedVirtualSwitchProductSpecOperationType("proceedWithUpgrade") - DistributedVirtualSwitchProductSpecOperationTypeUpdateBundleInfo = DistributedVirtualSwitchProductSpecOperationType("updateBundleInfo") -) - -func init() { - t["DistributedVirtualSwitchProductSpecOperationType"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpecOperationType)(nil)).Elem() -} - -type DpmBehavior string - -const ( - DpmBehaviorManual = DpmBehavior("manual") - DpmBehaviorAutomated = DpmBehavior("automated") -) - -func init() { - t["DpmBehavior"] = reflect.TypeOf((*DpmBehavior)(nil)).Elem() -} - -type DrsBehavior string - -const ( - DrsBehaviorManual = DrsBehavior("manual") - DrsBehaviorPartiallyAutomated = DrsBehavior("partiallyAutomated") - DrsBehaviorFullyAutomated = DrsBehavior("fullyAutomated") -) - -func init() { - t["DrsBehavior"] = reflect.TypeOf((*DrsBehavior)(nil)).Elem() -} - -type DrsInjectorWorkloadCorrelationState string - -const ( - DrsInjectorWorkloadCorrelationStateCorrelated = DrsInjectorWorkloadCorrelationState("Correlated") - DrsInjectorWorkloadCorrelationStateUncorrelated = DrsInjectorWorkloadCorrelationState("Uncorrelated") -) - -func init() { - t["DrsInjectorWorkloadCorrelationState"] = reflect.TypeOf((*DrsInjectorWorkloadCorrelationState)(nil)).Elem() -} - -type DrsRecommendationReasonCode string - -const ( - DrsRecommendationReasonCodeFairnessCpuAvg = DrsRecommendationReasonCode("fairnessCpuAvg") - DrsRecommendationReasonCodeFairnessMemAvg = DrsRecommendationReasonCode("fairnessMemAvg") - DrsRecommendationReasonCodeJointAffin = DrsRecommendationReasonCode("jointAffin") - DrsRecommendationReasonCodeAntiAffin = DrsRecommendationReasonCode("antiAffin") - DrsRecommendationReasonCodeHostMaint = DrsRecommendationReasonCode("hostMaint") -) - -func init() { - t["DrsRecommendationReasonCode"] = reflect.TypeOf((*DrsRecommendationReasonCode)(nil)).Elem() -} - -type DvsEventPortBlockState string - -const ( - DvsEventPortBlockStateUnset = DvsEventPortBlockState("unset") - DvsEventPortBlockStateBlocked = DvsEventPortBlockState("blocked") - DvsEventPortBlockStateUnblocked = DvsEventPortBlockState("unblocked") - DvsEventPortBlockStateUnknown = DvsEventPortBlockState("unknown") -) - -func init() { - t["DvsEventPortBlockState"] = reflect.TypeOf((*DvsEventPortBlockState)(nil)).Elem() -} - -type DvsFilterOnFailure string - -const ( - DvsFilterOnFailureFailOpen = DvsFilterOnFailure("failOpen") - DvsFilterOnFailureFailClosed = DvsFilterOnFailure("failClosed") -) - -func init() { - t["DvsFilterOnFailure"] = reflect.TypeOf((*DvsFilterOnFailure)(nil)).Elem() -} - -type DvsNetworkRuleDirectionType string - -const ( - DvsNetworkRuleDirectionTypeIncomingPackets = DvsNetworkRuleDirectionType("incomingPackets") - DvsNetworkRuleDirectionTypeOutgoingPackets = DvsNetworkRuleDirectionType("outgoingPackets") - DvsNetworkRuleDirectionTypeBoth = DvsNetworkRuleDirectionType("both") -) - -func init() { - t["DvsNetworkRuleDirectionType"] = reflect.TypeOf((*DvsNetworkRuleDirectionType)(nil)).Elem() -} - -type EntityImportType string - -const ( - EntityImportTypeCreateEntityWithNewIdentifier = EntityImportType("createEntityWithNewIdentifier") - EntityImportTypeCreateEntityWithOriginalIdentifier = EntityImportType("createEntityWithOriginalIdentifier") - EntityImportTypeApplyToEntitySpecified = EntityImportType("applyToEntitySpecified") -) - -func init() { - t["EntityImportType"] = reflect.TypeOf((*EntityImportType)(nil)).Elem() -} - -type EntityType string - -const ( - EntityTypeDistributedVirtualSwitch = EntityType("distributedVirtualSwitch") - EntityTypeDistributedVirtualPortgroup = EntityType("distributedVirtualPortgroup") -) - -func init() { - t["EntityType"] = reflect.TypeOf((*EntityType)(nil)).Elem() -} - -type EventAlarmExpressionComparisonOperator string - -const ( - EventAlarmExpressionComparisonOperatorEquals = EventAlarmExpressionComparisonOperator("equals") - EventAlarmExpressionComparisonOperatorNotEqualTo = EventAlarmExpressionComparisonOperator("notEqualTo") - EventAlarmExpressionComparisonOperatorStartsWith = EventAlarmExpressionComparisonOperator("startsWith") - EventAlarmExpressionComparisonOperatorDoesNotStartWith = EventAlarmExpressionComparisonOperator("doesNotStartWith") - EventAlarmExpressionComparisonOperatorEndsWith = EventAlarmExpressionComparisonOperator("endsWith") - EventAlarmExpressionComparisonOperatorDoesNotEndWith = EventAlarmExpressionComparisonOperator("doesNotEndWith") -) - -func init() { - t["EventAlarmExpressionComparisonOperator"] = reflect.TypeOf((*EventAlarmExpressionComparisonOperator)(nil)).Elem() -} - -type EventCategory string - -const ( - EventCategoryInfo = EventCategory("info") - EventCategoryWarning = EventCategory("warning") - EventCategoryError = EventCategory("error") - EventCategoryUser = EventCategory("user") -) - -func init() { - t["EventCategory"] = reflect.TypeOf((*EventCategory)(nil)).Elem() -} - -type EventEventSeverity string - -const ( - EventEventSeverityError = EventEventSeverity("error") - EventEventSeverityWarning = EventEventSeverity("warning") - EventEventSeverityInfo = EventEventSeverity("info") - EventEventSeverityUser = EventEventSeverity("user") -) - -func init() { - t["EventEventSeverity"] = reflect.TypeOf((*EventEventSeverity)(nil)).Elem() -} - -type EventFilterSpecRecursionOption string - -const ( - EventFilterSpecRecursionOptionSelf = EventFilterSpecRecursionOption("self") - EventFilterSpecRecursionOptionChildren = EventFilterSpecRecursionOption("children") - EventFilterSpecRecursionOptionAll = EventFilterSpecRecursionOption("all") -) - -func init() { - t["EventFilterSpecRecursionOption"] = reflect.TypeOf((*EventFilterSpecRecursionOption)(nil)).Elem() -} - -type FibreChannelPortType string - -const ( - FibreChannelPortTypeFabric = FibreChannelPortType("fabric") - FibreChannelPortTypeLoop = FibreChannelPortType("loop") - FibreChannelPortTypePointToPoint = FibreChannelPortType("pointToPoint") - FibreChannelPortTypeUnknown = FibreChannelPortType("unknown") -) - -func init() { - t["FibreChannelPortType"] = reflect.TypeOf((*FibreChannelPortType)(nil)).Elem() -} - -type FileSystemMountInfoVStorageSupportStatus string - -const ( - FileSystemMountInfoVStorageSupportStatusVStorageSupported = FileSystemMountInfoVStorageSupportStatus("vStorageSupported") - FileSystemMountInfoVStorageSupportStatusVStorageUnsupported = FileSystemMountInfoVStorageSupportStatus("vStorageUnsupported") - FileSystemMountInfoVStorageSupportStatusVStorageUnknown = FileSystemMountInfoVStorageSupportStatus("vStorageUnknown") -) - -func init() { - t["FileSystemMountInfoVStorageSupportStatus"] = reflect.TypeOf((*FileSystemMountInfoVStorageSupportStatus)(nil)).Elem() -} - -type FolderDesiredHostState string - -const ( - FolderDesiredHostStateMaintenance = FolderDesiredHostState("maintenance") - FolderDesiredHostStateNon_maintenance = FolderDesiredHostState("non_maintenance") -) - -func init() { - t["FolderDesiredHostState"] = reflect.TypeOf((*FolderDesiredHostState)(nil)).Elem() -} - -type FtIssuesOnHostHostSelectionType string - -const ( - FtIssuesOnHostHostSelectionTypeUser = FtIssuesOnHostHostSelectionType("user") - FtIssuesOnHostHostSelectionTypeVc = FtIssuesOnHostHostSelectionType("vc") - FtIssuesOnHostHostSelectionTypeDrs = FtIssuesOnHostHostSelectionType("drs") -) - -func init() { - t["FtIssuesOnHostHostSelectionType"] = reflect.TypeOf((*FtIssuesOnHostHostSelectionType)(nil)).Elem() -} - -type GuestFileType string - -const ( - GuestFileTypeFile = GuestFileType("file") - GuestFileTypeDirectory = GuestFileType("directory") - GuestFileTypeSymlink = GuestFileType("symlink") -) - -func init() { - t["GuestFileType"] = reflect.TypeOf((*GuestFileType)(nil)).Elem() -} - -type GuestInfoAppStateType string - -const ( - GuestInfoAppStateTypeNone = GuestInfoAppStateType("none") - GuestInfoAppStateTypeAppStateOk = GuestInfoAppStateType("appStateOk") - GuestInfoAppStateTypeAppStateNeedReset = GuestInfoAppStateType("appStateNeedReset") -) - -func init() { - t["GuestInfoAppStateType"] = reflect.TypeOf((*GuestInfoAppStateType)(nil)).Elem() -} - -type GuestInfoCustomizationStatus string - -const ( - GuestInfoCustomizationStatusTOOLSDEPLOYPKG_IDLE = GuestInfoCustomizationStatus("TOOLSDEPLOYPKG_IDLE") - GuestInfoCustomizationStatusTOOLSDEPLOYPKG_PENDING = GuestInfoCustomizationStatus("TOOLSDEPLOYPKG_PENDING") - GuestInfoCustomizationStatusTOOLSDEPLOYPKG_RUNNING = GuestInfoCustomizationStatus("TOOLSDEPLOYPKG_RUNNING") - GuestInfoCustomizationStatusTOOLSDEPLOYPKG_SUCCEEDED = GuestInfoCustomizationStatus("TOOLSDEPLOYPKG_SUCCEEDED") - GuestInfoCustomizationStatusTOOLSDEPLOYPKG_FAILED = GuestInfoCustomizationStatus("TOOLSDEPLOYPKG_FAILED") -) - -func init() { - t["GuestInfoCustomizationStatus"] = reflect.TypeOf((*GuestInfoCustomizationStatus)(nil)).Elem() -} - -type GuestOsDescriptorFirmwareType string - -const ( - GuestOsDescriptorFirmwareTypeBios = GuestOsDescriptorFirmwareType("bios") - GuestOsDescriptorFirmwareTypeEfi = GuestOsDescriptorFirmwareType("efi") -) - -func init() { - t["GuestOsDescriptorFirmwareType"] = reflect.TypeOf((*GuestOsDescriptorFirmwareType)(nil)).Elem() -} - -type GuestOsDescriptorSupportLevel string - -const ( - GuestOsDescriptorSupportLevelExperimental = GuestOsDescriptorSupportLevel("experimental") - GuestOsDescriptorSupportLevelLegacy = GuestOsDescriptorSupportLevel("legacy") - GuestOsDescriptorSupportLevelTerminated = GuestOsDescriptorSupportLevel("terminated") - GuestOsDescriptorSupportLevelSupported = GuestOsDescriptorSupportLevel("supported") - GuestOsDescriptorSupportLevelUnsupported = GuestOsDescriptorSupportLevel("unsupported") - GuestOsDescriptorSupportLevelDeprecated = GuestOsDescriptorSupportLevel("deprecated") - GuestOsDescriptorSupportLevelTechPreview = GuestOsDescriptorSupportLevel("techPreview") -) - -func init() { - t["GuestOsDescriptorSupportLevel"] = reflect.TypeOf((*GuestOsDescriptorSupportLevel)(nil)).Elem() -} - -type GuestQuiesceEndGuestQuiesceError string - -const ( - GuestQuiesceEndGuestQuiesceErrorFailure = GuestQuiesceEndGuestQuiesceError("failure") -) - -func init() { - t["GuestQuiesceEndGuestQuiesceError"] = reflect.TypeOf((*GuestQuiesceEndGuestQuiesceError)(nil)).Elem() -} - -type GuestRegKeyWowSpec string - -const ( - GuestRegKeyWowSpecWOWNative = GuestRegKeyWowSpec("WOWNative") - GuestRegKeyWowSpecWOW32 = GuestRegKeyWowSpec("WOW32") - GuestRegKeyWowSpecWOW64 = GuestRegKeyWowSpec("WOW64") -) - -func init() { - t["GuestRegKeyWowSpec"] = reflect.TypeOf((*GuestRegKeyWowSpec)(nil)).Elem() -} - -type HealthUpdateInfoComponentType string - -const ( - HealthUpdateInfoComponentTypeMemory = HealthUpdateInfoComponentType("Memory") - HealthUpdateInfoComponentTypePower = HealthUpdateInfoComponentType("Power") - HealthUpdateInfoComponentTypeFan = HealthUpdateInfoComponentType("Fan") - HealthUpdateInfoComponentTypeNetwork = HealthUpdateInfoComponentType("Network") - HealthUpdateInfoComponentTypeStorage = HealthUpdateInfoComponentType("Storage") -) - -func init() { - t["HealthUpdateInfoComponentType"] = reflect.TypeOf((*HealthUpdateInfoComponentType)(nil)).Elem() -} - -type HostAccessMode string - -const ( - HostAccessModeAccessNone = HostAccessMode("accessNone") - HostAccessModeAccessAdmin = HostAccessMode("accessAdmin") - HostAccessModeAccessNoAccess = HostAccessMode("accessNoAccess") - HostAccessModeAccessReadOnly = HostAccessMode("accessReadOnly") - HostAccessModeAccessOther = HostAccessMode("accessOther") -) - -func init() { - t["HostAccessMode"] = reflect.TypeOf((*HostAccessMode)(nil)).Elem() -} - -type HostActiveDirectoryAuthenticationCertificateDigest string - -const ( - HostActiveDirectoryAuthenticationCertificateDigestSHA1 = HostActiveDirectoryAuthenticationCertificateDigest("SHA1") -) - -func init() { - t["HostActiveDirectoryAuthenticationCertificateDigest"] = reflect.TypeOf((*HostActiveDirectoryAuthenticationCertificateDigest)(nil)).Elem() -} - -type HostActiveDirectoryInfoDomainMembershipStatus string - -const ( - HostActiveDirectoryInfoDomainMembershipStatusUnknown = HostActiveDirectoryInfoDomainMembershipStatus("unknown") - HostActiveDirectoryInfoDomainMembershipStatusOk = HostActiveDirectoryInfoDomainMembershipStatus("ok") - HostActiveDirectoryInfoDomainMembershipStatusNoServers = HostActiveDirectoryInfoDomainMembershipStatus("noServers") - HostActiveDirectoryInfoDomainMembershipStatusClientTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("clientTrustBroken") - HostActiveDirectoryInfoDomainMembershipStatusServerTrustBroken = HostActiveDirectoryInfoDomainMembershipStatus("serverTrustBroken") - HostActiveDirectoryInfoDomainMembershipStatusInconsistentTrust = HostActiveDirectoryInfoDomainMembershipStatus("inconsistentTrust") - HostActiveDirectoryInfoDomainMembershipStatusOtherProblem = HostActiveDirectoryInfoDomainMembershipStatus("otherProblem") -) - -func init() { - t["HostActiveDirectoryInfoDomainMembershipStatus"] = reflect.TypeOf((*HostActiveDirectoryInfoDomainMembershipStatus)(nil)).Elem() -} - -type HostCapabilityFtUnsupportedReason string - -const ( - HostCapabilityFtUnsupportedReasonVMotionNotLicensed = HostCapabilityFtUnsupportedReason("vMotionNotLicensed") - HostCapabilityFtUnsupportedReasonMissingVMotionNic = HostCapabilityFtUnsupportedReason("missingVMotionNic") - HostCapabilityFtUnsupportedReasonMissingFTLoggingNic = HostCapabilityFtUnsupportedReason("missingFTLoggingNic") - HostCapabilityFtUnsupportedReasonFtNotLicensed = HostCapabilityFtUnsupportedReason("ftNotLicensed") - HostCapabilityFtUnsupportedReasonHaAgentIssue = HostCapabilityFtUnsupportedReason("haAgentIssue") - HostCapabilityFtUnsupportedReasonUnsupportedProduct = HostCapabilityFtUnsupportedReason("unsupportedProduct") - HostCapabilityFtUnsupportedReasonCpuHvUnsupported = HostCapabilityFtUnsupportedReason("cpuHvUnsupported") - HostCapabilityFtUnsupportedReasonCpuHwmmuUnsupported = HostCapabilityFtUnsupportedReason("cpuHwmmuUnsupported") - HostCapabilityFtUnsupportedReasonCpuHvDisabled = HostCapabilityFtUnsupportedReason("cpuHvDisabled") -) - -func init() { - t["HostCapabilityFtUnsupportedReason"] = reflect.TypeOf((*HostCapabilityFtUnsupportedReason)(nil)).Elem() -} - -type HostCapabilityUnmapMethodSupported string - -const ( - HostCapabilityUnmapMethodSupportedPriority = HostCapabilityUnmapMethodSupported("priority") - HostCapabilityUnmapMethodSupportedFixed = HostCapabilityUnmapMethodSupported("fixed") - HostCapabilityUnmapMethodSupportedDynamic = HostCapabilityUnmapMethodSupported("dynamic") -) - -func init() { - t["HostCapabilityUnmapMethodSupported"] = reflect.TypeOf((*HostCapabilityUnmapMethodSupported)(nil)).Elem() -} - -type HostCapabilityVmDirectPathGen2UnsupportedReason string - -const ( - HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleProduct = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleProduct") - HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptIncompatibleHardware = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptIncompatibleHardware") - HostCapabilityVmDirectPathGen2UnsupportedReasonHostNptDisabled = HostCapabilityVmDirectPathGen2UnsupportedReason("hostNptDisabled") -) - -func init() { - t["HostCapabilityVmDirectPathGen2UnsupportedReason"] = reflect.TypeOf((*HostCapabilityVmDirectPathGen2UnsupportedReason)(nil)).Elem() -} - -type HostCertificateManagerCertificateInfoCertificateStatus string - -const ( - HostCertificateManagerCertificateInfoCertificateStatusUnknown = HostCertificateManagerCertificateInfoCertificateStatus("unknown") - HostCertificateManagerCertificateInfoCertificateStatusExpired = HostCertificateManagerCertificateInfoCertificateStatus("expired") - HostCertificateManagerCertificateInfoCertificateStatusExpiring = HostCertificateManagerCertificateInfoCertificateStatus("expiring") - HostCertificateManagerCertificateInfoCertificateStatusExpiringShortly = HostCertificateManagerCertificateInfoCertificateStatus("expiringShortly") - HostCertificateManagerCertificateInfoCertificateStatusExpirationImminent = HostCertificateManagerCertificateInfoCertificateStatus("expirationImminent") - HostCertificateManagerCertificateInfoCertificateStatusGood = HostCertificateManagerCertificateInfoCertificateStatus("good") -) - -func init() { - t["HostCertificateManagerCertificateInfoCertificateStatus"] = reflect.TypeOf((*HostCertificateManagerCertificateInfoCertificateStatus)(nil)).Elem() -} - -type HostConfigChangeMode string - -const ( - HostConfigChangeModeModify = HostConfigChangeMode("modify") - HostConfigChangeModeReplace = HostConfigChangeMode("replace") -) - -func init() { - t["HostConfigChangeMode"] = reflect.TypeOf((*HostConfigChangeMode)(nil)).Elem() -} - -type HostConfigChangeOperation string - -const ( - HostConfigChangeOperationAdd = HostConfigChangeOperation("add") - HostConfigChangeOperationRemove = HostConfigChangeOperation("remove") - HostConfigChangeOperationEdit = HostConfigChangeOperation("edit") - HostConfigChangeOperationIgnore = HostConfigChangeOperation("ignore") -) - -func init() { - t["HostConfigChangeOperation"] = reflect.TypeOf((*HostConfigChangeOperation)(nil)).Elem() -} - -type HostCpuPackageVendor string - -const ( - HostCpuPackageVendorUnknown = HostCpuPackageVendor("unknown") - HostCpuPackageVendorIntel = HostCpuPackageVendor("intel") - HostCpuPackageVendorAmd = HostCpuPackageVendor("amd") - HostCpuPackageVendorHygon = HostCpuPackageVendor("hygon") -) - -func init() { - t["HostCpuPackageVendor"] = reflect.TypeOf((*HostCpuPackageVendor)(nil)).Elem() -} - -type HostCpuPowerManagementInfoPolicyType string - -const ( - HostCpuPowerManagementInfoPolicyTypeOff = HostCpuPowerManagementInfoPolicyType("off") - HostCpuPowerManagementInfoPolicyTypeStaticPolicy = HostCpuPowerManagementInfoPolicyType("staticPolicy") - HostCpuPowerManagementInfoPolicyTypeDynamicPolicy = HostCpuPowerManagementInfoPolicyType("dynamicPolicy") -) - -func init() { - t["HostCpuPowerManagementInfoPolicyType"] = reflect.TypeOf((*HostCpuPowerManagementInfoPolicyType)(nil)).Elem() -} - -type HostCryptoState string - -const ( - HostCryptoStateIncapable = HostCryptoState("incapable") - HostCryptoStatePrepared = HostCryptoState("prepared") - HostCryptoStateSafe = HostCryptoState("safe") - HostCryptoStatePendingIncapable = HostCryptoState("pendingIncapable") -) - -func init() { - t["HostCryptoState"] = reflect.TypeOf((*HostCryptoState)(nil)).Elem() -} - -type HostDVSConfigSpecSwitchMode string - -const ( - HostDVSConfigSpecSwitchModeNormal = HostDVSConfigSpecSwitchMode("normal") - HostDVSConfigSpecSwitchModeMux = HostDVSConfigSpecSwitchMode("mux") -) - -func init() { - t["HostDVSConfigSpecSwitchMode"] = reflect.TypeOf((*HostDVSConfigSpecSwitchMode)(nil)).Elem() -} - -type HostDasErrorEventHostDasErrorReason string - -const ( - HostDasErrorEventHostDasErrorReasonConfigFailed = HostDasErrorEventHostDasErrorReason("configFailed") - HostDasErrorEventHostDasErrorReasonTimeout = HostDasErrorEventHostDasErrorReason("timeout") - HostDasErrorEventHostDasErrorReasonCommunicationInitFailed = HostDasErrorEventHostDasErrorReason("communicationInitFailed") - HostDasErrorEventHostDasErrorReasonHealthCheckScriptFailed = HostDasErrorEventHostDasErrorReason("healthCheckScriptFailed") - HostDasErrorEventHostDasErrorReasonAgentFailed = HostDasErrorEventHostDasErrorReason("agentFailed") - HostDasErrorEventHostDasErrorReasonAgentShutdown = HostDasErrorEventHostDasErrorReason("agentShutdown") - HostDasErrorEventHostDasErrorReasonIsolationAddressUnpingable = HostDasErrorEventHostDasErrorReason("isolationAddressUnpingable") - HostDasErrorEventHostDasErrorReasonOther = HostDasErrorEventHostDasErrorReason("other") -) - -func init() { - t["HostDasErrorEventHostDasErrorReason"] = reflect.TypeOf((*HostDasErrorEventHostDasErrorReason)(nil)).Elem() -} - -type HostDateTimeInfoProtocol string - -const ( - HostDateTimeInfoProtocolNtp = HostDateTimeInfoProtocol("ntp") - HostDateTimeInfoProtocolPtp = HostDateTimeInfoProtocol("ptp") -) - -func init() { - t["HostDateTimeInfoProtocol"] = reflect.TypeOf((*HostDateTimeInfoProtocol)(nil)).Elem() -} - -type HostDigestInfoDigestMethodType string - -const ( - HostDigestInfoDigestMethodTypeSHA1 = HostDigestInfoDigestMethodType("SHA1") - HostDigestInfoDigestMethodTypeMD5 = HostDigestInfoDigestMethodType("MD5") - HostDigestInfoDigestMethodTypeSHA256 = HostDigestInfoDigestMethodType("SHA256") - HostDigestInfoDigestMethodTypeSHA384 = HostDigestInfoDigestMethodType("SHA384") - HostDigestInfoDigestMethodTypeSHA512 = HostDigestInfoDigestMethodType("SHA512") - HostDigestInfoDigestMethodTypeSM3_256 = HostDigestInfoDigestMethodType("SM3_256") -) - -func init() { - t["HostDigestInfoDigestMethodType"] = reflect.TypeOf((*HostDigestInfoDigestMethodType)(nil)).Elem() -} - -type HostDigestVerificationSetting string - -const ( - HostDigestVerificationSettingDigestDisabled = HostDigestVerificationSetting("digestDisabled") - HostDigestVerificationSettingHeaderOnly = HostDigestVerificationSetting("headerOnly") - HostDigestVerificationSettingDataOnly = HostDigestVerificationSetting("dataOnly") - HostDigestVerificationSettingHeaderAndData = HostDigestVerificationSetting("headerAndData") -) - -func init() { - t["HostDigestVerificationSetting"] = reflect.TypeOf((*HostDigestVerificationSetting)(nil)).Elem() -} - -type HostDisconnectedEventReasonCode string - -const ( - HostDisconnectedEventReasonCodeSslThumbprintVerifyFailed = HostDisconnectedEventReasonCode("sslThumbprintVerifyFailed") - HostDisconnectedEventReasonCodeLicenseExpired = HostDisconnectedEventReasonCode("licenseExpired") - HostDisconnectedEventReasonCodeAgentUpgrade = HostDisconnectedEventReasonCode("agentUpgrade") - HostDisconnectedEventReasonCodeUserRequest = HostDisconnectedEventReasonCode("userRequest") - HostDisconnectedEventReasonCodeInsufficientLicenses = HostDisconnectedEventReasonCode("insufficientLicenses") - HostDisconnectedEventReasonCodeAgentOutOfDate = HostDisconnectedEventReasonCode("agentOutOfDate") - HostDisconnectedEventReasonCodePasswordDecryptFailure = HostDisconnectedEventReasonCode("passwordDecryptFailure") - HostDisconnectedEventReasonCodeUnknown = HostDisconnectedEventReasonCode("unknown") - HostDisconnectedEventReasonCodeVcVRAMCapacityExceeded = HostDisconnectedEventReasonCode("vcVRAMCapacityExceeded") -) - -func init() { - t["HostDisconnectedEventReasonCode"] = reflect.TypeOf((*HostDisconnectedEventReasonCode)(nil)).Elem() -} - -type HostDiskPartitionInfoPartitionFormat string - -const ( - HostDiskPartitionInfoPartitionFormatGpt = HostDiskPartitionInfoPartitionFormat("gpt") - HostDiskPartitionInfoPartitionFormatMbr = HostDiskPartitionInfoPartitionFormat("mbr") - HostDiskPartitionInfoPartitionFormatUnknown = HostDiskPartitionInfoPartitionFormat("unknown") -) - -func init() { - t["HostDiskPartitionInfoPartitionFormat"] = reflect.TypeOf((*HostDiskPartitionInfoPartitionFormat)(nil)).Elem() -} - -type HostDiskPartitionInfoType string - -const ( - HostDiskPartitionInfoTypeNone = HostDiskPartitionInfoType("none") - HostDiskPartitionInfoTypeVmfs = HostDiskPartitionInfoType("vmfs") - HostDiskPartitionInfoTypeLinuxNative = HostDiskPartitionInfoType("linuxNative") - HostDiskPartitionInfoTypeLinuxSwap = HostDiskPartitionInfoType("linuxSwap") - HostDiskPartitionInfoTypeExtended = HostDiskPartitionInfoType("extended") - HostDiskPartitionInfoTypeNtfs = HostDiskPartitionInfoType("ntfs") - HostDiskPartitionInfoTypeVmkDiagnostic = HostDiskPartitionInfoType("vmkDiagnostic") - HostDiskPartitionInfoTypeVffs = HostDiskPartitionInfoType("vffs") -) - -func init() { - t["HostDiskPartitionInfoType"] = reflect.TypeOf((*HostDiskPartitionInfoType)(nil)).Elem() -} - -type HostFeatureVersionKey string - -const ( - HostFeatureVersionKeyFaultTolerance = HostFeatureVersionKey("faultTolerance") -) - -func init() { - t["HostFeatureVersionKey"] = reflect.TypeOf((*HostFeatureVersionKey)(nil)).Elem() -} - -type HostFileSystemVolumeFileSystemType string - -const ( - HostFileSystemVolumeFileSystemTypeVMFS = HostFileSystemVolumeFileSystemType("VMFS") - HostFileSystemVolumeFileSystemTypeNFS = HostFileSystemVolumeFileSystemType("NFS") - HostFileSystemVolumeFileSystemTypeNFS41 = HostFileSystemVolumeFileSystemType("NFS41") - HostFileSystemVolumeFileSystemTypeCIFS = HostFileSystemVolumeFileSystemType("CIFS") - HostFileSystemVolumeFileSystemTypeVsan = HostFileSystemVolumeFileSystemType("vsan") - HostFileSystemVolumeFileSystemTypeVFFS = HostFileSystemVolumeFileSystemType("VFFS") - HostFileSystemVolumeFileSystemTypeVVOL = HostFileSystemVolumeFileSystemType("VVOL") - HostFileSystemVolumeFileSystemTypePMEM = HostFileSystemVolumeFileSystemType("PMEM") - HostFileSystemVolumeFileSystemTypeVsanD = HostFileSystemVolumeFileSystemType("vsanD") - HostFileSystemVolumeFileSystemTypeOTHER = HostFileSystemVolumeFileSystemType("OTHER") -) - -func init() { - t["HostFileSystemVolumeFileSystemType"] = reflect.TypeOf((*HostFileSystemVolumeFileSystemType)(nil)).Elem() -} - -type HostFirewallRuleDirection string - -const ( - HostFirewallRuleDirectionInbound = HostFirewallRuleDirection("inbound") - HostFirewallRuleDirectionOutbound = HostFirewallRuleDirection("outbound") -) - -func init() { - t["HostFirewallRuleDirection"] = reflect.TypeOf((*HostFirewallRuleDirection)(nil)).Elem() -} - -type HostFirewallRulePortType string - -const ( - HostFirewallRulePortTypeSrc = HostFirewallRulePortType("src") - HostFirewallRulePortTypeDst = HostFirewallRulePortType("dst") -) - -func init() { - t["HostFirewallRulePortType"] = reflect.TypeOf((*HostFirewallRulePortType)(nil)).Elem() -} - -type HostFirewallRuleProtocol string - -const ( - HostFirewallRuleProtocolTcp = HostFirewallRuleProtocol("tcp") - HostFirewallRuleProtocolUdp = HostFirewallRuleProtocol("udp") -) - -func init() { - t["HostFirewallRuleProtocol"] = reflect.TypeOf((*HostFirewallRuleProtocol)(nil)).Elem() -} - -type HostFruFruType string - -const ( - HostFruFruTypeUndefined = HostFruFruType("undefined") - HostFruFruTypeBoard = HostFruFruType("board") - HostFruFruTypeProduct = HostFruFruType("product") -) - -func init() { - t["HostFruFruType"] = reflect.TypeOf((*HostFruFruType)(nil)).Elem() -} - -type HostGraphicsConfigGraphicsType string - -const ( - HostGraphicsConfigGraphicsTypeShared = HostGraphicsConfigGraphicsType("shared") - HostGraphicsConfigGraphicsTypeSharedDirect = HostGraphicsConfigGraphicsType("sharedDirect") -) - -func init() { - t["HostGraphicsConfigGraphicsType"] = reflect.TypeOf((*HostGraphicsConfigGraphicsType)(nil)).Elem() -} - -type HostGraphicsConfigSharedPassthruAssignmentPolicy string - -const ( - HostGraphicsConfigSharedPassthruAssignmentPolicyPerformance = HostGraphicsConfigSharedPassthruAssignmentPolicy("performance") - HostGraphicsConfigSharedPassthruAssignmentPolicyConsolidation = HostGraphicsConfigSharedPassthruAssignmentPolicy("consolidation") -) - -func init() { - t["HostGraphicsConfigSharedPassthruAssignmentPolicy"] = reflect.TypeOf((*HostGraphicsConfigSharedPassthruAssignmentPolicy)(nil)).Elem() -} - -type HostGraphicsInfoGraphicsType string - -const ( - HostGraphicsInfoGraphicsTypeBasic = HostGraphicsInfoGraphicsType("basic") - HostGraphicsInfoGraphicsTypeShared = HostGraphicsInfoGraphicsType("shared") - HostGraphicsInfoGraphicsTypeDirect = HostGraphicsInfoGraphicsType("direct") - HostGraphicsInfoGraphicsTypeSharedDirect = HostGraphicsInfoGraphicsType("sharedDirect") -) - -func init() { - t["HostGraphicsInfoGraphicsType"] = reflect.TypeOf((*HostGraphicsInfoGraphicsType)(nil)).Elem() -} - -type HostHardwareElementStatus string - -const ( - HostHardwareElementStatusUnknown = HostHardwareElementStatus("Unknown") - HostHardwareElementStatusGreen = HostHardwareElementStatus("Green") - HostHardwareElementStatusYellow = HostHardwareElementStatus("Yellow") - HostHardwareElementStatusRed = HostHardwareElementStatus("Red") -) - -func init() { - t["HostHardwareElementStatus"] = reflect.TypeOf((*HostHardwareElementStatus)(nil)).Elem() -} - -type HostHasComponentFailureHostComponentType string - -const ( - HostHasComponentFailureHostComponentTypeDatastore = HostHasComponentFailureHostComponentType("Datastore") -) - -func init() { - t["HostHasComponentFailureHostComponentType"] = reflect.TypeOf((*HostHasComponentFailureHostComponentType)(nil)).Elem() -} - -type HostImageAcceptanceLevel string - -const ( - HostImageAcceptanceLevelVmware_certified = HostImageAcceptanceLevel("vmware_certified") - HostImageAcceptanceLevelVmware_accepted = HostImageAcceptanceLevel("vmware_accepted") - HostImageAcceptanceLevelPartner = HostImageAcceptanceLevel("partner") - HostImageAcceptanceLevelCommunity = HostImageAcceptanceLevel("community") -) - -func init() { - t["HostImageAcceptanceLevel"] = reflect.TypeOf((*HostImageAcceptanceLevel)(nil)).Elem() -} - -type HostIncompatibleForFaultToleranceReason string - -const ( - HostIncompatibleForFaultToleranceReasonProduct = HostIncompatibleForFaultToleranceReason("product") - HostIncompatibleForFaultToleranceReasonProcessor = HostIncompatibleForFaultToleranceReason("processor") -) - -func init() { - t["HostIncompatibleForFaultToleranceReason"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceReason)(nil)).Elem() -} - -type HostIncompatibleForRecordReplayReason string - -const ( - HostIncompatibleForRecordReplayReasonProduct = HostIncompatibleForRecordReplayReason("product") - HostIncompatibleForRecordReplayReasonProcessor = HostIncompatibleForRecordReplayReason("processor") -) - -func init() { - t["HostIncompatibleForRecordReplayReason"] = reflect.TypeOf((*HostIncompatibleForRecordReplayReason)(nil)).Elem() -} - -type HostInternetScsiHbaChapAuthenticationType string - -const ( - HostInternetScsiHbaChapAuthenticationTypeChapProhibited = HostInternetScsiHbaChapAuthenticationType("chapProhibited") - HostInternetScsiHbaChapAuthenticationTypeChapDiscouraged = HostInternetScsiHbaChapAuthenticationType("chapDiscouraged") - HostInternetScsiHbaChapAuthenticationTypeChapPreferred = HostInternetScsiHbaChapAuthenticationType("chapPreferred") - HostInternetScsiHbaChapAuthenticationTypeChapRequired = HostInternetScsiHbaChapAuthenticationType("chapRequired") -) - -func init() { - t["HostInternetScsiHbaChapAuthenticationType"] = reflect.TypeOf((*HostInternetScsiHbaChapAuthenticationType)(nil)).Elem() -} - -type HostInternetScsiHbaDigestType string - -const ( - HostInternetScsiHbaDigestTypeDigestProhibited = HostInternetScsiHbaDigestType("digestProhibited") - HostInternetScsiHbaDigestTypeDigestDiscouraged = HostInternetScsiHbaDigestType("digestDiscouraged") - HostInternetScsiHbaDigestTypeDigestPreferred = HostInternetScsiHbaDigestType("digestPreferred") - HostInternetScsiHbaDigestTypeDigestRequired = HostInternetScsiHbaDigestType("digestRequired") -) - -func init() { - t["HostInternetScsiHbaDigestType"] = reflect.TypeOf((*HostInternetScsiHbaDigestType)(nil)).Elem() -} - -type HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType string - -const ( - HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeDHCP = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("DHCP") - HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeAutoConfigured = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("AutoConfigured") - HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeStatic = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Static") - HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationTypeOther = HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType("Other") -) - -func init() { - t["HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressAddressConfigurationType)(nil)).Elem() -} - -type HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation string - -const ( - HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationAdd = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("add") - HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperationRemove = HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation("remove") -) - -func init() { - t["HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6AddressIPv6AddressOperation)(nil)).Elem() -} - -type HostInternetScsiHbaNetworkBindingSupportType string - -const ( - HostInternetScsiHbaNetworkBindingSupportTypeNotsupported = HostInternetScsiHbaNetworkBindingSupportType("notsupported") - HostInternetScsiHbaNetworkBindingSupportTypeOptional = HostInternetScsiHbaNetworkBindingSupportType("optional") - HostInternetScsiHbaNetworkBindingSupportTypeRequired = HostInternetScsiHbaNetworkBindingSupportType("required") -) - -func init() { - t["HostInternetScsiHbaNetworkBindingSupportType"] = reflect.TypeOf((*HostInternetScsiHbaNetworkBindingSupportType)(nil)).Elem() -} - -type HostInternetScsiHbaStaticTargetTargetDiscoveryMethod string - -const ( - HostInternetScsiHbaStaticTargetTargetDiscoveryMethodStaticMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("staticMethod") - HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSendTargetMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("sendTargetMethod") - HostInternetScsiHbaStaticTargetTargetDiscoveryMethodSlpMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("slpMethod") - HostInternetScsiHbaStaticTargetTargetDiscoveryMethodIsnsMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("isnsMethod") - HostInternetScsiHbaStaticTargetTargetDiscoveryMethodUnknownMethod = HostInternetScsiHbaStaticTargetTargetDiscoveryMethod("unknownMethod") -) - -func init() { - t["HostInternetScsiHbaStaticTargetTargetDiscoveryMethod"] = reflect.TypeOf((*HostInternetScsiHbaStaticTargetTargetDiscoveryMethod)(nil)).Elem() -} - -type HostIpConfigIpV6AddressConfigType string - -const ( - HostIpConfigIpV6AddressConfigTypeOther = HostIpConfigIpV6AddressConfigType("other") - HostIpConfigIpV6AddressConfigTypeManual = HostIpConfigIpV6AddressConfigType("manual") - HostIpConfigIpV6AddressConfigTypeDhcp = HostIpConfigIpV6AddressConfigType("dhcp") - HostIpConfigIpV6AddressConfigTypeLinklayer = HostIpConfigIpV6AddressConfigType("linklayer") - HostIpConfigIpV6AddressConfigTypeRandom = HostIpConfigIpV6AddressConfigType("random") -) - -func init() { - t["HostIpConfigIpV6AddressConfigType"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfigType)(nil)).Elem() -} - -type HostIpConfigIpV6AddressStatus string - -const ( - HostIpConfigIpV6AddressStatusPreferred = HostIpConfigIpV6AddressStatus("preferred") - HostIpConfigIpV6AddressStatusDeprecated = HostIpConfigIpV6AddressStatus("deprecated") - HostIpConfigIpV6AddressStatusInvalid = HostIpConfigIpV6AddressStatus("invalid") - HostIpConfigIpV6AddressStatusInaccessible = HostIpConfigIpV6AddressStatus("inaccessible") - HostIpConfigIpV6AddressStatusUnknown = HostIpConfigIpV6AddressStatus("unknown") - HostIpConfigIpV6AddressStatusTentative = HostIpConfigIpV6AddressStatus("tentative") - HostIpConfigIpV6AddressStatusDuplicate = HostIpConfigIpV6AddressStatus("duplicate") -) - -func init() { - t["HostIpConfigIpV6AddressStatus"] = reflect.TypeOf((*HostIpConfigIpV6AddressStatus)(nil)).Elem() -} - -type HostLicensableResourceKey string - -const ( - HostLicensableResourceKeyNumCpuPackages = HostLicensableResourceKey("numCpuPackages") - HostLicensableResourceKeyNumCpuCores = HostLicensableResourceKey("numCpuCores") - HostLicensableResourceKeyMemorySize = HostLicensableResourceKey("memorySize") - HostLicensableResourceKeyMemoryForVms = HostLicensableResourceKey("memoryForVms") - HostLicensableResourceKeyNumVmsStarted = HostLicensableResourceKey("numVmsStarted") - HostLicensableResourceKeyNumVmsStarting = HostLicensableResourceKey("numVmsStarting") -) - -func init() { - t["HostLicensableResourceKey"] = reflect.TypeOf((*HostLicensableResourceKey)(nil)).Elem() -} - -type HostLockdownMode string - -const ( - HostLockdownModeLockdownDisabled = HostLockdownMode("lockdownDisabled") - HostLockdownModeLockdownNormal = HostLockdownMode("lockdownNormal") - HostLockdownModeLockdownStrict = HostLockdownMode("lockdownStrict") -) - -func init() { - t["HostLockdownMode"] = reflect.TypeOf((*HostLockdownMode)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerFileType string - -const ( - HostLowLevelProvisioningManagerFileTypeFile = HostLowLevelProvisioningManagerFileType("File") - HostLowLevelProvisioningManagerFileTypeVirtualDisk = HostLowLevelProvisioningManagerFileType("VirtualDisk") - HostLowLevelProvisioningManagerFileTypeDirectory = HostLowLevelProvisioningManagerFileType("Directory") -) - -func init() { - t["HostLowLevelProvisioningManagerFileType"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileType)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerReloadTarget string - -const ( - HostLowLevelProvisioningManagerReloadTargetCurrentConfig = HostLowLevelProvisioningManagerReloadTarget("currentConfig") - HostLowLevelProvisioningManagerReloadTargetSnapshotConfig = HostLowLevelProvisioningManagerReloadTarget("snapshotConfig") -) - -func init() { - t["HostLowLevelProvisioningManagerReloadTarget"] = reflect.TypeOf((*HostLowLevelProvisioningManagerReloadTarget)(nil)).Elem() -} - -type HostMaintenanceSpecPurpose string - -const ( - HostMaintenanceSpecPurposeHostUpgrade = HostMaintenanceSpecPurpose("hostUpgrade") -) - -func init() { - t["HostMaintenanceSpecPurpose"] = reflect.TypeOf((*HostMaintenanceSpecPurpose)(nil)).Elem() -} - -type HostMemoryTierFlags string - -const ( - HostMemoryTierFlagsMemoryTier = HostMemoryTierFlags("memoryTier") - HostMemoryTierFlagsPersistentTier = HostMemoryTierFlags("persistentTier") - HostMemoryTierFlagsCachingTier = HostMemoryTierFlags("cachingTier") -) - -func init() { - t["HostMemoryTierFlags"] = reflect.TypeOf((*HostMemoryTierFlags)(nil)).Elem() -} - -type HostMemoryTierType string - -const ( - HostMemoryTierTypeDRAM = HostMemoryTierType("DRAM") - HostMemoryTierTypePMem = HostMemoryTierType("PMem") -) - -func init() { - t["HostMemoryTierType"] = reflect.TypeOf((*HostMemoryTierType)(nil)).Elem() -} - -type HostMemoryTieringType string - -const ( - HostMemoryTieringTypeNoTiering = HostMemoryTieringType("noTiering") - HostMemoryTieringTypeHardwareTiering = HostMemoryTieringType("hardwareTiering") -) - -func init() { - t["HostMemoryTieringType"] = reflect.TypeOf((*HostMemoryTieringType)(nil)).Elem() -} - -type HostMountInfoInaccessibleReason string - -const ( - HostMountInfoInaccessibleReasonAllPathsDown_Start = HostMountInfoInaccessibleReason("AllPathsDown_Start") - HostMountInfoInaccessibleReasonAllPathsDown_Timeout = HostMountInfoInaccessibleReason("AllPathsDown_Timeout") - HostMountInfoInaccessibleReasonPermanentDeviceLoss = HostMountInfoInaccessibleReason("PermanentDeviceLoss") -) - -func init() { - t["HostMountInfoInaccessibleReason"] = reflect.TypeOf((*HostMountInfoInaccessibleReason)(nil)).Elem() -} - -type HostMountInfoMountFailedReason string - -const ( - HostMountInfoMountFailedReasonCONNECT_FAILURE = HostMountInfoMountFailedReason("CONNECT_FAILURE") - HostMountInfoMountFailedReasonMOUNT_NOT_SUPPORTED = HostMountInfoMountFailedReason("MOUNT_NOT_SUPPORTED") - HostMountInfoMountFailedReasonNFS_NOT_SUPPORTED = HostMountInfoMountFailedReason("NFS_NOT_SUPPORTED") - HostMountInfoMountFailedReasonMOUNT_DENIED = HostMountInfoMountFailedReason("MOUNT_DENIED") - HostMountInfoMountFailedReasonMOUNT_NOT_DIR = HostMountInfoMountFailedReason("MOUNT_NOT_DIR") - HostMountInfoMountFailedReasonVOLUME_LIMIT_EXCEEDED = HostMountInfoMountFailedReason("VOLUME_LIMIT_EXCEEDED") - HostMountInfoMountFailedReasonCONN_LIMIT_EXCEEDED = HostMountInfoMountFailedReason("CONN_LIMIT_EXCEEDED") - HostMountInfoMountFailedReasonMOUNT_EXISTS = HostMountInfoMountFailedReason("MOUNT_EXISTS") - HostMountInfoMountFailedReasonOTHERS = HostMountInfoMountFailedReason("OTHERS") -) - -func init() { - t["HostMountInfoMountFailedReason"] = reflect.TypeOf((*HostMountInfoMountFailedReason)(nil)).Elem() -} - -type HostMountMode string - -const ( - HostMountModeReadWrite = HostMountMode("readWrite") - HostMountModeReadOnly = HostMountMode("readOnly") -) - -func init() { - t["HostMountMode"] = reflect.TypeOf((*HostMountMode)(nil)).Elem() -} - -type HostNasVolumeSecurityType string - -const ( - HostNasVolumeSecurityTypeAUTH_SYS = HostNasVolumeSecurityType("AUTH_SYS") - HostNasVolumeSecurityTypeSEC_KRB5 = HostNasVolumeSecurityType("SEC_KRB5") - HostNasVolumeSecurityTypeSEC_KRB5I = HostNasVolumeSecurityType("SEC_KRB5I") -) - -func init() { - t["HostNasVolumeSecurityType"] = reflect.TypeOf((*HostNasVolumeSecurityType)(nil)).Elem() -} - -type HostNetStackInstanceCongestionControlAlgorithmType string - -const ( - HostNetStackInstanceCongestionControlAlgorithmTypeNewreno = HostNetStackInstanceCongestionControlAlgorithmType("newreno") - HostNetStackInstanceCongestionControlAlgorithmTypeCubic = HostNetStackInstanceCongestionControlAlgorithmType("cubic") -) - -func init() { - t["HostNetStackInstanceCongestionControlAlgorithmType"] = reflect.TypeOf((*HostNetStackInstanceCongestionControlAlgorithmType)(nil)).Elem() -} - -type HostNetStackInstanceSystemStackKey string - -const ( - HostNetStackInstanceSystemStackKeyDefaultTcpipStack = HostNetStackInstanceSystemStackKey("defaultTcpipStack") - HostNetStackInstanceSystemStackKeyVmotion = HostNetStackInstanceSystemStackKey("vmotion") - HostNetStackInstanceSystemStackKeyVSphereProvisioning = HostNetStackInstanceSystemStackKey("vSphereProvisioning") - HostNetStackInstanceSystemStackKeyMirror = HostNetStackInstanceSystemStackKey("mirror") - HostNetStackInstanceSystemStackKeyOps = HostNetStackInstanceSystemStackKey("ops") -) - -func init() { - t["HostNetStackInstanceSystemStackKey"] = reflect.TypeOf((*HostNetStackInstanceSystemStackKey)(nil)).Elem() -} - -type HostNumericSensorHealthState string - -const ( - HostNumericSensorHealthStateUnknown = HostNumericSensorHealthState("unknown") - HostNumericSensorHealthStateGreen = HostNumericSensorHealthState("green") - HostNumericSensorHealthStateYellow = HostNumericSensorHealthState("yellow") - HostNumericSensorHealthStateRed = HostNumericSensorHealthState("red") -) - -func init() { - t["HostNumericSensorHealthState"] = reflect.TypeOf((*HostNumericSensorHealthState)(nil)).Elem() -} - -type HostNumericSensorType string - -const ( - HostNumericSensorTypeFan = HostNumericSensorType("fan") - HostNumericSensorTypePower = HostNumericSensorType("power") - HostNumericSensorTypeTemperature = HostNumericSensorType("temperature") - HostNumericSensorTypeVoltage = HostNumericSensorType("voltage") - HostNumericSensorTypeOther = HostNumericSensorType("other") - HostNumericSensorTypeProcessor = HostNumericSensorType("processor") - HostNumericSensorTypeMemory = HostNumericSensorType("memory") - HostNumericSensorTypeStorage = HostNumericSensorType("storage") - HostNumericSensorTypeSystemBoard = HostNumericSensorType("systemBoard") - HostNumericSensorTypeBattery = HostNumericSensorType("battery") - HostNumericSensorTypeBios = HostNumericSensorType("bios") - HostNumericSensorTypeCable = HostNumericSensorType("cable") - HostNumericSensorTypeWatchdog = HostNumericSensorType("watchdog") -) - -func init() { - t["HostNumericSensorType"] = reflect.TypeOf((*HostNumericSensorType)(nil)).Elem() -} - -type HostNvmeDiscoveryLogSubsystemType string - -const ( - HostNvmeDiscoveryLogSubsystemTypeDiscovery = HostNvmeDiscoveryLogSubsystemType("discovery") - HostNvmeDiscoveryLogSubsystemTypeNvm = HostNvmeDiscoveryLogSubsystemType("nvm") -) - -func init() { - t["HostNvmeDiscoveryLogSubsystemType"] = reflect.TypeOf((*HostNvmeDiscoveryLogSubsystemType)(nil)).Elem() -} - -type HostNvmeDiscoveryLogTransportRequirements string - -const ( - HostNvmeDiscoveryLogTransportRequirementsSecureChannelRequired = HostNvmeDiscoveryLogTransportRequirements("secureChannelRequired") - HostNvmeDiscoveryLogTransportRequirementsSecureChannelNotRequired = HostNvmeDiscoveryLogTransportRequirements("secureChannelNotRequired") - HostNvmeDiscoveryLogTransportRequirementsRequirementsNotSpecified = HostNvmeDiscoveryLogTransportRequirements("requirementsNotSpecified") -) - -func init() { - t["HostNvmeDiscoveryLogTransportRequirements"] = reflect.TypeOf((*HostNvmeDiscoveryLogTransportRequirements)(nil)).Elem() -} - -type HostNvmeTransportParametersNvmeAddressFamily string - -const ( - HostNvmeTransportParametersNvmeAddressFamilyIpv4 = HostNvmeTransportParametersNvmeAddressFamily("ipv4") - HostNvmeTransportParametersNvmeAddressFamilyIpv6 = HostNvmeTransportParametersNvmeAddressFamily("ipv6") - HostNvmeTransportParametersNvmeAddressFamilyInfiniBand = HostNvmeTransportParametersNvmeAddressFamily("infiniBand") - HostNvmeTransportParametersNvmeAddressFamilyFc = HostNvmeTransportParametersNvmeAddressFamily("fc") - HostNvmeTransportParametersNvmeAddressFamilyLoopback = HostNvmeTransportParametersNvmeAddressFamily("loopback") - HostNvmeTransportParametersNvmeAddressFamilyUnknown = HostNvmeTransportParametersNvmeAddressFamily("unknown") -) - -func init() { - t["HostNvmeTransportParametersNvmeAddressFamily"] = reflect.TypeOf((*HostNvmeTransportParametersNvmeAddressFamily)(nil)).Elem() -} - -type HostNvmeTransportType string - -const ( - HostNvmeTransportTypePcie = HostNvmeTransportType("pcie") - HostNvmeTransportTypeFibreChannel = HostNvmeTransportType("fibreChannel") - HostNvmeTransportTypeRdma = HostNvmeTransportType("rdma") - HostNvmeTransportTypeTcp = HostNvmeTransportType("tcp") - HostNvmeTransportTypeLoopback = HostNvmeTransportType("loopback") - HostNvmeTransportTypeUnsupported = HostNvmeTransportType("unsupported") -) - -func init() { - t["HostNvmeTransportType"] = reflect.TypeOf((*HostNvmeTransportType)(nil)).Elem() -} - -type HostOpaqueSwitchOpaqueSwitchState string - -const ( - HostOpaqueSwitchOpaqueSwitchStateUp = HostOpaqueSwitchOpaqueSwitchState("up") - HostOpaqueSwitchOpaqueSwitchStateWarning = HostOpaqueSwitchOpaqueSwitchState("warning") - HostOpaqueSwitchOpaqueSwitchStateDown = HostOpaqueSwitchOpaqueSwitchState("down") - HostOpaqueSwitchOpaqueSwitchStateMaintenance = HostOpaqueSwitchOpaqueSwitchState("maintenance") -) - -func init() { - t["HostOpaqueSwitchOpaqueSwitchState"] = reflect.TypeOf((*HostOpaqueSwitchOpaqueSwitchState)(nil)).Elem() -} - -type HostPatchManagerInstallState string - -const ( - HostPatchManagerInstallStateHostRestarted = HostPatchManagerInstallState("hostRestarted") - HostPatchManagerInstallStateImageActive = HostPatchManagerInstallState("imageActive") -) - -func init() { - t["HostPatchManagerInstallState"] = reflect.TypeOf((*HostPatchManagerInstallState)(nil)).Elem() -} - -type HostPatchManagerIntegrityStatus string - -const ( - HostPatchManagerIntegrityStatusValidated = HostPatchManagerIntegrityStatus("validated") - HostPatchManagerIntegrityStatusKeyNotFound = HostPatchManagerIntegrityStatus("keyNotFound") - HostPatchManagerIntegrityStatusKeyRevoked = HostPatchManagerIntegrityStatus("keyRevoked") - HostPatchManagerIntegrityStatusKeyExpired = HostPatchManagerIntegrityStatus("keyExpired") - HostPatchManagerIntegrityStatusDigestMismatch = HostPatchManagerIntegrityStatus("digestMismatch") - HostPatchManagerIntegrityStatusNotEnoughSignatures = HostPatchManagerIntegrityStatus("notEnoughSignatures") - HostPatchManagerIntegrityStatusValidationError = HostPatchManagerIntegrityStatus("validationError") -) - -func init() { - t["HostPatchManagerIntegrityStatus"] = reflect.TypeOf((*HostPatchManagerIntegrityStatus)(nil)).Elem() -} - -type HostPatchManagerReason string - -const ( - HostPatchManagerReasonObsoleted = HostPatchManagerReason("obsoleted") - HostPatchManagerReasonMissingPatch = HostPatchManagerReason("missingPatch") - HostPatchManagerReasonMissingLib = HostPatchManagerReason("missingLib") - HostPatchManagerReasonHasDependentPatch = HostPatchManagerReason("hasDependentPatch") - HostPatchManagerReasonConflictPatch = HostPatchManagerReason("conflictPatch") - HostPatchManagerReasonConflictLib = HostPatchManagerReason("conflictLib") -) - -func init() { - t["HostPatchManagerReason"] = reflect.TypeOf((*HostPatchManagerReason)(nil)).Elem() -} - -type HostPowerOperationType string - -const ( - HostPowerOperationTypePowerOn = HostPowerOperationType("powerOn") - HostPowerOperationTypePowerOff = HostPowerOperationType("powerOff") -) - -func init() { - t["HostPowerOperationType"] = reflect.TypeOf((*HostPowerOperationType)(nil)).Elem() -} - -type HostProfileManagerAnswerFileStatus string - -const ( - HostProfileManagerAnswerFileStatusValid = HostProfileManagerAnswerFileStatus("valid") - HostProfileManagerAnswerFileStatusInvalid = HostProfileManagerAnswerFileStatus("invalid") - HostProfileManagerAnswerFileStatusUnknown = HostProfileManagerAnswerFileStatus("unknown") -) - -func init() { - t["HostProfileManagerAnswerFileStatus"] = reflect.TypeOf((*HostProfileManagerAnswerFileStatus)(nil)).Elem() -} - -type HostProfileManagerCompositionResultResultElementStatus string - -const ( - HostProfileManagerCompositionResultResultElementStatusSuccess = HostProfileManagerCompositionResultResultElementStatus("success") - HostProfileManagerCompositionResultResultElementStatusError = HostProfileManagerCompositionResultResultElementStatus("error") -) - -func init() { - t["HostProfileManagerCompositionResultResultElementStatus"] = reflect.TypeOf((*HostProfileManagerCompositionResultResultElementStatus)(nil)).Elem() -} - -type HostProfileManagerCompositionValidationResultResultElementStatus string - -const ( - HostProfileManagerCompositionValidationResultResultElementStatusSuccess = HostProfileManagerCompositionValidationResultResultElementStatus("success") - HostProfileManagerCompositionValidationResultResultElementStatusError = HostProfileManagerCompositionValidationResultResultElementStatus("error") -) - -func init() { - t["HostProfileManagerCompositionValidationResultResultElementStatus"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResultResultElementStatus)(nil)).Elem() -} - -type HostProfileManagerTaskListRequirement string - -const ( - HostProfileManagerTaskListRequirementMaintenanceModeRequired = HostProfileManagerTaskListRequirement("maintenanceModeRequired") - HostProfileManagerTaskListRequirementRebootRequired = HostProfileManagerTaskListRequirement("rebootRequired") -) - -func init() { - t["HostProfileManagerTaskListRequirement"] = reflect.TypeOf((*HostProfileManagerTaskListRequirement)(nil)).Elem() -} - -type HostProfileValidationFailureInfoUpdateType string - -const ( - HostProfileValidationFailureInfoUpdateTypeHostBased = HostProfileValidationFailureInfoUpdateType("HostBased") - HostProfileValidationFailureInfoUpdateTypeImport = HostProfileValidationFailureInfoUpdateType("Import") - HostProfileValidationFailureInfoUpdateTypeEdit = HostProfileValidationFailureInfoUpdateType("Edit") - HostProfileValidationFailureInfoUpdateTypeCompose = HostProfileValidationFailureInfoUpdateType("Compose") -) - -func init() { - t["HostProfileValidationFailureInfoUpdateType"] = reflect.TypeOf((*HostProfileValidationFailureInfoUpdateType)(nil)).Elem() -} - -type HostProfileValidationState string - -const ( - HostProfileValidationStateReady = HostProfileValidationState("Ready") - HostProfileValidationStateRunning = HostProfileValidationState("Running") - HostProfileValidationStateFailed = HostProfileValidationState("Failed") -) - -func init() { - t["HostProfileValidationState"] = reflect.TypeOf((*HostProfileValidationState)(nil)).Elem() -} - -type HostProtocolEndpointPEType string - -const ( - HostProtocolEndpointPETypeBlock = HostProtocolEndpointPEType("block") - HostProtocolEndpointPETypeNas = HostProtocolEndpointPEType("nas") -) - -func init() { - t["HostProtocolEndpointPEType"] = reflect.TypeOf((*HostProtocolEndpointPEType)(nil)).Elem() -} - -type HostProtocolEndpointProtocolEndpointType string - -const ( - HostProtocolEndpointProtocolEndpointTypeScsi = HostProtocolEndpointProtocolEndpointType("scsi") - HostProtocolEndpointProtocolEndpointTypeNfs = HostProtocolEndpointProtocolEndpointType("nfs") - HostProtocolEndpointProtocolEndpointTypeNfs4x = HostProtocolEndpointProtocolEndpointType("nfs4x") -) - -func init() { - t["HostProtocolEndpointProtocolEndpointType"] = reflect.TypeOf((*HostProtocolEndpointProtocolEndpointType)(nil)).Elem() -} - -type HostPtpConfigDeviceType string - -const ( - HostPtpConfigDeviceTypeNone = HostPtpConfigDeviceType("none") - HostPtpConfigDeviceTypeVirtualNic = HostPtpConfigDeviceType("virtualNic") - HostPtpConfigDeviceTypePciPassthruNic = HostPtpConfigDeviceType("pciPassthruNic") -) - -func init() { - t["HostPtpConfigDeviceType"] = reflect.TypeOf((*HostPtpConfigDeviceType)(nil)).Elem() -} - -type HostQualifiedNameType string - -const ( - HostQualifiedNameTypeNvmeQualifiedName = HostQualifiedNameType("nvmeQualifiedName") - HostQualifiedNameTypeVvolNvmeQualifiedName = HostQualifiedNameType("vvolNvmeQualifiedName") -) - -func init() { - t["HostQualifiedNameType"] = reflect.TypeOf((*HostQualifiedNameType)(nil)).Elem() -} - -type HostRdmaDeviceConnectionState string - -const ( - HostRdmaDeviceConnectionStateUnknown = HostRdmaDeviceConnectionState("unknown") - HostRdmaDeviceConnectionStateDown = HostRdmaDeviceConnectionState("down") - HostRdmaDeviceConnectionStateInit = HostRdmaDeviceConnectionState("init") - HostRdmaDeviceConnectionStateArmed = HostRdmaDeviceConnectionState("armed") - HostRdmaDeviceConnectionStateActive = HostRdmaDeviceConnectionState("active") - HostRdmaDeviceConnectionStateActiveDefer = HostRdmaDeviceConnectionState("activeDefer") -) - -func init() { - t["HostRdmaDeviceConnectionState"] = reflect.TypeOf((*HostRdmaDeviceConnectionState)(nil)).Elem() -} - -type HostReplayUnsupportedReason string - -const ( - HostReplayUnsupportedReasonIncompatibleProduct = HostReplayUnsupportedReason("incompatibleProduct") - HostReplayUnsupportedReasonIncompatibleCpu = HostReplayUnsupportedReason("incompatibleCpu") - HostReplayUnsupportedReasonHvDisabled = HostReplayUnsupportedReason("hvDisabled") - HostReplayUnsupportedReasonCpuidLimitSet = HostReplayUnsupportedReason("cpuidLimitSet") - HostReplayUnsupportedReasonOldBIOS = HostReplayUnsupportedReason("oldBIOS") - HostReplayUnsupportedReasonUnknown = HostReplayUnsupportedReason("unknown") -) - -func init() { - t["HostReplayUnsupportedReason"] = reflect.TypeOf((*HostReplayUnsupportedReason)(nil)).Elem() -} - -type HostRuntimeInfoNetStackInstanceRuntimeInfoState string - -const ( - HostRuntimeInfoNetStackInstanceRuntimeInfoStateInactive = HostRuntimeInfoNetStackInstanceRuntimeInfoState("inactive") - HostRuntimeInfoNetStackInstanceRuntimeInfoStateActive = HostRuntimeInfoNetStackInstanceRuntimeInfoState("active") - HostRuntimeInfoNetStackInstanceRuntimeInfoStateDeactivating = HostRuntimeInfoNetStackInstanceRuntimeInfoState("deactivating") - HostRuntimeInfoNetStackInstanceRuntimeInfoStateActivating = HostRuntimeInfoNetStackInstanceRuntimeInfoState("activating") -) - -func init() { - t["HostRuntimeInfoNetStackInstanceRuntimeInfoState"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfoState)(nil)).Elem() -} - -type HostRuntimeInfoStateEncryptionInfoProtectionMode string - -const ( - HostRuntimeInfoStateEncryptionInfoProtectionModeNone = HostRuntimeInfoStateEncryptionInfoProtectionMode("none") - HostRuntimeInfoStateEncryptionInfoProtectionModeTpm = HostRuntimeInfoStateEncryptionInfoProtectionMode("tpm") -) - -func init() { - t["HostRuntimeInfoStateEncryptionInfoProtectionMode"] = reflect.TypeOf((*HostRuntimeInfoStateEncryptionInfoProtectionMode)(nil)).Elem() -} - -type HostRuntimeInfoStatelessNvdsMigrationState string - -const ( - HostRuntimeInfoStatelessNvdsMigrationStateReady = HostRuntimeInfoStatelessNvdsMigrationState("ready") - HostRuntimeInfoStatelessNvdsMigrationStateNotNeeded = HostRuntimeInfoStatelessNvdsMigrationState("notNeeded") - HostRuntimeInfoStatelessNvdsMigrationStateUnknown = HostRuntimeInfoStatelessNvdsMigrationState("unknown") -) - -func init() { - t["HostRuntimeInfoStatelessNvdsMigrationState"] = reflect.TypeOf((*HostRuntimeInfoStatelessNvdsMigrationState)(nil)).Elem() -} - -type HostServicePolicy string - -const ( - HostServicePolicyOn = HostServicePolicy("on") - HostServicePolicyAutomatic = HostServicePolicy("automatic") - HostServicePolicyOff = HostServicePolicy("off") -) - -func init() { - t["HostServicePolicy"] = reflect.TypeOf((*HostServicePolicy)(nil)).Elem() -} - -type HostSevInfoSevState string - -const ( - HostSevInfoSevStateUninitialized = HostSevInfoSevState("uninitialized") - HostSevInfoSevStateInitialized = HostSevInfoSevState("initialized") - HostSevInfoSevStateWorking = HostSevInfoSevState("working") -) - -func init() { - t["HostSevInfoSevState"] = reflect.TypeOf((*HostSevInfoSevState)(nil)).Elem() -} - -type HostSgxInfoFlcModes string - -const ( - HostSgxInfoFlcModesOff = HostSgxInfoFlcModes("off") - HostSgxInfoFlcModesLocked = HostSgxInfoFlcModes("locked") - HostSgxInfoFlcModesUnlocked = HostSgxInfoFlcModes("unlocked") -) - -func init() { - t["HostSgxInfoFlcModes"] = reflect.TypeOf((*HostSgxInfoFlcModes)(nil)).Elem() -} - -type HostSgxInfoSgxStates string - -const ( - HostSgxInfoSgxStatesNotPresent = HostSgxInfoSgxStates("notPresent") - HostSgxInfoSgxStatesDisabledBIOS = HostSgxInfoSgxStates("disabledBIOS") - HostSgxInfoSgxStatesDisabledCFW101 = HostSgxInfoSgxStates("disabledCFW101") - HostSgxInfoSgxStatesDisabledCPUMismatch = HostSgxInfoSgxStates("disabledCPUMismatch") - HostSgxInfoSgxStatesDisabledNoFLC = HostSgxInfoSgxStates("disabledNoFLC") - HostSgxInfoSgxStatesDisabledNUMAUnsup = HostSgxInfoSgxStates("disabledNUMAUnsup") - HostSgxInfoSgxStatesDisabledMaxEPCRegs = HostSgxInfoSgxStates("disabledMaxEPCRegs") - HostSgxInfoSgxStatesEnabled = HostSgxInfoSgxStates("enabled") -) - -func init() { - t["HostSgxInfoSgxStates"] = reflect.TypeOf((*HostSgxInfoSgxStates)(nil)).Elem() -} - -type HostSgxRegistrationInfoRegistrationStatus string - -const ( - HostSgxRegistrationInfoRegistrationStatusNotApplicable = HostSgxRegistrationInfoRegistrationStatus("notApplicable") - HostSgxRegistrationInfoRegistrationStatusIncomplete = HostSgxRegistrationInfoRegistrationStatus("incomplete") - HostSgxRegistrationInfoRegistrationStatusComplete = HostSgxRegistrationInfoRegistrationStatus("complete") -) - -func init() { - t["HostSgxRegistrationInfoRegistrationStatus"] = reflect.TypeOf((*HostSgxRegistrationInfoRegistrationStatus)(nil)).Elem() -} - -type HostSgxRegistrationInfoRegistrationType string - -const ( - HostSgxRegistrationInfoRegistrationTypeManifest = HostSgxRegistrationInfoRegistrationType("manifest") - HostSgxRegistrationInfoRegistrationTypeAddPackage = HostSgxRegistrationInfoRegistrationType("addPackage") -) - -func init() { - t["HostSgxRegistrationInfoRegistrationType"] = reflect.TypeOf((*HostSgxRegistrationInfoRegistrationType)(nil)).Elem() -} - -type HostSnmpAgentCapability string - -const ( - HostSnmpAgentCapabilityCOMPLETE = HostSnmpAgentCapability("COMPLETE") - HostSnmpAgentCapabilityDIAGNOSTICS = HostSnmpAgentCapability("DIAGNOSTICS") - HostSnmpAgentCapabilityCONFIGURATION = HostSnmpAgentCapability("CONFIGURATION") -) - -func init() { - t["HostSnmpAgentCapability"] = reflect.TypeOf((*HostSnmpAgentCapability)(nil)).Elem() -} - -type HostStandbyMode string - -const ( - HostStandbyModeEntering = HostStandbyMode("entering") - HostStandbyModeExiting = HostStandbyMode("exiting") - HostStandbyModeIn = HostStandbyMode("in") - HostStandbyModeNone = HostStandbyMode("none") -) - -func init() { - t["HostStandbyMode"] = reflect.TypeOf((*HostStandbyMode)(nil)).Elem() -} - -type HostStorageProtocol string - -const ( - HostStorageProtocolScsi = HostStorageProtocol("scsi") - HostStorageProtocolNvme = HostStorageProtocol("nvme") -) - -func init() { - t["HostStorageProtocol"] = reflect.TypeOf((*HostStorageProtocol)(nil)).Elem() -} - -type HostSystemConnectionState string - -const ( - HostSystemConnectionStateConnected = HostSystemConnectionState("connected") - HostSystemConnectionStateNotResponding = HostSystemConnectionState("notResponding") - HostSystemConnectionStateDisconnected = HostSystemConnectionState("disconnected") -) - -func init() { - t["HostSystemConnectionState"] = reflect.TypeOf((*HostSystemConnectionState)(nil)).Elem() -} - -type HostSystemIdentificationInfoIdentifier string - -const ( - HostSystemIdentificationInfoIdentifierAssetTag = HostSystemIdentificationInfoIdentifier("AssetTag") - HostSystemIdentificationInfoIdentifierServiceTag = HostSystemIdentificationInfoIdentifier("ServiceTag") - HostSystemIdentificationInfoIdentifierOemSpecificString = HostSystemIdentificationInfoIdentifier("OemSpecificString") - HostSystemIdentificationInfoIdentifierEnclosureSerialNumberTag = HostSystemIdentificationInfoIdentifier("EnclosureSerialNumberTag") - HostSystemIdentificationInfoIdentifierSerialNumberTag = HostSystemIdentificationInfoIdentifier("SerialNumberTag") -) - -func init() { - t["HostSystemIdentificationInfoIdentifier"] = reflect.TypeOf((*HostSystemIdentificationInfoIdentifier)(nil)).Elem() -} - -type HostSystemPowerState string - -const ( - HostSystemPowerStatePoweredOn = HostSystemPowerState("poweredOn") - HostSystemPowerStatePoweredOff = HostSystemPowerState("poweredOff") - HostSystemPowerStateStandBy = HostSystemPowerState("standBy") - HostSystemPowerStateUnknown = HostSystemPowerState("unknown") -) - -func init() { - t["HostSystemPowerState"] = reflect.TypeOf((*HostSystemPowerState)(nil)).Elem() -} - -type HostSystemRemediationStateState string - -const ( - HostSystemRemediationStateStateRemediationReady = HostSystemRemediationStateState("remediationReady") - HostSystemRemediationStateStatePrecheckRemediationRunning = HostSystemRemediationStateState("precheckRemediationRunning") - HostSystemRemediationStateStatePrecheckRemediationComplete = HostSystemRemediationStateState("precheckRemediationComplete") - HostSystemRemediationStateStatePrecheckRemediationFailed = HostSystemRemediationStateState("precheckRemediationFailed") - HostSystemRemediationStateStateRemediationRunning = HostSystemRemediationStateState("remediationRunning") - HostSystemRemediationStateStateRemediationFailed = HostSystemRemediationStateState("remediationFailed") -) - -func init() { - t["HostSystemRemediationStateState"] = reflect.TypeOf((*HostSystemRemediationStateState)(nil)).Elem() -} - -type HostTpmAttestationInfoAcceptanceStatus string - -const ( - HostTpmAttestationInfoAcceptanceStatusNotAccepted = HostTpmAttestationInfoAcceptanceStatus("notAccepted") - HostTpmAttestationInfoAcceptanceStatusAccepted = HostTpmAttestationInfoAcceptanceStatus("accepted") -) - -func init() { - t["HostTpmAttestationInfoAcceptanceStatus"] = reflect.TypeOf((*HostTpmAttestationInfoAcceptanceStatus)(nil)).Elem() -} - -type HostTrustAuthorityAttestationInfoAttestationStatus string - -const ( - HostTrustAuthorityAttestationInfoAttestationStatusAttested = HostTrustAuthorityAttestationInfoAttestationStatus("attested") - HostTrustAuthorityAttestationInfoAttestationStatusNotAttested = HostTrustAuthorityAttestationInfoAttestationStatus("notAttested") - HostTrustAuthorityAttestationInfoAttestationStatusUnknown = HostTrustAuthorityAttestationInfoAttestationStatus("unknown") -) - -func init() { - t["HostTrustAuthorityAttestationInfoAttestationStatus"] = reflect.TypeOf((*HostTrustAuthorityAttestationInfoAttestationStatus)(nil)).Elem() -} - -type HostUnresolvedVmfsExtentUnresolvedReason string - -const ( - HostUnresolvedVmfsExtentUnresolvedReasonDiskIdMismatch = HostUnresolvedVmfsExtentUnresolvedReason("diskIdMismatch") - HostUnresolvedVmfsExtentUnresolvedReasonUuidConflict = HostUnresolvedVmfsExtentUnresolvedReason("uuidConflict") -) - -func init() { - t["HostUnresolvedVmfsExtentUnresolvedReason"] = reflect.TypeOf((*HostUnresolvedVmfsExtentUnresolvedReason)(nil)).Elem() -} - -type HostUnresolvedVmfsResolutionSpecVmfsUuidResolution string - -const ( - HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionResignature = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("resignature") - HostUnresolvedVmfsResolutionSpecVmfsUuidResolutionForceMount = HostUnresolvedVmfsResolutionSpecVmfsUuidResolution("forceMount") -) - -func init() { - t["HostUnresolvedVmfsResolutionSpecVmfsUuidResolution"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpecVmfsUuidResolution)(nil)).Elem() -} - -type HostVirtualNicManagerNicType string - -const ( - HostVirtualNicManagerNicTypeVmotion = HostVirtualNicManagerNicType("vmotion") - HostVirtualNicManagerNicTypeFaultToleranceLogging = HostVirtualNicManagerNicType("faultToleranceLogging") - HostVirtualNicManagerNicTypeVSphereReplication = HostVirtualNicManagerNicType("vSphereReplication") - HostVirtualNicManagerNicTypeVSphereReplicationNFC = HostVirtualNicManagerNicType("vSphereReplicationNFC") - HostVirtualNicManagerNicTypeManagement = HostVirtualNicManagerNicType("management") - HostVirtualNicManagerNicTypeVsan = HostVirtualNicManagerNicType("vsan") - HostVirtualNicManagerNicTypeVSphereProvisioning = HostVirtualNicManagerNicType("vSphereProvisioning") - HostVirtualNicManagerNicTypeVsanWitness = HostVirtualNicManagerNicType("vsanWitness") - HostVirtualNicManagerNicTypeVSphereBackupNFC = HostVirtualNicManagerNicType("vSphereBackupNFC") - HostVirtualNicManagerNicTypePtp = HostVirtualNicManagerNicType("ptp") - HostVirtualNicManagerNicTypeNvmeTcp = HostVirtualNicManagerNicType("nvmeTcp") - HostVirtualNicManagerNicTypeNvmeRdma = HostVirtualNicManagerNicType("nvmeRdma") -) - -func init() { - t["HostVirtualNicManagerNicType"] = reflect.TypeOf((*HostVirtualNicManagerNicType)(nil)).Elem() -} - -type HostVmciAccessManagerMode string - -const ( - HostVmciAccessManagerModeGrant = HostVmciAccessManagerMode("grant") - HostVmciAccessManagerModeReplace = HostVmciAccessManagerMode("replace") - HostVmciAccessManagerModeRevoke = HostVmciAccessManagerMode("revoke") -) - -func init() { - t["HostVmciAccessManagerMode"] = reflect.TypeOf((*HostVmciAccessManagerMode)(nil)).Elem() -} - -type HostVmfsVolumeUnmapBandwidthPolicy string - -const ( - HostVmfsVolumeUnmapBandwidthPolicyFixed = HostVmfsVolumeUnmapBandwidthPolicy("fixed") - HostVmfsVolumeUnmapBandwidthPolicyDynamic = HostVmfsVolumeUnmapBandwidthPolicy("dynamic") -) - -func init() { - t["HostVmfsVolumeUnmapBandwidthPolicy"] = reflect.TypeOf((*HostVmfsVolumeUnmapBandwidthPolicy)(nil)).Elem() -} - -type HostVmfsVolumeUnmapPriority string - -const ( - HostVmfsVolumeUnmapPriorityNone = HostVmfsVolumeUnmapPriority("none") - HostVmfsVolumeUnmapPriorityLow = HostVmfsVolumeUnmapPriority("low") -) - -func init() { - t["HostVmfsVolumeUnmapPriority"] = reflect.TypeOf((*HostVmfsVolumeUnmapPriority)(nil)).Elem() -} - -type HttpNfcLeaseManifestEntryChecksumType string - -const ( - HttpNfcLeaseManifestEntryChecksumTypeSha1 = HttpNfcLeaseManifestEntryChecksumType("sha1") - HttpNfcLeaseManifestEntryChecksumTypeSha256 = HttpNfcLeaseManifestEntryChecksumType("sha256") -) - -func init() { - t["HttpNfcLeaseManifestEntryChecksumType"] = reflect.TypeOf((*HttpNfcLeaseManifestEntryChecksumType)(nil)).Elem() -} - -type HttpNfcLeaseMode string - -const ( - HttpNfcLeaseModePushOrGet = HttpNfcLeaseMode("pushOrGet") - HttpNfcLeaseModePull = HttpNfcLeaseMode("pull") -) - -func init() { - t["HttpNfcLeaseMode"] = reflect.TypeOf((*HttpNfcLeaseMode)(nil)).Elem() -} - -type HttpNfcLeaseState string - -const ( - HttpNfcLeaseStateInitializing = HttpNfcLeaseState("initializing") - HttpNfcLeaseStateReady = HttpNfcLeaseState("ready") - HttpNfcLeaseStateDone = HttpNfcLeaseState("done") - HttpNfcLeaseStateError = HttpNfcLeaseState("error") -) - -func init() { - t["HttpNfcLeaseState"] = reflect.TypeOf((*HttpNfcLeaseState)(nil)).Elem() -} - -type IncompatibleHostForVmReplicationIncompatibleReason string - -const ( - IncompatibleHostForVmReplicationIncompatibleReasonRpo = IncompatibleHostForVmReplicationIncompatibleReason("rpo") - IncompatibleHostForVmReplicationIncompatibleReasonNetCompression = IncompatibleHostForVmReplicationIncompatibleReason("netCompression") -) - -func init() { - t["IncompatibleHostForVmReplicationIncompatibleReason"] = reflect.TypeOf((*IncompatibleHostForVmReplicationIncompatibleReason)(nil)).Elem() -} - -type InternetScsiSnsDiscoveryMethod string - -const ( - InternetScsiSnsDiscoveryMethodIsnsStatic = InternetScsiSnsDiscoveryMethod("isnsStatic") - InternetScsiSnsDiscoveryMethodIsnsDhcp = InternetScsiSnsDiscoveryMethod("isnsDhcp") - InternetScsiSnsDiscoveryMethodIsnsSlp = InternetScsiSnsDiscoveryMethod("isnsSlp") -) - -func init() { - t["InternetScsiSnsDiscoveryMethod"] = reflect.TypeOf((*InternetScsiSnsDiscoveryMethod)(nil)).Elem() -} - -type InvalidDasConfigArgumentEntryForInvalidArgument string - -const ( - InvalidDasConfigArgumentEntryForInvalidArgumentAdmissionControl = InvalidDasConfigArgumentEntryForInvalidArgument("admissionControl") - InvalidDasConfigArgumentEntryForInvalidArgumentUserHeartbeatDs = InvalidDasConfigArgumentEntryForInvalidArgument("userHeartbeatDs") - InvalidDasConfigArgumentEntryForInvalidArgumentVmConfig = InvalidDasConfigArgumentEntryForInvalidArgument("vmConfig") -) - -func init() { - t["InvalidDasConfigArgumentEntryForInvalidArgument"] = reflect.TypeOf((*InvalidDasConfigArgumentEntryForInvalidArgument)(nil)).Elem() -} - -type InvalidProfileReferenceHostReason string - -const ( - InvalidProfileReferenceHostReasonIncompatibleVersion = InvalidProfileReferenceHostReason("incompatibleVersion") - InvalidProfileReferenceHostReasonMissingReferenceHost = InvalidProfileReferenceHostReason("missingReferenceHost") -) - -func init() { - t["InvalidProfileReferenceHostReason"] = reflect.TypeOf((*InvalidProfileReferenceHostReason)(nil)).Elem() -} - -type IoFilterOperation string - -const ( - IoFilterOperationInstall = IoFilterOperation("install") - IoFilterOperationUninstall = IoFilterOperation("uninstall") - IoFilterOperationUpgrade = IoFilterOperation("upgrade") -) - -func init() { - t["IoFilterOperation"] = reflect.TypeOf((*IoFilterOperation)(nil)).Elem() -} - -type IoFilterType string - -const ( - IoFilterTypeCache = IoFilterType("cache") - IoFilterTypeReplication = IoFilterType("replication") - IoFilterTypeEncryption = IoFilterType("encryption") - IoFilterTypeCompression = IoFilterType("compression") - IoFilterTypeInspection = IoFilterType("inspection") - IoFilterTypeDatastoreIoControl = IoFilterType("datastoreIoControl") - IoFilterTypeDataProvider = IoFilterType("dataProvider") - IoFilterTypeDataCapture = IoFilterType("dataCapture") -) - -func init() { - t["IoFilterType"] = reflect.TypeOf((*IoFilterType)(nil)).Elem() -} - -type IscsiPortInfoPathStatus string - -const ( - IscsiPortInfoPathStatusNotUsed = IscsiPortInfoPathStatus("notUsed") - IscsiPortInfoPathStatusActive = IscsiPortInfoPathStatus("active") - IscsiPortInfoPathStatusStandBy = IscsiPortInfoPathStatus("standBy") - IscsiPortInfoPathStatusLastActive = IscsiPortInfoPathStatus("lastActive") -) - -func init() { - t["IscsiPortInfoPathStatus"] = reflect.TypeOf((*IscsiPortInfoPathStatus)(nil)).Elem() -} - -type KmipClusterInfoKmsManagementType string - -const ( - KmipClusterInfoKmsManagementTypeUnknown = KmipClusterInfoKmsManagementType("unknown") - KmipClusterInfoKmsManagementTypeVCenter = KmipClusterInfoKmsManagementType("vCenter") - KmipClusterInfoKmsManagementTypeTrustAuthority = KmipClusterInfoKmsManagementType("trustAuthority") - KmipClusterInfoKmsManagementTypeNativeProvider = KmipClusterInfoKmsManagementType("nativeProvider") -) - -func init() { - t["KmipClusterInfoKmsManagementType"] = reflect.TypeOf((*KmipClusterInfoKmsManagementType)(nil)).Elem() -} - -type LatencySensitivitySensitivityLevel string - -const ( - LatencySensitivitySensitivityLevelLow = LatencySensitivitySensitivityLevel("low") - LatencySensitivitySensitivityLevelNormal = LatencySensitivitySensitivityLevel("normal") - LatencySensitivitySensitivityLevelMedium = LatencySensitivitySensitivityLevel("medium") - LatencySensitivitySensitivityLevelHigh = LatencySensitivitySensitivityLevel("high") - LatencySensitivitySensitivityLevelCustom = LatencySensitivitySensitivityLevel("custom") -) - -func init() { - t["LatencySensitivitySensitivityLevel"] = reflect.TypeOf((*LatencySensitivitySensitivityLevel)(nil)).Elem() -} - -type LicenseAssignmentFailedReason string - -const ( - LicenseAssignmentFailedReasonKeyEntityMismatch = LicenseAssignmentFailedReason("keyEntityMismatch") - LicenseAssignmentFailedReasonDowngradeDisallowed = LicenseAssignmentFailedReason("downgradeDisallowed") - LicenseAssignmentFailedReasonInventoryNotManageableByVirtualCenter = LicenseAssignmentFailedReason("inventoryNotManageableByVirtualCenter") - LicenseAssignmentFailedReasonHostsUnmanageableByVirtualCenterWithoutLicenseServer = LicenseAssignmentFailedReason("hostsUnmanageableByVirtualCenterWithoutLicenseServer") -) - -func init() { - t["LicenseAssignmentFailedReason"] = reflect.TypeOf((*LicenseAssignmentFailedReason)(nil)).Elem() -} - -type LicenseFeatureInfoSourceRestriction string - -const ( - LicenseFeatureInfoSourceRestrictionUnrestricted = LicenseFeatureInfoSourceRestriction("unrestricted") - LicenseFeatureInfoSourceRestrictionServed = LicenseFeatureInfoSourceRestriction("served") - LicenseFeatureInfoSourceRestrictionFile = LicenseFeatureInfoSourceRestriction("file") -) - -func init() { - t["LicenseFeatureInfoSourceRestriction"] = reflect.TypeOf((*LicenseFeatureInfoSourceRestriction)(nil)).Elem() -} - -type LicenseFeatureInfoState string - -const ( - LicenseFeatureInfoStateEnabled = LicenseFeatureInfoState("enabled") - LicenseFeatureInfoStateDisabled = LicenseFeatureInfoState("disabled") - LicenseFeatureInfoStateOptional = LicenseFeatureInfoState("optional") -) - -func init() { - t["LicenseFeatureInfoState"] = reflect.TypeOf((*LicenseFeatureInfoState)(nil)).Elem() -} - -type LicenseFeatureInfoUnit string - -const ( - LicenseFeatureInfoUnitHost = LicenseFeatureInfoUnit("host") - LicenseFeatureInfoUnitCpuCore = LicenseFeatureInfoUnit("cpuCore") - LicenseFeatureInfoUnitCpuPackage = LicenseFeatureInfoUnit("cpuPackage") - LicenseFeatureInfoUnitServer = LicenseFeatureInfoUnit("server") - LicenseFeatureInfoUnitVm = LicenseFeatureInfoUnit("vm") -) - -func init() { - t["LicenseFeatureInfoUnit"] = reflect.TypeOf((*LicenseFeatureInfoUnit)(nil)).Elem() -} - -type LicenseManagerLicenseKey string - -const ( - LicenseManagerLicenseKeyEsxFull = LicenseManagerLicenseKey("esxFull") - LicenseManagerLicenseKeyEsxVmtn = LicenseManagerLicenseKey("esxVmtn") - LicenseManagerLicenseKeyEsxExpress = LicenseManagerLicenseKey("esxExpress") - LicenseManagerLicenseKeySan = LicenseManagerLicenseKey("san") - LicenseManagerLicenseKeyIscsi = LicenseManagerLicenseKey("iscsi") - LicenseManagerLicenseKeyNas = LicenseManagerLicenseKey("nas") - LicenseManagerLicenseKeyVsmp = LicenseManagerLicenseKey("vsmp") - LicenseManagerLicenseKeyBackup = LicenseManagerLicenseKey("backup") - LicenseManagerLicenseKeyVc = LicenseManagerLicenseKey("vc") - LicenseManagerLicenseKeyVcExpress = LicenseManagerLicenseKey("vcExpress") - LicenseManagerLicenseKeyEsxHost = LicenseManagerLicenseKey("esxHost") - LicenseManagerLicenseKeyGsxHost = LicenseManagerLicenseKey("gsxHost") - LicenseManagerLicenseKeyServerHost = LicenseManagerLicenseKey("serverHost") - LicenseManagerLicenseKeyDrsPower = LicenseManagerLicenseKey("drsPower") - LicenseManagerLicenseKeyVmotion = LicenseManagerLicenseKey("vmotion") - LicenseManagerLicenseKeyDrs = LicenseManagerLicenseKey("drs") - LicenseManagerLicenseKeyDas = LicenseManagerLicenseKey("das") -) - -func init() { - t["LicenseManagerLicenseKey"] = reflect.TypeOf((*LicenseManagerLicenseKey)(nil)).Elem() -} - -type LicenseManagerState string - -const ( - LicenseManagerStateInitializing = LicenseManagerState("initializing") - LicenseManagerStateNormal = LicenseManagerState("normal") - LicenseManagerStateMarginal = LicenseManagerState("marginal") - LicenseManagerStateFault = LicenseManagerState("fault") -) - -func init() { - t["LicenseManagerState"] = reflect.TypeOf((*LicenseManagerState)(nil)).Elem() -} - -type LicenseReservationInfoState string - -const ( - LicenseReservationInfoStateNotUsed = LicenseReservationInfoState("notUsed") - LicenseReservationInfoStateNoLicense = LicenseReservationInfoState("noLicense") - LicenseReservationInfoStateUnlicensedUse = LicenseReservationInfoState("unlicensedUse") - LicenseReservationInfoStateLicensed = LicenseReservationInfoState("licensed") -) - -func init() { - t["LicenseReservationInfoState"] = reflect.TypeOf((*LicenseReservationInfoState)(nil)).Elem() -} - -type LinkDiscoveryProtocolConfigOperationType string - -const ( - LinkDiscoveryProtocolConfigOperationTypeNone = LinkDiscoveryProtocolConfigOperationType("none") - LinkDiscoveryProtocolConfigOperationTypeListen = LinkDiscoveryProtocolConfigOperationType("listen") - LinkDiscoveryProtocolConfigOperationTypeAdvertise = LinkDiscoveryProtocolConfigOperationType("advertise") - LinkDiscoveryProtocolConfigOperationTypeBoth = LinkDiscoveryProtocolConfigOperationType("both") -) - -func init() { - t["LinkDiscoveryProtocolConfigOperationType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigOperationType)(nil)).Elem() -} - -type LinkDiscoveryProtocolConfigProtocolType string - -const ( - LinkDiscoveryProtocolConfigProtocolTypeCdp = LinkDiscoveryProtocolConfigProtocolType("cdp") - LinkDiscoveryProtocolConfigProtocolTypeLldp = LinkDiscoveryProtocolConfigProtocolType("lldp") -) - -func init() { - t["LinkDiscoveryProtocolConfigProtocolType"] = reflect.TypeOf((*LinkDiscoveryProtocolConfigProtocolType)(nil)).Elem() -} - -type ManagedEntityStatus string - -const ( - ManagedEntityStatusGray = ManagedEntityStatus("gray") - ManagedEntityStatusGreen = ManagedEntityStatus("green") - ManagedEntityStatusYellow = ManagedEntityStatus("yellow") - ManagedEntityStatusRed = ManagedEntityStatus("red") -) - -func init() { - t["ManagedEntityStatus"] = reflect.TypeOf((*ManagedEntityStatus)(nil)).Elem() -} - -type MetricAlarmOperator string - -const ( - MetricAlarmOperatorIsAbove = MetricAlarmOperator("isAbove") - MetricAlarmOperatorIsBelow = MetricAlarmOperator("isBelow") -) - -func init() { - t["MetricAlarmOperator"] = reflect.TypeOf((*MetricAlarmOperator)(nil)).Elem() -} - -type MultipathState string - -const ( - MultipathStateStandby = MultipathState("standby") - MultipathStateActive = MultipathState("active") - MultipathStateDisabled = MultipathState("disabled") - MultipathStateDead = MultipathState("dead") - MultipathStateUnknown = MultipathState("unknown") -) - -func init() { - t["MultipathState"] = reflect.TypeOf((*MultipathState)(nil)).Elem() -} - -type NetBIOSConfigInfoMode string - -const ( - NetBIOSConfigInfoModeUnknown = NetBIOSConfigInfoMode("unknown") - NetBIOSConfigInfoModeEnabled = NetBIOSConfigInfoMode("enabled") - NetBIOSConfigInfoModeDisabled = NetBIOSConfigInfoMode("disabled") - NetBIOSConfigInfoModeEnabledViaDHCP = NetBIOSConfigInfoMode("enabledViaDHCP") -) - -func init() { - t["NetBIOSConfigInfoMode"] = reflect.TypeOf((*NetBIOSConfigInfoMode)(nil)).Elem() -} - -type NetIpConfigInfoIpAddressOrigin string - -const ( - NetIpConfigInfoIpAddressOriginOther = NetIpConfigInfoIpAddressOrigin("other") - NetIpConfigInfoIpAddressOriginManual = NetIpConfigInfoIpAddressOrigin("manual") - NetIpConfigInfoIpAddressOriginDhcp = NetIpConfigInfoIpAddressOrigin("dhcp") - NetIpConfigInfoIpAddressOriginLinklayer = NetIpConfigInfoIpAddressOrigin("linklayer") - NetIpConfigInfoIpAddressOriginRandom = NetIpConfigInfoIpAddressOrigin("random") -) - -func init() { - t["NetIpConfigInfoIpAddressOrigin"] = reflect.TypeOf((*NetIpConfigInfoIpAddressOrigin)(nil)).Elem() -} - -type NetIpConfigInfoIpAddressStatus string - -const ( - NetIpConfigInfoIpAddressStatusPreferred = NetIpConfigInfoIpAddressStatus("preferred") - NetIpConfigInfoIpAddressStatusDeprecated = NetIpConfigInfoIpAddressStatus("deprecated") - NetIpConfigInfoIpAddressStatusInvalid = NetIpConfigInfoIpAddressStatus("invalid") - NetIpConfigInfoIpAddressStatusInaccessible = NetIpConfigInfoIpAddressStatus("inaccessible") - NetIpConfigInfoIpAddressStatusUnknown = NetIpConfigInfoIpAddressStatus("unknown") - NetIpConfigInfoIpAddressStatusTentative = NetIpConfigInfoIpAddressStatus("tentative") - NetIpConfigInfoIpAddressStatusDuplicate = NetIpConfigInfoIpAddressStatus("duplicate") -) - -func init() { - t["NetIpConfigInfoIpAddressStatus"] = reflect.TypeOf((*NetIpConfigInfoIpAddressStatus)(nil)).Elem() -} - -type NetIpStackInfoEntryType string - -const ( - NetIpStackInfoEntryTypeOther = NetIpStackInfoEntryType("other") - NetIpStackInfoEntryTypeInvalid = NetIpStackInfoEntryType("invalid") - NetIpStackInfoEntryTypeDynamic = NetIpStackInfoEntryType("dynamic") - NetIpStackInfoEntryTypeManual = NetIpStackInfoEntryType("manual") -) - -func init() { - t["NetIpStackInfoEntryType"] = reflect.TypeOf((*NetIpStackInfoEntryType)(nil)).Elem() -} - -type NetIpStackInfoPreference string - -const ( - NetIpStackInfoPreferenceReserved = NetIpStackInfoPreference("reserved") - NetIpStackInfoPreferenceLow = NetIpStackInfoPreference("low") - NetIpStackInfoPreferenceMedium = NetIpStackInfoPreference("medium") - NetIpStackInfoPreferenceHigh = NetIpStackInfoPreference("high") -) - -func init() { - t["NetIpStackInfoPreference"] = reflect.TypeOf((*NetIpStackInfoPreference)(nil)).Elem() -} - -type NotSupportedDeviceForFTDeviceType string - -const ( - NotSupportedDeviceForFTDeviceTypeVirtualVmxnet3 = NotSupportedDeviceForFTDeviceType("virtualVmxnet3") - NotSupportedDeviceForFTDeviceTypeParaVirtualSCSIController = NotSupportedDeviceForFTDeviceType("paraVirtualSCSIController") -) - -func init() { - t["NotSupportedDeviceForFTDeviceType"] = reflect.TypeOf((*NotSupportedDeviceForFTDeviceType)(nil)).Elem() -} - -type NumVirtualCpusIncompatibleReason string - -const ( - NumVirtualCpusIncompatibleReasonRecordReplay = NumVirtualCpusIncompatibleReason("recordReplay") - NumVirtualCpusIncompatibleReasonFaultTolerance = NumVirtualCpusIncompatibleReason("faultTolerance") -) - -func init() { - t["NumVirtualCpusIncompatibleReason"] = reflect.TypeOf((*NumVirtualCpusIncompatibleReason)(nil)).Elem() -} - -type NvdimmInterleaveSetState string - -const ( - NvdimmInterleaveSetStateInvalid = NvdimmInterleaveSetState("invalid") - NvdimmInterleaveSetStateActive = NvdimmInterleaveSetState("active") -) - -func init() { - t["NvdimmInterleaveSetState"] = reflect.TypeOf((*NvdimmInterleaveSetState)(nil)).Elem() -} - -type NvdimmNamespaceDetailsHealthStatus string - -const ( - NvdimmNamespaceDetailsHealthStatusNormal = NvdimmNamespaceDetailsHealthStatus("normal") - NvdimmNamespaceDetailsHealthStatusMissing = NvdimmNamespaceDetailsHealthStatus("missing") - NvdimmNamespaceDetailsHealthStatusLabelMissing = NvdimmNamespaceDetailsHealthStatus("labelMissing") - NvdimmNamespaceDetailsHealthStatusInterleaveBroken = NvdimmNamespaceDetailsHealthStatus("interleaveBroken") - NvdimmNamespaceDetailsHealthStatusLabelInconsistent = NvdimmNamespaceDetailsHealthStatus("labelInconsistent") -) - -func init() { - t["NvdimmNamespaceDetailsHealthStatus"] = reflect.TypeOf((*NvdimmNamespaceDetailsHealthStatus)(nil)).Elem() -} - -type NvdimmNamespaceDetailsState string - -const ( - NvdimmNamespaceDetailsStateInvalid = NvdimmNamespaceDetailsState("invalid") - NvdimmNamespaceDetailsStateNotInUse = NvdimmNamespaceDetailsState("notInUse") - NvdimmNamespaceDetailsStateInUse = NvdimmNamespaceDetailsState("inUse") -) - -func init() { - t["NvdimmNamespaceDetailsState"] = reflect.TypeOf((*NvdimmNamespaceDetailsState)(nil)).Elem() -} - -type NvdimmNamespaceHealthStatus string - -const ( - NvdimmNamespaceHealthStatusNormal = NvdimmNamespaceHealthStatus("normal") - NvdimmNamespaceHealthStatusMissing = NvdimmNamespaceHealthStatus("missing") - NvdimmNamespaceHealthStatusLabelMissing = NvdimmNamespaceHealthStatus("labelMissing") - NvdimmNamespaceHealthStatusInterleaveBroken = NvdimmNamespaceHealthStatus("interleaveBroken") - NvdimmNamespaceHealthStatusLabelInconsistent = NvdimmNamespaceHealthStatus("labelInconsistent") - NvdimmNamespaceHealthStatusBttCorrupt = NvdimmNamespaceHealthStatus("bttCorrupt") - NvdimmNamespaceHealthStatusBadBlockSize = NvdimmNamespaceHealthStatus("badBlockSize") -) - -func init() { - t["NvdimmNamespaceHealthStatus"] = reflect.TypeOf((*NvdimmNamespaceHealthStatus)(nil)).Elem() -} - -type NvdimmNamespaceState string - -const ( - NvdimmNamespaceStateInvalid = NvdimmNamespaceState("invalid") - NvdimmNamespaceStateNotInUse = NvdimmNamespaceState("notInUse") - NvdimmNamespaceStateInUse = NvdimmNamespaceState("inUse") -) - -func init() { - t["NvdimmNamespaceState"] = reflect.TypeOf((*NvdimmNamespaceState)(nil)).Elem() -} - -type NvdimmNamespaceType string - -const ( - NvdimmNamespaceTypeBlockNamespace = NvdimmNamespaceType("blockNamespace") - NvdimmNamespaceTypePersistentNamespace = NvdimmNamespaceType("persistentNamespace") -) - -func init() { - t["NvdimmNamespaceType"] = reflect.TypeOf((*NvdimmNamespaceType)(nil)).Elem() -} - -type NvdimmNvdimmHealthInfoState string - -const ( - NvdimmNvdimmHealthInfoStateNormal = NvdimmNvdimmHealthInfoState("normal") - NvdimmNvdimmHealthInfoStateError = NvdimmNvdimmHealthInfoState("error") -) - -func init() { - t["NvdimmNvdimmHealthInfoState"] = reflect.TypeOf((*NvdimmNvdimmHealthInfoState)(nil)).Elem() -} - -type NvdimmRangeType string - -const ( - NvdimmRangeTypeVolatileRange = NvdimmRangeType("volatileRange") - NvdimmRangeTypePersistentRange = NvdimmRangeType("persistentRange") - NvdimmRangeTypeControlRange = NvdimmRangeType("controlRange") - NvdimmRangeTypeBlockRange = NvdimmRangeType("blockRange") - NvdimmRangeTypeVolatileVirtualDiskRange = NvdimmRangeType("volatileVirtualDiskRange") - NvdimmRangeTypeVolatileVirtualCDRange = NvdimmRangeType("volatileVirtualCDRange") - NvdimmRangeTypePersistentVirtualDiskRange = NvdimmRangeType("persistentVirtualDiskRange") - NvdimmRangeTypePersistentVirtualCDRange = NvdimmRangeType("persistentVirtualCDRange") -) - -func init() { - t["NvdimmRangeType"] = reflect.TypeOf((*NvdimmRangeType)(nil)).Elem() -} - -type ObjectUpdateKind string - -const ( - ObjectUpdateKindModify = ObjectUpdateKind("modify") - ObjectUpdateKindEnter = ObjectUpdateKind("enter") - ObjectUpdateKindLeave = ObjectUpdateKind("leave") -) - -func init() { - t["ObjectUpdateKind"] = reflect.TypeOf((*ObjectUpdateKind)(nil)).Elem() -} - -type OvfConsumerOstNodeType string - -const ( - OvfConsumerOstNodeTypeEnvelope = OvfConsumerOstNodeType("envelope") - OvfConsumerOstNodeTypeVirtualSystem = OvfConsumerOstNodeType("virtualSystem") - OvfConsumerOstNodeTypeVirtualSystemCollection = OvfConsumerOstNodeType("virtualSystemCollection") -) - -func init() { - t["OvfConsumerOstNodeType"] = reflect.TypeOf((*OvfConsumerOstNodeType)(nil)).Elem() -} - -type OvfCreateImportSpecParamsDiskProvisioningType string - -const ( - OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicSparse = OvfCreateImportSpecParamsDiskProvisioningType("monolithicSparse") - OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicFlat = OvfCreateImportSpecParamsDiskProvisioningType("monolithicFlat") - OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentSparse = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentSparse") - OvfCreateImportSpecParamsDiskProvisioningTypeTwoGbMaxExtentFlat = OvfCreateImportSpecParamsDiskProvisioningType("twoGbMaxExtentFlat") - OvfCreateImportSpecParamsDiskProvisioningTypeThin = OvfCreateImportSpecParamsDiskProvisioningType("thin") - OvfCreateImportSpecParamsDiskProvisioningTypeThick = OvfCreateImportSpecParamsDiskProvisioningType("thick") - OvfCreateImportSpecParamsDiskProvisioningTypeSeSparse = OvfCreateImportSpecParamsDiskProvisioningType("seSparse") - OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick = OvfCreateImportSpecParamsDiskProvisioningType("eagerZeroedThick") - OvfCreateImportSpecParamsDiskProvisioningTypeSparse = OvfCreateImportSpecParamsDiskProvisioningType("sparse") - OvfCreateImportSpecParamsDiskProvisioningTypeFlat = OvfCreateImportSpecParamsDiskProvisioningType("flat") -) - -func init() { - t["OvfCreateImportSpecParamsDiskProvisioningType"] = reflect.TypeOf((*OvfCreateImportSpecParamsDiskProvisioningType)(nil)).Elem() -} - -type PerfFormat string - -const ( - PerfFormatNormal = PerfFormat("normal") - PerfFormatCsv = PerfFormat("csv") -) - -func init() { - t["PerfFormat"] = reflect.TypeOf((*PerfFormat)(nil)).Elem() -} - -type PerfStatsType string - -const ( - PerfStatsTypeAbsolute = PerfStatsType("absolute") - PerfStatsTypeDelta = PerfStatsType("delta") - PerfStatsTypeRate = PerfStatsType("rate") -) - -func init() { - t["PerfStatsType"] = reflect.TypeOf((*PerfStatsType)(nil)).Elem() -} - -type PerfSummaryType string - -const ( - PerfSummaryTypeAverage = PerfSummaryType("average") - PerfSummaryTypeMaximum = PerfSummaryType("maximum") - PerfSummaryTypeMinimum = PerfSummaryType("minimum") - PerfSummaryTypeLatest = PerfSummaryType("latest") - PerfSummaryTypeSummation = PerfSummaryType("summation") - PerfSummaryTypeNone = PerfSummaryType("none") -) - -func init() { - t["PerfSummaryType"] = reflect.TypeOf((*PerfSummaryType)(nil)).Elem() -} - -type PerformanceManagerUnit string - -const ( - PerformanceManagerUnitPercent = PerformanceManagerUnit("percent") - PerformanceManagerUnitKiloBytes = PerformanceManagerUnit("kiloBytes") - PerformanceManagerUnitMegaBytes = PerformanceManagerUnit("megaBytes") - PerformanceManagerUnitMegaHertz = PerformanceManagerUnit("megaHertz") - PerformanceManagerUnitNumber = PerformanceManagerUnit("number") - PerformanceManagerUnitMicrosecond = PerformanceManagerUnit("microsecond") - PerformanceManagerUnitMillisecond = PerformanceManagerUnit("millisecond") - PerformanceManagerUnitSecond = PerformanceManagerUnit("second") - PerformanceManagerUnitKiloBytesPerSecond = PerformanceManagerUnit("kiloBytesPerSecond") - PerformanceManagerUnitMegaBytesPerSecond = PerformanceManagerUnit("megaBytesPerSecond") - PerformanceManagerUnitWatt = PerformanceManagerUnit("watt") - PerformanceManagerUnitJoule = PerformanceManagerUnit("joule") - PerformanceManagerUnitTeraBytes = PerformanceManagerUnit("teraBytes") - PerformanceManagerUnitCelsius = PerformanceManagerUnit("celsius") - PerformanceManagerUnitNanosecond = PerformanceManagerUnit("nanosecond") -) - -func init() { - t["PerformanceManagerUnit"] = reflect.TypeOf((*PerformanceManagerUnit)(nil)).Elem() -} - -type PhysicalNicResourcePoolSchedulerDisallowedReason string - -const ( - PhysicalNicResourcePoolSchedulerDisallowedReasonUserOptOut = PhysicalNicResourcePoolSchedulerDisallowedReason("userOptOut") - PhysicalNicResourcePoolSchedulerDisallowedReasonHardwareUnsupported = PhysicalNicResourcePoolSchedulerDisallowedReason("hardwareUnsupported") -) - -func init() { - t["PhysicalNicResourcePoolSchedulerDisallowedReason"] = reflect.TypeOf((*PhysicalNicResourcePoolSchedulerDisallowedReason)(nil)).Elem() -} - -type PhysicalNicVmDirectPathGen2SupportedMode string - -const ( - PhysicalNicVmDirectPathGen2SupportedModeUpt = PhysicalNicVmDirectPathGen2SupportedMode("upt") -) - -func init() { - t["PhysicalNicVmDirectPathGen2SupportedMode"] = reflect.TypeOf((*PhysicalNicVmDirectPathGen2SupportedMode)(nil)).Elem() -} - -type PlacementAffinityRuleRuleScope string - -const ( - PlacementAffinityRuleRuleScopeCluster = PlacementAffinityRuleRuleScope("cluster") - PlacementAffinityRuleRuleScopeHost = PlacementAffinityRuleRuleScope("host") - PlacementAffinityRuleRuleScopeStoragePod = PlacementAffinityRuleRuleScope("storagePod") - PlacementAffinityRuleRuleScopeDatastore = PlacementAffinityRuleRuleScope("datastore") -) - -func init() { - t["PlacementAffinityRuleRuleScope"] = reflect.TypeOf((*PlacementAffinityRuleRuleScope)(nil)).Elem() -} - -type PlacementAffinityRuleRuleType string - -const ( - PlacementAffinityRuleRuleTypeAffinity = PlacementAffinityRuleRuleType("affinity") - PlacementAffinityRuleRuleTypeAntiAffinity = PlacementAffinityRuleRuleType("antiAffinity") - PlacementAffinityRuleRuleTypeSoftAffinity = PlacementAffinityRuleRuleType("softAffinity") - PlacementAffinityRuleRuleTypeSoftAntiAffinity = PlacementAffinityRuleRuleType("softAntiAffinity") -) - -func init() { - t["PlacementAffinityRuleRuleType"] = reflect.TypeOf((*PlacementAffinityRuleRuleType)(nil)).Elem() -} - -type PlacementSpecPlacementType string - -const ( - PlacementSpecPlacementTypeCreate = PlacementSpecPlacementType("create") - PlacementSpecPlacementTypeReconfigure = PlacementSpecPlacementType("reconfigure") - PlacementSpecPlacementTypeRelocate = PlacementSpecPlacementType("relocate") - PlacementSpecPlacementTypeClone = PlacementSpecPlacementType("clone") -) - -func init() { - t["PlacementSpecPlacementType"] = reflect.TypeOf((*PlacementSpecPlacementType)(nil)).Elem() -} - -type PortGroupConnecteeType string - -const ( - PortGroupConnecteeTypeVirtualMachine = PortGroupConnecteeType("virtualMachine") - PortGroupConnecteeTypeSystemManagement = PortGroupConnecteeType("systemManagement") - PortGroupConnecteeTypeHost = PortGroupConnecteeType("host") - PortGroupConnecteeTypeUnknown = PortGroupConnecteeType("unknown") -) - -func init() { - t["PortGroupConnecteeType"] = reflect.TypeOf((*PortGroupConnecteeType)(nil)).Elem() -} - -type ProfileExecuteResultStatus string - -const ( - ProfileExecuteResultStatusSuccess = ProfileExecuteResultStatus("success") - ProfileExecuteResultStatusNeedInput = ProfileExecuteResultStatus("needInput") - ProfileExecuteResultStatusError = ProfileExecuteResultStatus("error") -) - -func init() { - t["ProfileExecuteResultStatus"] = reflect.TypeOf((*ProfileExecuteResultStatus)(nil)).Elem() -} - -type ProfileNumericComparator string - -const ( - ProfileNumericComparatorLessThan = ProfileNumericComparator("lessThan") - ProfileNumericComparatorLessThanEqual = ProfileNumericComparator("lessThanEqual") - ProfileNumericComparatorEqual = ProfileNumericComparator("equal") - ProfileNumericComparatorNotEqual = ProfileNumericComparator("notEqual") - ProfileNumericComparatorGreaterThanEqual = ProfileNumericComparator("greaterThanEqual") - ProfileNumericComparatorGreaterThan = ProfileNumericComparator("greaterThan") -) - -func init() { - t["ProfileNumericComparator"] = reflect.TypeOf((*ProfileNumericComparator)(nil)).Elem() -} - -type ProfileParameterMetadataRelationType string - -const ( - ProfileParameterMetadataRelationTypeDynamic_relation = ProfileParameterMetadataRelationType("dynamic_relation") - ProfileParameterMetadataRelationTypeExtensible_relation = ProfileParameterMetadataRelationType("extensible_relation") - ProfileParameterMetadataRelationTypeLocalizable_relation = ProfileParameterMetadataRelationType("localizable_relation") - ProfileParameterMetadataRelationTypeStatic_relation = ProfileParameterMetadataRelationType("static_relation") - ProfileParameterMetadataRelationTypeValidation_relation = ProfileParameterMetadataRelationType("validation_relation") -) - -func init() { - t["ProfileParameterMetadataRelationType"] = reflect.TypeOf((*ProfileParameterMetadataRelationType)(nil)).Elem() -} - -type PropertyChangeOp string - -const ( - PropertyChangeOpAdd = PropertyChangeOp("add") - PropertyChangeOpRemove = PropertyChangeOp("remove") - PropertyChangeOpAssign = PropertyChangeOp("assign") - PropertyChangeOpIndirectRemove = PropertyChangeOp("indirectRemove") -) - -func init() { - t["PropertyChangeOp"] = reflect.TypeOf((*PropertyChangeOp)(nil)).Elem() -} - -type QuarantineModeFaultFaultType string - -const ( - QuarantineModeFaultFaultTypeNoCompatibleNonQuarantinedHost = QuarantineModeFaultFaultType("NoCompatibleNonQuarantinedHost") - QuarantineModeFaultFaultTypeCorrectionDisallowed = QuarantineModeFaultFaultType("CorrectionDisallowed") - QuarantineModeFaultFaultTypeCorrectionImpact = QuarantineModeFaultFaultType("CorrectionImpact") -) - -func init() { - t["QuarantineModeFaultFaultType"] = reflect.TypeOf((*QuarantineModeFaultFaultType)(nil)).Elem() -} - -type QuiesceMode string - -const ( - QuiesceModeApplication = QuiesceMode("application") - QuiesceModeFilesystem = QuiesceMode("filesystem") - QuiesceModeNone = QuiesceMode("none") -) - -func init() { - t["QuiesceMode"] = reflect.TypeOf((*QuiesceMode)(nil)).Elem() -} - -type RecommendationReasonCode string - -const ( - RecommendationReasonCodeFairnessCpuAvg = RecommendationReasonCode("fairnessCpuAvg") - RecommendationReasonCodeFairnessMemAvg = RecommendationReasonCode("fairnessMemAvg") - RecommendationReasonCodeJointAffin = RecommendationReasonCode("jointAffin") - RecommendationReasonCodeAntiAffin = RecommendationReasonCode("antiAffin") - RecommendationReasonCodeHostMaint = RecommendationReasonCode("hostMaint") - RecommendationReasonCodeEnterStandby = RecommendationReasonCode("enterStandby") - RecommendationReasonCodeReservationCpu = RecommendationReasonCode("reservationCpu") - RecommendationReasonCodeReservationMem = RecommendationReasonCode("reservationMem") - RecommendationReasonCodePowerOnVm = RecommendationReasonCode("powerOnVm") - RecommendationReasonCodePowerSaving = RecommendationReasonCode("powerSaving") - RecommendationReasonCodeIncreaseCapacity = RecommendationReasonCode("increaseCapacity") - RecommendationReasonCodeCheckResource = RecommendationReasonCode("checkResource") - RecommendationReasonCodeUnreservedCapacity = RecommendationReasonCode("unreservedCapacity") - RecommendationReasonCodeVmHostHardAffinity = RecommendationReasonCode("vmHostHardAffinity") - RecommendationReasonCodeVmHostSoftAffinity = RecommendationReasonCode("vmHostSoftAffinity") - RecommendationReasonCodeBalanceDatastoreSpaceUsage = RecommendationReasonCode("balanceDatastoreSpaceUsage") - RecommendationReasonCodeBalanceDatastoreIOLoad = RecommendationReasonCode("balanceDatastoreIOLoad") - RecommendationReasonCodeBalanceDatastoreIOPSReservation = RecommendationReasonCode("balanceDatastoreIOPSReservation") - RecommendationReasonCodeDatastoreMaint = RecommendationReasonCode("datastoreMaint") - RecommendationReasonCodeVirtualDiskJointAffin = RecommendationReasonCode("virtualDiskJointAffin") - RecommendationReasonCodeVirtualDiskAntiAffin = RecommendationReasonCode("virtualDiskAntiAffin") - RecommendationReasonCodeDatastoreSpaceOutage = RecommendationReasonCode("datastoreSpaceOutage") - RecommendationReasonCodeStoragePlacement = RecommendationReasonCode("storagePlacement") - RecommendationReasonCodeIolbDisabledInternal = RecommendationReasonCode("iolbDisabledInternal") - RecommendationReasonCodeXvmotionPlacement = RecommendationReasonCode("xvmotionPlacement") - RecommendationReasonCodeNetworkBandwidthReservation = RecommendationReasonCode("networkBandwidthReservation") - RecommendationReasonCodeHostInDegradation = RecommendationReasonCode("hostInDegradation") - RecommendationReasonCodeHostExitDegradation = RecommendationReasonCode("hostExitDegradation") - RecommendationReasonCodeMaxVmsConstraint = RecommendationReasonCode("maxVmsConstraint") - RecommendationReasonCodeFtConstraints = RecommendationReasonCode("ftConstraints") - RecommendationReasonCodeVmHostAffinityPolicy = RecommendationReasonCode("vmHostAffinityPolicy") - RecommendationReasonCodeVmHostAntiAffinityPolicy = RecommendationReasonCode("vmHostAntiAffinityPolicy") - RecommendationReasonCodeVmAntiAffinityPolicy = RecommendationReasonCode("vmAntiAffinityPolicy") - RecommendationReasonCodeBalanceVsanUsage = RecommendationReasonCode("balanceVsanUsage") -) - -func init() { - t["RecommendationReasonCode"] = reflect.TypeOf((*RecommendationReasonCode)(nil)).Elem() -} - -type RecommendationType string - -const ( - RecommendationTypeV1 = RecommendationType("V1") -) - -func init() { - t["RecommendationType"] = reflect.TypeOf((*RecommendationType)(nil)).Elem() -} - -type ReplicationDiskConfigFaultReasonForFault string - -const ( - ReplicationDiskConfigFaultReasonForFaultDiskNotFound = ReplicationDiskConfigFaultReasonForFault("diskNotFound") - ReplicationDiskConfigFaultReasonForFaultDiskTypeNotSupported = ReplicationDiskConfigFaultReasonForFault("diskTypeNotSupported") - ReplicationDiskConfigFaultReasonForFaultInvalidDiskKey = ReplicationDiskConfigFaultReasonForFault("invalidDiskKey") - ReplicationDiskConfigFaultReasonForFaultInvalidDiskReplicationId = ReplicationDiskConfigFaultReasonForFault("invalidDiskReplicationId") - ReplicationDiskConfigFaultReasonForFaultDuplicateDiskReplicationId = ReplicationDiskConfigFaultReasonForFault("duplicateDiskReplicationId") - ReplicationDiskConfigFaultReasonForFaultInvalidPersistentFilePath = ReplicationDiskConfigFaultReasonForFault("invalidPersistentFilePath") - ReplicationDiskConfigFaultReasonForFaultReconfigureDiskReplicationIdNotAllowed = ReplicationDiskConfigFaultReasonForFault("reconfigureDiskReplicationIdNotAllowed") -) - -func init() { - t["ReplicationDiskConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultReasonForFault)(nil)).Elem() -} - -type ReplicationVmConfigFaultReasonForFault string - -const ( - ReplicationVmConfigFaultReasonForFaultIncompatibleHwVersion = ReplicationVmConfigFaultReasonForFault("incompatibleHwVersion") - ReplicationVmConfigFaultReasonForFaultInvalidVmReplicationId = ReplicationVmConfigFaultReasonForFault("invalidVmReplicationId") - ReplicationVmConfigFaultReasonForFaultInvalidGenerationNumber = ReplicationVmConfigFaultReasonForFault("invalidGenerationNumber") - ReplicationVmConfigFaultReasonForFaultOutOfBoundsRpoValue = ReplicationVmConfigFaultReasonForFault("outOfBoundsRpoValue") - ReplicationVmConfigFaultReasonForFaultInvalidDestinationIpAddress = ReplicationVmConfigFaultReasonForFault("invalidDestinationIpAddress") - ReplicationVmConfigFaultReasonForFaultInvalidDestinationPort = ReplicationVmConfigFaultReasonForFault("invalidDestinationPort") - ReplicationVmConfigFaultReasonForFaultInvalidExtraVmOptions = ReplicationVmConfigFaultReasonForFault("invalidExtraVmOptions") - ReplicationVmConfigFaultReasonForFaultStaleGenerationNumber = ReplicationVmConfigFaultReasonForFault("staleGenerationNumber") - ReplicationVmConfigFaultReasonForFaultReconfigureVmReplicationIdNotAllowed = ReplicationVmConfigFaultReasonForFault("reconfigureVmReplicationIdNotAllowed") - ReplicationVmConfigFaultReasonForFaultCannotRetrieveVmReplicationConfiguration = ReplicationVmConfigFaultReasonForFault("cannotRetrieveVmReplicationConfiguration") - ReplicationVmConfigFaultReasonForFaultReplicationAlreadyEnabled = ReplicationVmConfigFaultReasonForFault("replicationAlreadyEnabled") - ReplicationVmConfigFaultReasonForFaultInvalidPriorConfiguration = ReplicationVmConfigFaultReasonForFault("invalidPriorConfiguration") - ReplicationVmConfigFaultReasonForFaultReplicationNotEnabled = ReplicationVmConfigFaultReasonForFault("replicationNotEnabled") - ReplicationVmConfigFaultReasonForFaultReplicationConfigurationFailed = ReplicationVmConfigFaultReasonForFault("replicationConfigurationFailed") - ReplicationVmConfigFaultReasonForFaultEncryptedVm = ReplicationVmConfigFaultReasonForFault("encryptedVm") - ReplicationVmConfigFaultReasonForFaultInvalidThumbprint = ReplicationVmConfigFaultReasonForFault("invalidThumbprint") - ReplicationVmConfigFaultReasonForFaultIncompatibleDevice = ReplicationVmConfigFaultReasonForFault("incompatibleDevice") -) - -func init() { - t["ReplicationVmConfigFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmConfigFaultReasonForFault)(nil)).Elem() -} - -type ReplicationVmFaultReasonForFault string - -const ( - ReplicationVmFaultReasonForFaultNotConfigured = ReplicationVmFaultReasonForFault("notConfigured") - ReplicationVmFaultReasonForFaultPoweredOff = ReplicationVmFaultReasonForFault("poweredOff") - ReplicationVmFaultReasonForFaultSuspended = ReplicationVmFaultReasonForFault("suspended") - ReplicationVmFaultReasonForFaultPoweredOn = ReplicationVmFaultReasonForFault("poweredOn") - ReplicationVmFaultReasonForFaultOfflineReplicating = ReplicationVmFaultReasonForFault("offlineReplicating") - ReplicationVmFaultReasonForFaultInvalidState = ReplicationVmFaultReasonForFault("invalidState") - ReplicationVmFaultReasonForFaultInvalidInstanceId = ReplicationVmFaultReasonForFault("invalidInstanceId") - ReplicationVmFaultReasonForFaultCloseDiskError = ReplicationVmFaultReasonForFault("closeDiskError") - ReplicationVmFaultReasonForFaultGroupExist = ReplicationVmFaultReasonForFault("groupExist") -) - -func init() { - t["ReplicationVmFaultReasonForFault"] = reflect.TypeOf((*ReplicationVmFaultReasonForFault)(nil)).Elem() -} - -type ReplicationVmInProgressFaultActivity string - -const ( - ReplicationVmInProgressFaultActivityFullSync = ReplicationVmInProgressFaultActivity("fullSync") - ReplicationVmInProgressFaultActivityDelta = ReplicationVmInProgressFaultActivity("delta") -) - -func init() { - t["ReplicationVmInProgressFaultActivity"] = reflect.TypeOf((*ReplicationVmInProgressFaultActivity)(nil)).Elem() -} - -type ReplicationVmState string - -const ( - ReplicationVmStateNone = ReplicationVmState("none") - ReplicationVmStatePaused = ReplicationVmState("paused") - ReplicationVmStateSyncing = ReplicationVmState("syncing") - ReplicationVmStateIdle = ReplicationVmState("idle") - ReplicationVmStateActive = ReplicationVmState("active") - ReplicationVmStateError = ReplicationVmState("error") -) - -func init() { - t["ReplicationVmState"] = reflect.TypeOf((*ReplicationVmState)(nil)).Elem() -} - -type ResourceConfigSpecScaleSharesBehavior string - -const ( - ResourceConfigSpecScaleSharesBehaviorDisabled = ResourceConfigSpecScaleSharesBehavior("disabled") - ResourceConfigSpecScaleSharesBehaviorScaleCpuAndMemoryShares = ResourceConfigSpecScaleSharesBehavior("scaleCpuAndMemoryShares") -) - -func init() { - t["ResourceConfigSpecScaleSharesBehavior"] = reflect.TypeOf((*ResourceConfigSpecScaleSharesBehavior)(nil)).Elem() -} - -type ScheduledHardwareUpgradeInfoHardwareUpgradePolicy string - -const ( - ScheduledHardwareUpgradeInfoHardwareUpgradePolicyNever = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("never") - ScheduledHardwareUpgradeInfoHardwareUpgradePolicyOnSoftPowerOff = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("onSoftPowerOff") - ScheduledHardwareUpgradeInfoHardwareUpgradePolicyAlways = ScheduledHardwareUpgradeInfoHardwareUpgradePolicy("always") -) - -func init() { - t["ScheduledHardwareUpgradeInfoHardwareUpgradePolicy"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradePolicy)(nil)).Elem() -} - -type ScheduledHardwareUpgradeInfoHardwareUpgradeStatus string - -const ( - ScheduledHardwareUpgradeInfoHardwareUpgradeStatusNone = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("none") - ScheduledHardwareUpgradeInfoHardwareUpgradeStatusPending = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("pending") - ScheduledHardwareUpgradeInfoHardwareUpgradeStatusSuccess = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("success") - ScheduledHardwareUpgradeInfoHardwareUpgradeStatusFailed = ScheduledHardwareUpgradeInfoHardwareUpgradeStatus("failed") -) - -func init() { - t["ScheduledHardwareUpgradeInfoHardwareUpgradeStatus"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfoHardwareUpgradeStatus)(nil)).Elem() -} - -type ScsiDiskType string - -const ( - ScsiDiskTypeNative512 = ScsiDiskType("native512") - ScsiDiskTypeEmulated512 = ScsiDiskType("emulated512") - ScsiDiskTypeNative4k = ScsiDiskType("native4k") - ScsiDiskTypeSoftwareEmulated4k = ScsiDiskType("SoftwareEmulated4k") - ScsiDiskTypeUnknown = ScsiDiskType("unknown") -) - -func init() { - t["ScsiDiskType"] = reflect.TypeOf((*ScsiDiskType)(nil)).Elem() -} - -type ScsiLunDescriptorQuality string - -const ( - ScsiLunDescriptorQualityHighQuality = ScsiLunDescriptorQuality("highQuality") - ScsiLunDescriptorQualityMediumQuality = ScsiLunDescriptorQuality("mediumQuality") - ScsiLunDescriptorQualityLowQuality = ScsiLunDescriptorQuality("lowQuality") - ScsiLunDescriptorQualityUnknownQuality = ScsiLunDescriptorQuality("unknownQuality") -) - -func init() { - t["ScsiLunDescriptorQuality"] = reflect.TypeOf((*ScsiLunDescriptorQuality)(nil)).Elem() -} - -type ScsiLunState string - -const ( - ScsiLunStateUnknownState = ScsiLunState("unknownState") - ScsiLunStateOk = ScsiLunState("ok") - ScsiLunStateError = ScsiLunState("error") - ScsiLunStateOff = ScsiLunState("off") - ScsiLunStateQuiesced = ScsiLunState("quiesced") - ScsiLunStateDegraded = ScsiLunState("degraded") - ScsiLunStateLostCommunication = ScsiLunState("lostCommunication") - ScsiLunStateTimeout = ScsiLunState("timeout") -) - -func init() { - t["ScsiLunState"] = reflect.TypeOf((*ScsiLunState)(nil)).Elem() -} - -type ScsiLunType string - -const ( - ScsiLunTypeDisk = ScsiLunType("disk") - ScsiLunTypeTape = ScsiLunType("tape") - ScsiLunTypePrinter = ScsiLunType("printer") - ScsiLunTypeProcessor = ScsiLunType("processor") - ScsiLunTypeWorm = ScsiLunType("worm") - ScsiLunTypeCdrom = ScsiLunType("cdrom") - ScsiLunTypeScanner = ScsiLunType("scanner") - ScsiLunTypeOpticalDevice = ScsiLunType("opticalDevice") - ScsiLunTypeMediaChanger = ScsiLunType("mediaChanger") - ScsiLunTypeCommunications = ScsiLunType("communications") - ScsiLunTypeStorageArrayController = ScsiLunType("storageArrayController") - ScsiLunTypeEnclosure = ScsiLunType("enclosure") - ScsiLunTypeUnknown = ScsiLunType("unknown") -) - -func init() { - t["ScsiLunType"] = reflect.TypeOf((*ScsiLunType)(nil)).Elem() -} - -type ScsiLunVStorageSupportStatus string - -const ( - ScsiLunVStorageSupportStatusVStorageSupported = ScsiLunVStorageSupportStatus("vStorageSupported") - ScsiLunVStorageSupportStatusVStorageUnsupported = ScsiLunVStorageSupportStatus("vStorageUnsupported") - ScsiLunVStorageSupportStatusVStorageUnknown = ScsiLunVStorageSupportStatus("vStorageUnknown") -) - -func init() { - t["ScsiLunVStorageSupportStatus"] = reflect.TypeOf((*ScsiLunVStorageSupportStatus)(nil)).Elem() -} - -type SessionManagerGenericServiceTicketTicketType string - -const ( - SessionManagerGenericServiceTicketTicketTypeHttpNfcServiceTicket = SessionManagerGenericServiceTicketTicketType("HttpNfcServiceTicket") - SessionManagerGenericServiceTicketTicketTypeHostServiceTicket = SessionManagerGenericServiceTicketTicketType("HostServiceTicket") - SessionManagerGenericServiceTicketTicketTypeVcServiceTicket = SessionManagerGenericServiceTicketTicketType("VcServiceTicket") -) - -func init() { - t["SessionManagerGenericServiceTicketTicketType"] = reflect.TypeOf((*SessionManagerGenericServiceTicketTicketType)(nil)).Elem() -} - -type SessionManagerHttpServiceRequestSpecMethod string - -const ( - SessionManagerHttpServiceRequestSpecMethodHttpOptions = SessionManagerHttpServiceRequestSpecMethod("httpOptions") - SessionManagerHttpServiceRequestSpecMethodHttpGet = SessionManagerHttpServiceRequestSpecMethod("httpGet") - SessionManagerHttpServiceRequestSpecMethodHttpHead = SessionManagerHttpServiceRequestSpecMethod("httpHead") - SessionManagerHttpServiceRequestSpecMethodHttpPost = SessionManagerHttpServiceRequestSpecMethod("httpPost") - SessionManagerHttpServiceRequestSpecMethodHttpPut = SessionManagerHttpServiceRequestSpecMethod("httpPut") - SessionManagerHttpServiceRequestSpecMethodHttpDelete = SessionManagerHttpServiceRequestSpecMethod("httpDelete") - SessionManagerHttpServiceRequestSpecMethodHttpTrace = SessionManagerHttpServiceRequestSpecMethod("httpTrace") - SessionManagerHttpServiceRequestSpecMethodHttpConnect = SessionManagerHttpServiceRequestSpecMethod("httpConnect") -) - -func init() { - t["SessionManagerHttpServiceRequestSpecMethod"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpecMethod)(nil)).Elem() -} - -type SharesLevel string - -const ( - SharesLevelLow = SharesLevel("low") - SharesLevelNormal = SharesLevel("normal") - SharesLevelHigh = SharesLevel("high") - SharesLevelCustom = SharesLevel("custom") -) - -func init() { - t["SharesLevel"] = reflect.TypeOf((*SharesLevel)(nil)).Elem() -} - -type SimpleCommandEncoding string - -const ( - SimpleCommandEncodingCSV = SimpleCommandEncoding("CSV") - SimpleCommandEncodingHEX = SimpleCommandEncoding("HEX") - SimpleCommandEncodingSTRING = SimpleCommandEncoding("STRING") -) - -func init() { - t["SimpleCommandEncoding"] = reflect.TypeOf((*SimpleCommandEncoding)(nil)).Elem() -} - -type SlpDiscoveryMethod string - -const ( - SlpDiscoveryMethodSlpDhcp = SlpDiscoveryMethod("slpDhcp") - SlpDiscoveryMethodSlpAutoUnicast = SlpDiscoveryMethod("slpAutoUnicast") - SlpDiscoveryMethodSlpAutoMulticast = SlpDiscoveryMethod("slpAutoMulticast") - SlpDiscoveryMethodSlpManual = SlpDiscoveryMethod("slpManual") -) - -func init() { - t["SlpDiscoveryMethod"] = reflect.TypeOf((*SlpDiscoveryMethod)(nil)).Elem() -} - -type SoftwarePackageConstraint string - -const ( - SoftwarePackageConstraintEquals = SoftwarePackageConstraint("equals") - SoftwarePackageConstraintLessThan = SoftwarePackageConstraint("lessThan") - SoftwarePackageConstraintLessThanEqual = SoftwarePackageConstraint("lessThanEqual") - SoftwarePackageConstraintGreaterThanEqual = SoftwarePackageConstraint("greaterThanEqual") - SoftwarePackageConstraintGreaterThan = SoftwarePackageConstraint("greaterThan") -) - -func init() { - t["SoftwarePackageConstraint"] = reflect.TypeOf((*SoftwarePackageConstraint)(nil)).Elem() -} - -type SoftwarePackageVibType string - -const ( - SoftwarePackageVibTypeBootbank = SoftwarePackageVibType("bootbank") - SoftwarePackageVibTypeTools = SoftwarePackageVibType("tools") - SoftwarePackageVibTypeMeta = SoftwarePackageVibType("meta") -) - -func init() { - t["SoftwarePackageVibType"] = reflect.TypeOf((*SoftwarePackageVibType)(nil)).Elem() -} - -type StateAlarmOperator string - -const ( - StateAlarmOperatorIsEqual = StateAlarmOperator("isEqual") - StateAlarmOperatorIsUnequal = StateAlarmOperator("isUnequal") -) - -func init() { - t["StateAlarmOperator"] = reflect.TypeOf((*StateAlarmOperator)(nil)).Elem() -} - -type StorageDrsPodConfigInfoBehavior string - -const ( - StorageDrsPodConfigInfoBehaviorManual = StorageDrsPodConfigInfoBehavior("manual") - StorageDrsPodConfigInfoBehaviorAutomated = StorageDrsPodConfigInfoBehavior("automated") -) - -func init() { - t["StorageDrsPodConfigInfoBehavior"] = reflect.TypeOf((*StorageDrsPodConfigInfoBehavior)(nil)).Elem() -} - -type StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode string - -const ( - StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeUtilization = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("utilization") - StorageDrsSpaceLoadBalanceConfigSpaceThresholdModeFreeSpace = StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode("freeSpace") -) - -func init() { - t["StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfigSpaceThresholdMode)(nil)).Elem() -} - -type StorageIORMThresholdMode string - -const ( - StorageIORMThresholdModeAutomatic = StorageIORMThresholdMode("automatic") - StorageIORMThresholdModeManual = StorageIORMThresholdMode("manual") -) - -func init() { - t["StorageIORMThresholdMode"] = reflect.TypeOf((*StorageIORMThresholdMode)(nil)).Elem() -} - -type StoragePlacementSpecPlacementType string - -const ( - StoragePlacementSpecPlacementTypeCreate = StoragePlacementSpecPlacementType("create") - StoragePlacementSpecPlacementTypeReconfigure = StoragePlacementSpecPlacementType("reconfigure") - StoragePlacementSpecPlacementTypeRelocate = StoragePlacementSpecPlacementType("relocate") - StoragePlacementSpecPlacementTypeClone = StoragePlacementSpecPlacementType("clone") -) - -func init() { - t["StoragePlacementSpecPlacementType"] = reflect.TypeOf((*StoragePlacementSpecPlacementType)(nil)).Elem() -} - -type TaskFilterSpecRecursionOption string - -const ( - TaskFilterSpecRecursionOptionSelf = TaskFilterSpecRecursionOption("self") - TaskFilterSpecRecursionOptionChildren = TaskFilterSpecRecursionOption("children") - TaskFilterSpecRecursionOptionAll = TaskFilterSpecRecursionOption("all") -) - -func init() { - t["TaskFilterSpecRecursionOption"] = reflect.TypeOf((*TaskFilterSpecRecursionOption)(nil)).Elem() -} - -type TaskFilterSpecTimeOption string - -const ( - TaskFilterSpecTimeOptionQueuedTime = TaskFilterSpecTimeOption("queuedTime") - TaskFilterSpecTimeOptionStartedTime = TaskFilterSpecTimeOption("startedTime") - TaskFilterSpecTimeOptionCompletedTime = TaskFilterSpecTimeOption("completedTime") -) - -func init() { - t["TaskFilterSpecTimeOption"] = reflect.TypeOf((*TaskFilterSpecTimeOption)(nil)).Elem() -} - -type TaskInfoState string - -const ( - TaskInfoStateQueued = TaskInfoState("queued") - TaskInfoStateRunning = TaskInfoState("running") - TaskInfoStateSuccess = TaskInfoState("success") - TaskInfoStateError = TaskInfoState("error") -) - -func init() { - t["TaskInfoState"] = reflect.TypeOf((*TaskInfoState)(nil)).Elem() -} - -type ThirdPartyLicenseAssignmentFailedReason string - -const ( - ThirdPartyLicenseAssignmentFailedReasonLicenseAssignmentFailed = ThirdPartyLicenseAssignmentFailedReason("licenseAssignmentFailed") - ThirdPartyLicenseAssignmentFailedReasonModuleNotInstalled = ThirdPartyLicenseAssignmentFailedReason("moduleNotInstalled") -) - -func init() { - t["ThirdPartyLicenseAssignmentFailedReason"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedReason)(nil)).Elem() -} - -type UpgradePolicy string - -const ( - UpgradePolicyManual = UpgradePolicy("manual") - UpgradePolicyUpgradeAtPowerCycle = UpgradePolicy("upgradeAtPowerCycle") -) - -func init() { - t["UpgradePolicy"] = reflect.TypeOf((*UpgradePolicy)(nil)).Elem() -} - -type VAppAutoStartAction string - -const ( - VAppAutoStartActionNone = VAppAutoStartAction("none") - VAppAutoStartActionPowerOn = VAppAutoStartAction("powerOn") - VAppAutoStartActionPowerOff = VAppAutoStartAction("powerOff") - VAppAutoStartActionGuestShutdown = VAppAutoStartAction("guestShutdown") - VAppAutoStartActionSuspend = VAppAutoStartAction("suspend") -) - -func init() { - t["VAppAutoStartAction"] = reflect.TypeOf((*VAppAutoStartAction)(nil)).Elem() -} - -type VAppCloneSpecProvisioningType string - -const ( - VAppCloneSpecProvisioningTypeSameAsSource = VAppCloneSpecProvisioningType("sameAsSource") - VAppCloneSpecProvisioningTypeThin = VAppCloneSpecProvisioningType("thin") - VAppCloneSpecProvisioningTypeThick = VAppCloneSpecProvisioningType("thick") -) - -func init() { - t["VAppCloneSpecProvisioningType"] = reflect.TypeOf((*VAppCloneSpecProvisioningType)(nil)).Elem() -} - -type VAppIPAssignmentInfoAllocationSchemes string - -const ( - VAppIPAssignmentInfoAllocationSchemesDhcp = VAppIPAssignmentInfoAllocationSchemes("dhcp") - VAppIPAssignmentInfoAllocationSchemesOvfenv = VAppIPAssignmentInfoAllocationSchemes("ovfenv") -) - -func init() { - t["VAppIPAssignmentInfoAllocationSchemes"] = reflect.TypeOf((*VAppIPAssignmentInfoAllocationSchemes)(nil)).Elem() -} - -type VAppIPAssignmentInfoIpAllocationPolicy string - -const ( - VAppIPAssignmentInfoIpAllocationPolicyDhcpPolicy = VAppIPAssignmentInfoIpAllocationPolicy("dhcpPolicy") - VAppIPAssignmentInfoIpAllocationPolicyTransientPolicy = VAppIPAssignmentInfoIpAllocationPolicy("transientPolicy") - VAppIPAssignmentInfoIpAllocationPolicyFixedPolicy = VAppIPAssignmentInfoIpAllocationPolicy("fixedPolicy") - VAppIPAssignmentInfoIpAllocationPolicyFixedAllocatedPolicy = VAppIPAssignmentInfoIpAllocationPolicy("fixedAllocatedPolicy") -) - -func init() { - t["VAppIPAssignmentInfoIpAllocationPolicy"] = reflect.TypeOf((*VAppIPAssignmentInfoIpAllocationPolicy)(nil)).Elem() -} - -type VAppIPAssignmentInfoProtocols string - -const ( - VAppIPAssignmentInfoProtocolsIPv4 = VAppIPAssignmentInfoProtocols("IPv4") - VAppIPAssignmentInfoProtocolsIPv6 = VAppIPAssignmentInfoProtocols("IPv6") -) - -func init() { - t["VAppIPAssignmentInfoProtocols"] = reflect.TypeOf((*VAppIPAssignmentInfoProtocols)(nil)).Elem() -} - -type VFlashModuleNotSupportedReason string - -const ( - VFlashModuleNotSupportedReasonCacheModeNotSupported = VFlashModuleNotSupportedReason("CacheModeNotSupported") - VFlashModuleNotSupportedReasonCacheConsistencyTypeNotSupported = VFlashModuleNotSupportedReason("CacheConsistencyTypeNotSupported") - VFlashModuleNotSupportedReasonCacheBlockSizeNotSupported = VFlashModuleNotSupportedReason("CacheBlockSizeNotSupported") - VFlashModuleNotSupportedReasonCacheReservationNotSupported = VFlashModuleNotSupportedReason("CacheReservationNotSupported") - VFlashModuleNotSupportedReasonDiskSizeNotSupported = VFlashModuleNotSupportedReason("DiskSizeNotSupported") -) - -func init() { - t["VFlashModuleNotSupportedReason"] = reflect.TypeOf((*VFlashModuleNotSupportedReason)(nil)).Elem() -} - -type VMotionCompatibilityType string - -const ( - VMotionCompatibilityTypeCpu = VMotionCompatibilityType("cpu") - VMotionCompatibilityTypeSoftware = VMotionCompatibilityType("software") -) - -func init() { - t["VMotionCompatibilityType"] = reflect.TypeOf((*VMotionCompatibilityType)(nil)).Elem() -} - -type VMwareDVSTeamingMatchStatus string - -const ( - VMwareDVSTeamingMatchStatusIphashMatch = VMwareDVSTeamingMatchStatus("iphashMatch") - VMwareDVSTeamingMatchStatusNonIphashMatch = VMwareDVSTeamingMatchStatus("nonIphashMatch") - VMwareDVSTeamingMatchStatusIphashMismatch = VMwareDVSTeamingMatchStatus("iphashMismatch") - VMwareDVSTeamingMatchStatusNonIphashMismatch = VMwareDVSTeamingMatchStatus("nonIphashMismatch") -) - -func init() { - t["VMwareDVSTeamingMatchStatus"] = reflect.TypeOf((*VMwareDVSTeamingMatchStatus)(nil)).Elem() -} - -type VMwareDVSVspanSessionEncapType string - -const ( - VMwareDVSVspanSessionEncapTypeGre = VMwareDVSVspanSessionEncapType("gre") - VMwareDVSVspanSessionEncapTypeErspan2 = VMwareDVSVspanSessionEncapType("erspan2") - VMwareDVSVspanSessionEncapTypeErspan3 = VMwareDVSVspanSessionEncapType("erspan3") -) - -func init() { - t["VMwareDVSVspanSessionEncapType"] = reflect.TypeOf((*VMwareDVSVspanSessionEncapType)(nil)).Elem() -} - -type VMwareDVSVspanSessionType string - -const ( - VMwareDVSVspanSessionTypeMixedDestMirror = VMwareDVSVspanSessionType("mixedDestMirror") - VMwareDVSVspanSessionTypeDvPortMirror = VMwareDVSVspanSessionType("dvPortMirror") - VMwareDVSVspanSessionTypeRemoteMirrorSource = VMwareDVSVspanSessionType("remoteMirrorSource") - VMwareDVSVspanSessionTypeRemoteMirrorDest = VMwareDVSVspanSessionType("remoteMirrorDest") - VMwareDVSVspanSessionTypeEncapsulatedRemoteMirrorSource = VMwareDVSVspanSessionType("encapsulatedRemoteMirrorSource") -) - -func init() { - t["VMwareDVSVspanSessionType"] = reflect.TypeOf((*VMwareDVSVspanSessionType)(nil)).Elem() -} - -type VMwareDvsLacpApiVersion string - -const ( - VMwareDvsLacpApiVersionSingleLag = VMwareDvsLacpApiVersion("singleLag") - VMwareDvsLacpApiVersionMultipleLag = VMwareDvsLacpApiVersion("multipleLag") -) - -func init() { - t["VMwareDvsLacpApiVersion"] = reflect.TypeOf((*VMwareDvsLacpApiVersion)(nil)).Elem() -} - -type VMwareDvsLacpLoadBalanceAlgorithm string - -const ( - VMwareDvsLacpLoadBalanceAlgorithmSrcMac = VMwareDvsLacpLoadBalanceAlgorithm("srcMac") - VMwareDvsLacpLoadBalanceAlgorithmDestMac = VMwareDvsLacpLoadBalanceAlgorithm("destMac") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestMac = VMwareDvsLacpLoadBalanceAlgorithm("srcDestMac") - VMwareDvsLacpLoadBalanceAlgorithmDestIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("destIpVlan") - VMwareDvsLacpLoadBalanceAlgorithmSrcIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcIpVlan") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpVlan") - VMwareDvsLacpLoadBalanceAlgorithmDestTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("destTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmSrcTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcDestTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPort = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPort") - VMwareDvsLacpLoadBalanceAlgorithmDestIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("destIpTcpUdpPortVlan") - VMwareDvsLacpLoadBalanceAlgorithmSrcIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcIpTcpUdpPortVlan") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestIpTcpUdpPortVlan = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIpTcpUdpPortVlan") - VMwareDvsLacpLoadBalanceAlgorithmDestIp = VMwareDvsLacpLoadBalanceAlgorithm("destIp") - VMwareDvsLacpLoadBalanceAlgorithmSrcIp = VMwareDvsLacpLoadBalanceAlgorithm("srcIp") - VMwareDvsLacpLoadBalanceAlgorithmSrcDestIp = VMwareDvsLacpLoadBalanceAlgorithm("srcDestIp") - VMwareDvsLacpLoadBalanceAlgorithmVlan = VMwareDvsLacpLoadBalanceAlgorithm("vlan") - VMwareDvsLacpLoadBalanceAlgorithmSrcPortId = VMwareDvsLacpLoadBalanceAlgorithm("srcPortId") -) - -func init() { - t["VMwareDvsLacpLoadBalanceAlgorithm"] = reflect.TypeOf((*VMwareDvsLacpLoadBalanceAlgorithm)(nil)).Elem() -} - -type VMwareDvsMulticastFilteringMode string - -const ( - VMwareDvsMulticastFilteringModeLegacyFiltering = VMwareDvsMulticastFilteringMode("legacyFiltering") - VMwareDvsMulticastFilteringModeSnooping = VMwareDvsMulticastFilteringMode("snooping") -) - -func init() { - t["VMwareDvsMulticastFilteringMode"] = reflect.TypeOf((*VMwareDvsMulticastFilteringMode)(nil)).Elem() -} - -type VMwareUplinkLacpMode string - -const ( - VMwareUplinkLacpModeActive = VMwareUplinkLacpMode("active") - VMwareUplinkLacpModePassive = VMwareUplinkLacpMode("passive") -) - -func init() { - t["VMwareUplinkLacpMode"] = reflect.TypeOf((*VMwareUplinkLacpMode)(nil)).Elem() -} - -type VMwareUplinkLacpTimeoutMode string - -const ( - VMwareUplinkLacpTimeoutModeFast = VMwareUplinkLacpTimeoutMode("fast") - VMwareUplinkLacpTimeoutModeSlow = VMwareUplinkLacpTimeoutMode("slow") -) - -func init() { - t["VMwareUplinkLacpTimeoutMode"] = reflect.TypeOf((*VMwareUplinkLacpTimeoutMode)(nil)).Elem() -} - -type VStorageObjectConsumptionType string - -const ( - VStorageObjectConsumptionTypeDisk = VStorageObjectConsumptionType("disk") -) - -func init() { - t["VStorageObjectConsumptionType"] = reflect.TypeOf((*VStorageObjectConsumptionType)(nil)).Elem() -} - -type ValidateMigrationTestType string - -const ( - ValidateMigrationTestTypeSourceTests = ValidateMigrationTestType("sourceTests") - ValidateMigrationTestTypeCompatibilityTests = ValidateMigrationTestType("compatibilityTests") - ValidateMigrationTestTypeDiskAccessibilityTests = ValidateMigrationTestType("diskAccessibilityTests") - ValidateMigrationTestTypeResourceTests = ValidateMigrationTestType("resourceTests") -) - -func init() { - t["ValidateMigrationTestType"] = reflect.TypeOf((*ValidateMigrationTestType)(nil)).Elem() -} - -type VchaClusterMode string - -const ( - VchaClusterModeEnabled = VchaClusterMode("enabled") - VchaClusterModeDisabled = VchaClusterMode("disabled") - VchaClusterModeMaintenance = VchaClusterMode("maintenance") -) - -func init() { - t["VchaClusterMode"] = reflect.TypeOf((*VchaClusterMode)(nil)).Elem() -} - -type VchaClusterState string - -const ( - VchaClusterStateHealthy = VchaClusterState("healthy") - VchaClusterStateDegraded = VchaClusterState("degraded") - VchaClusterStateIsolated = VchaClusterState("isolated") -) - -func init() { - t["VchaClusterState"] = reflect.TypeOf((*VchaClusterState)(nil)).Elem() -} - -type VchaNodeRole string - -const ( - VchaNodeRoleActive = VchaNodeRole("active") - VchaNodeRolePassive = VchaNodeRole("passive") - VchaNodeRoleWitness = VchaNodeRole("witness") -) - -func init() { - t["VchaNodeRole"] = reflect.TypeOf((*VchaNodeRole)(nil)).Elem() -} - -type VchaNodeState string - -const ( - VchaNodeStateUp = VchaNodeState("up") - VchaNodeStateDown = VchaNodeState("down") -) - -func init() { - t["VchaNodeState"] = reflect.TypeOf((*VchaNodeState)(nil)).Elem() -} - -type VchaState string - -const ( - VchaStateConfigured = VchaState("configured") - VchaStateNotConfigured = VchaState("notConfigured") - VchaStateInvalid = VchaState("invalid") - VchaStatePrepared = VchaState("prepared") -) - -func init() { - t["VchaState"] = reflect.TypeOf((*VchaState)(nil)).Elem() -} - -type VirtualAppVAppState string - -const ( - VirtualAppVAppStateStarted = VirtualAppVAppState("started") - VirtualAppVAppStateStopped = VirtualAppVAppState("stopped") - VirtualAppVAppStateStarting = VirtualAppVAppState("starting") - VirtualAppVAppStateStopping = VirtualAppVAppState("stopping") -) - -func init() { - t["VirtualAppVAppState"] = reflect.TypeOf((*VirtualAppVAppState)(nil)).Elem() -} - -type VirtualDeviceConfigSpecChangeMode string - -const ( - VirtualDeviceConfigSpecChangeModeFail = VirtualDeviceConfigSpecChangeMode("fail") - VirtualDeviceConfigSpecChangeModeSkip = VirtualDeviceConfigSpecChangeMode("skip") -) - -func init() { - t["VirtualDeviceConfigSpecChangeMode"] = reflect.TypeOf((*VirtualDeviceConfigSpecChangeMode)(nil)).Elem() -} - -type VirtualDeviceConfigSpecFileOperation string - -const ( - VirtualDeviceConfigSpecFileOperationCreate = VirtualDeviceConfigSpecFileOperation("create") - VirtualDeviceConfigSpecFileOperationDestroy = VirtualDeviceConfigSpecFileOperation("destroy") - VirtualDeviceConfigSpecFileOperationReplace = VirtualDeviceConfigSpecFileOperation("replace") -) - -func init() { - t["VirtualDeviceConfigSpecFileOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecFileOperation)(nil)).Elem() -} - -type VirtualDeviceConfigSpecOperation string - -const ( - VirtualDeviceConfigSpecOperationAdd = VirtualDeviceConfigSpecOperation("add") - VirtualDeviceConfigSpecOperationRemove = VirtualDeviceConfigSpecOperation("remove") - VirtualDeviceConfigSpecOperationEdit = VirtualDeviceConfigSpecOperation("edit") -) - -func init() { - t["VirtualDeviceConfigSpecOperation"] = reflect.TypeOf((*VirtualDeviceConfigSpecOperation)(nil)).Elem() -} - -type VirtualDeviceConnectInfoMigrateConnectOp string - -const ( - VirtualDeviceConnectInfoMigrateConnectOpConnect = VirtualDeviceConnectInfoMigrateConnectOp("connect") - VirtualDeviceConnectInfoMigrateConnectOpDisconnect = VirtualDeviceConnectInfoMigrateConnectOp("disconnect") - VirtualDeviceConnectInfoMigrateConnectOpUnset = VirtualDeviceConnectInfoMigrateConnectOp("unset") -) - -func init() { - t["VirtualDeviceConnectInfoMigrateConnectOp"] = reflect.TypeOf((*VirtualDeviceConnectInfoMigrateConnectOp)(nil)).Elem() -} - -type VirtualDeviceConnectInfoStatus string - -const ( - VirtualDeviceConnectInfoStatusOk = VirtualDeviceConnectInfoStatus("ok") - VirtualDeviceConnectInfoStatusRecoverableError = VirtualDeviceConnectInfoStatus("recoverableError") - VirtualDeviceConnectInfoStatusUnrecoverableError = VirtualDeviceConnectInfoStatus("unrecoverableError") - VirtualDeviceConnectInfoStatusUntried = VirtualDeviceConnectInfoStatus("untried") -) - -func init() { - t["VirtualDeviceConnectInfoStatus"] = reflect.TypeOf((*VirtualDeviceConnectInfoStatus)(nil)).Elem() -} - -type VirtualDeviceFileExtension string - -const ( - VirtualDeviceFileExtensionIso = VirtualDeviceFileExtension("iso") - VirtualDeviceFileExtensionFlp = VirtualDeviceFileExtension("flp") - VirtualDeviceFileExtensionVmdk = VirtualDeviceFileExtension("vmdk") - VirtualDeviceFileExtensionDsk = VirtualDeviceFileExtension("dsk") - VirtualDeviceFileExtensionRdm = VirtualDeviceFileExtension("rdm") -) - -func init() { - t["VirtualDeviceFileExtension"] = reflect.TypeOf((*VirtualDeviceFileExtension)(nil)).Elem() -} - -type VirtualDeviceURIBackingOptionDirection string - -const ( - VirtualDeviceURIBackingOptionDirectionServer = VirtualDeviceURIBackingOptionDirection("server") - VirtualDeviceURIBackingOptionDirectionClient = VirtualDeviceURIBackingOptionDirection("client") -) - -func init() { - t["VirtualDeviceURIBackingOptionDirection"] = reflect.TypeOf((*VirtualDeviceURIBackingOptionDirection)(nil)).Elem() -} - -type VirtualDiskAdapterType string - -const ( - VirtualDiskAdapterTypeIde = VirtualDiskAdapterType("ide") - VirtualDiskAdapterTypeBusLogic = VirtualDiskAdapterType("busLogic") - VirtualDiskAdapterTypeLsiLogic = VirtualDiskAdapterType("lsiLogic") -) - -func init() { - t["VirtualDiskAdapterType"] = reflect.TypeOf((*VirtualDiskAdapterType)(nil)).Elem() -} - -type VirtualDiskCompatibilityMode string - -const ( - VirtualDiskCompatibilityModeVirtualMode = VirtualDiskCompatibilityMode("virtualMode") - VirtualDiskCompatibilityModePhysicalMode = VirtualDiskCompatibilityMode("physicalMode") -) - -func init() { - t["VirtualDiskCompatibilityMode"] = reflect.TypeOf((*VirtualDiskCompatibilityMode)(nil)).Elem() -} - -type VirtualDiskDeltaDiskFormat string - -const ( - VirtualDiskDeltaDiskFormatRedoLogFormat = VirtualDiskDeltaDiskFormat("redoLogFormat") - VirtualDiskDeltaDiskFormatNativeFormat = VirtualDiskDeltaDiskFormat("nativeFormat") - VirtualDiskDeltaDiskFormatSeSparseFormat = VirtualDiskDeltaDiskFormat("seSparseFormat") -) - -func init() { - t["VirtualDiskDeltaDiskFormat"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormat)(nil)).Elem() -} - -type VirtualDiskDeltaDiskFormatVariant string - -const ( - VirtualDiskDeltaDiskFormatVariantVmfsSparseVariant = VirtualDiskDeltaDiskFormatVariant("vmfsSparseVariant") - VirtualDiskDeltaDiskFormatVariantVsanSparseVariant = VirtualDiskDeltaDiskFormatVariant("vsanSparseVariant") -) - -func init() { - t["VirtualDiskDeltaDiskFormatVariant"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatVariant)(nil)).Elem() -} - -type VirtualDiskMode string - -const ( - VirtualDiskModePersistent = VirtualDiskMode("persistent") - VirtualDiskModeNonpersistent = VirtualDiskMode("nonpersistent") - VirtualDiskModeUndoable = VirtualDiskMode("undoable") - VirtualDiskModeIndependent_persistent = VirtualDiskMode("independent_persistent") - VirtualDiskModeIndependent_nonpersistent = VirtualDiskMode("independent_nonpersistent") - VirtualDiskModeAppend = VirtualDiskMode("append") -) - -func init() { - t["VirtualDiskMode"] = reflect.TypeOf((*VirtualDiskMode)(nil)).Elem() -} - -type VirtualDiskRuleSpecRuleType string - -const ( - VirtualDiskRuleSpecRuleTypeAffinity = VirtualDiskRuleSpecRuleType("affinity") - VirtualDiskRuleSpecRuleTypeAntiAffinity = VirtualDiskRuleSpecRuleType("antiAffinity") - VirtualDiskRuleSpecRuleTypeDisabled = VirtualDiskRuleSpecRuleType("disabled") -) - -func init() { - t["VirtualDiskRuleSpecRuleType"] = reflect.TypeOf((*VirtualDiskRuleSpecRuleType)(nil)).Elem() -} - -type VirtualDiskSharing string - -const ( - VirtualDiskSharingSharingNone = VirtualDiskSharing("sharingNone") - VirtualDiskSharingSharingMultiWriter = VirtualDiskSharing("sharingMultiWriter") -) - -func init() { - t["VirtualDiskSharing"] = reflect.TypeOf((*VirtualDiskSharing)(nil)).Elem() -} - -type VirtualDiskType string - -const ( - VirtualDiskTypePreallocated = VirtualDiskType("preallocated") - VirtualDiskTypeThin = VirtualDiskType("thin") - VirtualDiskTypeSeSparse = VirtualDiskType("seSparse") - VirtualDiskTypeRdm = VirtualDiskType("rdm") - VirtualDiskTypeRdmp = VirtualDiskType("rdmp") - VirtualDiskTypeRaw = VirtualDiskType("raw") - VirtualDiskTypeDelta = VirtualDiskType("delta") - VirtualDiskTypeSparse2Gb = VirtualDiskType("sparse2Gb") - VirtualDiskTypeThick2Gb = VirtualDiskType("thick2Gb") - VirtualDiskTypeEagerZeroedThick = VirtualDiskType("eagerZeroedThick") - VirtualDiskTypeSparseMonolithic = VirtualDiskType("sparseMonolithic") - VirtualDiskTypeFlatMonolithic = VirtualDiskType("flatMonolithic") - VirtualDiskTypeThick = VirtualDiskType("thick") -) - -func init() { - t["VirtualDiskType"] = reflect.TypeOf((*VirtualDiskType)(nil)).Elem() -} - -type VirtualDiskVFlashCacheConfigInfoCacheConsistencyType string - -const ( - VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeStrong = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("strong") - VirtualDiskVFlashCacheConfigInfoCacheConsistencyTypeWeak = VirtualDiskVFlashCacheConfigInfoCacheConsistencyType("weak") -) - -func init() { - t["VirtualDiskVFlashCacheConfigInfoCacheConsistencyType"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheConsistencyType)(nil)).Elem() -} - -type VirtualDiskVFlashCacheConfigInfoCacheMode string - -const ( - VirtualDiskVFlashCacheConfigInfoCacheModeWrite_thru = VirtualDiskVFlashCacheConfigInfoCacheMode("write_thru") - VirtualDiskVFlashCacheConfigInfoCacheModeWrite_back = VirtualDiskVFlashCacheConfigInfoCacheMode("write_back") -) - -func init() { - t["VirtualDiskVFlashCacheConfigInfoCacheMode"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfoCacheMode)(nil)).Elem() -} - -type VirtualEthernetCardLegacyNetworkDeviceName string - -const ( - VirtualEthernetCardLegacyNetworkDeviceNameBridged = VirtualEthernetCardLegacyNetworkDeviceName("bridged") - VirtualEthernetCardLegacyNetworkDeviceNameNat = VirtualEthernetCardLegacyNetworkDeviceName("nat") - VirtualEthernetCardLegacyNetworkDeviceNameHostonly = VirtualEthernetCardLegacyNetworkDeviceName("hostonly") -) - -func init() { - t["VirtualEthernetCardLegacyNetworkDeviceName"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkDeviceName)(nil)).Elem() -} - -type VirtualEthernetCardMacType string - -const ( - VirtualEthernetCardMacTypeManual = VirtualEthernetCardMacType("manual") - VirtualEthernetCardMacTypeGenerated = VirtualEthernetCardMacType("generated") - VirtualEthernetCardMacTypeAssigned = VirtualEthernetCardMacType("assigned") -) - -func init() { - t["VirtualEthernetCardMacType"] = reflect.TypeOf((*VirtualEthernetCardMacType)(nil)).Elem() -} - -type VirtualHardwareMotherboardLayout string - -const ( - VirtualHardwareMotherboardLayoutI440bxHostBridge = VirtualHardwareMotherboardLayout("i440bxHostBridge") - VirtualHardwareMotherboardLayoutAcpiHostBridges = VirtualHardwareMotherboardLayout("acpiHostBridges") -) - -func init() { - t["VirtualHardwareMotherboardLayout"] = reflect.TypeOf((*VirtualHardwareMotherboardLayout)(nil)).Elem() -} - -type VirtualMachineAppHeartbeatStatusType string - -const ( - VirtualMachineAppHeartbeatStatusTypeAppStatusGray = VirtualMachineAppHeartbeatStatusType("appStatusGray") - VirtualMachineAppHeartbeatStatusTypeAppStatusGreen = VirtualMachineAppHeartbeatStatusType("appStatusGreen") - VirtualMachineAppHeartbeatStatusTypeAppStatusRed = VirtualMachineAppHeartbeatStatusType("appStatusRed") -) - -func init() { - t["VirtualMachineAppHeartbeatStatusType"] = reflect.TypeOf((*VirtualMachineAppHeartbeatStatusType)(nil)).Elem() -} - -type VirtualMachineBootOptionsNetworkBootProtocolType string - -const ( - VirtualMachineBootOptionsNetworkBootProtocolTypeIpv4 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv4") - VirtualMachineBootOptionsNetworkBootProtocolTypeIpv6 = VirtualMachineBootOptionsNetworkBootProtocolType("ipv6") -) - -func init() { - t["VirtualMachineBootOptionsNetworkBootProtocolType"] = reflect.TypeOf((*VirtualMachineBootOptionsNetworkBootProtocolType)(nil)).Elem() -} - -type VirtualMachineCertThumbprintHashAlgorithm string - -const ( - VirtualMachineCertThumbprintHashAlgorithmSha256 = VirtualMachineCertThumbprintHashAlgorithm("sha256") -) - -func init() { - t["VirtualMachineCertThumbprintHashAlgorithm"] = reflect.TypeOf((*VirtualMachineCertThumbprintHashAlgorithm)(nil)).Elem() -} - -type VirtualMachineCloneSpecTpmProvisionPolicy string - -const ( - VirtualMachineCloneSpecTpmProvisionPolicyCopy = VirtualMachineCloneSpecTpmProvisionPolicy("copy") - VirtualMachineCloneSpecTpmProvisionPolicyReplace = VirtualMachineCloneSpecTpmProvisionPolicy("replace") -) - -func init() { - t["VirtualMachineCloneSpecTpmProvisionPolicy"] = reflect.TypeOf((*VirtualMachineCloneSpecTpmProvisionPolicy)(nil)).Elem() -} - -type VirtualMachineConfigInfoNpivWwnType string - -const ( - VirtualMachineConfigInfoNpivWwnTypeVc = VirtualMachineConfigInfoNpivWwnType("vc") - VirtualMachineConfigInfoNpivWwnTypeHost = VirtualMachineConfigInfoNpivWwnType("host") - VirtualMachineConfigInfoNpivWwnTypeExternal = VirtualMachineConfigInfoNpivWwnType("external") -) - -func init() { - t["VirtualMachineConfigInfoNpivWwnType"] = reflect.TypeOf((*VirtualMachineConfigInfoNpivWwnType)(nil)).Elem() -} - -type VirtualMachineConfigInfoSwapPlacementType string - -const ( - VirtualMachineConfigInfoSwapPlacementTypeInherit = VirtualMachineConfigInfoSwapPlacementType("inherit") - VirtualMachineConfigInfoSwapPlacementTypeVmDirectory = VirtualMachineConfigInfoSwapPlacementType("vmDirectory") - VirtualMachineConfigInfoSwapPlacementTypeHostLocal = VirtualMachineConfigInfoSwapPlacementType("hostLocal") -) - -func init() { - t["VirtualMachineConfigInfoSwapPlacementType"] = reflect.TypeOf((*VirtualMachineConfigInfoSwapPlacementType)(nil)).Elem() -} - -type VirtualMachineConfigSpecEncryptedFtModes string - -const ( - VirtualMachineConfigSpecEncryptedFtModesFtEncryptionDisabled = VirtualMachineConfigSpecEncryptedFtModes("ftEncryptionDisabled") - VirtualMachineConfigSpecEncryptedFtModesFtEncryptionOpportunistic = VirtualMachineConfigSpecEncryptedFtModes("ftEncryptionOpportunistic") - VirtualMachineConfigSpecEncryptedFtModesFtEncryptionRequired = VirtualMachineConfigSpecEncryptedFtModes("ftEncryptionRequired") -) - -func init() { - t["VirtualMachineConfigSpecEncryptedFtModes"] = reflect.TypeOf((*VirtualMachineConfigSpecEncryptedFtModes)(nil)).Elem() -} - -type VirtualMachineConfigSpecEncryptedVMotionModes string - -const ( - VirtualMachineConfigSpecEncryptedVMotionModesDisabled = VirtualMachineConfigSpecEncryptedVMotionModes("disabled") - VirtualMachineConfigSpecEncryptedVMotionModesOpportunistic = VirtualMachineConfigSpecEncryptedVMotionModes("opportunistic") - VirtualMachineConfigSpecEncryptedVMotionModesRequired = VirtualMachineConfigSpecEncryptedVMotionModes("required") -) - -func init() { - t["VirtualMachineConfigSpecEncryptedVMotionModes"] = reflect.TypeOf((*VirtualMachineConfigSpecEncryptedVMotionModes)(nil)).Elem() -} - -type VirtualMachineConfigSpecNpivWwnOp string - -const ( - VirtualMachineConfigSpecNpivWwnOpGenerate = VirtualMachineConfigSpecNpivWwnOp("generate") - VirtualMachineConfigSpecNpivWwnOpSet = VirtualMachineConfigSpecNpivWwnOp("set") - VirtualMachineConfigSpecNpivWwnOpRemove = VirtualMachineConfigSpecNpivWwnOp("remove") - VirtualMachineConfigSpecNpivWwnOpExtend = VirtualMachineConfigSpecNpivWwnOp("extend") -) - -func init() { - t["VirtualMachineConfigSpecNpivWwnOp"] = reflect.TypeOf((*VirtualMachineConfigSpecNpivWwnOp)(nil)).Elem() -} - -type VirtualMachineConnectionState string - -const ( - VirtualMachineConnectionStateConnected = VirtualMachineConnectionState("connected") - VirtualMachineConnectionStateDisconnected = VirtualMachineConnectionState("disconnected") - VirtualMachineConnectionStateOrphaned = VirtualMachineConnectionState("orphaned") - VirtualMachineConnectionStateInaccessible = VirtualMachineConnectionState("inaccessible") - VirtualMachineConnectionStateInvalid = VirtualMachineConnectionState("invalid") -) - -func init() { - t["VirtualMachineConnectionState"] = reflect.TypeOf((*VirtualMachineConnectionState)(nil)).Elem() -} - -type VirtualMachineCryptoState string - -const ( - VirtualMachineCryptoStateUnlocked = VirtualMachineCryptoState("unlocked") - VirtualMachineCryptoStateLocked = VirtualMachineCryptoState("locked") -) - -func init() { - t["VirtualMachineCryptoState"] = reflect.TypeOf((*VirtualMachineCryptoState)(nil)).Elem() -} - -type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther string - -const ( - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleHost = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleHost") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOtherVmNptIncompatibleNetwork = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther("vmNptIncompatibleNetwork") -) - -func init() { - t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonOther)(nil)).Elem() -} - -type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm string - -const ( - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuest = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuest") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleGuestDriver = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleGuestDriver") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterType = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterType") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptDisabledOrDisconnectedAdapter = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptDisabledOrDisconnectedAdapter") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleAdapterFeatures = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleAdapterFeatures") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptIncompatibleBackingType = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptIncompatibleBackingType") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptInsufficientMemoryReservation = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptInsufficientMemoryReservation") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptFaultToleranceOrRecordReplayConfigured = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptFaultToleranceOrRecordReplayConfigured") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingIOChainConfigured = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingIOChainConfigured") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptMonitorBlocks = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptMonitorBlocks") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptConflictingOperationInProgress = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptConflictingOperationInProgress") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptRuntimeError = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptRuntimeError") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptOutOfIntrVector = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptOutOfIntrVector") - VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVmVmNptVMCIActive = VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm("vmNptVMCIActive") -) - -func init() { - t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeStateVmDirectPathGen2InactiveReasonVm)(nil)).Elem() -} - -type VirtualMachineFaultToleranceState string - -const ( - VirtualMachineFaultToleranceStateNotConfigured = VirtualMachineFaultToleranceState("notConfigured") - VirtualMachineFaultToleranceStateDisabled = VirtualMachineFaultToleranceState("disabled") - VirtualMachineFaultToleranceStateEnabled = VirtualMachineFaultToleranceState("enabled") - VirtualMachineFaultToleranceStateNeedSecondary = VirtualMachineFaultToleranceState("needSecondary") - VirtualMachineFaultToleranceStateStarting = VirtualMachineFaultToleranceState("starting") - VirtualMachineFaultToleranceStateRunning = VirtualMachineFaultToleranceState("running") -) - -func init() { - t["VirtualMachineFaultToleranceState"] = reflect.TypeOf((*VirtualMachineFaultToleranceState)(nil)).Elem() -} - -type VirtualMachineFaultToleranceType string - -const ( - VirtualMachineFaultToleranceTypeUnset = VirtualMachineFaultToleranceType("unset") - VirtualMachineFaultToleranceTypeRecordReplay = VirtualMachineFaultToleranceType("recordReplay") - VirtualMachineFaultToleranceTypeCheckpointing = VirtualMachineFaultToleranceType("checkpointing") -) - -func init() { - t["VirtualMachineFaultToleranceType"] = reflect.TypeOf((*VirtualMachineFaultToleranceType)(nil)).Elem() -} - -type VirtualMachineFileLayoutExFileType string - -const ( - VirtualMachineFileLayoutExFileTypeConfig = VirtualMachineFileLayoutExFileType("config") - VirtualMachineFileLayoutExFileTypeExtendedConfig = VirtualMachineFileLayoutExFileType("extendedConfig") - VirtualMachineFileLayoutExFileTypeDiskDescriptor = VirtualMachineFileLayoutExFileType("diskDescriptor") - VirtualMachineFileLayoutExFileTypeDiskExtent = VirtualMachineFileLayoutExFileType("diskExtent") - VirtualMachineFileLayoutExFileTypeDigestDescriptor = VirtualMachineFileLayoutExFileType("digestDescriptor") - VirtualMachineFileLayoutExFileTypeDigestExtent = VirtualMachineFileLayoutExFileType("digestExtent") - VirtualMachineFileLayoutExFileTypeDiskReplicationState = VirtualMachineFileLayoutExFileType("diskReplicationState") - VirtualMachineFileLayoutExFileTypeLog = VirtualMachineFileLayoutExFileType("log") - VirtualMachineFileLayoutExFileTypeStat = VirtualMachineFileLayoutExFileType("stat") - VirtualMachineFileLayoutExFileTypeNamespaceData = VirtualMachineFileLayoutExFileType("namespaceData") - VirtualMachineFileLayoutExFileTypeDataSetsDiskModeStore = VirtualMachineFileLayoutExFileType("dataSetsDiskModeStore") - VirtualMachineFileLayoutExFileTypeDataSetsVmModeStore = VirtualMachineFileLayoutExFileType("dataSetsVmModeStore") - VirtualMachineFileLayoutExFileTypeNvram = VirtualMachineFileLayoutExFileType("nvram") - VirtualMachineFileLayoutExFileTypeSnapshotData = VirtualMachineFileLayoutExFileType("snapshotData") - VirtualMachineFileLayoutExFileTypeSnapshotMemory = VirtualMachineFileLayoutExFileType("snapshotMemory") - VirtualMachineFileLayoutExFileTypeSnapshotList = VirtualMachineFileLayoutExFileType("snapshotList") - VirtualMachineFileLayoutExFileTypeSnapshotManifestList = VirtualMachineFileLayoutExFileType("snapshotManifestList") - VirtualMachineFileLayoutExFileTypeSuspend = VirtualMachineFileLayoutExFileType("suspend") - VirtualMachineFileLayoutExFileTypeSuspendMemory = VirtualMachineFileLayoutExFileType("suspendMemory") - VirtualMachineFileLayoutExFileTypeSwap = VirtualMachineFileLayoutExFileType("swap") - VirtualMachineFileLayoutExFileTypeUwswap = VirtualMachineFileLayoutExFileType("uwswap") - VirtualMachineFileLayoutExFileTypeCore = VirtualMachineFileLayoutExFileType("core") - VirtualMachineFileLayoutExFileTypeScreenshot = VirtualMachineFileLayoutExFileType("screenshot") - VirtualMachineFileLayoutExFileTypeFtMetadata = VirtualMachineFileLayoutExFileType("ftMetadata") - VirtualMachineFileLayoutExFileTypeGuestCustomization = VirtualMachineFileLayoutExFileType("guestCustomization") -) - -func init() { - t["VirtualMachineFileLayoutExFileType"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileType)(nil)).Elem() -} - -type VirtualMachineFlagInfoMonitorType string - -const ( - VirtualMachineFlagInfoMonitorTypeRelease = VirtualMachineFlagInfoMonitorType("release") - VirtualMachineFlagInfoMonitorTypeDebug = VirtualMachineFlagInfoMonitorType("debug") - VirtualMachineFlagInfoMonitorTypeStats = VirtualMachineFlagInfoMonitorType("stats") -) - -func init() { - t["VirtualMachineFlagInfoMonitorType"] = reflect.TypeOf((*VirtualMachineFlagInfoMonitorType)(nil)).Elem() -} - -type VirtualMachineFlagInfoVirtualExecUsage string - -const ( - VirtualMachineFlagInfoVirtualExecUsageHvAuto = VirtualMachineFlagInfoVirtualExecUsage("hvAuto") - VirtualMachineFlagInfoVirtualExecUsageHvOn = VirtualMachineFlagInfoVirtualExecUsage("hvOn") - VirtualMachineFlagInfoVirtualExecUsageHvOff = VirtualMachineFlagInfoVirtualExecUsage("hvOff") -) - -func init() { - t["VirtualMachineFlagInfoVirtualExecUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualExecUsage)(nil)).Elem() -} - -type VirtualMachineFlagInfoVirtualMmuUsage string - -const ( - VirtualMachineFlagInfoVirtualMmuUsageAutomatic = VirtualMachineFlagInfoVirtualMmuUsage("automatic") - VirtualMachineFlagInfoVirtualMmuUsageOn = VirtualMachineFlagInfoVirtualMmuUsage("on") - VirtualMachineFlagInfoVirtualMmuUsageOff = VirtualMachineFlagInfoVirtualMmuUsage("off") -) - -func init() { - t["VirtualMachineFlagInfoVirtualMmuUsage"] = reflect.TypeOf((*VirtualMachineFlagInfoVirtualMmuUsage)(nil)).Elem() -} - -type VirtualMachineForkConfigInfoChildType string - -const ( - VirtualMachineForkConfigInfoChildTypeNone = VirtualMachineForkConfigInfoChildType("none") - VirtualMachineForkConfigInfoChildTypePersistent = VirtualMachineForkConfigInfoChildType("persistent") - VirtualMachineForkConfigInfoChildTypeNonpersistent = VirtualMachineForkConfigInfoChildType("nonpersistent") -) - -func init() { - t["VirtualMachineForkConfigInfoChildType"] = reflect.TypeOf((*VirtualMachineForkConfigInfoChildType)(nil)).Elem() -} - -type VirtualMachineGuestOsFamily string - -const ( - VirtualMachineGuestOsFamilyWindowsGuest = VirtualMachineGuestOsFamily("windowsGuest") - VirtualMachineGuestOsFamilyLinuxGuest = VirtualMachineGuestOsFamily("linuxGuest") - VirtualMachineGuestOsFamilyNetwareGuest = VirtualMachineGuestOsFamily("netwareGuest") - VirtualMachineGuestOsFamilySolarisGuest = VirtualMachineGuestOsFamily("solarisGuest") - VirtualMachineGuestOsFamilyDarwinGuestFamily = VirtualMachineGuestOsFamily("darwinGuestFamily") - VirtualMachineGuestOsFamilyOtherGuestFamily = VirtualMachineGuestOsFamily("otherGuestFamily") -) - -func init() { - t["VirtualMachineGuestOsFamily"] = reflect.TypeOf((*VirtualMachineGuestOsFamily)(nil)).Elem() -} - -type VirtualMachineGuestOsIdentifier string - -const ( - VirtualMachineGuestOsIdentifierDosGuest = VirtualMachineGuestOsIdentifier("dosGuest") - VirtualMachineGuestOsIdentifierWin31Guest = VirtualMachineGuestOsIdentifier("win31Guest") - VirtualMachineGuestOsIdentifierWin95Guest = VirtualMachineGuestOsIdentifier("win95Guest") - VirtualMachineGuestOsIdentifierWin98Guest = VirtualMachineGuestOsIdentifier("win98Guest") - VirtualMachineGuestOsIdentifierWinMeGuest = VirtualMachineGuestOsIdentifier("winMeGuest") - VirtualMachineGuestOsIdentifierWinNTGuest = VirtualMachineGuestOsIdentifier("winNTGuest") - VirtualMachineGuestOsIdentifierWin2000ProGuest = VirtualMachineGuestOsIdentifier("win2000ProGuest") - VirtualMachineGuestOsIdentifierWin2000ServGuest = VirtualMachineGuestOsIdentifier("win2000ServGuest") - VirtualMachineGuestOsIdentifierWin2000AdvServGuest = VirtualMachineGuestOsIdentifier("win2000AdvServGuest") - VirtualMachineGuestOsIdentifierWinXPHomeGuest = VirtualMachineGuestOsIdentifier("winXPHomeGuest") - VirtualMachineGuestOsIdentifierWinXPProGuest = VirtualMachineGuestOsIdentifier("winXPProGuest") - VirtualMachineGuestOsIdentifierWinXPPro64Guest = VirtualMachineGuestOsIdentifier("winXPPro64Guest") - VirtualMachineGuestOsIdentifierWinNetWebGuest = VirtualMachineGuestOsIdentifier("winNetWebGuest") - VirtualMachineGuestOsIdentifierWinNetStandardGuest = VirtualMachineGuestOsIdentifier("winNetStandardGuest") - VirtualMachineGuestOsIdentifierWinNetEnterpriseGuest = VirtualMachineGuestOsIdentifier("winNetEnterpriseGuest") - VirtualMachineGuestOsIdentifierWinNetDatacenterGuest = VirtualMachineGuestOsIdentifier("winNetDatacenterGuest") - VirtualMachineGuestOsIdentifierWinNetBusinessGuest = VirtualMachineGuestOsIdentifier("winNetBusinessGuest") - VirtualMachineGuestOsIdentifierWinNetStandard64Guest = VirtualMachineGuestOsIdentifier("winNetStandard64Guest") - VirtualMachineGuestOsIdentifierWinNetEnterprise64Guest = VirtualMachineGuestOsIdentifier("winNetEnterprise64Guest") - VirtualMachineGuestOsIdentifierWinLonghornGuest = VirtualMachineGuestOsIdentifier("winLonghornGuest") - VirtualMachineGuestOsIdentifierWinLonghorn64Guest = VirtualMachineGuestOsIdentifier("winLonghorn64Guest") - VirtualMachineGuestOsIdentifierWinNetDatacenter64Guest = VirtualMachineGuestOsIdentifier("winNetDatacenter64Guest") - VirtualMachineGuestOsIdentifierWinVistaGuest = VirtualMachineGuestOsIdentifier("winVistaGuest") - VirtualMachineGuestOsIdentifierWinVista64Guest = VirtualMachineGuestOsIdentifier("winVista64Guest") - VirtualMachineGuestOsIdentifierWindows7Guest = VirtualMachineGuestOsIdentifier("windows7Guest") - VirtualMachineGuestOsIdentifierWindows7_64Guest = VirtualMachineGuestOsIdentifier("windows7_64Guest") - VirtualMachineGuestOsIdentifierWindows7Server64Guest = VirtualMachineGuestOsIdentifier("windows7Server64Guest") - VirtualMachineGuestOsIdentifierWindows8Guest = VirtualMachineGuestOsIdentifier("windows8Guest") - VirtualMachineGuestOsIdentifierWindows8_64Guest = VirtualMachineGuestOsIdentifier("windows8_64Guest") - VirtualMachineGuestOsIdentifierWindows8Server64Guest = VirtualMachineGuestOsIdentifier("windows8Server64Guest") - VirtualMachineGuestOsIdentifierWindows9Guest = VirtualMachineGuestOsIdentifier("windows9Guest") - VirtualMachineGuestOsIdentifierWindows9_64Guest = VirtualMachineGuestOsIdentifier("windows9_64Guest") - VirtualMachineGuestOsIdentifierWindows9Server64Guest = VirtualMachineGuestOsIdentifier("windows9Server64Guest") - VirtualMachineGuestOsIdentifierWindows11_64Guest = VirtualMachineGuestOsIdentifier("windows11_64Guest") - VirtualMachineGuestOsIdentifierWindows12_64Guest = VirtualMachineGuestOsIdentifier("windows12_64Guest") - VirtualMachineGuestOsIdentifierWindowsHyperVGuest = VirtualMachineGuestOsIdentifier("windowsHyperVGuest") - VirtualMachineGuestOsIdentifierWindows2019srv_64Guest = VirtualMachineGuestOsIdentifier("windows2019srv_64Guest") - VirtualMachineGuestOsIdentifierWindows2019srvNext_64Guest = VirtualMachineGuestOsIdentifier("windows2019srvNext_64Guest") - VirtualMachineGuestOsIdentifierWindows2022srvNext_64Guest = VirtualMachineGuestOsIdentifier("windows2022srvNext_64Guest") - VirtualMachineGuestOsIdentifierFreebsdGuest = VirtualMachineGuestOsIdentifier("freebsdGuest") - VirtualMachineGuestOsIdentifierFreebsd64Guest = VirtualMachineGuestOsIdentifier("freebsd64Guest") - VirtualMachineGuestOsIdentifierFreebsd11Guest = VirtualMachineGuestOsIdentifier("freebsd11Guest") - VirtualMachineGuestOsIdentifierFreebsd11_64Guest = VirtualMachineGuestOsIdentifier("freebsd11_64Guest") - VirtualMachineGuestOsIdentifierFreebsd12Guest = VirtualMachineGuestOsIdentifier("freebsd12Guest") - VirtualMachineGuestOsIdentifierFreebsd12_64Guest = VirtualMachineGuestOsIdentifier("freebsd12_64Guest") - VirtualMachineGuestOsIdentifierFreebsd13Guest = VirtualMachineGuestOsIdentifier("freebsd13Guest") - VirtualMachineGuestOsIdentifierFreebsd13_64Guest = VirtualMachineGuestOsIdentifier("freebsd13_64Guest") - VirtualMachineGuestOsIdentifierFreebsd14Guest = VirtualMachineGuestOsIdentifier("freebsd14Guest") - VirtualMachineGuestOsIdentifierFreebsd14_64Guest = VirtualMachineGuestOsIdentifier("freebsd14_64Guest") - VirtualMachineGuestOsIdentifierRedhatGuest = VirtualMachineGuestOsIdentifier("redhatGuest") - VirtualMachineGuestOsIdentifierRhel2Guest = VirtualMachineGuestOsIdentifier("rhel2Guest") - VirtualMachineGuestOsIdentifierRhel3Guest = VirtualMachineGuestOsIdentifier("rhel3Guest") - VirtualMachineGuestOsIdentifierRhel3_64Guest = VirtualMachineGuestOsIdentifier("rhel3_64Guest") - VirtualMachineGuestOsIdentifierRhel4Guest = VirtualMachineGuestOsIdentifier("rhel4Guest") - VirtualMachineGuestOsIdentifierRhel4_64Guest = VirtualMachineGuestOsIdentifier("rhel4_64Guest") - VirtualMachineGuestOsIdentifierRhel5Guest = VirtualMachineGuestOsIdentifier("rhel5Guest") - VirtualMachineGuestOsIdentifierRhel5_64Guest = VirtualMachineGuestOsIdentifier("rhel5_64Guest") - VirtualMachineGuestOsIdentifierRhel6Guest = VirtualMachineGuestOsIdentifier("rhel6Guest") - VirtualMachineGuestOsIdentifierRhel6_64Guest = VirtualMachineGuestOsIdentifier("rhel6_64Guest") - VirtualMachineGuestOsIdentifierRhel7Guest = VirtualMachineGuestOsIdentifier("rhel7Guest") - VirtualMachineGuestOsIdentifierRhel7_64Guest = VirtualMachineGuestOsIdentifier("rhel7_64Guest") - VirtualMachineGuestOsIdentifierRhel8_64Guest = VirtualMachineGuestOsIdentifier("rhel8_64Guest") - VirtualMachineGuestOsIdentifierRhel9_64Guest = VirtualMachineGuestOsIdentifier("rhel9_64Guest") - VirtualMachineGuestOsIdentifierCentosGuest = VirtualMachineGuestOsIdentifier("centosGuest") - VirtualMachineGuestOsIdentifierCentos64Guest = VirtualMachineGuestOsIdentifier("centos64Guest") - VirtualMachineGuestOsIdentifierCentos6Guest = VirtualMachineGuestOsIdentifier("centos6Guest") - VirtualMachineGuestOsIdentifierCentos6_64Guest = VirtualMachineGuestOsIdentifier("centos6_64Guest") - VirtualMachineGuestOsIdentifierCentos7Guest = VirtualMachineGuestOsIdentifier("centos7Guest") - VirtualMachineGuestOsIdentifierCentos7_64Guest = VirtualMachineGuestOsIdentifier("centos7_64Guest") - VirtualMachineGuestOsIdentifierCentos8_64Guest = VirtualMachineGuestOsIdentifier("centos8_64Guest") - VirtualMachineGuestOsIdentifierCentos9_64Guest = VirtualMachineGuestOsIdentifier("centos9_64Guest") - VirtualMachineGuestOsIdentifierOracleLinuxGuest = VirtualMachineGuestOsIdentifier("oracleLinuxGuest") - VirtualMachineGuestOsIdentifierOracleLinux64Guest = VirtualMachineGuestOsIdentifier("oracleLinux64Guest") - VirtualMachineGuestOsIdentifierOracleLinux6Guest = VirtualMachineGuestOsIdentifier("oracleLinux6Guest") - VirtualMachineGuestOsIdentifierOracleLinux6_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux6_64Guest") - VirtualMachineGuestOsIdentifierOracleLinux7Guest = VirtualMachineGuestOsIdentifier("oracleLinux7Guest") - VirtualMachineGuestOsIdentifierOracleLinux7_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux7_64Guest") - VirtualMachineGuestOsIdentifierOracleLinux8_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux8_64Guest") - VirtualMachineGuestOsIdentifierOracleLinux9_64Guest = VirtualMachineGuestOsIdentifier("oracleLinux9_64Guest") - VirtualMachineGuestOsIdentifierSuseGuest = VirtualMachineGuestOsIdentifier("suseGuest") - VirtualMachineGuestOsIdentifierSuse64Guest = VirtualMachineGuestOsIdentifier("suse64Guest") - VirtualMachineGuestOsIdentifierSlesGuest = VirtualMachineGuestOsIdentifier("slesGuest") - VirtualMachineGuestOsIdentifierSles64Guest = VirtualMachineGuestOsIdentifier("sles64Guest") - VirtualMachineGuestOsIdentifierSles10Guest = VirtualMachineGuestOsIdentifier("sles10Guest") - VirtualMachineGuestOsIdentifierSles10_64Guest = VirtualMachineGuestOsIdentifier("sles10_64Guest") - VirtualMachineGuestOsIdentifierSles11Guest = VirtualMachineGuestOsIdentifier("sles11Guest") - VirtualMachineGuestOsIdentifierSles11_64Guest = VirtualMachineGuestOsIdentifier("sles11_64Guest") - VirtualMachineGuestOsIdentifierSles12Guest = VirtualMachineGuestOsIdentifier("sles12Guest") - VirtualMachineGuestOsIdentifierSles12_64Guest = VirtualMachineGuestOsIdentifier("sles12_64Guest") - VirtualMachineGuestOsIdentifierSles15_64Guest = VirtualMachineGuestOsIdentifier("sles15_64Guest") - VirtualMachineGuestOsIdentifierSles16_64Guest = VirtualMachineGuestOsIdentifier("sles16_64Guest") - VirtualMachineGuestOsIdentifierNld9Guest = VirtualMachineGuestOsIdentifier("nld9Guest") - VirtualMachineGuestOsIdentifierOesGuest = VirtualMachineGuestOsIdentifier("oesGuest") - VirtualMachineGuestOsIdentifierSjdsGuest = VirtualMachineGuestOsIdentifier("sjdsGuest") - VirtualMachineGuestOsIdentifierMandrakeGuest = VirtualMachineGuestOsIdentifier("mandrakeGuest") - VirtualMachineGuestOsIdentifierMandrivaGuest = VirtualMachineGuestOsIdentifier("mandrivaGuest") - VirtualMachineGuestOsIdentifierMandriva64Guest = VirtualMachineGuestOsIdentifier("mandriva64Guest") - VirtualMachineGuestOsIdentifierTurboLinuxGuest = VirtualMachineGuestOsIdentifier("turboLinuxGuest") - VirtualMachineGuestOsIdentifierTurboLinux64Guest = VirtualMachineGuestOsIdentifier("turboLinux64Guest") - VirtualMachineGuestOsIdentifierUbuntuGuest = VirtualMachineGuestOsIdentifier("ubuntuGuest") - VirtualMachineGuestOsIdentifierUbuntu64Guest = VirtualMachineGuestOsIdentifier("ubuntu64Guest") - VirtualMachineGuestOsIdentifierDebian4Guest = VirtualMachineGuestOsIdentifier("debian4Guest") - VirtualMachineGuestOsIdentifierDebian4_64Guest = VirtualMachineGuestOsIdentifier("debian4_64Guest") - VirtualMachineGuestOsIdentifierDebian5Guest = VirtualMachineGuestOsIdentifier("debian5Guest") - VirtualMachineGuestOsIdentifierDebian5_64Guest = VirtualMachineGuestOsIdentifier("debian5_64Guest") - VirtualMachineGuestOsIdentifierDebian6Guest = VirtualMachineGuestOsIdentifier("debian6Guest") - VirtualMachineGuestOsIdentifierDebian6_64Guest = VirtualMachineGuestOsIdentifier("debian6_64Guest") - VirtualMachineGuestOsIdentifierDebian7Guest = VirtualMachineGuestOsIdentifier("debian7Guest") - VirtualMachineGuestOsIdentifierDebian7_64Guest = VirtualMachineGuestOsIdentifier("debian7_64Guest") - VirtualMachineGuestOsIdentifierDebian8Guest = VirtualMachineGuestOsIdentifier("debian8Guest") - VirtualMachineGuestOsIdentifierDebian8_64Guest = VirtualMachineGuestOsIdentifier("debian8_64Guest") - VirtualMachineGuestOsIdentifierDebian9Guest = VirtualMachineGuestOsIdentifier("debian9Guest") - VirtualMachineGuestOsIdentifierDebian9_64Guest = VirtualMachineGuestOsIdentifier("debian9_64Guest") - VirtualMachineGuestOsIdentifierDebian10Guest = VirtualMachineGuestOsIdentifier("debian10Guest") - VirtualMachineGuestOsIdentifierDebian10_64Guest = VirtualMachineGuestOsIdentifier("debian10_64Guest") - VirtualMachineGuestOsIdentifierDebian11Guest = VirtualMachineGuestOsIdentifier("debian11Guest") - VirtualMachineGuestOsIdentifierDebian11_64Guest = VirtualMachineGuestOsIdentifier("debian11_64Guest") - VirtualMachineGuestOsIdentifierDebian12Guest = VirtualMachineGuestOsIdentifier("debian12Guest") - VirtualMachineGuestOsIdentifierDebian12_64Guest = VirtualMachineGuestOsIdentifier("debian12_64Guest") - VirtualMachineGuestOsIdentifierAsianux3Guest = VirtualMachineGuestOsIdentifier("asianux3Guest") - VirtualMachineGuestOsIdentifierAsianux3_64Guest = VirtualMachineGuestOsIdentifier("asianux3_64Guest") - VirtualMachineGuestOsIdentifierAsianux4Guest = VirtualMachineGuestOsIdentifier("asianux4Guest") - VirtualMachineGuestOsIdentifierAsianux4_64Guest = VirtualMachineGuestOsIdentifier("asianux4_64Guest") - VirtualMachineGuestOsIdentifierAsianux5_64Guest = VirtualMachineGuestOsIdentifier("asianux5_64Guest") - VirtualMachineGuestOsIdentifierAsianux7_64Guest = VirtualMachineGuestOsIdentifier("asianux7_64Guest") - VirtualMachineGuestOsIdentifierAsianux8_64Guest = VirtualMachineGuestOsIdentifier("asianux8_64Guest") - VirtualMachineGuestOsIdentifierAsianux9_64Guest = VirtualMachineGuestOsIdentifier("asianux9_64Guest") - VirtualMachineGuestOsIdentifierOpensuseGuest = VirtualMachineGuestOsIdentifier("opensuseGuest") - VirtualMachineGuestOsIdentifierOpensuse64Guest = VirtualMachineGuestOsIdentifier("opensuse64Guest") - VirtualMachineGuestOsIdentifierFedoraGuest = VirtualMachineGuestOsIdentifier("fedoraGuest") - VirtualMachineGuestOsIdentifierFedora64Guest = VirtualMachineGuestOsIdentifier("fedora64Guest") - VirtualMachineGuestOsIdentifierCoreos64Guest = VirtualMachineGuestOsIdentifier("coreos64Guest") - VirtualMachineGuestOsIdentifierVmwarePhoton64Guest = VirtualMachineGuestOsIdentifier("vmwarePhoton64Guest") - VirtualMachineGuestOsIdentifierOther24xLinuxGuest = VirtualMachineGuestOsIdentifier("other24xLinuxGuest") - VirtualMachineGuestOsIdentifierOther26xLinuxGuest = VirtualMachineGuestOsIdentifier("other26xLinuxGuest") - VirtualMachineGuestOsIdentifierOtherLinuxGuest = VirtualMachineGuestOsIdentifier("otherLinuxGuest") - VirtualMachineGuestOsIdentifierOther3xLinuxGuest = VirtualMachineGuestOsIdentifier("other3xLinuxGuest") - VirtualMachineGuestOsIdentifierOther4xLinuxGuest = VirtualMachineGuestOsIdentifier("other4xLinuxGuest") - VirtualMachineGuestOsIdentifierOther5xLinuxGuest = VirtualMachineGuestOsIdentifier("other5xLinuxGuest") - VirtualMachineGuestOsIdentifierOther6xLinuxGuest = VirtualMachineGuestOsIdentifier("other6xLinuxGuest") - VirtualMachineGuestOsIdentifierGenericLinuxGuest = VirtualMachineGuestOsIdentifier("genericLinuxGuest") - VirtualMachineGuestOsIdentifierOther24xLinux64Guest = VirtualMachineGuestOsIdentifier("other24xLinux64Guest") - VirtualMachineGuestOsIdentifierOther26xLinux64Guest = VirtualMachineGuestOsIdentifier("other26xLinux64Guest") - VirtualMachineGuestOsIdentifierOther3xLinux64Guest = VirtualMachineGuestOsIdentifier("other3xLinux64Guest") - VirtualMachineGuestOsIdentifierOther4xLinux64Guest = VirtualMachineGuestOsIdentifier("other4xLinux64Guest") - VirtualMachineGuestOsIdentifierOther5xLinux64Guest = VirtualMachineGuestOsIdentifier("other5xLinux64Guest") - VirtualMachineGuestOsIdentifierOther6xLinux64Guest = VirtualMachineGuestOsIdentifier("other6xLinux64Guest") - VirtualMachineGuestOsIdentifierOtherLinux64Guest = VirtualMachineGuestOsIdentifier("otherLinux64Guest") - VirtualMachineGuestOsIdentifierSolaris6Guest = VirtualMachineGuestOsIdentifier("solaris6Guest") - VirtualMachineGuestOsIdentifierSolaris7Guest = VirtualMachineGuestOsIdentifier("solaris7Guest") - VirtualMachineGuestOsIdentifierSolaris8Guest = VirtualMachineGuestOsIdentifier("solaris8Guest") - VirtualMachineGuestOsIdentifierSolaris9Guest = VirtualMachineGuestOsIdentifier("solaris9Guest") - VirtualMachineGuestOsIdentifierSolaris10Guest = VirtualMachineGuestOsIdentifier("solaris10Guest") - VirtualMachineGuestOsIdentifierSolaris10_64Guest = VirtualMachineGuestOsIdentifier("solaris10_64Guest") - VirtualMachineGuestOsIdentifierSolaris11_64Guest = VirtualMachineGuestOsIdentifier("solaris11_64Guest") - VirtualMachineGuestOsIdentifierOs2Guest = VirtualMachineGuestOsIdentifier("os2Guest") - VirtualMachineGuestOsIdentifierEComStationGuest = VirtualMachineGuestOsIdentifier("eComStationGuest") - VirtualMachineGuestOsIdentifierEComStation2Guest = VirtualMachineGuestOsIdentifier("eComStation2Guest") - VirtualMachineGuestOsIdentifierNetware4Guest = VirtualMachineGuestOsIdentifier("netware4Guest") - VirtualMachineGuestOsIdentifierNetware5Guest = VirtualMachineGuestOsIdentifier("netware5Guest") - VirtualMachineGuestOsIdentifierNetware6Guest = VirtualMachineGuestOsIdentifier("netware6Guest") - VirtualMachineGuestOsIdentifierOpenServer5Guest = VirtualMachineGuestOsIdentifier("openServer5Guest") - VirtualMachineGuestOsIdentifierOpenServer6Guest = VirtualMachineGuestOsIdentifier("openServer6Guest") - VirtualMachineGuestOsIdentifierUnixWare7Guest = VirtualMachineGuestOsIdentifier("unixWare7Guest") - VirtualMachineGuestOsIdentifierDarwinGuest = VirtualMachineGuestOsIdentifier("darwinGuest") - VirtualMachineGuestOsIdentifierDarwin64Guest = VirtualMachineGuestOsIdentifier("darwin64Guest") - VirtualMachineGuestOsIdentifierDarwin10Guest = VirtualMachineGuestOsIdentifier("darwin10Guest") - VirtualMachineGuestOsIdentifierDarwin10_64Guest = VirtualMachineGuestOsIdentifier("darwin10_64Guest") - VirtualMachineGuestOsIdentifierDarwin11Guest = VirtualMachineGuestOsIdentifier("darwin11Guest") - VirtualMachineGuestOsIdentifierDarwin11_64Guest = VirtualMachineGuestOsIdentifier("darwin11_64Guest") - VirtualMachineGuestOsIdentifierDarwin12_64Guest = VirtualMachineGuestOsIdentifier("darwin12_64Guest") - VirtualMachineGuestOsIdentifierDarwin13_64Guest = VirtualMachineGuestOsIdentifier("darwin13_64Guest") - VirtualMachineGuestOsIdentifierDarwin14_64Guest = VirtualMachineGuestOsIdentifier("darwin14_64Guest") - VirtualMachineGuestOsIdentifierDarwin15_64Guest = VirtualMachineGuestOsIdentifier("darwin15_64Guest") - VirtualMachineGuestOsIdentifierDarwin16_64Guest = VirtualMachineGuestOsIdentifier("darwin16_64Guest") - VirtualMachineGuestOsIdentifierDarwin17_64Guest = VirtualMachineGuestOsIdentifier("darwin17_64Guest") - VirtualMachineGuestOsIdentifierDarwin18_64Guest = VirtualMachineGuestOsIdentifier("darwin18_64Guest") - VirtualMachineGuestOsIdentifierDarwin19_64Guest = VirtualMachineGuestOsIdentifier("darwin19_64Guest") - VirtualMachineGuestOsIdentifierDarwin20_64Guest = VirtualMachineGuestOsIdentifier("darwin20_64Guest") - VirtualMachineGuestOsIdentifierDarwin21_64Guest = VirtualMachineGuestOsIdentifier("darwin21_64Guest") - VirtualMachineGuestOsIdentifierDarwin22_64Guest = VirtualMachineGuestOsIdentifier("darwin22_64Guest") - VirtualMachineGuestOsIdentifierDarwin23_64Guest = VirtualMachineGuestOsIdentifier("darwin23_64Guest") - VirtualMachineGuestOsIdentifierVmkernelGuest = VirtualMachineGuestOsIdentifier("vmkernelGuest") - VirtualMachineGuestOsIdentifierVmkernel5Guest = VirtualMachineGuestOsIdentifier("vmkernel5Guest") - VirtualMachineGuestOsIdentifierVmkernel6Guest = VirtualMachineGuestOsIdentifier("vmkernel6Guest") - VirtualMachineGuestOsIdentifierVmkernel65Guest = VirtualMachineGuestOsIdentifier("vmkernel65Guest") - VirtualMachineGuestOsIdentifierVmkernel7Guest = VirtualMachineGuestOsIdentifier("vmkernel7Guest") - VirtualMachineGuestOsIdentifierVmkernel8Guest = VirtualMachineGuestOsIdentifier("vmkernel8Guest") - VirtualMachineGuestOsIdentifierAmazonlinux2_64Guest = VirtualMachineGuestOsIdentifier("amazonlinux2_64Guest") - VirtualMachineGuestOsIdentifierAmazonlinux3_64Guest = VirtualMachineGuestOsIdentifier("amazonlinux3_64Guest") - VirtualMachineGuestOsIdentifierCrxPod1Guest = VirtualMachineGuestOsIdentifier("crxPod1Guest") - VirtualMachineGuestOsIdentifierRockylinux_64Guest = VirtualMachineGuestOsIdentifier("rockylinux_64Guest") - VirtualMachineGuestOsIdentifierAlmalinux_64Guest = VirtualMachineGuestOsIdentifier("almalinux_64Guest") - VirtualMachineGuestOsIdentifierOtherGuest = VirtualMachineGuestOsIdentifier("otherGuest") - VirtualMachineGuestOsIdentifierOtherGuest64 = VirtualMachineGuestOsIdentifier("otherGuest64") -) - -func init() { - t["VirtualMachineGuestOsIdentifier"] = reflect.TypeOf((*VirtualMachineGuestOsIdentifier)(nil)).Elem() -} - -type VirtualMachineGuestState string - -const ( - VirtualMachineGuestStateRunning = VirtualMachineGuestState("running") - VirtualMachineGuestStateShuttingDown = VirtualMachineGuestState("shuttingDown") - VirtualMachineGuestStateResetting = VirtualMachineGuestState("resetting") - VirtualMachineGuestStateStandby = VirtualMachineGuestState("standby") - VirtualMachineGuestStateNotRunning = VirtualMachineGuestState("notRunning") - VirtualMachineGuestStateUnknown = VirtualMachineGuestState("unknown") -) - -func init() { - t["VirtualMachineGuestState"] = reflect.TypeOf((*VirtualMachineGuestState)(nil)).Elem() -} - -type VirtualMachineHtSharing string - -const ( - VirtualMachineHtSharingAny = VirtualMachineHtSharing("any") - VirtualMachineHtSharingNone = VirtualMachineHtSharing("none") - VirtualMachineHtSharingInternal = VirtualMachineHtSharing("internal") -) - -func init() { - t["VirtualMachineHtSharing"] = reflect.TypeOf((*VirtualMachineHtSharing)(nil)).Elem() -} - -type VirtualMachineMemoryAllocationPolicy string - -const ( - VirtualMachineMemoryAllocationPolicySwapNone = VirtualMachineMemoryAllocationPolicy("swapNone") - VirtualMachineMemoryAllocationPolicySwapSome = VirtualMachineMemoryAllocationPolicy("swapSome") - VirtualMachineMemoryAllocationPolicySwapMost = VirtualMachineMemoryAllocationPolicy("swapMost") -) - -func init() { - t["VirtualMachineMemoryAllocationPolicy"] = reflect.TypeOf((*VirtualMachineMemoryAllocationPolicy)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadataOp string - -const ( - VirtualMachineMetadataManagerVmMetadataOpUpdate = VirtualMachineMetadataManagerVmMetadataOp("Update") - VirtualMachineMetadataManagerVmMetadataOpRemove = VirtualMachineMetadataManagerVmMetadataOp("Remove") -) - -func init() { - t["VirtualMachineMetadataManagerVmMetadataOp"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOp)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadataOwnerOwner string - -const ( - VirtualMachineMetadataManagerVmMetadataOwnerOwnerComVmwareVsphereHA = VirtualMachineMetadataManagerVmMetadataOwnerOwner("ComVmwareVsphereHA") -) - -func init() { - t["VirtualMachineMetadataManagerVmMetadataOwnerOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwnerOwner)(nil)).Elem() -} - -type VirtualMachineMovePriority string - -const ( - VirtualMachineMovePriorityLowPriority = VirtualMachineMovePriority("lowPriority") - VirtualMachineMovePriorityHighPriority = VirtualMachineMovePriority("highPriority") - VirtualMachineMovePriorityDefaultPriority = VirtualMachineMovePriority("defaultPriority") -) - -func init() { - t["VirtualMachineMovePriority"] = reflect.TypeOf((*VirtualMachineMovePriority)(nil)).Elem() -} - -type VirtualMachineNeedSecondaryReason string - -const ( - VirtualMachineNeedSecondaryReasonInitializing = VirtualMachineNeedSecondaryReason("initializing") - VirtualMachineNeedSecondaryReasonDivergence = VirtualMachineNeedSecondaryReason("divergence") - VirtualMachineNeedSecondaryReasonLostConnection = VirtualMachineNeedSecondaryReason("lostConnection") - VirtualMachineNeedSecondaryReasonPartialHardwareFailure = VirtualMachineNeedSecondaryReason("partialHardwareFailure") - VirtualMachineNeedSecondaryReasonUserAction = VirtualMachineNeedSecondaryReason("userAction") - VirtualMachineNeedSecondaryReasonCheckpointError = VirtualMachineNeedSecondaryReason("checkpointError") - VirtualMachineNeedSecondaryReasonOther = VirtualMachineNeedSecondaryReason("other") -) - -func init() { - t["VirtualMachineNeedSecondaryReason"] = reflect.TypeOf((*VirtualMachineNeedSecondaryReason)(nil)).Elem() -} - -type VirtualMachinePowerOffBehavior string - -const ( - VirtualMachinePowerOffBehaviorPowerOff = VirtualMachinePowerOffBehavior("powerOff") - VirtualMachinePowerOffBehaviorRevert = VirtualMachinePowerOffBehavior("revert") - VirtualMachinePowerOffBehaviorPrompt = VirtualMachinePowerOffBehavior("prompt") - VirtualMachinePowerOffBehaviorTake = VirtualMachinePowerOffBehavior("take") -) - -func init() { - t["VirtualMachinePowerOffBehavior"] = reflect.TypeOf((*VirtualMachinePowerOffBehavior)(nil)).Elem() -} - -type VirtualMachinePowerOpType string - -const ( - VirtualMachinePowerOpTypeSoft = VirtualMachinePowerOpType("soft") - VirtualMachinePowerOpTypeHard = VirtualMachinePowerOpType("hard") - VirtualMachinePowerOpTypePreset = VirtualMachinePowerOpType("preset") -) - -func init() { - t["VirtualMachinePowerOpType"] = reflect.TypeOf((*VirtualMachinePowerOpType)(nil)).Elem() -} - -type VirtualMachinePowerState string - -const ( - VirtualMachinePowerStatePoweredOff = VirtualMachinePowerState("poweredOff") - VirtualMachinePowerStatePoweredOn = VirtualMachinePowerState("poweredOn") - VirtualMachinePowerStateSuspended = VirtualMachinePowerState("suspended") -) - -func init() { - t["VirtualMachinePowerState"] = reflect.TypeOf((*VirtualMachinePowerState)(nil)).Elem() -} - -type VirtualMachineRecordReplayState string - -const ( - VirtualMachineRecordReplayStateRecording = VirtualMachineRecordReplayState("recording") - VirtualMachineRecordReplayStateReplaying = VirtualMachineRecordReplayState("replaying") - VirtualMachineRecordReplayStateInactive = VirtualMachineRecordReplayState("inactive") -) - -func init() { - t["VirtualMachineRecordReplayState"] = reflect.TypeOf((*VirtualMachineRecordReplayState)(nil)).Elem() -} - -type VirtualMachineRelocateDiskMoveOptions string - -const ( - VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndAllowSharing = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndAllowSharing") - VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndDisallowSharing = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndDisallowSharing") - VirtualMachineRelocateDiskMoveOptionsMoveChildMostDiskBacking = VirtualMachineRelocateDiskMoveOptions("moveChildMostDiskBacking") - VirtualMachineRelocateDiskMoveOptionsCreateNewChildDiskBacking = VirtualMachineRelocateDiskMoveOptions("createNewChildDiskBacking") - VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndConsolidate = VirtualMachineRelocateDiskMoveOptions("moveAllDiskBackingsAndConsolidate") -) - -func init() { - t["VirtualMachineRelocateDiskMoveOptions"] = reflect.TypeOf((*VirtualMachineRelocateDiskMoveOptions)(nil)).Elem() -} - -type VirtualMachineRelocateTransformation string - -const ( - VirtualMachineRelocateTransformationFlat = VirtualMachineRelocateTransformation("flat") - VirtualMachineRelocateTransformationSparse = VirtualMachineRelocateTransformation("sparse") -) - -func init() { - t["VirtualMachineRelocateTransformation"] = reflect.TypeOf((*VirtualMachineRelocateTransformation)(nil)).Elem() -} - -type VirtualMachineScsiPassthroughType string - -const ( - VirtualMachineScsiPassthroughTypeDisk = VirtualMachineScsiPassthroughType("disk") - VirtualMachineScsiPassthroughTypeTape = VirtualMachineScsiPassthroughType("tape") - VirtualMachineScsiPassthroughTypePrinter = VirtualMachineScsiPassthroughType("printer") - VirtualMachineScsiPassthroughTypeProcessor = VirtualMachineScsiPassthroughType("processor") - VirtualMachineScsiPassthroughTypeWorm = VirtualMachineScsiPassthroughType("worm") - VirtualMachineScsiPassthroughTypeCdrom = VirtualMachineScsiPassthroughType("cdrom") - VirtualMachineScsiPassthroughTypeScanner = VirtualMachineScsiPassthroughType("scanner") - VirtualMachineScsiPassthroughTypeOptical = VirtualMachineScsiPassthroughType("optical") - VirtualMachineScsiPassthroughTypeMedia = VirtualMachineScsiPassthroughType("media") - VirtualMachineScsiPassthroughTypeCom = VirtualMachineScsiPassthroughType("com") - VirtualMachineScsiPassthroughTypeRaid = VirtualMachineScsiPassthroughType("raid") - VirtualMachineScsiPassthroughTypeUnknown = VirtualMachineScsiPassthroughType("unknown") -) - -func init() { - t["VirtualMachineScsiPassthroughType"] = reflect.TypeOf((*VirtualMachineScsiPassthroughType)(nil)).Elem() -} - -type VirtualMachineSgxInfoFlcModes string - -const ( - VirtualMachineSgxInfoFlcModesLocked = VirtualMachineSgxInfoFlcModes("locked") - VirtualMachineSgxInfoFlcModesUnlocked = VirtualMachineSgxInfoFlcModes("unlocked") -) - -func init() { - t["VirtualMachineSgxInfoFlcModes"] = reflect.TypeOf((*VirtualMachineSgxInfoFlcModes)(nil)).Elem() -} - -type VirtualMachineStandbyActionType string - -const ( - VirtualMachineStandbyActionTypeCheckpoint = VirtualMachineStandbyActionType("checkpoint") - VirtualMachineStandbyActionTypePowerOnSuspend = VirtualMachineStandbyActionType("powerOnSuspend") -) - -func init() { - t["VirtualMachineStandbyActionType"] = reflect.TypeOf((*VirtualMachineStandbyActionType)(nil)).Elem() -} - -type VirtualMachineTargetInfoConfigurationTag string - -const ( - VirtualMachineTargetInfoConfigurationTagCompliant = VirtualMachineTargetInfoConfigurationTag("compliant") - VirtualMachineTargetInfoConfigurationTagClusterWide = VirtualMachineTargetInfoConfigurationTag("clusterWide") -) - -func init() { - t["VirtualMachineTargetInfoConfigurationTag"] = reflect.TypeOf((*VirtualMachineTargetInfoConfigurationTag)(nil)).Elem() -} - -type VirtualMachineTicketType string - -const ( - VirtualMachineTicketTypeMks = VirtualMachineTicketType("mks") - VirtualMachineTicketTypeDevice = VirtualMachineTicketType("device") - VirtualMachineTicketTypeGuestControl = VirtualMachineTicketType("guestControl") - VirtualMachineTicketTypeWebmks = VirtualMachineTicketType("webmks") - VirtualMachineTicketTypeGuestIntegrity = VirtualMachineTicketType("guestIntegrity") - VirtualMachineTicketTypeWebRemoteDevice = VirtualMachineTicketType("webRemoteDevice") -) - -func init() { - t["VirtualMachineTicketType"] = reflect.TypeOf((*VirtualMachineTicketType)(nil)).Elem() -} - -type VirtualMachineToolsInstallType string - -const ( - VirtualMachineToolsInstallTypeGuestToolsTypeUnknown = VirtualMachineToolsInstallType("guestToolsTypeUnknown") - VirtualMachineToolsInstallTypeGuestToolsTypeMSI = VirtualMachineToolsInstallType("guestToolsTypeMSI") - VirtualMachineToolsInstallTypeGuestToolsTypeTar = VirtualMachineToolsInstallType("guestToolsTypeTar") - VirtualMachineToolsInstallTypeGuestToolsTypeOSP = VirtualMachineToolsInstallType("guestToolsTypeOSP") - VirtualMachineToolsInstallTypeGuestToolsTypeOpenVMTools = VirtualMachineToolsInstallType("guestToolsTypeOpenVMTools") -) - -func init() { - t["VirtualMachineToolsInstallType"] = reflect.TypeOf((*VirtualMachineToolsInstallType)(nil)).Elem() -} - -type VirtualMachineToolsRunningStatus string - -const ( - VirtualMachineToolsRunningStatusGuestToolsNotRunning = VirtualMachineToolsRunningStatus("guestToolsNotRunning") - VirtualMachineToolsRunningStatusGuestToolsRunning = VirtualMachineToolsRunningStatus("guestToolsRunning") - VirtualMachineToolsRunningStatusGuestToolsExecutingScripts = VirtualMachineToolsRunningStatus("guestToolsExecutingScripts") -) - -func init() { - t["VirtualMachineToolsRunningStatus"] = reflect.TypeOf((*VirtualMachineToolsRunningStatus)(nil)).Elem() -} - -type VirtualMachineToolsStatus string - -const ( - VirtualMachineToolsStatusToolsNotInstalled = VirtualMachineToolsStatus("toolsNotInstalled") - VirtualMachineToolsStatusToolsNotRunning = VirtualMachineToolsStatus("toolsNotRunning") - VirtualMachineToolsStatusToolsOld = VirtualMachineToolsStatus("toolsOld") - VirtualMachineToolsStatusToolsOk = VirtualMachineToolsStatus("toolsOk") -) - -func init() { - t["VirtualMachineToolsStatus"] = reflect.TypeOf((*VirtualMachineToolsStatus)(nil)).Elem() -} - -type VirtualMachineToolsVersionStatus string - -const ( - VirtualMachineToolsVersionStatusGuestToolsNotInstalled = VirtualMachineToolsVersionStatus("guestToolsNotInstalled") - VirtualMachineToolsVersionStatusGuestToolsNeedUpgrade = VirtualMachineToolsVersionStatus("guestToolsNeedUpgrade") - VirtualMachineToolsVersionStatusGuestToolsCurrent = VirtualMachineToolsVersionStatus("guestToolsCurrent") - VirtualMachineToolsVersionStatusGuestToolsUnmanaged = VirtualMachineToolsVersionStatus("guestToolsUnmanaged") - VirtualMachineToolsVersionStatusGuestToolsTooOld = VirtualMachineToolsVersionStatus("guestToolsTooOld") - VirtualMachineToolsVersionStatusGuestToolsSupportedOld = VirtualMachineToolsVersionStatus("guestToolsSupportedOld") - VirtualMachineToolsVersionStatusGuestToolsSupportedNew = VirtualMachineToolsVersionStatus("guestToolsSupportedNew") - VirtualMachineToolsVersionStatusGuestToolsTooNew = VirtualMachineToolsVersionStatus("guestToolsTooNew") - VirtualMachineToolsVersionStatusGuestToolsBlacklisted = VirtualMachineToolsVersionStatus("guestToolsBlacklisted") -) - -func init() { - t["VirtualMachineToolsVersionStatus"] = reflect.TypeOf((*VirtualMachineToolsVersionStatus)(nil)).Elem() -} - -type VirtualMachineUsbInfoFamily string - -const ( - VirtualMachineUsbInfoFamilyAudio = VirtualMachineUsbInfoFamily("audio") - VirtualMachineUsbInfoFamilyHid = VirtualMachineUsbInfoFamily("hid") - VirtualMachineUsbInfoFamilyHid_bootable = VirtualMachineUsbInfoFamily("hid_bootable") - VirtualMachineUsbInfoFamilyPhysical = VirtualMachineUsbInfoFamily("physical") - VirtualMachineUsbInfoFamilyCommunication = VirtualMachineUsbInfoFamily("communication") - VirtualMachineUsbInfoFamilyImaging = VirtualMachineUsbInfoFamily("imaging") - VirtualMachineUsbInfoFamilyPrinter = VirtualMachineUsbInfoFamily("printer") - VirtualMachineUsbInfoFamilyStorage = VirtualMachineUsbInfoFamily("storage") - VirtualMachineUsbInfoFamilyHub = VirtualMachineUsbInfoFamily("hub") - VirtualMachineUsbInfoFamilySmart_card = VirtualMachineUsbInfoFamily("smart_card") - VirtualMachineUsbInfoFamilySecurity = VirtualMachineUsbInfoFamily("security") - VirtualMachineUsbInfoFamilyVideo = VirtualMachineUsbInfoFamily("video") - VirtualMachineUsbInfoFamilyWireless = VirtualMachineUsbInfoFamily("wireless") - VirtualMachineUsbInfoFamilyBluetooth = VirtualMachineUsbInfoFamily("bluetooth") - VirtualMachineUsbInfoFamilyWusb = VirtualMachineUsbInfoFamily("wusb") - VirtualMachineUsbInfoFamilyPda = VirtualMachineUsbInfoFamily("pda") - VirtualMachineUsbInfoFamilyVendor_specific = VirtualMachineUsbInfoFamily("vendor_specific") - VirtualMachineUsbInfoFamilyOther = VirtualMachineUsbInfoFamily("other") - VirtualMachineUsbInfoFamilyUnknownFamily = VirtualMachineUsbInfoFamily("unknownFamily") -) - -func init() { - t["VirtualMachineUsbInfoFamily"] = reflect.TypeOf((*VirtualMachineUsbInfoFamily)(nil)).Elem() -} - -type VirtualMachineUsbInfoSpeed string - -const ( - VirtualMachineUsbInfoSpeedLow = VirtualMachineUsbInfoSpeed("low") - VirtualMachineUsbInfoSpeedFull = VirtualMachineUsbInfoSpeed("full") - VirtualMachineUsbInfoSpeedHigh = VirtualMachineUsbInfoSpeed("high") - VirtualMachineUsbInfoSpeedSuperSpeed = VirtualMachineUsbInfoSpeed("superSpeed") - VirtualMachineUsbInfoSpeedSuperSpeedPlus = VirtualMachineUsbInfoSpeed("superSpeedPlus") - VirtualMachineUsbInfoSpeedSuperSpeed20Gbps = VirtualMachineUsbInfoSpeed("superSpeed20Gbps") - VirtualMachineUsbInfoSpeedUnknownSpeed = VirtualMachineUsbInfoSpeed("unknownSpeed") -) - -func init() { - t["VirtualMachineUsbInfoSpeed"] = reflect.TypeOf((*VirtualMachineUsbInfoSpeed)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceAction string - -const ( - VirtualMachineVMCIDeviceActionAllow = VirtualMachineVMCIDeviceAction("allow") - VirtualMachineVMCIDeviceActionDeny = VirtualMachineVMCIDeviceAction("deny") -) - -func init() { - t["VirtualMachineVMCIDeviceAction"] = reflect.TypeOf((*VirtualMachineVMCIDeviceAction)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceDirection string - -const ( - VirtualMachineVMCIDeviceDirectionGuest = VirtualMachineVMCIDeviceDirection("guest") - VirtualMachineVMCIDeviceDirectionHost = VirtualMachineVMCIDeviceDirection("host") - VirtualMachineVMCIDeviceDirectionAnyDirection = VirtualMachineVMCIDeviceDirection("anyDirection") -) - -func init() { - t["VirtualMachineVMCIDeviceDirection"] = reflect.TypeOf((*VirtualMachineVMCIDeviceDirection)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceProtocol string - -const ( - VirtualMachineVMCIDeviceProtocolHypervisor = VirtualMachineVMCIDeviceProtocol("hypervisor") - VirtualMachineVMCIDeviceProtocolDoorbell = VirtualMachineVMCIDeviceProtocol("doorbell") - VirtualMachineVMCIDeviceProtocolQueuepair = VirtualMachineVMCIDeviceProtocol("queuepair") - VirtualMachineVMCIDeviceProtocolDatagram = VirtualMachineVMCIDeviceProtocol("datagram") - VirtualMachineVMCIDeviceProtocolStream = VirtualMachineVMCIDeviceProtocol("stream") - VirtualMachineVMCIDeviceProtocolAnyProtocol = VirtualMachineVMCIDeviceProtocol("anyProtocol") -) - -func init() { - t["VirtualMachineVMCIDeviceProtocol"] = reflect.TypeOf((*VirtualMachineVMCIDeviceProtocol)(nil)).Elem() -} - -type VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType string - -const ( - VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentTypePciPassthru = VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType("pciPassthru") - VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentTypeNvidiaVgpu = VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType("nvidiaVgpu") - VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentTypeSriovNic = VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType("sriovNic") - VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentTypeDvx = VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType("dvx") -) - -func init() { - t["VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType"] = reflect.TypeOf((*VirtualMachineVendorDeviceGroupInfoComponentDeviceInfoComponentType)(nil)).Elem() -} - -type VirtualMachineVgpuProfileInfoProfileClass string - -const ( - VirtualMachineVgpuProfileInfoProfileClassCompute = VirtualMachineVgpuProfileInfoProfileClass("compute") - VirtualMachineVgpuProfileInfoProfileClassQuadro = VirtualMachineVgpuProfileInfoProfileClass("quadro") -) - -func init() { - t["VirtualMachineVgpuProfileInfoProfileClass"] = reflect.TypeOf((*VirtualMachineVgpuProfileInfoProfileClass)(nil)).Elem() -} - -type VirtualMachineVgpuProfileInfoProfileSharing string - -const ( - VirtualMachineVgpuProfileInfoProfileSharingTimeSliced = VirtualMachineVgpuProfileInfoProfileSharing("timeSliced") - VirtualMachineVgpuProfileInfoProfileSharingMig = VirtualMachineVgpuProfileInfoProfileSharing("mig") -) - -func init() { - t["VirtualMachineVgpuProfileInfoProfileSharing"] = reflect.TypeOf((*VirtualMachineVgpuProfileInfoProfileSharing)(nil)).Elem() -} - -type VirtualMachineVideoCardUse3dRenderer string - -const ( - VirtualMachineVideoCardUse3dRendererAutomatic = VirtualMachineVideoCardUse3dRenderer("automatic") - VirtualMachineVideoCardUse3dRendererSoftware = VirtualMachineVideoCardUse3dRenderer("software") - VirtualMachineVideoCardUse3dRendererHardware = VirtualMachineVideoCardUse3dRenderer("hardware") -) - -func init() { - t["VirtualMachineVideoCardUse3dRenderer"] = reflect.TypeOf((*VirtualMachineVideoCardUse3dRenderer)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceSwapDeviceSwapStatus string - -const ( - VirtualMachineVirtualDeviceSwapDeviceSwapStatusNone = VirtualMachineVirtualDeviceSwapDeviceSwapStatus("none") - VirtualMachineVirtualDeviceSwapDeviceSwapStatusScheduled = VirtualMachineVirtualDeviceSwapDeviceSwapStatus("scheduled") - VirtualMachineVirtualDeviceSwapDeviceSwapStatusInprogress = VirtualMachineVirtualDeviceSwapDeviceSwapStatus("inprogress") - VirtualMachineVirtualDeviceSwapDeviceSwapStatusFailed = VirtualMachineVirtualDeviceSwapDeviceSwapStatus("failed") - VirtualMachineVirtualDeviceSwapDeviceSwapStatusCompleted = VirtualMachineVirtualDeviceSwapDeviceSwapStatus("completed") -) - -func init() { - t["VirtualMachineVirtualDeviceSwapDeviceSwapStatus"] = reflect.TypeOf((*VirtualMachineVirtualDeviceSwapDeviceSwapStatus)(nil)).Elem() -} - -type VirtualMachineVirtualPMemSnapshotMode string - -const ( - VirtualMachineVirtualPMemSnapshotModeIndependent_persistent = VirtualMachineVirtualPMemSnapshotMode("independent_persistent") - VirtualMachineVirtualPMemSnapshotModeIndependent_eraseonrevert = VirtualMachineVirtualPMemSnapshotMode("independent_eraseonrevert") -) - -func init() { - t["VirtualMachineVirtualPMemSnapshotMode"] = reflect.TypeOf((*VirtualMachineVirtualPMemSnapshotMode)(nil)).Elem() -} - -type VirtualMachineWindowsQuiesceSpecVssBackupContext string - -const ( - VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_auto = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_auto") - VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_backup") - VirtualMachineWindowsQuiesceSpecVssBackupContextCtx_file_share_backup = VirtualMachineWindowsQuiesceSpecVssBackupContext("ctx_file_share_backup") -) - -func init() { - t["VirtualMachineWindowsQuiesceSpecVssBackupContext"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpecVssBackupContext)(nil)).Elem() -} - -type VirtualPointingDeviceHostChoice string - -const ( - VirtualPointingDeviceHostChoiceAutodetect = VirtualPointingDeviceHostChoice("autodetect") - VirtualPointingDeviceHostChoiceIntellimouseExplorer = VirtualPointingDeviceHostChoice("intellimouseExplorer") - VirtualPointingDeviceHostChoiceIntellimousePs2 = VirtualPointingDeviceHostChoice("intellimousePs2") - VirtualPointingDeviceHostChoiceLogitechMouseman = VirtualPointingDeviceHostChoice("logitechMouseman") - VirtualPointingDeviceHostChoiceMicrosoft_serial = VirtualPointingDeviceHostChoice("microsoft_serial") - VirtualPointingDeviceHostChoiceMouseSystems = VirtualPointingDeviceHostChoice("mouseSystems") - VirtualPointingDeviceHostChoiceMousemanSerial = VirtualPointingDeviceHostChoice("mousemanSerial") - VirtualPointingDeviceHostChoicePs2 = VirtualPointingDeviceHostChoice("ps2") -) - -func init() { - t["VirtualPointingDeviceHostChoice"] = reflect.TypeOf((*VirtualPointingDeviceHostChoice)(nil)).Elem() -} - -type VirtualSCSISharing string - -const ( - VirtualSCSISharingNoSharing = VirtualSCSISharing("noSharing") - VirtualSCSISharingVirtualSharing = VirtualSCSISharing("virtualSharing") - VirtualSCSISharingPhysicalSharing = VirtualSCSISharing("physicalSharing") -) - -func init() { - t["VirtualSCSISharing"] = reflect.TypeOf((*VirtualSCSISharing)(nil)).Elem() -} - -type VirtualSerialPortEndPoint string - -const ( - VirtualSerialPortEndPointClient = VirtualSerialPortEndPoint("client") - VirtualSerialPortEndPointServer = VirtualSerialPortEndPoint("server") -) - -func init() { - t["VirtualSerialPortEndPoint"] = reflect.TypeOf((*VirtualSerialPortEndPoint)(nil)).Elem() -} - -type VirtualVmxnet3VrdmaOptionDeviceProtocols string - -const ( - VirtualVmxnet3VrdmaOptionDeviceProtocolsRocev1 = VirtualVmxnet3VrdmaOptionDeviceProtocols("rocev1") - VirtualVmxnet3VrdmaOptionDeviceProtocolsRocev2 = VirtualVmxnet3VrdmaOptionDeviceProtocols("rocev2") -) - -func init() { - t["VirtualVmxnet3VrdmaOptionDeviceProtocols"] = reflect.TypeOf((*VirtualVmxnet3VrdmaOptionDeviceProtocols)(nil)).Elem() -} - -type VmDasBeingResetEventReasonCode string - -const ( - VmDasBeingResetEventReasonCodeVmtoolsHeartbeatFailure = VmDasBeingResetEventReasonCode("vmtoolsHeartbeatFailure") - VmDasBeingResetEventReasonCodeAppHeartbeatFailure = VmDasBeingResetEventReasonCode("appHeartbeatFailure") - VmDasBeingResetEventReasonCodeAppImmediateResetRequest = VmDasBeingResetEventReasonCode("appImmediateResetRequest") - VmDasBeingResetEventReasonCodeVmcpResetApdCleared = VmDasBeingResetEventReasonCode("vmcpResetApdCleared") -) - -func init() { - t["VmDasBeingResetEventReasonCode"] = reflect.TypeOf((*VmDasBeingResetEventReasonCode)(nil)).Elem() -} - -type VmFailedStartingSecondaryEventFailureReason string - -const ( - VmFailedStartingSecondaryEventFailureReasonIncompatibleHost = VmFailedStartingSecondaryEventFailureReason("incompatibleHost") - VmFailedStartingSecondaryEventFailureReasonLoginFailed = VmFailedStartingSecondaryEventFailureReason("loginFailed") - VmFailedStartingSecondaryEventFailureReasonRegisterVmFailed = VmFailedStartingSecondaryEventFailureReason("registerVmFailed") - VmFailedStartingSecondaryEventFailureReasonMigrateFailed = VmFailedStartingSecondaryEventFailureReason("migrateFailed") -) - -func init() { - t["VmFailedStartingSecondaryEventFailureReason"] = reflect.TypeOf((*VmFailedStartingSecondaryEventFailureReason)(nil)).Elem() -} - -type VmFaultToleranceConfigIssueReasonForIssue string - -const ( - VmFaultToleranceConfigIssueReasonForIssueHaNotEnabled = VmFaultToleranceConfigIssueReasonForIssue("haNotEnabled") - VmFaultToleranceConfigIssueReasonForIssueMoreThanOneSecondary = VmFaultToleranceConfigIssueReasonForIssue("moreThanOneSecondary") - VmFaultToleranceConfigIssueReasonForIssueRecordReplayNotSupported = VmFaultToleranceConfigIssueReasonForIssue("recordReplayNotSupported") - VmFaultToleranceConfigIssueReasonForIssueReplayNotSupported = VmFaultToleranceConfigIssueReasonForIssue("replayNotSupported") - VmFaultToleranceConfigIssueReasonForIssueTemplateVm = VmFaultToleranceConfigIssueReasonForIssue("templateVm") - VmFaultToleranceConfigIssueReasonForIssueMultipleVCPU = VmFaultToleranceConfigIssueReasonForIssue("multipleVCPU") - VmFaultToleranceConfigIssueReasonForIssueHostInactive = VmFaultToleranceConfigIssueReasonForIssue("hostInactive") - VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedHardware = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedHardware") - VmFaultToleranceConfigIssueReasonForIssueFtUnsupportedProduct = VmFaultToleranceConfigIssueReasonForIssue("ftUnsupportedProduct") - VmFaultToleranceConfigIssueReasonForIssueMissingVMotionNic = VmFaultToleranceConfigIssueReasonForIssue("missingVMotionNic") - VmFaultToleranceConfigIssueReasonForIssueMissingFTLoggingNic = VmFaultToleranceConfigIssueReasonForIssue("missingFTLoggingNic") - VmFaultToleranceConfigIssueReasonForIssueThinDisk = VmFaultToleranceConfigIssueReasonForIssue("thinDisk") - VmFaultToleranceConfigIssueReasonForIssueVerifySSLCertificateFlagNotSet = VmFaultToleranceConfigIssueReasonForIssue("verifySSLCertificateFlagNotSet") - VmFaultToleranceConfigIssueReasonForIssueHasSnapshots = VmFaultToleranceConfigIssueReasonForIssue("hasSnapshots") - VmFaultToleranceConfigIssueReasonForIssueNoConfig = VmFaultToleranceConfigIssueReasonForIssue("noConfig") - VmFaultToleranceConfigIssueReasonForIssueFtSecondaryVm = VmFaultToleranceConfigIssueReasonForIssue("ftSecondaryVm") - VmFaultToleranceConfigIssueReasonForIssueHasLocalDisk = VmFaultToleranceConfigIssueReasonForIssue("hasLocalDisk") - VmFaultToleranceConfigIssueReasonForIssueEsxAgentVm = VmFaultToleranceConfigIssueReasonForIssue("esxAgentVm") - VmFaultToleranceConfigIssueReasonForIssueVideo3dEnabled = VmFaultToleranceConfigIssueReasonForIssue("video3dEnabled") - VmFaultToleranceConfigIssueReasonForIssueHasUnsupportedDisk = VmFaultToleranceConfigIssueReasonForIssue("hasUnsupportedDisk") - VmFaultToleranceConfigIssueReasonForIssueInsufficientBandwidth = VmFaultToleranceConfigIssueReasonForIssue("insufficientBandwidth") - VmFaultToleranceConfigIssueReasonForIssueHasNestedHVConfiguration = VmFaultToleranceConfigIssueReasonForIssue("hasNestedHVConfiguration") - VmFaultToleranceConfigIssueReasonForIssueHasVFlashConfiguration = VmFaultToleranceConfigIssueReasonForIssue("hasVFlashConfiguration") - VmFaultToleranceConfigIssueReasonForIssueUnsupportedProduct = VmFaultToleranceConfigIssueReasonForIssue("unsupportedProduct") - VmFaultToleranceConfigIssueReasonForIssueCpuHvUnsupported = VmFaultToleranceConfigIssueReasonForIssue("cpuHvUnsupported") - VmFaultToleranceConfigIssueReasonForIssueCpuHwmmuUnsupported = VmFaultToleranceConfigIssueReasonForIssue("cpuHwmmuUnsupported") - VmFaultToleranceConfigIssueReasonForIssueCpuHvDisabled = VmFaultToleranceConfigIssueReasonForIssue("cpuHvDisabled") - VmFaultToleranceConfigIssueReasonForIssueHasEFIFirmware = VmFaultToleranceConfigIssueReasonForIssue("hasEFIFirmware") - VmFaultToleranceConfigIssueReasonForIssueTooManyVCPUs = VmFaultToleranceConfigIssueReasonForIssue("tooManyVCPUs") - VmFaultToleranceConfigIssueReasonForIssueTooMuchMemory = VmFaultToleranceConfigIssueReasonForIssue("tooMuchMemory") - VmFaultToleranceConfigIssueReasonForIssueUnsupportedPMemHAFailOver = VmFaultToleranceConfigIssueReasonForIssue("unsupportedPMemHAFailOver") -) - -func init() { - t["VmFaultToleranceConfigIssueReasonForIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssueReasonForIssue)(nil)).Elem() -} - -type VmFaultToleranceInvalidFileBackingDeviceType string - -const ( - VmFaultToleranceInvalidFileBackingDeviceTypeVirtualFloppy = VmFaultToleranceInvalidFileBackingDeviceType("virtualFloppy") - VmFaultToleranceInvalidFileBackingDeviceTypeVirtualCdrom = VmFaultToleranceInvalidFileBackingDeviceType("virtualCdrom") - VmFaultToleranceInvalidFileBackingDeviceTypeVirtualSerialPort = VmFaultToleranceInvalidFileBackingDeviceType("virtualSerialPort") - VmFaultToleranceInvalidFileBackingDeviceTypeVirtualParallelPort = VmFaultToleranceInvalidFileBackingDeviceType("virtualParallelPort") - VmFaultToleranceInvalidFileBackingDeviceTypeVirtualDisk = VmFaultToleranceInvalidFileBackingDeviceType("virtualDisk") -) - -func init() { - t["VmFaultToleranceInvalidFileBackingDeviceType"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingDeviceType)(nil)).Elem() -} - -type VmShutdownOnIsolationEventOperation string - -const ( - VmShutdownOnIsolationEventOperationShutdown = VmShutdownOnIsolationEventOperation("shutdown") - VmShutdownOnIsolationEventOperationPoweredOff = VmShutdownOnIsolationEventOperation("poweredOff") -) - -func init() { - t["VmShutdownOnIsolationEventOperation"] = reflect.TypeOf((*VmShutdownOnIsolationEventOperation)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitchPvlanPortType string - -const ( - VmwareDistributedVirtualSwitchPvlanPortTypePromiscuous = VmwareDistributedVirtualSwitchPvlanPortType("promiscuous") - VmwareDistributedVirtualSwitchPvlanPortTypeIsolated = VmwareDistributedVirtualSwitchPvlanPortType("isolated") - VmwareDistributedVirtualSwitchPvlanPortTypeCommunity = VmwareDistributedVirtualSwitchPvlanPortType("community") -) - -func init() { - t["VmwareDistributedVirtualSwitchPvlanPortType"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanPortType)(nil)).Elem() -} - -type VsanDiskIssueType string - -const ( - VsanDiskIssueTypeNonExist = VsanDiskIssueType("nonExist") - VsanDiskIssueTypeStampMismatch = VsanDiskIssueType("stampMismatch") - VsanDiskIssueTypeUnknown = VsanDiskIssueType("unknown") -) - -func init() { - t["VsanDiskIssueType"] = reflect.TypeOf((*VsanDiskIssueType)(nil)).Elem() -} - -type VsanHostDecommissionModeObjectAction string - -const ( - VsanHostDecommissionModeObjectActionNoAction = VsanHostDecommissionModeObjectAction("noAction") - VsanHostDecommissionModeObjectActionEnsureObjectAccessibility = VsanHostDecommissionModeObjectAction("ensureObjectAccessibility") - VsanHostDecommissionModeObjectActionEvacuateAllData = VsanHostDecommissionModeObjectAction("evacuateAllData") -) - -func init() { - t["VsanHostDecommissionModeObjectAction"] = reflect.TypeOf((*VsanHostDecommissionModeObjectAction)(nil)).Elem() -} - -type VsanHostDiskResultState string - -const ( - VsanHostDiskResultStateInUse = VsanHostDiskResultState("inUse") - VsanHostDiskResultStateEligible = VsanHostDiskResultState("eligible") - VsanHostDiskResultStateIneligible = VsanHostDiskResultState("ineligible") -) - -func init() { - t["VsanHostDiskResultState"] = reflect.TypeOf((*VsanHostDiskResultState)(nil)).Elem() -} - -type VsanHostHealthState string - -const ( - VsanHostHealthStateUnknown = VsanHostHealthState("unknown") - VsanHostHealthStateHealthy = VsanHostHealthState("healthy") - VsanHostHealthStateUnhealthy = VsanHostHealthState("unhealthy") -) - -func init() { - t["VsanHostHealthState"] = reflect.TypeOf((*VsanHostHealthState)(nil)).Elem() -} - -type VsanHostNodeState string - -const ( - VsanHostNodeStateError = VsanHostNodeState("error") - VsanHostNodeStateDisabled = VsanHostNodeState("disabled") - VsanHostNodeStateAgent = VsanHostNodeState("agent") - VsanHostNodeStateMaster = VsanHostNodeState("master") - VsanHostNodeStateBackup = VsanHostNodeState("backup") - VsanHostNodeStateStarting = VsanHostNodeState("starting") - VsanHostNodeStateStopping = VsanHostNodeState("stopping") - VsanHostNodeStateEnteringMaintenanceMode = VsanHostNodeState("enteringMaintenanceMode") - VsanHostNodeStateExitingMaintenanceMode = VsanHostNodeState("exitingMaintenanceMode") - VsanHostNodeStateDecommissioning = VsanHostNodeState("decommissioning") -) - -func init() { - t["VsanHostNodeState"] = reflect.TypeOf((*VsanHostNodeState)(nil)).Elem() -} - -type VsanUpgradeSystemUpgradeHistoryDiskGroupOpType string - -const ( - VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeAdd = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("add") - VsanUpgradeSystemUpgradeHistoryDiskGroupOpTypeRemove = VsanUpgradeSystemUpgradeHistoryDiskGroupOpType("remove") -) - -func init() { - t["VsanUpgradeSystemUpgradeHistoryDiskGroupOpType"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOpType)(nil)).Elem() -} - -type WeekOfMonth string - -const ( - WeekOfMonthFirst = WeekOfMonth("first") - WeekOfMonthSecond = WeekOfMonth("second") - WeekOfMonthThird = WeekOfMonth("third") - WeekOfMonthFourth = WeekOfMonth("fourth") - WeekOfMonthLast = WeekOfMonth("last") -) - -func init() { - t["WeekOfMonth"] = reflect.TypeOf((*WeekOfMonth)(nil)).Elem() -} - -type WillLoseHAProtectionResolution string - -const ( - WillLoseHAProtectionResolutionSvmotion = WillLoseHAProtectionResolution("svmotion") - WillLoseHAProtectionResolutionRelocate = WillLoseHAProtectionResolution("relocate") -) - -func init() { - t["WillLoseHAProtectionResolution"] = reflect.TypeOf((*WillLoseHAProtectionResolution)(nil)).Elem() -} - -type VslmDiskInfoFlag string - -const ( - VslmDiskInfoFlagId = VslmDiskInfoFlag("id") - VslmDiskInfoFlagBackingObjectId = VslmDiskInfoFlag("backingObjectId") - VslmDiskInfoFlagPath = VslmDiskInfoFlag("path") - VslmDiskInfoFlagParentPath = VslmDiskInfoFlag("parentPath") - VslmDiskInfoFlagName = VslmDiskInfoFlag("name") - VslmDiskInfoFlagDeviceName = VslmDiskInfoFlag("deviceName") - VslmDiskInfoFlagCapacity = VslmDiskInfoFlag("capacity") - VslmDiskInfoFlagAllocated = VslmDiskInfoFlag("allocated") - VslmDiskInfoFlagType = VslmDiskInfoFlag("type") - VslmDiskInfoFlagConsumers = VslmDiskInfoFlag("consumers") - VslmDiskInfoFlagTentativeState = VslmDiskInfoFlag("tentativeState") - VslmDiskInfoFlagCreateTime = VslmDiskInfoFlag("createTime") - VslmDiskInfoFlagIoFilter = VslmDiskInfoFlag("ioFilter") - VslmDiskInfoFlagControlFlags = VslmDiskInfoFlag("controlFlags") - VslmDiskInfoFlagKeepAfterVmDelete = VslmDiskInfoFlag("keepAfterVmDelete") - VslmDiskInfoFlagRelocationDisabled = VslmDiskInfoFlag("relocationDisabled") - VslmDiskInfoFlagKeyId = VslmDiskInfoFlag("keyId") - VslmDiskInfoFlagKeyProviderId = VslmDiskInfoFlag("keyProviderId") - VslmDiskInfoFlagNativeSnapshotSupported = VslmDiskInfoFlag("nativeSnapshotSupported") - VslmDiskInfoFlagCbtEnabled = VslmDiskInfoFlag("cbtEnabled") -) - -func init() { - t["vslmDiskInfoFlag"] = reflect.TypeOf((*VslmDiskInfoFlag)(nil)).Elem() -} - -type VslmVStorageObjectControlFlag string - -const ( - VslmVStorageObjectControlFlagKeepAfterDeleteVm = VslmVStorageObjectControlFlag("keepAfterDeleteVm") - VslmVStorageObjectControlFlagDisableRelocation = VslmVStorageObjectControlFlag("disableRelocation") - VslmVStorageObjectControlFlagEnableChangedBlockTracking = VslmVStorageObjectControlFlag("enableChangedBlockTracking") -) - -func init() { - t["vslmVStorageObjectControlFlag"] = reflect.TypeOf((*VslmVStorageObjectControlFlag)(nil)).Elem() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/fault.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/fault.go deleted file mode 100644 index 813ea9ec60e7..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/fault.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright (c) 2015 VMware, Inc. 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. -*/ - -package types - -type HasFault interface { - Fault() BaseMethodFault -} - -func IsFileNotFound(err error) bool { - if f, ok := err.(HasFault); ok { - switch f.Fault().(type) { - case *FileNotFound: - return true - } - } - - return false -} - -func IsAlreadyExists(err error) bool { - if f, ok := err.(HasFault); ok { - switch f.Fault().(type) { - case *AlreadyExists: - return true - } - } - - return false -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/helpers.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/helpers.go deleted file mode 100644 index 70360eb4fcae..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/helpers.go +++ /dev/null @@ -1,316 +0,0 @@ -/* -Copyright (c) 2015-2022 VMware, Inc. 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. -*/ - -package types - -import ( - "net/url" - "reflect" - "strings" - "time" -) - -func NewBool(v bool) *bool { - return &v -} - -func NewInt32(v int32) *int32 { - return &v -} - -func NewInt64(v int64) *int64 { - return &v -} - -func NewTime(v time.Time) *time.Time { - return &v -} - -func NewReference(r ManagedObjectReference) *ManagedObjectReference { - return &r -} - -func (r ManagedObjectReference) Reference() ManagedObjectReference { - return r -} - -func (r ManagedObjectReference) String() string { - return strings.Join([]string{r.Type, r.Value}, ":") -} - -func (r *ManagedObjectReference) FromString(o string) bool { - s := strings.SplitN(o, ":", 2) - - if len(s) != 2 { - return false - } - - r.Type = s[0] - r.Value = s[1] - - return true -} - -// Encode ManagedObjectReference for use with URL and File paths -func (r ManagedObjectReference) Encode() string { - return strings.Join([]string{r.Type, url.QueryEscape(r.Value)}, "-") -} - -func (c *PerfCounterInfo) Name() string { - return c.GroupInfo.GetElementDescription().Key + "." + c.NameInfo.GetElementDescription().Key + "." + string(c.RollupType) -} - -func defaultResourceAllocationInfo() ResourceAllocationInfo { - return ResourceAllocationInfo{ - Reservation: NewInt64(0), - ExpandableReservation: NewBool(true), - Limit: NewInt64(-1), - Shares: &SharesInfo{ - Level: SharesLevelNormal, - }, - } -} - -// DefaultResourceConfigSpec returns a ResourceConfigSpec populated with the same default field values as vCenter. -// Note that the wsdl marks these fields as optional, but they are required to be set when creating a resource pool. -// They are only optional when updating a resource pool. -func DefaultResourceConfigSpec() ResourceConfigSpec { - return ResourceConfigSpec{ - CpuAllocation: defaultResourceAllocationInfo(), - MemoryAllocation: defaultResourceAllocationInfo(), - } -} - -// ToConfigSpec returns a VirtualMachineConfigSpec based on the -// VirtualMachineConfigInfo. -func (ci VirtualMachineConfigInfo) ToConfigSpec() VirtualMachineConfigSpec { - cs := VirtualMachineConfigSpec{ - ChangeVersion: ci.ChangeVersion, - Name: ci.Name, - Version: ci.Version, - CreateDate: ci.CreateDate, - Uuid: ci.Uuid, - InstanceUuid: ci.InstanceUuid, - NpivNodeWorldWideName: ci.NpivNodeWorldWideName, - NpivPortWorldWideName: ci.NpivPortWorldWideName, - NpivWorldWideNameType: ci.NpivWorldWideNameType, - NpivDesiredNodeWwns: ci.NpivDesiredNodeWwns, - NpivDesiredPortWwns: ci.NpivDesiredPortWwns, - NpivTemporaryDisabled: ci.NpivTemporaryDisabled, - NpivOnNonRdmDisks: ci.NpivOnNonRdmDisks, - LocationId: ci.LocationId, - GuestId: ci.GuestId, - AlternateGuestName: ci.AlternateGuestName, - Annotation: ci.Annotation, - Files: &ci.Files, - Tools: ci.Tools, - Flags: &ci.Flags, - ConsolePreferences: ci.ConsolePreferences, - PowerOpInfo: &ci.DefaultPowerOps, - NumCPUs: ci.Hardware.NumCPU, - VcpuConfig: ci.VcpuConfig, - NumCoresPerSocket: ci.Hardware.NumCoresPerSocket, - MemoryMB: int64(ci.Hardware.MemoryMB), - MemoryHotAddEnabled: ci.MemoryHotAddEnabled, - CpuHotAddEnabled: ci.CpuHotAddEnabled, - CpuHotRemoveEnabled: ci.CpuHotRemoveEnabled, - VirtualICH7MPresent: ci.Hardware.VirtualICH7MPresent, - VirtualSMCPresent: ci.Hardware.VirtualSMCPresent, - DeviceChange: make([]BaseVirtualDeviceConfigSpec, len(ci.Hardware.Device)), - CpuAllocation: ci.CpuAllocation, - MemoryAllocation: ci.MemoryAllocation, - LatencySensitivity: ci.LatencySensitivity, - CpuAffinity: ci.CpuAffinity, - MemoryAffinity: ci.MemoryAffinity, - NetworkShaper: ci.NetworkShaper, - CpuFeatureMask: make([]VirtualMachineCpuIdInfoSpec, len(ci.CpuFeatureMask)), - ExtraConfig: ci.ExtraConfig, - SwapPlacement: ci.SwapPlacement, - BootOptions: ci.BootOptions, - FtInfo: ci.FtInfo, - RepConfig: ci.RepConfig, - VAssertsEnabled: ci.VAssertsEnabled, - ChangeTrackingEnabled: ci.ChangeTrackingEnabled, - Firmware: ci.Firmware, - MaxMksConnections: ci.MaxMksConnections, - GuestAutoLockEnabled: ci.GuestAutoLockEnabled, - ManagedBy: ci.ManagedBy, - MemoryReservationLockedToMax: ci.MemoryReservationLockedToMax, - NestedHVEnabled: ci.NestedHVEnabled, - VPMCEnabled: ci.VPMCEnabled, - MessageBusTunnelEnabled: ci.MessageBusTunnelEnabled, - MigrateEncryption: ci.MigrateEncryption, - FtEncryptionMode: ci.FtEncryptionMode, - SevEnabled: ci.SevEnabled, - PmemFailoverEnabled: ci.PmemFailoverEnabled, - Pmem: ci.Pmem, - NpivWorldWideNameOp: ci.NpivWorldWideNameType, - RebootPowerOff: ci.RebootPowerOff, - ScheduledHardwareUpgradeInfo: ci.ScheduledHardwareUpgradeInfo, - SgxInfo: ci.SgxInfo, - GuestMonitoringModeInfo: ci.GuestMonitoringModeInfo, - VmxStatsCollectionEnabled: ci.VmxStatsCollectionEnabled, - VmOpNotificationToAppEnabled: ci.VmOpNotificationToAppEnabled, - VmOpNotificationTimeout: ci.VmOpNotificationTimeout, - DeviceSwap: ci.DeviceSwap, - SimultaneousThreads: ci.Hardware.SimultaneousThreads, - DeviceGroups: ci.DeviceGroups, - MotherboardLayout: ci.Hardware.MotherboardLayout, - } - - // Unassign the Files field if all of its fields are empty. - if ci.Files.FtMetadataDirectory == "" && ci.Files.LogDirectory == "" && - ci.Files.SnapshotDirectory == "" && ci.Files.SuspendDirectory == "" && - ci.Files.VmPathName == "" { - cs.Files = nil - } - - // Unassign the Flags field if all of its fields are empty. - if ci.Flags.CbrcCacheEnabled == nil && - ci.Flags.DisableAcceleration == nil && - ci.Flags.DiskUuidEnabled == nil && - ci.Flags.EnableLogging == nil && - ci.Flags.FaultToleranceType == "" && - ci.Flags.HtSharing == "" && - ci.Flags.MonitorType == "" && - ci.Flags.RecordReplayEnabled == nil && - ci.Flags.RunWithDebugInfo == nil && - ci.Flags.SnapshotDisabled == nil && - ci.Flags.SnapshotLocked == nil && - ci.Flags.SnapshotPowerOffBehavior == "" && - ci.Flags.UseToe == nil && - ci.Flags.VbsEnabled == nil && - ci.Flags.VirtualExecUsage == "" && - ci.Flags.VirtualMmuUsage == "" && - ci.Flags.VvtdEnabled == nil { - cs.Flags = nil - } - - // Unassign the PowerOps field if all of its fields are empty. - if ci.DefaultPowerOps.DefaultPowerOffType == "" && - ci.DefaultPowerOps.DefaultResetType == "" && - ci.DefaultPowerOps.DefaultSuspendType == "" && - ci.DefaultPowerOps.PowerOffType == "" && - ci.DefaultPowerOps.ResetType == "" && - ci.DefaultPowerOps.StandbyAction == "" && - ci.DefaultPowerOps.SuspendType == "" { - cs.PowerOpInfo = nil - } - - for i := 0; i < len(cs.CpuFeatureMask); i++ { - cs.CpuFeatureMask[i] = VirtualMachineCpuIdInfoSpec{ - ArrayUpdateSpec: ArrayUpdateSpec{ - Operation: ArrayUpdateOperationAdd, - }, - Info: &HostCpuIdInfo{ - // TODO: Does DynamicData need to be copied? - // It is an empty struct... - Level: ci.CpuFeatureMask[i].Level, - Vendor: ci.CpuFeatureMask[i].Vendor, - Eax: ci.CpuFeatureMask[i].Eax, - Ebx: ci.CpuFeatureMask[i].Ebx, - Ecx: ci.CpuFeatureMask[i].Ecx, - Edx: ci.CpuFeatureMask[i].Edx, - }, - } - } - - for i := 0; i < len(cs.DeviceChange); i++ { - cs.DeviceChange[i] = &VirtualDeviceConfigSpec{ - // TODO: Does DynamicData need to be copied? - // It is an empty struct... - Operation: VirtualDeviceConfigSpecOperationAdd, - FileOperation: VirtualDeviceConfigSpecFileOperationCreate, - Device: ci.Hardware.Device[i], - // TODO: It is unclear how the profiles associated with the VM or - // its hardware can be reintroduced/persisted in the - // ConfigSpec. - Profile: nil, - // The backing will come from the device. - Backing: nil, - // TODO: Investigate futher. - FilterSpec: nil, - } - } - - if ni := ci.NumaInfo; ni != nil { - cs.VirtualNuma = &VirtualMachineVirtualNuma{ - CoresPerNumaNode: ni.CoresPerNumaNode, - ExposeVnumaOnCpuHotadd: ni.VnumaOnCpuHotaddExposed, - } - } - - if civa, ok := ci.VAppConfig.(*VmConfigInfo); ok { - var csva VmConfigSpec - - csva.Eula = civa.Eula - csva.InstallBootRequired = &civa.InstallBootRequired - csva.InstallBootStopDelay = civa.InstallBootStopDelay - - ipAssignment := civa.IpAssignment - csva.IpAssignment = &ipAssignment - - csva.OvfEnvironmentTransport = civa.OvfEnvironmentTransport - for i := range civa.OvfSection { - s := civa.OvfSection[i] - csva.OvfSection = append( - csva.OvfSection, - VAppOvfSectionSpec{ - ArrayUpdateSpec: ArrayUpdateSpec{ - Operation: ArrayUpdateOperationAdd, - }, - Info: &s, - }, - ) - } - - for i := range civa.Product { - p := civa.Product[i] - csva.Product = append( - csva.Product, - VAppProductSpec{ - ArrayUpdateSpec: ArrayUpdateSpec{ - Operation: ArrayUpdateOperationAdd, - }, - Info: &p, - }, - ) - } - - for i := range civa.Property { - p := civa.Property[i] - csva.Property = append( - csva.Property, - VAppPropertySpec{ - ArrayUpdateSpec: ArrayUpdateSpec{ - Operation: ArrayUpdateOperationAdd, - }, - Info: &p, - }, - ) - } - - cs.VAppConfig = &csva - } - - return cs -} - -func init() { - // Known 6.5 issue where this event type is sent even though it is internal. - // This workaround allows us to unmarshal and avoid NPEs. - t["HostSubSpecificationUpdateEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/if.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/if.go deleted file mode 100644 index 03ba1f37d447..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/if.go +++ /dev/null @@ -1,3561 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import "reflect" - -func (b *Action) GetAction() *Action { return b } - -type BaseAction interface { - GetAction() *Action -} - -func init() { - t["BaseAction"] = reflect.TypeOf((*Action)(nil)).Elem() -} - -func (b *ActiveDirectoryFault) GetActiveDirectoryFault() *ActiveDirectoryFault { return b } - -type BaseActiveDirectoryFault interface { - GetActiveDirectoryFault() *ActiveDirectoryFault -} - -func init() { - t["BaseActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem() -} - -func (b *AlarmAction) GetAlarmAction() *AlarmAction { return b } - -type BaseAlarmAction interface { - GetAlarmAction() *AlarmAction -} - -func init() { - t["BaseAlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem() -} - -func (b *AlarmEvent) GetAlarmEvent() *AlarmEvent { return b } - -type BaseAlarmEvent interface { - GetAlarmEvent() *AlarmEvent -} - -func init() { - t["BaseAlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem() -} - -func (b *AlarmExpression) GetAlarmExpression() *AlarmExpression { return b } - -type BaseAlarmExpression interface { - GetAlarmExpression() *AlarmExpression -} - -func init() { - t["BaseAlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem() -} - -func (b *AlarmSpec) GetAlarmSpec() *AlarmSpec { return b } - -type BaseAlarmSpec interface { - GetAlarmSpec() *AlarmSpec -} - -func init() { - t["BaseAlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem() -} - -func (b *AnswerFileCreateSpec) GetAnswerFileCreateSpec() *AnswerFileCreateSpec { return b } - -type BaseAnswerFileCreateSpec interface { - GetAnswerFileCreateSpec() *AnswerFileCreateSpec -} - -func init() { - t["BaseAnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem() -} - -func (b *ApplyProfile) GetApplyProfile() *ApplyProfile { return b } - -type BaseApplyProfile interface { - GetApplyProfile() *ApplyProfile -} - -func init() { - t["BaseApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem() -} - -func (b *ArrayUpdateSpec) GetArrayUpdateSpec() *ArrayUpdateSpec { return b } - -type BaseArrayUpdateSpec interface { - GetArrayUpdateSpec() *ArrayUpdateSpec -} - -func init() { - t["BaseArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem() -} - -func (b *AuthorizationEvent) GetAuthorizationEvent() *AuthorizationEvent { return b } - -type BaseAuthorizationEvent interface { - GetAuthorizationEvent() *AuthorizationEvent -} - -func init() { - t["BaseAuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem() -} - -func (b *BaseConfigInfo) GetBaseConfigInfo() *BaseConfigInfo { return b } - -type BaseBaseConfigInfo interface { - GetBaseConfigInfo() *BaseConfigInfo -} - -func init() { - t["BaseBaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem() -} - -func (b *BaseConfigInfoBackingInfo) GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo { - return b -} - -type BaseBaseConfigInfoBackingInfo interface { - GetBaseConfigInfoBackingInfo() *BaseConfigInfoBackingInfo -} - -func init() { - t["BaseBaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem() -} - -func (b *BaseConfigInfoFileBackingInfo) GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo { - return b -} - -type BaseBaseConfigInfoFileBackingInfo interface { - GetBaseConfigInfoFileBackingInfo() *BaseConfigInfoFileBackingInfo -} - -func init() { - t["BaseBaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem() -} - -func (b *CannotAccessNetwork) GetCannotAccessNetwork() *CannotAccessNetwork { return b } - -type BaseCannotAccessNetwork interface { - GetCannotAccessNetwork() *CannotAccessNetwork -} - -func init() { - t["BaseCannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem() -} - -func (b *CannotAccessVmComponent) GetCannotAccessVmComponent() *CannotAccessVmComponent { return b } - -type BaseCannotAccessVmComponent interface { - GetCannotAccessVmComponent() *CannotAccessVmComponent -} - -func init() { - t["BaseCannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem() -} - -func (b *CannotAccessVmDevice) GetCannotAccessVmDevice() *CannotAccessVmDevice { return b } - -type BaseCannotAccessVmDevice interface { - GetCannotAccessVmDevice() *CannotAccessVmDevice -} - -func init() { - t["BaseCannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem() -} - -func (b *CannotAccessVmDisk) GetCannotAccessVmDisk() *CannotAccessVmDisk { return b } - -type BaseCannotAccessVmDisk interface { - GetCannotAccessVmDisk() *CannotAccessVmDisk -} - -func init() { - t["BaseCannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem() -} - -func (b *CannotMoveVsanEnabledHost) GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost { - return b -} - -type BaseCannotMoveVsanEnabledHost interface { - GetCannotMoveVsanEnabledHost() *CannotMoveVsanEnabledHost -} - -func init() { - t["BaseCannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem() -} - -func (b *ClusterAction) GetClusterAction() *ClusterAction { return b } - -type BaseClusterAction interface { - GetClusterAction() *ClusterAction -} - -func init() { - t["BaseClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem() -} - -func (b *ClusterComputeResourceValidationResultBase) GetClusterComputeResourceValidationResultBase() *ClusterComputeResourceValidationResultBase { - return b -} - -type BaseClusterComputeResourceValidationResultBase interface { - GetClusterComputeResourceValidationResultBase() *ClusterComputeResourceValidationResultBase -} - -func init() { - t["BaseClusterComputeResourceValidationResultBase"] = reflect.TypeOf((*ClusterComputeResourceValidationResultBase)(nil)).Elem() -} - -func (b *ClusterDasAdmissionControlInfo) GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo { - return b -} - -type BaseClusterDasAdmissionControlInfo interface { - GetClusterDasAdmissionControlInfo() *ClusterDasAdmissionControlInfo -} - -func init() { - t["BaseClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem() -} - -func (b *ClusterDasAdmissionControlPolicy) GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy { - return b -} - -type BaseClusterDasAdmissionControlPolicy interface { - GetClusterDasAdmissionControlPolicy() *ClusterDasAdmissionControlPolicy -} - -func init() { - t["BaseClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem() -} - -func (b *ClusterDasAdvancedRuntimeInfo) GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo { - return b -} - -type BaseClusterDasAdvancedRuntimeInfo interface { - GetClusterDasAdvancedRuntimeInfo() *ClusterDasAdvancedRuntimeInfo -} - -func init() { - t["BaseClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem() -} - -func (b *ClusterDasData) GetClusterDasData() *ClusterDasData { return b } - -type BaseClusterDasData interface { - GetClusterDasData() *ClusterDasData -} - -func init() { - t["BaseClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem() -} - -func (b *ClusterDasHostInfo) GetClusterDasHostInfo() *ClusterDasHostInfo { return b } - -type BaseClusterDasHostInfo interface { - GetClusterDasHostInfo() *ClusterDasHostInfo -} - -func init() { - t["BaseClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem() -} - -func (b *ClusterDrsFaultsFaultsByVm) GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm { - return b -} - -type BaseClusterDrsFaultsFaultsByVm interface { - GetClusterDrsFaultsFaultsByVm() *ClusterDrsFaultsFaultsByVm -} - -func init() { - t["BaseClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem() -} - -func (b *ClusterEvent) GetClusterEvent() *ClusterEvent { return b } - -type BaseClusterEvent interface { - GetClusterEvent() *ClusterEvent -} - -func init() { - t["BaseClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem() -} - -func (b *ClusterGroupInfo) GetClusterGroupInfo() *ClusterGroupInfo { return b } - -type BaseClusterGroupInfo interface { - GetClusterGroupInfo() *ClusterGroupInfo -} - -func init() { - t["BaseClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem() -} - -func (b *ClusterOvercommittedEvent) GetClusterOvercommittedEvent() *ClusterOvercommittedEvent { - return b -} - -type BaseClusterOvercommittedEvent interface { - GetClusterOvercommittedEvent() *ClusterOvercommittedEvent -} - -func init() { - t["BaseClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem() -} - -func (b *ClusterProfileConfigSpec) GetClusterProfileConfigSpec() *ClusterProfileConfigSpec { return b } - -type BaseClusterProfileConfigSpec interface { - GetClusterProfileConfigSpec() *ClusterProfileConfigSpec -} - -func init() { - t["BaseClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem() -} - -func (b *ClusterProfileCreateSpec) GetClusterProfileCreateSpec() *ClusterProfileCreateSpec { return b } - -type BaseClusterProfileCreateSpec interface { - GetClusterProfileCreateSpec() *ClusterProfileCreateSpec -} - -func init() { - t["BaseClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem() -} - -func (b *ClusterRuleInfo) GetClusterRuleInfo() *ClusterRuleInfo { return b } - -type BaseClusterRuleInfo interface { - GetClusterRuleInfo() *ClusterRuleInfo -} - -func init() { - t["BaseClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem() -} - -func (b *ClusterSlotPolicy) GetClusterSlotPolicy() *ClusterSlotPolicy { return b } - -type BaseClusterSlotPolicy interface { - GetClusterSlotPolicy() *ClusterSlotPolicy -} - -func init() { - t["BaseClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem() -} - -func (b *ClusterStatusChangedEvent) GetClusterStatusChangedEvent() *ClusterStatusChangedEvent { - return b -} - -type BaseClusterStatusChangedEvent interface { - GetClusterStatusChangedEvent() *ClusterStatusChangedEvent -} - -func init() { - t["BaseClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem() -} - -func (b *ComputeResourceConfigInfo) GetComputeResourceConfigInfo() *ComputeResourceConfigInfo { - return b -} - -type BaseComputeResourceConfigInfo interface { - GetComputeResourceConfigInfo() *ComputeResourceConfigInfo -} - -func init() { - t["BaseComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem() -} - -func (b *ComputeResourceConfigSpec) GetComputeResourceConfigSpec() *ComputeResourceConfigSpec { - return b -} - -type BaseComputeResourceConfigSpec interface { - GetComputeResourceConfigSpec() *ComputeResourceConfigSpec -} - -func init() { - t["BaseComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem() -} - -func (b *ComputeResourceSummary) GetComputeResourceSummary() *ComputeResourceSummary { return b } - -type BaseComputeResourceSummary interface { - GetComputeResourceSummary() *ComputeResourceSummary -} - -func init() { - t["BaseComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem() -} - -func (b *CpuIncompatible) GetCpuIncompatible() *CpuIncompatible { return b } - -type BaseCpuIncompatible interface { - GetCpuIncompatible() *CpuIncompatible -} - -func init() { - t["BaseCpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem() -} - -func (b *CryptoSpec) GetCryptoSpec() *CryptoSpec { return b } - -type BaseCryptoSpec interface { - GetCryptoSpec() *CryptoSpec -} - -func init() { - t["BaseCryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem() -} - -func (b *CryptoSpecNoOp) GetCryptoSpecNoOp() *CryptoSpecNoOp { return b } - -type BaseCryptoSpecNoOp interface { - GetCryptoSpecNoOp() *CryptoSpecNoOp -} - -func init() { - t["BaseCryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem() -} - -func (b *CustomFieldDefEvent) GetCustomFieldDefEvent() *CustomFieldDefEvent { return b } - -type BaseCustomFieldDefEvent interface { - GetCustomFieldDefEvent() *CustomFieldDefEvent -} - -func init() { - t["BaseCustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem() -} - -func (b *CustomFieldEvent) GetCustomFieldEvent() *CustomFieldEvent { return b } - -type BaseCustomFieldEvent interface { - GetCustomFieldEvent() *CustomFieldEvent -} - -func init() { - t["BaseCustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem() -} - -func (b *CustomFieldValue) GetCustomFieldValue() *CustomFieldValue { return b } - -type BaseCustomFieldValue interface { - GetCustomFieldValue() *CustomFieldValue -} - -func init() { - t["BaseCustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem() -} - -func (b *CustomizationEvent) GetCustomizationEvent() *CustomizationEvent { return b } - -type BaseCustomizationEvent interface { - GetCustomizationEvent() *CustomizationEvent -} - -func init() { - t["BaseCustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem() -} - -func (b *CustomizationFailed) GetCustomizationFailed() *CustomizationFailed { return b } - -type BaseCustomizationFailed interface { - GetCustomizationFailed() *CustomizationFailed -} - -func init() { - t["BaseCustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem() -} - -func (b *CustomizationFault) GetCustomizationFault() *CustomizationFault { return b } - -type BaseCustomizationFault interface { - GetCustomizationFault() *CustomizationFault -} - -func init() { - t["BaseCustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem() -} - -func (b *CustomizationIdentitySettings) GetCustomizationIdentitySettings() *CustomizationIdentitySettings { - return b -} - -type BaseCustomizationIdentitySettings interface { - GetCustomizationIdentitySettings() *CustomizationIdentitySettings -} - -func init() { - t["BaseCustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem() -} - -func (b *CustomizationIpGenerator) GetCustomizationIpGenerator() *CustomizationIpGenerator { return b } - -type BaseCustomizationIpGenerator interface { - GetCustomizationIpGenerator() *CustomizationIpGenerator -} - -func init() { - t["BaseCustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem() -} - -func (b *CustomizationIpV6Generator) GetCustomizationIpV6Generator() *CustomizationIpV6Generator { - return b -} - -type BaseCustomizationIpV6Generator interface { - GetCustomizationIpV6Generator() *CustomizationIpV6Generator -} - -func init() { - t["BaseCustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem() -} - -func (b *CustomizationName) GetCustomizationName() *CustomizationName { return b } - -type BaseCustomizationName interface { - GetCustomizationName() *CustomizationName -} - -func init() { - t["BaseCustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem() -} - -func (b *CustomizationOptions) GetCustomizationOptions() *CustomizationOptions { return b } - -type BaseCustomizationOptions interface { - GetCustomizationOptions() *CustomizationOptions -} - -func init() { - t["BaseCustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem() -} - -func (b *DVPortSetting) GetDVPortSetting() *DVPortSetting { return b } - -type BaseDVPortSetting interface { - GetDVPortSetting() *DVPortSetting -} - -func init() { - t["BaseDVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem() -} - -func (b *DVPortgroupEvent) GetDVPortgroupEvent() *DVPortgroupEvent { return b } - -type BaseDVPortgroupEvent interface { - GetDVPortgroupEvent() *DVPortgroupEvent -} - -func init() { - t["BaseDVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem() -} - -func (b *DVPortgroupPolicy) GetDVPortgroupPolicy() *DVPortgroupPolicy { return b } - -type BaseDVPortgroupPolicy interface { - GetDVPortgroupPolicy() *DVPortgroupPolicy -} - -func init() { - t["BaseDVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem() -} - -func (b *DVSConfigInfo) GetDVSConfigInfo() *DVSConfigInfo { return b } - -type BaseDVSConfigInfo interface { - GetDVSConfigInfo() *DVSConfigInfo -} - -func init() { - t["BaseDVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem() -} - -func (b *DVSConfigSpec) GetDVSConfigSpec() *DVSConfigSpec { return b } - -type BaseDVSConfigSpec interface { - GetDVSConfigSpec() *DVSConfigSpec -} - -func init() { - t["BaseDVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem() -} - -func (b *DVSFeatureCapability) GetDVSFeatureCapability() *DVSFeatureCapability { return b } - -type BaseDVSFeatureCapability interface { - GetDVSFeatureCapability() *DVSFeatureCapability -} - -func init() { - t["BaseDVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem() -} - -func (b *DVSHealthCheckCapability) GetDVSHealthCheckCapability() *DVSHealthCheckCapability { return b } - -type BaseDVSHealthCheckCapability interface { - GetDVSHealthCheckCapability() *DVSHealthCheckCapability -} - -func init() { - t["BaseDVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem() -} - -func (b *DVSHealthCheckConfig) GetDVSHealthCheckConfig() *DVSHealthCheckConfig { return b } - -type BaseDVSHealthCheckConfig interface { - GetDVSHealthCheckConfig() *DVSHealthCheckConfig -} - -func init() { - t["BaseDVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem() -} - -func (b *DVSUplinkPortPolicy) GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy { return b } - -type BaseDVSUplinkPortPolicy interface { - GetDVSUplinkPortPolicy() *DVSUplinkPortPolicy -} - -func init() { - t["BaseDVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem() -} - -func (b *DailyTaskScheduler) GetDailyTaskScheduler() *DailyTaskScheduler { return b } - -type BaseDailyTaskScheduler interface { - GetDailyTaskScheduler() *DailyTaskScheduler -} - -func init() { - t["BaseDailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem() -} - -func (b *DatacenterEvent) GetDatacenterEvent() *DatacenterEvent { return b } - -type BaseDatacenterEvent interface { - GetDatacenterEvent() *DatacenterEvent -} - -func init() { - t["BaseDatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem() -} - -func (b *DatastoreEvent) GetDatastoreEvent() *DatastoreEvent { return b } - -type BaseDatastoreEvent interface { - GetDatastoreEvent() *DatastoreEvent -} - -func init() { - t["BaseDatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem() -} - -func (b *DatastoreFileEvent) GetDatastoreFileEvent() *DatastoreFileEvent { return b } - -type BaseDatastoreFileEvent interface { - GetDatastoreFileEvent() *DatastoreFileEvent -} - -func init() { - t["BaseDatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem() -} - -func (b *DatastoreInfo) GetDatastoreInfo() *DatastoreInfo { return b } - -type BaseDatastoreInfo interface { - GetDatastoreInfo() *DatastoreInfo -} - -func init() { - t["BaseDatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem() -} - -func (b *DatastoreNotWritableOnHost) GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost { - return b -} - -type BaseDatastoreNotWritableOnHost interface { - GetDatastoreNotWritableOnHost() *DatastoreNotWritableOnHost -} - -func init() { - t["BaseDatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem() -} - -func (b *Description) GetDescription() *Description { return b } - -type BaseDescription interface { - GetDescription() *Description -} - -func init() { - t["BaseDescription"] = reflect.TypeOf((*Description)(nil)).Elem() -} - -func (b *DeviceBackingNotSupported) GetDeviceBackingNotSupported() *DeviceBackingNotSupported { - return b -} - -type BaseDeviceBackingNotSupported interface { - GetDeviceBackingNotSupported() *DeviceBackingNotSupported -} - -func init() { - t["BaseDeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem() -} - -func (b *DeviceNotSupported) GetDeviceNotSupported() *DeviceNotSupported { return b } - -type BaseDeviceNotSupported interface { - GetDeviceNotSupported() *DeviceNotSupported -} - -func init() { - t["BaseDeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem() -} - -func (b *DiskNotSupported) GetDiskNotSupported() *DiskNotSupported { return b } - -type BaseDiskNotSupported interface { - GetDiskNotSupported() *DiskNotSupported -} - -func init() { - t["BaseDiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem() -} - -func (b *DistributedVirtualSwitchHostMemberBacking) GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking { - return b -} - -type BaseDistributedVirtualSwitchHostMemberBacking interface { - GetDistributedVirtualSwitchHostMemberBacking() *DistributedVirtualSwitchHostMemberBacking -} - -func init() { - t["BaseDistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem() -} - -func (b *DistributedVirtualSwitchManagerHostDvsFilterSpec) GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec { - return b -} - -type BaseDistributedVirtualSwitchManagerHostDvsFilterSpec interface { - GetDistributedVirtualSwitchManagerHostDvsFilterSpec() *DistributedVirtualSwitchManagerHostDvsFilterSpec -} - -func init() { - t["BaseDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() -} - -func (b *DvsEvent) GetDvsEvent() *DvsEvent { return b } - -type BaseDvsEvent interface { - GetDvsEvent() *DvsEvent -} - -func init() { - t["BaseDvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem() -} - -func (b *DvsFault) GetDvsFault() *DvsFault { return b } - -type BaseDvsFault interface { - GetDvsFault() *DvsFault -} - -func init() { - t["BaseDvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem() -} - -func (b *DvsFilterConfig) GetDvsFilterConfig() *DvsFilterConfig { return b } - -type BaseDvsFilterConfig interface { - GetDvsFilterConfig() *DvsFilterConfig -} - -func init() { - t["BaseDvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem() -} - -func (b *DvsHealthStatusChangeEvent) GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent { - return b -} - -type BaseDvsHealthStatusChangeEvent interface { - GetDvsHealthStatusChangeEvent() *DvsHealthStatusChangeEvent -} - -func init() { - t["BaseDvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem() -} - -func (b *DvsIpPort) GetDvsIpPort() *DvsIpPort { return b } - -type BaseDvsIpPort interface { - GetDvsIpPort() *DvsIpPort -} - -func init() { - t["BaseDvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem() -} - -func (b *DvsNetworkRuleAction) GetDvsNetworkRuleAction() *DvsNetworkRuleAction { return b } - -type BaseDvsNetworkRuleAction interface { - GetDvsNetworkRuleAction() *DvsNetworkRuleAction -} - -func init() { - t["BaseDvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem() -} - -func (b *DvsNetworkRuleQualifier) GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier { return b } - -type BaseDvsNetworkRuleQualifier interface { - GetDvsNetworkRuleQualifier() *DvsNetworkRuleQualifier -} - -func init() { - t["BaseDvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem() -} - -func (b *DvsTrafficFilterConfig) GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig { return b } - -type BaseDvsTrafficFilterConfig interface { - GetDvsTrafficFilterConfig() *DvsTrafficFilterConfig -} - -func init() { - t["BaseDvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem() -} - -func (b *DvsVNicProfile) GetDvsVNicProfile() *DvsVNicProfile { return b } - -type BaseDvsVNicProfile interface { - GetDvsVNicProfile() *DvsVNicProfile -} - -func init() { - t["BaseDvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem() -} - -func (b *DynamicData) GetDynamicData() *DynamicData { return b } - -type BaseDynamicData interface { - GetDynamicData() *DynamicData -} - -func init() { - t["BaseDynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem() -} - -func (b *EVCAdmissionFailed) GetEVCAdmissionFailed() *EVCAdmissionFailed { return b } - -type BaseEVCAdmissionFailed interface { - GetEVCAdmissionFailed() *EVCAdmissionFailed -} - -func init() { - t["BaseEVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem() -} - -func (b *EVCConfigFault) GetEVCConfigFault() *EVCConfigFault { return b } - -type BaseEVCConfigFault interface { - GetEVCConfigFault() *EVCConfigFault -} - -func init() { - t["BaseEVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem() -} - -func (b *ElementDescription) GetElementDescription() *ElementDescription { return b } - -type BaseElementDescription interface { - GetElementDescription() *ElementDescription -} - -func init() { - t["BaseElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem() -} - -func (b *EnteredStandbyModeEvent) GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent { return b } - -type BaseEnteredStandbyModeEvent interface { - GetEnteredStandbyModeEvent() *EnteredStandbyModeEvent -} - -func init() { - t["BaseEnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem() -} - -func (b *EnteringStandbyModeEvent) GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent { return b } - -type BaseEnteringStandbyModeEvent interface { - GetEnteringStandbyModeEvent() *EnteringStandbyModeEvent -} - -func init() { - t["BaseEnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem() -} - -func (b *EntityEventArgument) GetEntityEventArgument() *EntityEventArgument { return b } - -type BaseEntityEventArgument interface { - GetEntityEventArgument() *EntityEventArgument -} - -func init() { - t["BaseEntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem() -} - -func (b *Event) GetEvent() *Event { return b } - -type BaseEvent interface { - GetEvent() *Event -} - -func init() { - t["BaseEvent"] = reflect.TypeOf((*Event)(nil)).Elem() -} - -func (b *EventArgument) GetEventArgument() *EventArgument { return b } - -type BaseEventArgument interface { - GetEventArgument() *EventArgument -} - -func init() { - t["BaseEventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem() -} - -func (b *ExitStandbyModeFailedEvent) GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent { - return b -} - -type BaseExitStandbyModeFailedEvent interface { - GetExitStandbyModeFailedEvent() *ExitStandbyModeFailedEvent -} - -func init() { - t["BaseExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem() -} - -func (b *ExitedStandbyModeEvent) GetExitedStandbyModeEvent() *ExitedStandbyModeEvent { return b } - -type BaseExitedStandbyModeEvent interface { - GetExitedStandbyModeEvent() *ExitedStandbyModeEvent -} - -func init() { - t["BaseExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem() -} - -func (b *ExitingStandbyModeEvent) GetExitingStandbyModeEvent() *ExitingStandbyModeEvent { return b } - -type BaseExitingStandbyModeEvent interface { - GetExitingStandbyModeEvent() *ExitingStandbyModeEvent -} - -func init() { - t["BaseExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem() -} - -func (b *ExpiredFeatureLicense) GetExpiredFeatureLicense() *ExpiredFeatureLicense { return b } - -type BaseExpiredFeatureLicense interface { - GetExpiredFeatureLicense() *ExpiredFeatureLicense -} - -func init() { - t["BaseExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem() -} - -func (b *FaultToleranceConfigInfo) GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo { return b } - -type BaseFaultToleranceConfigInfo interface { - GetFaultToleranceConfigInfo() *FaultToleranceConfigInfo -} - -func init() { - t["BaseFaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem() -} - -func (b *FcoeFault) GetFcoeFault() *FcoeFault { return b } - -type BaseFcoeFault interface { - GetFcoeFault() *FcoeFault -} - -func init() { - t["BaseFcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem() -} - -func (b *FileBackedVirtualDiskSpec) GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec { - return b -} - -type BaseFileBackedVirtualDiskSpec interface { - GetFileBackedVirtualDiskSpec() *FileBackedVirtualDiskSpec -} - -func init() { - t["BaseFileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem() -} - -func (b *FileFault) GetFileFault() *FileFault { return b } - -type BaseFileFault interface { - GetFileFault() *FileFault -} - -func init() { - t["BaseFileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem() -} - -func (b *FileInfo) GetFileInfo() *FileInfo { return b } - -type BaseFileInfo interface { - GetFileInfo() *FileInfo -} - -func init() { - t["BaseFileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem() -} - -func (b *FileQuery) GetFileQuery() *FileQuery { return b } - -type BaseFileQuery interface { - GetFileQuery() *FileQuery -} - -func init() { - t["BaseFileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem() -} - -func (b *GatewayConnectFault) GetGatewayConnectFault() *GatewayConnectFault { return b } - -type BaseGatewayConnectFault interface { - GetGatewayConnectFault() *GatewayConnectFault -} - -func init() { - t["BaseGatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem() -} - -func (b *GatewayToHostConnectFault) GetGatewayToHostConnectFault() *GatewayToHostConnectFault { - return b -} - -type BaseGatewayToHostConnectFault interface { - GetGatewayToHostConnectFault() *GatewayToHostConnectFault -} - -func init() { - t["BaseGatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem() -} - -func (b *GeneralEvent) GetGeneralEvent() *GeneralEvent { return b } - -type BaseGeneralEvent interface { - GetGeneralEvent() *GeneralEvent -} - -func init() { - t["BaseGeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem() -} - -func (b *GuestAuthSubject) GetGuestAuthSubject() *GuestAuthSubject { return b } - -type BaseGuestAuthSubject interface { - GetGuestAuthSubject() *GuestAuthSubject -} - -func init() { - t["BaseGuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem() -} - -func (b *GuestAuthentication) GetGuestAuthentication() *GuestAuthentication { return b } - -type BaseGuestAuthentication interface { - GetGuestAuthentication() *GuestAuthentication -} - -func init() { - t["BaseGuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem() -} - -func (b *GuestFileAttributes) GetGuestFileAttributes() *GuestFileAttributes { return b } - -type BaseGuestFileAttributes interface { - GetGuestFileAttributes() *GuestFileAttributes -} - -func init() { - t["BaseGuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem() -} - -func (b *GuestOperationsFault) GetGuestOperationsFault() *GuestOperationsFault { return b } - -type BaseGuestOperationsFault interface { - GetGuestOperationsFault() *GuestOperationsFault -} - -func init() { - t["BaseGuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem() -} - -func (b *GuestProgramSpec) GetGuestProgramSpec() *GuestProgramSpec { return b } - -type BaseGuestProgramSpec interface { - GetGuestProgramSpec() *GuestProgramSpec -} - -func init() { - t["BaseGuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem() -} - -func (b *GuestRegValueDataSpec) GetGuestRegValueDataSpec() *GuestRegValueDataSpec { return b } - -type BaseGuestRegValueDataSpec interface { - GetGuestRegValueDataSpec() *GuestRegValueDataSpec -} - -func init() { - t["BaseGuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem() -} - -func (b *GuestRegistryFault) GetGuestRegistryFault() *GuestRegistryFault { return b } - -type BaseGuestRegistryFault interface { - GetGuestRegistryFault() *GuestRegistryFault -} - -func init() { - t["BaseGuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem() -} - -func (b *GuestRegistryKeyFault) GetGuestRegistryKeyFault() *GuestRegistryKeyFault { return b } - -type BaseGuestRegistryKeyFault interface { - GetGuestRegistryKeyFault() *GuestRegistryKeyFault -} - -func init() { - t["BaseGuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem() -} - -func (b *GuestRegistryValueFault) GetGuestRegistryValueFault() *GuestRegistryValueFault { return b } - -type BaseGuestRegistryValueFault interface { - GetGuestRegistryValueFault() *GuestRegistryValueFault -} - -func init() { - t["BaseGuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem() -} - -func (b *HostAccountSpec) GetHostAccountSpec() *HostAccountSpec { return b } - -type BaseHostAccountSpec interface { - GetHostAccountSpec() *HostAccountSpec -} - -func init() { - t["BaseHostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem() -} - -func (b *HostAuthenticationStoreInfo) GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo { - return b -} - -type BaseHostAuthenticationStoreInfo interface { - GetHostAuthenticationStoreInfo() *HostAuthenticationStoreInfo -} - -func init() { - t["BaseHostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem() -} - -func (b *HostCommunication) GetHostCommunication() *HostCommunication { return b } - -type BaseHostCommunication interface { - GetHostCommunication() *HostCommunication -} - -func init() { - t["BaseHostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem() -} - -func (b *HostConfigFault) GetHostConfigFault() *HostConfigFault { return b } - -type BaseHostConfigFault interface { - GetHostConfigFault() *HostConfigFault -} - -func init() { - t["BaseHostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem() -} - -func (b *HostConnectFault) GetHostConnectFault() *HostConnectFault { return b } - -type BaseHostConnectFault interface { - GetHostConnectFault() *HostConnectFault -} - -func init() { - t["BaseHostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem() -} - -func (b *HostConnectInfoNetworkInfo) GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo { - return b -} - -type BaseHostConnectInfoNetworkInfo interface { - GetHostConnectInfoNetworkInfo() *HostConnectInfoNetworkInfo -} - -func init() { - t["BaseHostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem() -} - -func (b *HostDasEvent) GetHostDasEvent() *HostDasEvent { return b } - -type BaseHostDasEvent interface { - GetHostDasEvent() *HostDasEvent -} - -func init() { - t["BaseHostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem() -} - -func (b *HostDataTransportConnectionInfo) GetHostDataTransportConnectionInfo() *HostDataTransportConnectionInfo { - return b -} - -type BaseHostDataTransportConnectionInfo interface { - GetHostDataTransportConnectionInfo() *HostDataTransportConnectionInfo -} - -func init() { - t["BaseHostDataTransportConnectionInfo"] = reflect.TypeOf((*HostDataTransportConnectionInfo)(nil)).Elem() -} - -func (b *HostDatastoreConnectInfo) GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo { return b } - -type BaseHostDatastoreConnectInfo interface { - GetHostDatastoreConnectInfo() *HostDatastoreConnectInfo -} - -func init() { - t["BaseHostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem() -} - -func (b *HostDevice) GetHostDevice() *HostDevice { return b } - -type BaseHostDevice interface { - GetHostDevice() *HostDevice -} - -func init() { - t["BaseHostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem() -} - -func (b *HostDigestInfo) GetHostDigestInfo() *HostDigestInfo { return b } - -type BaseHostDigestInfo interface { - GetHostDigestInfo() *HostDigestInfo -} - -func init() { - t["BaseHostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem() -} - -func (b *HostDirectoryStoreInfo) GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo { return b } - -type BaseHostDirectoryStoreInfo interface { - GetHostDirectoryStoreInfo() *HostDirectoryStoreInfo -} - -func init() { - t["BaseHostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem() -} - -func (b *HostDnsConfig) GetHostDnsConfig() *HostDnsConfig { return b } - -type BaseHostDnsConfig interface { - GetHostDnsConfig() *HostDnsConfig -} - -func init() { - t["BaseHostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem() -} - -func (b *HostEvent) GetHostEvent() *HostEvent { return b } - -type BaseHostEvent interface { - GetHostEvent() *HostEvent -} - -func init() { - t["BaseHostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem() -} - -func (b *HostFibreChannelHba) GetHostFibreChannelHba() *HostFibreChannelHba { return b } - -type BaseHostFibreChannelHba interface { - GetHostFibreChannelHba() *HostFibreChannelHba -} - -func init() { - t["BaseHostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem() -} - -func (b *HostFibreChannelTargetTransport) GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport { - return b -} - -type BaseHostFibreChannelTargetTransport interface { - GetHostFibreChannelTargetTransport() *HostFibreChannelTargetTransport -} - -func init() { - t["BaseHostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem() -} - -func (b *HostFileSystemVolume) GetHostFileSystemVolume() *HostFileSystemVolume { return b } - -type BaseHostFileSystemVolume interface { - GetHostFileSystemVolume() *HostFileSystemVolume -} - -func init() { - t["BaseHostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem() -} - -func (b *HostHardwareElementInfo) GetHostHardwareElementInfo() *HostHardwareElementInfo { return b } - -type BaseHostHardwareElementInfo interface { - GetHostHardwareElementInfo() *HostHardwareElementInfo -} - -func init() { - t["BaseHostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem() -} - -func (b *HostHbaCreateSpec) GetHostHbaCreateSpec() *HostHbaCreateSpec { return b } - -type BaseHostHbaCreateSpec interface { - GetHostHbaCreateSpec() *HostHbaCreateSpec -} - -func init() { - t["BaseHostHbaCreateSpec"] = reflect.TypeOf((*HostHbaCreateSpec)(nil)).Elem() -} - -func (b *HostHostBusAdapter) GetHostHostBusAdapter() *HostHostBusAdapter { return b } - -type BaseHostHostBusAdapter interface { - GetHostHostBusAdapter() *HostHostBusAdapter -} - -func init() { - t["BaseHostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem() -} - -func (b *HostIpRouteConfig) GetHostIpRouteConfig() *HostIpRouteConfig { return b } - -type BaseHostIpRouteConfig interface { - GetHostIpRouteConfig() *HostIpRouteConfig -} - -func init() { - t["BaseHostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem() -} - -func (b *HostMemberHealthCheckResult) GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult { - return b -} - -type BaseHostMemberHealthCheckResult interface { - GetHostMemberHealthCheckResult() *HostMemberHealthCheckResult -} - -func init() { - t["BaseHostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem() -} - -func (b *HostMemberUplinkHealthCheckResult) GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult { - return b -} - -type BaseHostMemberUplinkHealthCheckResult interface { - GetHostMemberUplinkHealthCheckResult() *HostMemberUplinkHealthCheckResult -} - -func init() { - t["BaseHostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem() -} - -func (b *HostMultipathInfoLogicalUnitPolicy) GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy { - return b -} - -type BaseHostMultipathInfoLogicalUnitPolicy interface { - GetHostMultipathInfoLogicalUnitPolicy() *HostMultipathInfoLogicalUnitPolicy -} - -func init() { - t["BaseHostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem() -} - -func (b *HostNvmeSpec) GetHostNvmeSpec() *HostNvmeSpec { return b } - -type BaseHostNvmeSpec interface { - GetHostNvmeSpec() *HostNvmeSpec -} - -func init() { - t["BaseHostNvmeSpec"] = reflect.TypeOf((*HostNvmeSpec)(nil)).Elem() -} - -func (b *HostNvmeTransportParameters) GetHostNvmeTransportParameters() *HostNvmeTransportParameters { - return b -} - -type BaseHostNvmeTransportParameters interface { - GetHostNvmeTransportParameters() *HostNvmeTransportParameters -} - -func init() { - t["BaseHostNvmeTransportParameters"] = reflect.TypeOf((*HostNvmeTransportParameters)(nil)).Elem() -} - -func (b *HostPciPassthruConfig) GetHostPciPassthruConfig() *HostPciPassthruConfig { return b } - -type BaseHostPciPassthruConfig interface { - GetHostPciPassthruConfig() *HostPciPassthruConfig -} - -func init() { - t["BaseHostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem() -} - -func (b *HostPciPassthruInfo) GetHostPciPassthruInfo() *HostPciPassthruInfo { return b } - -type BaseHostPciPassthruInfo interface { - GetHostPciPassthruInfo() *HostPciPassthruInfo -} - -func init() { - t["BaseHostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem() -} - -func (b *HostPowerOpFailed) GetHostPowerOpFailed() *HostPowerOpFailed { return b } - -type BaseHostPowerOpFailed interface { - GetHostPowerOpFailed() *HostPowerOpFailed -} - -func init() { - t["BaseHostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem() -} - -func (b *HostProfileConfigSpec) GetHostProfileConfigSpec() *HostProfileConfigSpec { return b } - -type BaseHostProfileConfigSpec interface { - GetHostProfileConfigSpec() *HostProfileConfigSpec -} - -func init() { - t["BaseHostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem() -} - -func (b *HostProfilesEntityCustomizations) GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations { - return b -} - -type BaseHostProfilesEntityCustomizations interface { - GetHostProfilesEntityCustomizations() *HostProfilesEntityCustomizations -} - -func init() { - t["BaseHostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem() -} - -func (b *HostRdmaDeviceBacking) GetHostRdmaDeviceBacking() *HostRdmaDeviceBacking { return b } - -type BaseHostRdmaDeviceBacking interface { - GetHostRdmaDeviceBacking() *HostRdmaDeviceBacking -} - -func init() { - t["BaseHostRdmaDeviceBacking"] = reflect.TypeOf((*HostRdmaDeviceBacking)(nil)).Elem() -} - -func (b *HostSriovDevicePoolInfo) GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo { return b } - -type BaseHostSriovDevicePoolInfo interface { - GetHostSriovDevicePoolInfo() *HostSriovDevicePoolInfo -} - -func init() { - t["BaseHostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem() -} - -func (b *HostSystemSwapConfigurationSystemSwapOption) GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption { - return b -} - -type BaseHostSystemSwapConfigurationSystemSwapOption interface { - GetHostSystemSwapConfigurationSystemSwapOption() *HostSystemSwapConfigurationSystemSwapOption -} - -func init() { - t["BaseHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() -} - -func (b *HostTargetTransport) GetHostTargetTransport() *HostTargetTransport { return b } - -type BaseHostTargetTransport interface { - GetHostTargetTransport() *HostTargetTransport -} - -func init() { - t["BaseHostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem() -} - -func (b *HostTpmBootSecurityOptionEventDetails) GetHostTpmBootSecurityOptionEventDetails() *HostTpmBootSecurityOptionEventDetails { - return b -} - -type BaseHostTpmBootSecurityOptionEventDetails interface { - GetHostTpmBootSecurityOptionEventDetails() *HostTpmBootSecurityOptionEventDetails -} - -func init() { - t["BaseHostTpmBootSecurityOptionEventDetails"] = reflect.TypeOf((*HostTpmBootSecurityOptionEventDetails)(nil)).Elem() -} - -func (b *HostTpmEventDetails) GetHostTpmEventDetails() *HostTpmEventDetails { return b } - -type BaseHostTpmEventDetails interface { - GetHostTpmEventDetails() *HostTpmEventDetails -} - -func init() { - t["BaseHostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem() -} - -func (b *HostVirtualSwitchBridge) GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge { return b } - -type BaseHostVirtualSwitchBridge interface { - GetHostVirtualSwitchBridge() *HostVirtualSwitchBridge -} - -func init() { - t["BaseHostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem() -} - -func (b *HourlyTaskScheduler) GetHourlyTaskScheduler() *HourlyTaskScheduler { return b } - -type BaseHourlyTaskScheduler interface { - GetHourlyTaskScheduler() *HourlyTaskScheduler -} - -func init() { - t["BaseHourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem() -} - -func (b *ImportSpec) GetImportSpec() *ImportSpec { return b } - -type BaseImportSpec interface { - GetImportSpec() *ImportSpec -} - -func init() { - t["BaseImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem() -} - -func (b *InaccessibleDatastore) GetInaccessibleDatastore() *InaccessibleDatastore { return b } - -type BaseInaccessibleDatastore interface { - GetInaccessibleDatastore() *InaccessibleDatastore -} - -func init() { - t["BaseInaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem() -} - -func (b *InheritablePolicy) GetInheritablePolicy() *InheritablePolicy { return b } - -type BaseInheritablePolicy interface { - GetInheritablePolicy() *InheritablePolicy -} - -func init() { - t["BaseInheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem() -} - -func (b *InsufficientHostCapacityFault) GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault { - return b -} - -type BaseInsufficientHostCapacityFault interface { - GetInsufficientHostCapacityFault() *InsufficientHostCapacityFault -} - -func init() { - t["BaseInsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem() -} - -func (b *InsufficientResourcesFault) GetInsufficientResourcesFault() *InsufficientResourcesFault { - return b -} - -type BaseInsufficientResourcesFault interface { - GetInsufficientResourcesFault() *InsufficientResourcesFault -} - -func init() { - t["BaseInsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem() -} - -func (b *InsufficientStandbyResource) GetInsufficientStandbyResource() *InsufficientStandbyResource { - return b -} - -type BaseInsufficientStandbyResource interface { - GetInsufficientStandbyResource() *InsufficientStandbyResource -} - -func init() { - t["BaseInsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem() -} - -func (b *InvalidArgument) GetInvalidArgument() *InvalidArgument { return b } - -type BaseInvalidArgument interface { - GetInvalidArgument() *InvalidArgument -} - -func init() { - t["BaseInvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem() -} - -func (b *InvalidCAMServer) GetInvalidCAMServer() *InvalidCAMServer { return b } - -type BaseInvalidCAMServer interface { - GetInvalidCAMServer() *InvalidCAMServer -} - -func init() { - t["BaseInvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem() -} - -func (b *InvalidDatastore) GetInvalidDatastore() *InvalidDatastore { return b } - -type BaseInvalidDatastore interface { - GetInvalidDatastore() *InvalidDatastore -} - -func init() { - t["BaseInvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem() -} - -func (b *InvalidDeviceSpec) GetInvalidDeviceSpec() *InvalidDeviceSpec { return b } - -type BaseInvalidDeviceSpec interface { - GetInvalidDeviceSpec() *InvalidDeviceSpec -} - -func init() { - t["BaseInvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem() -} - -func (b *InvalidFolder) GetInvalidFolder() *InvalidFolder { return b } - -type BaseInvalidFolder interface { - GetInvalidFolder() *InvalidFolder -} - -func init() { - t["BaseInvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem() -} - -func (b *InvalidFormat) GetInvalidFormat() *InvalidFormat { return b } - -type BaseInvalidFormat interface { - GetInvalidFormat() *InvalidFormat -} - -func init() { - t["BaseInvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem() -} - -func (b *InvalidHostState) GetInvalidHostState() *InvalidHostState { return b } - -type BaseInvalidHostState interface { - GetInvalidHostState() *InvalidHostState -} - -func init() { - t["BaseInvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem() -} - -func (b *InvalidLogin) GetInvalidLogin() *InvalidLogin { return b } - -type BaseInvalidLogin interface { - GetInvalidLogin() *InvalidLogin -} - -func init() { - t["BaseInvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem() -} - -func (b *InvalidPropertyValue) GetInvalidPropertyValue() *InvalidPropertyValue { return b } - -type BaseInvalidPropertyValue interface { - GetInvalidPropertyValue() *InvalidPropertyValue -} - -func init() { - t["BaseInvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem() -} - -func (b *InvalidRequest) GetInvalidRequest() *InvalidRequest { return b } - -type BaseInvalidRequest interface { - GetInvalidRequest() *InvalidRequest -} - -func init() { - t["BaseInvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem() -} - -func (b *InvalidState) GetInvalidState() *InvalidState { return b } - -type BaseInvalidState interface { - GetInvalidState() *InvalidState -} - -func init() { - t["BaseInvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem() -} - -func (b *InvalidVmConfig) GetInvalidVmConfig() *InvalidVmConfig { return b } - -type BaseInvalidVmConfig interface { - GetInvalidVmConfig() *InvalidVmConfig -} - -func init() { - t["BaseInvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem() -} - -func (b *IoFilterInfo) GetIoFilterInfo() *IoFilterInfo { return b } - -type BaseIoFilterInfo interface { - GetIoFilterInfo() *IoFilterInfo -} - -func init() { - t["BaseIoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem() -} - -func (b *IpAddress) GetIpAddress() *IpAddress { return b } - -type BaseIpAddress interface { - GetIpAddress() *IpAddress -} - -func init() { - t["BaseIpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem() -} - -func (b *IscsiFault) GetIscsiFault() *IscsiFault { return b } - -type BaseIscsiFault interface { - GetIscsiFault() *IscsiFault -} - -func init() { - t["BaseIscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem() -} - -func (b *LicenseEvent) GetLicenseEvent() *LicenseEvent { return b } - -type BaseLicenseEvent interface { - GetLicenseEvent() *LicenseEvent -} - -func init() { - t["BaseLicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem() -} - -func (b *LicenseSource) GetLicenseSource() *LicenseSource { return b } - -type BaseLicenseSource interface { - GetLicenseSource() *LicenseSource -} - -func init() { - t["BaseLicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem() -} - -func (b *MacAddress) GetMacAddress() *MacAddress { return b } - -type BaseMacAddress interface { - GetMacAddress() *MacAddress -} - -func init() { - t["BaseMacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem() -} - -func (b *MethodFault) GetMethodFault() *MethodFault { return b } - -type BaseMethodFault interface { - GetMethodFault() *MethodFault -} - -func init() { - t["BaseMethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem() -} - -func (b *MigrationEvent) GetMigrationEvent() *MigrationEvent { return b } - -type BaseMigrationEvent interface { - GetMigrationEvent() *MigrationEvent -} - -func init() { - t["BaseMigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem() -} - -func (b *MigrationFault) GetMigrationFault() *MigrationFault { return b } - -type BaseMigrationFault interface { - GetMigrationFault() *MigrationFault -} - -func init() { - t["BaseMigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem() -} - -func (b *MigrationFeatureNotSupported) GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported { - return b -} - -type BaseMigrationFeatureNotSupported interface { - GetMigrationFeatureNotSupported() *MigrationFeatureNotSupported -} - -func init() { - t["BaseMigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem() -} - -func (b *MonthlyTaskScheduler) GetMonthlyTaskScheduler() *MonthlyTaskScheduler { return b } - -type BaseMonthlyTaskScheduler interface { - GetMonthlyTaskScheduler() *MonthlyTaskScheduler -} - -func init() { - t["BaseMonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem() -} - -func (b *NasConfigFault) GetNasConfigFault() *NasConfigFault { return b } - -type BaseNasConfigFault interface { - GetNasConfigFault() *NasConfigFault -} - -func init() { - t["BaseNasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem() -} - -func (b *NegatableExpression) GetNegatableExpression() *NegatableExpression { return b } - -type BaseNegatableExpression interface { - GetNegatableExpression() *NegatableExpression -} - -func init() { - t["BaseNegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem() -} - -func (b *NetBIOSConfigInfo) GetNetBIOSConfigInfo() *NetBIOSConfigInfo { return b } - -type BaseNetBIOSConfigInfo interface { - GetNetBIOSConfigInfo() *NetBIOSConfigInfo -} - -func init() { - t["BaseNetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem() -} - -func (b *NetworkSummary) GetNetworkSummary() *NetworkSummary { return b } - -type BaseNetworkSummary interface { - GetNetworkSummary() *NetworkSummary -} - -func init() { - t["BaseNetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem() -} - -func (b *NoCompatibleHost) GetNoCompatibleHost() *NoCompatibleHost { return b } - -type BaseNoCompatibleHost interface { - GetNoCompatibleHost() *NoCompatibleHost -} - -func init() { - t["BaseNoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem() -} - -func (b *NoPermission) GetNoPermission() *NoPermission { return b } - -type BaseNoPermission interface { - GetNoPermission() *NoPermission -} - -func init() { - t["BaseNoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem() -} - -func (b *NodeDeploymentSpec) GetNodeDeploymentSpec() *NodeDeploymentSpec { return b } - -type BaseNodeDeploymentSpec interface { - GetNodeDeploymentSpec() *NodeDeploymentSpec -} - -func init() { - t["BaseNodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem() -} - -func (b *NodeNetworkSpec) GetNodeNetworkSpec() *NodeNetworkSpec { return b } - -type BaseNodeNetworkSpec interface { - GetNodeNetworkSpec() *NodeNetworkSpec -} - -func init() { - t["BaseNodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem() -} - -func (b *NotEnoughCpus) GetNotEnoughCpus() *NotEnoughCpus { return b } - -type BaseNotEnoughCpus interface { - GetNotEnoughCpus() *NotEnoughCpus -} - -func init() { - t["BaseNotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem() -} - -func (b *NotEnoughLicenses) GetNotEnoughLicenses() *NotEnoughLicenses { return b } - -type BaseNotEnoughLicenses interface { - GetNotEnoughLicenses() *NotEnoughLicenses -} - -func init() { - t["BaseNotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem() -} - -func (b *NotSupported) GetNotSupported() *NotSupported { return b } - -type BaseNotSupported interface { - GetNotSupported() *NotSupported -} - -func init() { - t["BaseNotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem() -} - -func (b *NotSupportedHost) GetNotSupportedHost() *NotSupportedHost { return b } - -type BaseNotSupportedHost interface { - GetNotSupportedHost() *NotSupportedHost -} - -func init() { - t["BaseNotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem() -} - -func (b *NotSupportedHostInCluster) GetNotSupportedHostInCluster() *NotSupportedHostInCluster { - return b -} - -type BaseNotSupportedHostInCluster interface { - GetNotSupportedHostInCluster() *NotSupportedHostInCluster -} - -func init() { - t["BaseNotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem() -} - -func (b *OptionType) GetOptionType() *OptionType { return b } - -type BaseOptionType interface { - GetOptionType() *OptionType -} - -func init() { - t["BaseOptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem() -} - -func (b *OptionValue) GetOptionValue() *OptionValue { return b } - -type BaseOptionValue interface { - GetOptionValue() *OptionValue -} - -func init() { - t["BaseOptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem() -} - -func (b *OvfAttribute) GetOvfAttribute() *OvfAttribute { return b } - -type BaseOvfAttribute interface { - GetOvfAttribute() *OvfAttribute -} - -func init() { - t["BaseOvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem() -} - -func (b *OvfConnectedDevice) GetOvfConnectedDevice() *OvfConnectedDevice { return b } - -type BaseOvfConnectedDevice interface { - GetOvfConnectedDevice() *OvfConnectedDevice -} - -func init() { - t["BaseOvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem() -} - -func (b *OvfConstraint) GetOvfConstraint() *OvfConstraint { return b } - -type BaseOvfConstraint interface { - GetOvfConstraint() *OvfConstraint -} - -func init() { - t["BaseOvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem() -} - -func (b *OvfConsumerCallbackFault) GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault { return b } - -type BaseOvfConsumerCallbackFault interface { - GetOvfConsumerCallbackFault() *OvfConsumerCallbackFault -} - -func init() { - t["BaseOvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem() -} - -func (b *OvfElement) GetOvfElement() *OvfElement { return b } - -type BaseOvfElement interface { - GetOvfElement() *OvfElement -} - -func init() { - t["BaseOvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem() -} - -func (b *OvfExport) GetOvfExport() *OvfExport { return b } - -type BaseOvfExport interface { - GetOvfExport() *OvfExport -} - -func init() { - t["BaseOvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem() -} - -func (b *OvfFault) GetOvfFault() *OvfFault { return b } - -type BaseOvfFault interface { - GetOvfFault() *OvfFault -} - -func init() { - t["BaseOvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem() -} - -func (b *OvfHardwareExport) GetOvfHardwareExport() *OvfHardwareExport { return b } - -type BaseOvfHardwareExport interface { - GetOvfHardwareExport() *OvfHardwareExport -} - -func init() { - t["BaseOvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem() -} - -func (b *OvfImport) GetOvfImport() *OvfImport { return b } - -type BaseOvfImport interface { - GetOvfImport() *OvfImport -} - -func init() { - t["BaseOvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem() -} - -func (b *OvfInvalidPackage) GetOvfInvalidPackage() *OvfInvalidPackage { return b } - -type BaseOvfInvalidPackage interface { - GetOvfInvalidPackage() *OvfInvalidPackage -} - -func init() { - t["BaseOvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem() -} - -func (b *OvfInvalidValue) GetOvfInvalidValue() *OvfInvalidValue { return b } - -type BaseOvfInvalidValue interface { - GetOvfInvalidValue() *OvfInvalidValue -} - -func init() { - t["BaseOvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem() -} - -func (b *OvfManagerCommonParams) GetOvfManagerCommonParams() *OvfManagerCommonParams { return b } - -type BaseOvfManagerCommonParams interface { - GetOvfManagerCommonParams() *OvfManagerCommonParams -} - -func init() { - t["BaseOvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem() -} - -func (b *OvfMissingElement) GetOvfMissingElement() *OvfMissingElement { return b } - -type BaseOvfMissingElement interface { - GetOvfMissingElement() *OvfMissingElement -} - -func init() { - t["BaseOvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem() -} - -func (b *OvfProperty) GetOvfProperty() *OvfProperty { return b } - -type BaseOvfProperty interface { - GetOvfProperty() *OvfProperty -} - -func init() { - t["BaseOvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem() -} - -func (b *OvfSystemFault) GetOvfSystemFault() *OvfSystemFault { return b } - -type BaseOvfSystemFault interface { - GetOvfSystemFault() *OvfSystemFault -} - -func init() { - t["BaseOvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem() -} - -func (b *OvfUnsupportedAttribute) GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute { return b } - -type BaseOvfUnsupportedAttribute interface { - GetOvfUnsupportedAttribute() *OvfUnsupportedAttribute -} - -func init() { - t["BaseOvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem() -} - -func (b *OvfUnsupportedElement) GetOvfUnsupportedElement() *OvfUnsupportedElement { return b } - -type BaseOvfUnsupportedElement interface { - GetOvfUnsupportedElement() *OvfUnsupportedElement -} - -func init() { - t["BaseOvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem() -} - -func (b *OvfUnsupportedPackage) GetOvfUnsupportedPackage() *OvfUnsupportedPackage { return b } - -type BaseOvfUnsupportedPackage interface { - GetOvfUnsupportedPackage() *OvfUnsupportedPackage -} - -func init() { - t["BaseOvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem() -} - -func (b *PatchMetadataInvalid) GetPatchMetadataInvalid() *PatchMetadataInvalid { return b } - -type BasePatchMetadataInvalid interface { - GetPatchMetadataInvalid() *PatchMetadataInvalid -} - -func init() { - t["BasePatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem() -} - -func (b *PatchNotApplicable) GetPatchNotApplicable() *PatchNotApplicable { return b } - -type BasePatchNotApplicable interface { - GetPatchNotApplicable() *PatchNotApplicable -} - -func init() { - t["BasePatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem() -} - -func (b *PerfEntityMetricBase) GetPerfEntityMetricBase() *PerfEntityMetricBase { return b } - -type BasePerfEntityMetricBase interface { - GetPerfEntityMetricBase() *PerfEntityMetricBase -} - -func init() { - t["BasePerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem() -} - -func (b *PerfMetricSeries) GetPerfMetricSeries() *PerfMetricSeries { return b } - -type BasePerfMetricSeries interface { - GetPerfMetricSeries() *PerfMetricSeries -} - -func init() { - t["BasePerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem() -} - -func (b *PermissionEvent) GetPermissionEvent() *PermissionEvent { return b } - -type BasePermissionEvent interface { - GetPermissionEvent() *PermissionEvent -} - -func init() { - t["BasePermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem() -} - -func (b *PhysicalNicHint) GetPhysicalNicHint() *PhysicalNicHint { return b } - -type BasePhysicalNicHint interface { - GetPhysicalNicHint() *PhysicalNicHint -} - -func init() { - t["BasePhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem() -} - -func (b *PlatformConfigFault) GetPlatformConfigFault() *PlatformConfigFault { return b } - -type BasePlatformConfigFault interface { - GetPlatformConfigFault() *PlatformConfigFault -} - -func init() { - t["BasePlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem() -} - -func (b *PolicyOption) GetPolicyOption() *PolicyOption { return b } - -type BasePolicyOption interface { - GetPolicyOption() *PolicyOption -} - -func init() { - t["BasePolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem() -} - -func (b *PortGroupProfile) GetPortGroupProfile() *PortGroupProfile { return b } - -type BasePortGroupProfile interface { - GetPortGroupProfile() *PortGroupProfile -} - -func init() { - t["BasePortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem() -} - -func (b *ProfileConfigInfo) GetProfileConfigInfo() *ProfileConfigInfo { return b } - -type BaseProfileConfigInfo interface { - GetProfileConfigInfo() *ProfileConfigInfo -} - -func init() { - t["BaseProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem() -} - -func (b *ProfileCreateSpec) GetProfileCreateSpec() *ProfileCreateSpec { return b } - -type BaseProfileCreateSpec interface { - GetProfileCreateSpec() *ProfileCreateSpec -} - -func init() { - t["BaseProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem() -} - -func (b *ProfileEvent) GetProfileEvent() *ProfileEvent { return b } - -type BaseProfileEvent interface { - GetProfileEvent() *ProfileEvent -} - -func init() { - t["BaseProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem() -} - -func (b *ProfileExecuteResult) GetProfileExecuteResult() *ProfileExecuteResult { return b } - -type BaseProfileExecuteResult interface { - GetProfileExecuteResult() *ProfileExecuteResult -} - -func init() { - t["BaseProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem() -} - -func (b *ProfileExpression) GetProfileExpression() *ProfileExpression { return b } - -type BaseProfileExpression interface { - GetProfileExpression() *ProfileExpression -} - -func init() { - t["BaseProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem() -} - -func (b *ProfilePolicyOptionMetadata) GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata { - return b -} - -type BaseProfilePolicyOptionMetadata interface { - GetProfilePolicyOptionMetadata() *ProfilePolicyOptionMetadata -} - -func init() { - t["BaseProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem() -} - -func (b *ProfileSerializedCreateSpec) GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec { - return b -} - -type BaseProfileSerializedCreateSpec interface { - GetProfileSerializedCreateSpec() *ProfileSerializedCreateSpec -} - -func init() { - t["BaseProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem() -} - -func (b *RDMNotSupported) GetRDMNotSupported() *RDMNotSupported { return b } - -type BaseRDMNotSupported interface { - GetRDMNotSupported() *RDMNotSupported -} - -func init() { - t["BaseRDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem() -} - -func (b *RecurrentTaskScheduler) GetRecurrentTaskScheduler() *RecurrentTaskScheduler { return b } - -type BaseRecurrentTaskScheduler interface { - GetRecurrentTaskScheduler() *RecurrentTaskScheduler -} - -func init() { - t["BaseRecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem() -} - -func (b *ReplicationConfigFault) GetReplicationConfigFault() *ReplicationConfigFault { return b } - -type BaseReplicationConfigFault interface { - GetReplicationConfigFault() *ReplicationConfigFault -} - -func init() { - t["BaseReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem() -} - -func (b *ReplicationFault) GetReplicationFault() *ReplicationFault { return b } - -type BaseReplicationFault interface { - GetReplicationFault() *ReplicationFault -} - -func init() { - t["BaseReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem() -} - -func (b *ReplicationVmFault) GetReplicationVmFault() *ReplicationVmFault { return b } - -type BaseReplicationVmFault interface { - GetReplicationVmFault() *ReplicationVmFault -} - -func init() { - t["BaseReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem() -} - -func (b *ResourceInUse) GetResourceInUse() *ResourceInUse { return b } - -type BaseResourceInUse interface { - GetResourceInUse() *ResourceInUse -} - -func init() { - t["BaseResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem() -} - -func (b *ResourcePoolEvent) GetResourcePoolEvent() *ResourcePoolEvent { return b } - -type BaseResourcePoolEvent interface { - GetResourcePoolEvent() *ResourcePoolEvent -} - -func init() { - t["BaseResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem() -} - -func (b *ResourcePoolSummary) GetResourcePoolSummary() *ResourcePoolSummary { return b } - -type BaseResourcePoolSummary interface { - GetResourcePoolSummary() *ResourcePoolSummary -} - -func init() { - t["BaseResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem() -} - -func (b *RoleEvent) GetRoleEvent() *RoleEvent { return b } - -type BaseRoleEvent interface { - GetRoleEvent() *RoleEvent -} - -func init() { - t["BaseRoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem() -} - -func (b *RuntimeFault) GetRuntimeFault() *RuntimeFault { return b } - -type BaseRuntimeFault interface { - GetRuntimeFault() *RuntimeFault -} - -func init() { - t["BaseRuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem() -} - -func (b *ScheduledTaskEvent) GetScheduledTaskEvent() *ScheduledTaskEvent { return b } - -type BaseScheduledTaskEvent interface { - GetScheduledTaskEvent() *ScheduledTaskEvent -} - -func init() { - t["BaseScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem() -} - -func (b *ScheduledTaskSpec) GetScheduledTaskSpec() *ScheduledTaskSpec { return b } - -type BaseScheduledTaskSpec interface { - GetScheduledTaskSpec() *ScheduledTaskSpec -} - -func init() { - t["BaseScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem() -} - -func (b *ScsiLun) GetScsiLun() *ScsiLun { return b } - -type BaseScsiLun interface { - GetScsiLun() *ScsiLun -} - -func init() { - t["BaseScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem() -} - -func (b *SecurityError) GetSecurityError() *SecurityError { return b } - -type BaseSecurityError interface { - GetSecurityError() *SecurityError -} - -func init() { - t["BaseSecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem() -} - -func (b *SelectionSet) GetSelectionSet() *SelectionSet { return b } - -type BaseSelectionSet interface { - GetSelectionSet() *SelectionSet -} - -func init() { - t["BaseSelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem() -} - -func (b *SelectionSpec) GetSelectionSpec() *SelectionSpec { return b } - -type BaseSelectionSpec interface { - GetSelectionSpec() *SelectionSpec -} - -func init() { - t["BaseSelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem() -} - -func (b *ServiceLocatorCredential) GetServiceLocatorCredential() *ServiceLocatorCredential { return b } - -type BaseServiceLocatorCredential interface { - GetServiceLocatorCredential() *ServiceLocatorCredential -} - -func init() { - t["BaseServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem() -} - -func (b *SessionEvent) GetSessionEvent() *SessionEvent { return b } - -type BaseSessionEvent interface { - GetSessionEvent() *SessionEvent -} - -func init() { - t["BaseSessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem() -} - -func (b *SessionManagerServiceRequestSpec) GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec { - return b -} - -type BaseSessionManagerServiceRequestSpec interface { - GetSessionManagerServiceRequestSpec() *SessionManagerServiceRequestSpec -} - -func init() { - t["BaseSessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem() -} - -func (b *SnapshotCopyNotSupported) GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported { return b } - -type BaseSnapshotCopyNotSupported interface { - GetSnapshotCopyNotSupported() *SnapshotCopyNotSupported -} - -func init() { - t["BaseSnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem() -} - -func (b *SnapshotFault) GetSnapshotFault() *SnapshotFault { return b } - -type BaseSnapshotFault interface { - GetSnapshotFault() *SnapshotFault -} - -func init() { - t["BaseSnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem() -} - -func (b *TaskEvent) GetTaskEvent() *TaskEvent { return b } - -type BaseTaskEvent interface { - GetTaskEvent() *TaskEvent -} - -func init() { - t["BaseTaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem() -} - -func (b *TaskInProgress) GetTaskInProgress() *TaskInProgress { return b } - -type BaseTaskInProgress interface { - GetTaskInProgress() *TaskInProgress -} - -func init() { - t["BaseTaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem() -} - -func (b *TaskReason) GetTaskReason() *TaskReason { return b } - -type BaseTaskReason interface { - GetTaskReason() *TaskReason -} - -func init() { - t["BaseTaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem() -} - -func (b *TaskScheduler) GetTaskScheduler() *TaskScheduler { return b } - -type BaseTaskScheduler interface { - GetTaskScheduler() *TaskScheduler -} - -func init() { - t["BaseTaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem() -} - -func (b *TemplateUpgradeEvent) GetTemplateUpgradeEvent() *TemplateUpgradeEvent { return b } - -type BaseTemplateUpgradeEvent interface { - GetTemplateUpgradeEvent() *TemplateUpgradeEvent -} - -func init() { - t["BaseTemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem() -} - -func (b *Timedout) GetTimedout() *Timedout { return b } - -type BaseTimedout interface { - GetTimedout() *Timedout -} - -func init() { - t["BaseTimedout"] = reflect.TypeOf((*Timedout)(nil)).Elem() -} - -func (b *TypeDescription) GetTypeDescription() *TypeDescription { return b } - -type BaseTypeDescription interface { - GetTypeDescription() *TypeDescription -} - -func init() { - t["BaseTypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem() -} - -func (b *UnsupportedDatastore) GetUnsupportedDatastore() *UnsupportedDatastore { return b } - -type BaseUnsupportedDatastore interface { - GetUnsupportedDatastore() *UnsupportedDatastore -} - -func init() { - t["BaseUnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem() -} - -func (b *UpgradeEvent) GetUpgradeEvent() *UpgradeEvent { return b } - -type BaseUpgradeEvent interface { - GetUpgradeEvent() *UpgradeEvent -} - -func init() { - t["BaseUpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem() -} - -func (b *UserSearchResult) GetUserSearchResult() *UserSearchResult { return b } - -type BaseUserSearchResult interface { - GetUserSearchResult() *UserSearchResult -} - -func init() { - t["BaseUserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem() -} - -func (b *VAppConfigFault) GetVAppConfigFault() *VAppConfigFault { return b } - -type BaseVAppConfigFault interface { - GetVAppConfigFault() *VAppConfigFault -} - -func init() { - t["BaseVAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem() -} - -func (b *VAppPropertyFault) GetVAppPropertyFault() *VAppPropertyFault { return b } - -type BaseVAppPropertyFault interface { - GetVAppPropertyFault() *VAppPropertyFault -} - -func init() { - t["BaseVAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem() -} - -func (b *VMotionInterfaceIssue) GetVMotionInterfaceIssue() *VMotionInterfaceIssue { return b } - -type BaseVMotionInterfaceIssue interface { - GetVMotionInterfaceIssue() *VMotionInterfaceIssue -} - -func init() { - t["BaseVMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem() -} - -func (b *VMwareDVSHealthCheckConfig) GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig { - return b -} - -type BaseVMwareDVSHealthCheckConfig interface { - GetVMwareDVSHealthCheckConfig() *VMwareDVSHealthCheckConfig -} - -func init() { - t["BaseVMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem() -} - -func (b *VimFault) GetVimFault() *VimFault { return b } - -type BaseVimFault interface { - GetVimFault() *VimFault -} - -func init() { - t["BaseVimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem() -} - -func (b *VirtualController) GetVirtualController() *VirtualController { return b } - -type BaseVirtualController interface { - GetVirtualController() *VirtualController -} - -func init() { - t["BaseVirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem() -} - -func (b *VirtualControllerOption) GetVirtualControllerOption() *VirtualControllerOption { return b } - -type BaseVirtualControllerOption interface { - GetVirtualControllerOption() *VirtualControllerOption -} - -func init() { - t["BaseVirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem() -} - -func (b *VirtualDevice) GetVirtualDevice() *VirtualDevice { return b } - -type BaseVirtualDevice interface { - GetVirtualDevice() *VirtualDevice -} - -func init() { - t["BaseVirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem() -} - -func (b *VirtualDeviceBackingInfo) GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo { return b } - -type BaseVirtualDeviceBackingInfo interface { - GetVirtualDeviceBackingInfo() *VirtualDeviceBackingInfo -} - -func init() { - t["BaseVirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem() -} - -func (b *VirtualDeviceBackingOption) GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption { - return b -} - -type BaseVirtualDeviceBackingOption interface { - GetVirtualDeviceBackingOption() *VirtualDeviceBackingOption -} - -func init() { - t["BaseVirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem() -} - -func (b *VirtualDeviceBusSlotInfo) GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo { return b } - -type BaseVirtualDeviceBusSlotInfo interface { - GetVirtualDeviceBusSlotInfo() *VirtualDeviceBusSlotInfo -} - -func init() { - t["BaseVirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem() -} - -func (b *VirtualDeviceConfigSpec) GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec { return b } - -type BaseVirtualDeviceConfigSpec interface { - GetVirtualDeviceConfigSpec() *VirtualDeviceConfigSpec -} - -func init() { - t["BaseVirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem() -} - -func (b *VirtualDeviceDeviceBackingInfo) GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo { - return b -} - -type BaseVirtualDeviceDeviceBackingInfo interface { - GetVirtualDeviceDeviceBackingInfo() *VirtualDeviceDeviceBackingInfo -} - -func init() { - t["BaseVirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem() -} - -func (b *VirtualDeviceDeviceBackingOption) GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption { - return b -} - -type BaseVirtualDeviceDeviceBackingOption interface { - GetVirtualDeviceDeviceBackingOption() *VirtualDeviceDeviceBackingOption -} - -func init() { - t["BaseVirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem() -} - -func (b *VirtualDeviceFileBackingInfo) GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo { - return b -} - -type BaseVirtualDeviceFileBackingInfo interface { - GetVirtualDeviceFileBackingInfo() *VirtualDeviceFileBackingInfo -} - -func init() { - t["BaseVirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem() -} - -func (b *VirtualDeviceFileBackingOption) GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption { - return b -} - -type BaseVirtualDeviceFileBackingOption interface { - GetVirtualDeviceFileBackingOption() *VirtualDeviceFileBackingOption -} - -func init() { - t["BaseVirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem() -} - -func (b *VirtualDeviceOption) GetVirtualDeviceOption() *VirtualDeviceOption { return b } - -type BaseVirtualDeviceOption interface { - GetVirtualDeviceOption() *VirtualDeviceOption -} - -func init() { - t["BaseVirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem() -} - -func (b *VirtualDevicePciBusSlotInfo) GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo { - return b -} - -type BaseVirtualDevicePciBusSlotInfo interface { - GetVirtualDevicePciBusSlotInfo() *VirtualDevicePciBusSlotInfo -} - -func init() { - t["BaseVirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem() -} - -func (b *VirtualDevicePipeBackingInfo) GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo { - return b -} - -type BaseVirtualDevicePipeBackingInfo interface { - GetVirtualDevicePipeBackingInfo() *VirtualDevicePipeBackingInfo -} - -func init() { - t["BaseVirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem() -} - -func (b *VirtualDevicePipeBackingOption) GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption { - return b -} - -type BaseVirtualDevicePipeBackingOption interface { - GetVirtualDevicePipeBackingOption() *VirtualDevicePipeBackingOption -} - -func init() { - t["BaseVirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem() -} - -func (b *VirtualDeviceRemoteDeviceBackingInfo) GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo { - return b -} - -type BaseVirtualDeviceRemoteDeviceBackingInfo interface { - GetVirtualDeviceRemoteDeviceBackingInfo() *VirtualDeviceRemoteDeviceBackingInfo -} - -func init() { - t["BaseVirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem() -} - -func (b *VirtualDeviceRemoteDeviceBackingOption) GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption { - return b -} - -type BaseVirtualDeviceRemoteDeviceBackingOption interface { - GetVirtualDeviceRemoteDeviceBackingOption() *VirtualDeviceRemoteDeviceBackingOption -} - -func init() { - t["BaseVirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem() -} - -func (b *VirtualDeviceURIBackingInfo) GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo { - return b -} - -type BaseVirtualDeviceURIBackingInfo interface { - GetVirtualDeviceURIBackingInfo() *VirtualDeviceURIBackingInfo -} - -func init() { - t["BaseVirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem() -} - -func (b *VirtualDeviceURIBackingOption) GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption { - return b -} - -type BaseVirtualDeviceURIBackingOption interface { - GetVirtualDeviceURIBackingOption() *VirtualDeviceURIBackingOption -} - -func init() { - t["BaseVirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem() -} - -func (b *VirtualDiskRawDiskVer2BackingInfo) GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo { - return b -} - -type BaseVirtualDiskRawDiskVer2BackingInfo interface { - GetVirtualDiskRawDiskVer2BackingInfo() *VirtualDiskRawDiskVer2BackingInfo -} - -func init() { - t["BaseVirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem() -} - -func (b *VirtualDiskRawDiskVer2BackingOption) GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption { - return b -} - -type BaseVirtualDiskRawDiskVer2BackingOption interface { - GetVirtualDiskRawDiskVer2BackingOption() *VirtualDiskRawDiskVer2BackingOption -} - -func init() { - t["BaseVirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem() -} - -func (b *VirtualDiskSpec) GetVirtualDiskSpec() *VirtualDiskSpec { return b } - -type BaseVirtualDiskSpec interface { - GetVirtualDiskSpec() *VirtualDiskSpec -} - -func init() { - t["BaseVirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem() -} - -func (b *VirtualEthernetCard) GetVirtualEthernetCard() *VirtualEthernetCard { return b } - -type BaseVirtualEthernetCard interface { - GetVirtualEthernetCard() *VirtualEthernetCard -} - -func init() { - t["BaseVirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem() -} - -func (b *VirtualEthernetCardOption) GetVirtualEthernetCardOption() *VirtualEthernetCardOption { - return b -} - -type BaseVirtualEthernetCardOption interface { - GetVirtualEthernetCardOption() *VirtualEthernetCardOption -} - -func init() { - t["BaseVirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem() -} - -func (b *VirtualHardwareCompatibilityIssue) GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue { - return b -} - -type BaseVirtualHardwareCompatibilityIssue interface { - GetVirtualHardwareCompatibilityIssue() *VirtualHardwareCompatibilityIssue -} - -func init() { - t["BaseVirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem() -} - -func (b *VirtualMachineBaseIndependentFilterSpec) GetVirtualMachineBaseIndependentFilterSpec() *VirtualMachineBaseIndependentFilterSpec { - return b -} - -type BaseVirtualMachineBaseIndependentFilterSpec interface { - GetVirtualMachineBaseIndependentFilterSpec() *VirtualMachineBaseIndependentFilterSpec -} - -func init() { - t["BaseVirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineBaseIndependentFilterSpec)(nil)).Elem() -} - -func (b *VirtualMachineBootOptionsBootableDevice) GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice { - return b -} - -type BaseVirtualMachineBootOptionsBootableDevice interface { - GetVirtualMachineBootOptionsBootableDevice() *VirtualMachineBootOptionsBootableDevice -} - -func init() { - t["BaseVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem() -} - -func (b *VirtualMachineConnection) GetVirtualMachineConnection() *VirtualMachineConnection { return b } - -type BaseVirtualMachineConnection interface { - GetVirtualMachineConnection() *VirtualMachineConnection -} - -func init() { - t["BaseVirtualMachineConnection"] = reflect.TypeOf((*VirtualMachineConnection)(nil)).Elem() -} - -func (b *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState) GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState { - return b -} - -type BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState interface { - GetVirtualMachineDeviceRuntimeInfoDeviceRuntimeState() *VirtualMachineDeviceRuntimeInfoDeviceRuntimeState -} - -func init() { - t["BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem() -} - -func (b *VirtualMachineDiskDeviceInfo) GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo { - return b -} - -type BaseVirtualMachineDiskDeviceInfo interface { - GetVirtualMachineDiskDeviceInfo() *VirtualMachineDiskDeviceInfo -} - -func init() { - t["BaseVirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem() -} - -func (b *VirtualMachineGuestQuiesceSpec) GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec { - return b -} - -type BaseVirtualMachineGuestQuiesceSpec interface { - GetVirtualMachineGuestQuiesceSpec() *VirtualMachineGuestQuiesceSpec -} - -func init() { - t["BaseVirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem() -} - -func (b *VirtualMachinePciPassthroughInfo) GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo { - return b -} - -type BaseVirtualMachinePciPassthroughInfo interface { - GetVirtualMachinePciPassthroughInfo() *VirtualMachinePciPassthroughInfo -} - -func init() { - t["BaseVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem() -} - -func (b *VirtualMachineProfileSpec) GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec { - return b -} - -type BaseVirtualMachineProfileSpec interface { - GetVirtualMachineProfileSpec() *VirtualMachineProfileSpec -} - -func init() { - t["BaseVirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem() -} - -func (b *VirtualMachineSriovDevicePoolInfo) GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo { - return b -} - -type BaseVirtualMachineSriovDevicePoolInfo interface { - GetVirtualMachineSriovDevicePoolInfo() *VirtualMachineSriovDevicePoolInfo -} - -func init() { - t["BaseVirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem() -} - -func (b *VirtualMachineTargetInfo) GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo { return b } - -type BaseVirtualMachineTargetInfo interface { - GetVirtualMachineTargetInfo() *VirtualMachineTargetInfo -} - -func init() { - t["BaseVirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem() -} - -func (b *VirtualMachineVirtualDeviceGroupsDeviceGroup) GetVirtualMachineVirtualDeviceGroupsDeviceGroup() *VirtualMachineVirtualDeviceGroupsDeviceGroup { - return b -} - -type BaseVirtualMachineVirtualDeviceGroupsDeviceGroup interface { - GetVirtualMachineVirtualDeviceGroupsDeviceGroup() *VirtualMachineVirtualDeviceGroupsDeviceGroup -} - -func init() { - t["BaseVirtualMachineVirtualDeviceGroupsDeviceGroup"] = reflect.TypeOf((*VirtualMachineVirtualDeviceGroupsDeviceGroup)(nil)).Elem() -} - -func (b *VirtualPCIPassthroughPluginBackingInfo) GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo { - return b -} - -type BaseVirtualPCIPassthroughPluginBackingInfo interface { - GetVirtualPCIPassthroughPluginBackingInfo() *VirtualPCIPassthroughPluginBackingInfo -} - -func init() { - t["BaseVirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem() -} - -func (b *VirtualPCIPassthroughPluginBackingOption) GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption { - return b -} - -type BaseVirtualPCIPassthroughPluginBackingOption interface { - GetVirtualPCIPassthroughPluginBackingOption() *VirtualPCIPassthroughPluginBackingOption -} - -func init() { - t["BaseVirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem() -} - -func (b *VirtualSATAController) GetVirtualSATAController() *VirtualSATAController { return b } - -type BaseVirtualSATAController interface { - GetVirtualSATAController() *VirtualSATAController -} - -func init() { - t["BaseVirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem() -} - -func (b *VirtualSATAControllerOption) GetVirtualSATAControllerOption() *VirtualSATAControllerOption { - return b -} - -type BaseVirtualSATAControllerOption interface { - GetVirtualSATAControllerOption() *VirtualSATAControllerOption -} - -func init() { - t["BaseVirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem() -} - -func (b *VirtualSCSIController) GetVirtualSCSIController() *VirtualSCSIController { return b } - -type BaseVirtualSCSIController interface { - GetVirtualSCSIController() *VirtualSCSIController -} - -func init() { - t["BaseVirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem() -} - -func (b *VirtualSCSIControllerOption) GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption { - return b -} - -type BaseVirtualSCSIControllerOption interface { - GetVirtualSCSIControllerOption() *VirtualSCSIControllerOption -} - -func init() { - t["BaseVirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem() -} - -func (b *VirtualSoundCard) GetVirtualSoundCard() *VirtualSoundCard { return b } - -type BaseVirtualSoundCard interface { - GetVirtualSoundCard() *VirtualSoundCard -} - -func init() { - t["BaseVirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem() -} - -func (b *VirtualSoundCardOption) GetVirtualSoundCardOption() *VirtualSoundCardOption { return b } - -type BaseVirtualSoundCardOption interface { - GetVirtualSoundCardOption() *VirtualSoundCardOption -} - -func init() { - t["BaseVirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem() -} - -func (b *VirtualVmxnet) GetVirtualVmxnet() *VirtualVmxnet { return b } - -type BaseVirtualVmxnet interface { - GetVirtualVmxnet() *VirtualVmxnet -} - -func init() { - t["BaseVirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem() -} - -func (b *VirtualVmxnet3) GetVirtualVmxnet3() *VirtualVmxnet3 { return b } - -type BaseVirtualVmxnet3 interface { - GetVirtualVmxnet3() *VirtualVmxnet3 -} - -func init() { - t["BaseVirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem() -} - -func (b *VirtualVmxnet3Option) GetVirtualVmxnet3Option() *VirtualVmxnet3Option { return b } - -type BaseVirtualVmxnet3Option interface { - GetVirtualVmxnet3Option() *VirtualVmxnet3Option -} - -func init() { - t["BaseVirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem() -} - -func (b *VirtualVmxnetOption) GetVirtualVmxnetOption() *VirtualVmxnetOption { return b } - -type BaseVirtualVmxnetOption interface { - GetVirtualVmxnetOption() *VirtualVmxnetOption -} - -func init() { - t["BaseVirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem() -} - -func (b *VmCloneEvent) GetVmCloneEvent() *VmCloneEvent { return b } - -type BaseVmCloneEvent interface { - GetVmCloneEvent() *VmCloneEvent -} - -func init() { - t["BaseVmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem() -} - -func (b *VmConfigFault) GetVmConfigFault() *VmConfigFault { return b } - -type BaseVmConfigFault interface { - GetVmConfigFault() *VmConfigFault -} - -func init() { - t["BaseVmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem() -} - -func (b *VmConfigFileInfo) GetVmConfigFileInfo() *VmConfigFileInfo { return b } - -type BaseVmConfigFileInfo interface { - GetVmConfigFileInfo() *VmConfigFileInfo -} - -func init() { - t["BaseVmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem() -} - -func (b *VmConfigFileQuery) GetVmConfigFileQuery() *VmConfigFileQuery { return b } - -type BaseVmConfigFileQuery interface { - GetVmConfigFileQuery() *VmConfigFileQuery -} - -func init() { - t["BaseVmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem() -} - -func (b *VmConfigInfo) GetVmConfigInfo() *VmConfigInfo { return b } - -type BaseVmConfigInfo interface { - GetVmConfigInfo() *VmConfigInfo -} - -func init() { - t["BaseVmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem() -} - -func (b *VmConfigSpec) GetVmConfigSpec() *VmConfigSpec { return b } - -type BaseVmConfigSpec interface { - GetVmConfigSpec() *VmConfigSpec -} - -func init() { - t["BaseVmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem() -} - -func (b *VmDasBeingResetEvent) GetVmDasBeingResetEvent() *VmDasBeingResetEvent { return b } - -type BaseVmDasBeingResetEvent interface { - GetVmDasBeingResetEvent() *VmDasBeingResetEvent -} - -func init() { - t["BaseVmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem() -} - -func (b *VmEvent) GetVmEvent() *VmEvent { return b } - -type BaseVmEvent interface { - GetVmEvent() *VmEvent -} - -func init() { - t["BaseVmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem() -} - -func (b *VmFaultToleranceIssue) GetVmFaultToleranceIssue() *VmFaultToleranceIssue { return b } - -type BaseVmFaultToleranceIssue interface { - GetVmFaultToleranceIssue() *VmFaultToleranceIssue -} - -func init() { - t["BaseVmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem() -} - -func (b *VmMigratedEvent) GetVmMigratedEvent() *VmMigratedEvent { return b } - -type BaseVmMigratedEvent interface { - GetVmMigratedEvent() *VmMigratedEvent -} - -func init() { - t["BaseVmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem() -} - -func (b *VmPoweredOffEvent) GetVmPoweredOffEvent() *VmPoweredOffEvent { return b } - -type BaseVmPoweredOffEvent interface { - GetVmPoweredOffEvent() *VmPoweredOffEvent -} - -func init() { - t["BaseVmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem() -} - -func (b *VmPoweredOnEvent) GetVmPoweredOnEvent() *VmPoweredOnEvent { return b } - -type BaseVmPoweredOnEvent interface { - GetVmPoweredOnEvent() *VmPoweredOnEvent -} - -func init() { - t["BaseVmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem() -} - -func (b *VmRelocateSpecEvent) GetVmRelocateSpecEvent() *VmRelocateSpecEvent { return b } - -type BaseVmRelocateSpecEvent interface { - GetVmRelocateSpecEvent() *VmRelocateSpecEvent -} - -func init() { - t["BaseVmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem() -} - -func (b *VmStartingEvent) GetVmStartingEvent() *VmStartingEvent { return b } - -type BaseVmStartingEvent interface { - GetVmStartingEvent() *VmStartingEvent -} - -func init() { - t["BaseVmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem() -} - -func (b *VmToolsUpgradeFault) GetVmToolsUpgradeFault() *VmToolsUpgradeFault { return b } - -type BaseVmToolsUpgradeFault interface { - GetVmToolsUpgradeFault() *VmToolsUpgradeFault -} - -func init() { - t["BaseVmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem() -} - -func (b *VmfsDatastoreBaseOption) GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption { return b } - -type BaseVmfsDatastoreBaseOption interface { - GetVmfsDatastoreBaseOption() *VmfsDatastoreBaseOption -} - -func init() { - t["BaseVmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem() -} - -func (b *VmfsDatastoreSingleExtentOption) GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption { - return b -} - -type BaseVmfsDatastoreSingleExtentOption interface { - GetVmfsDatastoreSingleExtentOption() *VmfsDatastoreSingleExtentOption -} - -func init() { - t["BaseVmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem() -} - -func (b *VmfsDatastoreSpec) GetVmfsDatastoreSpec() *VmfsDatastoreSpec { return b } - -type BaseVmfsDatastoreSpec interface { - GetVmfsDatastoreSpec() *VmfsDatastoreSpec -} - -func init() { - t["BaseVmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem() -} - -func (b *VmfsMountFault) GetVmfsMountFault() *VmfsMountFault { return b } - -type BaseVmfsMountFault interface { - GetVmfsMountFault() *VmfsMountFault -} - -func init() { - t["BaseVmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem() -} - -func (b *VmwareDistributedVirtualSwitchVlanSpec) GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec { - return b -} - -type BaseVmwareDistributedVirtualSwitchVlanSpec interface { - GetVmwareDistributedVirtualSwitchVlanSpec() *VmwareDistributedVirtualSwitchVlanSpec -} - -func init() { - t["BaseVmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem() -} - -func (b *VsanDiskFault) GetVsanDiskFault() *VsanDiskFault { return b } - -type BaseVsanDiskFault interface { - GetVsanDiskFault() *VsanDiskFault -} - -func init() { - t["BaseVsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem() -} - -func (b *VsanFault) GetVsanFault() *VsanFault { return b } - -type BaseVsanFault interface { - GetVsanFault() *VsanFault -} - -func init() { - t["BaseVsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem() -} - -func (b *VsanUpgradeSystemPreflightCheckIssue) GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue { - return b -} - -type BaseVsanUpgradeSystemPreflightCheckIssue interface { - GetVsanUpgradeSystemPreflightCheckIssue() *VsanUpgradeSystemPreflightCheckIssue -} - -func init() { - t["BaseVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() -} - -func (b *VsanUpgradeSystemUpgradeHistoryItem) GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem { - return b -} - -type BaseVsanUpgradeSystemUpgradeHistoryItem interface { - GetVsanUpgradeSystemUpgradeHistoryItem() *VsanUpgradeSystemUpgradeHistoryItem -} - -func init() { - t["BaseVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() -} - -func (b *VslmCreateSpecBackingSpec) GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec { - return b -} - -type BaseVslmCreateSpecBackingSpec interface { - GetVslmCreateSpecBackingSpec() *VslmCreateSpecBackingSpec -} - -func init() { - t["BaseVslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem() -} - -func (b *VslmMigrateSpec) GetVslmMigrateSpec() *VslmMigrateSpec { return b } - -type BaseVslmMigrateSpec interface { - GetVslmMigrateSpec() *VslmMigrateSpec -} - -func init() { - t["BaseVslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/registry.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/registry.go deleted file mode 100644 index ff7c302d3185..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/registry.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - "strings" -) - -var t = map[string]reflect.Type{} - -func Add(name string, kind reflect.Type) { - t[name] = kind -} - -type Func func(string) (reflect.Type, bool) - -func TypeFunc() Func { - return func(name string) (reflect.Type, bool) { - typ, ok := t[name] - if !ok { - // The /sdk endpoint does not prefix types with the namespace, - // but extension endpoints, such as /pbm/sdk do. - name = strings.TrimPrefix(name, "vim25:") - typ, ok = t[name] - } - return typ, ok - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/types.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/types.go deleted file mode 100644 index f7ae195f79f7..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/types.go +++ /dev/null @@ -1,59412 +0,0 @@ -/* -Copyright (c) 2014-2022 VMware, Inc. 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. -*/ - -package types - -import ( - "reflect" - "time" -) - -type AbandonHciWorkflow AbandonHciWorkflowRequestType - -func init() { - t["AbandonHciWorkflow"] = reflect.TypeOf((*AbandonHciWorkflow)(nil)).Elem() -} - -type AbandonHciWorkflowRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AbandonHciWorkflowRequestType"] = reflect.TypeOf((*AbandonHciWorkflowRequestType)(nil)).Elem() -} - -type AbandonHciWorkflowResponse struct { -} - -type AbdicateDomOwnership AbdicateDomOwnershipRequestType - -func init() { - t["AbdicateDomOwnership"] = reflect.TypeOf((*AbdicateDomOwnership)(nil)).Elem() -} - -type AbdicateDomOwnershipRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids"` -} - -func init() { - t["AbdicateDomOwnershipRequestType"] = reflect.TypeOf((*AbdicateDomOwnershipRequestType)(nil)).Elem() -} - -type AbdicateDomOwnershipResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type AbortCustomizationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` -} - -func init() { - t["AbortCustomizationRequestType"] = reflect.TypeOf((*AbortCustomizationRequestType)(nil)).Elem() -} - -type AbortCustomization_Task AbortCustomizationRequestType - -func init() { - t["AbortCustomization_Task"] = reflect.TypeOf((*AbortCustomization_Task)(nil)).Elem() -} - -type AbortCustomization_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AboutInfo struct { - DynamicData - - Name string `xml:"name"` - FullName string `xml:"fullName"` - Vendor string `xml:"vendor"` - Version string `xml:"version"` - PatchLevel string `xml:"patchLevel,omitempty"` - Build string `xml:"build"` - LocaleVersion string `xml:"localeVersion,omitempty"` - LocaleBuild string `xml:"localeBuild,omitempty"` - OsType string `xml:"osType"` - ProductLineId string `xml:"productLineId"` - ApiType string `xml:"apiType"` - ApiVersion string `xml:"apiVersion"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - LicenseProductName string `xml:"licenseProductName,omitempty"` - LicenseProductVersion string `xml:"licenseProductVersion,omitempty"` -} - -func init() { - t["AboutInfo"] = reflect.TypeOf((*AboutInfo)(nil)).Elem() -} - -type AccountCreatedEvent struct { - HostEvent - - Spec BaseHostAccountSpec `xml:"spec,typeattr"` - Group bool `xml:"group"` -} - -func init() { - t["AccountCreatedEvent"] = reflect.TypeOf((*AccountCreatedEvent)(nil)).Elem() -} - -type AccountRemovedEvent struct { - HostEvent - - Account string `xml:"account"` - Group bool `xml:"group"` -} - -func init() { - t["AccountRemovedEvent"] = reflect.TypeOf((*AccountRemovedEvent)(nil)).Elem() -} - -type AccountUpdatedEvent struct { - HostEvent - - Spec BaseHostAccountSpec `xml:"spec,typeattr"` - Group bool `xml:"group"` - PrevDescription string `xml:"prevDescription,omitempty"` -} - -func init() { - t["AccountUpdatedEvent"] = reflect.TypeOf((*AccountUpdatedEvent)(nil)).Elem() -} - -type AcknowledgeAlarm AcknowledgeAlarmRequestType - -func init() { - t["AcknowledgeAlarm"] = reflect.TypeOf((*AcknowledgeAlarm)(nil)).Elem() -} - -type AcknowledgeAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Alarm ManagedObjectReference `xml:"alarm"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["AcknowledgeAlarmRequestType"] = reflect.TypeOf((*AcknowledgeAlarmRequestType)(nil)).Elem() -} - -type AcknowledgeAlarmResponse struct { -} - -type AcquireCimServicesTicket AcquireCimServicesTicketRequestType - -func init() { - t["AcquireCimServicesTicket"] = reflect.TypeOf((*AcquireCimServicesTicket)(nil)).Elem() -} - -type AcquireCimServicesTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AcquireCimServicesTicketRequestType"] = reflect.TypeOf((*AcquireCimServicesTicketRequestType)(nil)).Elem() -} - -type AcquireCimServicesTicketResponse struct { - Returnval HostServiceTicket `xml:"returnval"` -} - -type AcquireCloneTicket AcquireCloneTicketRequestType - -func init() { - t["AcquireCloneTicket"] = reflect.TypeOf((*AcquireCloneTicket)(nil)).Elem() -} - -type AcquireCloneTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AcquireCloneTicketRequestType"] = reflect.TypeOf((*AcquireCloneTicketRequestType)(nil)).Elem() -} - -type AcquireCloneTicketResponse struct { - Returnval string `xml:"returnval"` -} - -type AcquireCredentialsInGuest AcquireCredentialsInGuestRequestType - -func init() { - t["AcquireCredentialsInGuest"] = reflect.TypeOf((*AcquireCredentialsInGuest)(nil)).Elem() -} - -type AcquireCredentialsInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - RequestedAuth BaseGuestAuthentication `xml:"requestedAuth,typeattr"` - SessionID int64 `xml:"sessionID,omitempty"` -} - -func init() { - t["AcquireCredentialsInGuestRequestType"] = reflect.TypeOf((*AcquireCredentialsInGuestRequestType)(nil)).Elem() -} - -type AcquireCredentialsInGuestResponse struct { - Returnval BaseGuestAuthentication `xml:"returnval,typeattr"` -} - -type AcquireGenericServiceTicket AcquireGenericServiceTicketRequestType - -func init() { - t["AcquireGenericServiceTicket"] = reflect.TypeOf((*AcquireGenericServiceTicket)(nil)).Elem() -} - -type AcquireGenericServiceTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseSessionManagerServiceRequestSpec `xml:"spec,typeattr"` -} - -func init() { - t["AcquireGenericServiceTicketRequestType"] = reflect.TypeOf((*AcquireGenericServiceTicketRequestType)(nil)).Elem() -} - -type AcquireGenericServiceTicketResponse struct { - Returnval SessionManagerGenericServiceTicket `xml:"returnval"` -} - -type AcquireLocalTicket AcquireLocalTicketRequestType - -func init() { - t["AcquireLocalTicket"] = reflect.TypeOf((*AcquireLocalTicket)(nil)).Elem() -} - -type AcquireLocalTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` - UserName string `xml:"userName"` -} - -func init() { - t["AcquireLocalTicketRequestType"] = reflect.TypeOf((*AcquireLocalTicketRequestType)(nil)).Elem() -} - -type AcquireLocalTicketResponse struct { - Returnval SessionManagerLocalTicket `xml:"returnval"` -} - -type AcquireMksTicket AcquireMksTicketRequestType - -func init() { - t["AcquireMksTicket"] = reflect.TypeOf((*AcquireMksTicket)(nil)).Elem() -} - -type AcquireMksTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AcquireMksTicketRequestType"] = reflect.TypeOf((*AcquireMksTicketRequestType)(nil)).Elem() -} - -type AcquireMksTicketResponse struct { - Returnval VirtualMachineMksTicket `xml:"returnval"` -} - -type AcquireTicket AcquireTicketRequestType - -func init() { - t["AcquireTicket"] = reflect.TypeOf((*AcquireTicket)(nil)).Elem() -} - -type AcquireTicketRequestType struct { - This ManagedObjectReference `xml:"_this"` - TicketType string `xml:"ticketType"` -} - -func init() { - t["AcquireTicketRequestType"] = reflect.TypeOf((*AcquireTicketRequestType)(nil)).Elem() -} - -type AcquireTicketResponse struct { - Returnval VirtualMachineTicket `xml:"returnval"` -} - -type Action struct { - DynamicData -} - -func init() { - t["Action"] = reflect.TypeOf((*Action)(nil)).Elem() -} - -type ActiveDirectoryFault struct { - VimFault - - ErrorCode int32 `xml:"errorCode,omitempty"` -} - -func init() { - t["ActiveDirectoryFault"] = reflect.TypeOf((*ActiveDirectoryFault)(nil)).Elem() -} - -type ActiveDirectoryFaultFault BaseActiveDirectoryFault - -func init() { - t["ActiveDirectoryFaultFault"] = reflect.TypeOf((*ActiveDirectoryFaultFault)(nil)).Elem() -} - -type ActiveDirectoryProfile struct { - ApplyProfile -} - -func init() { - t["ActiveDirectoryProfile"] = reflect.TypeOf((*ActiveDirectoryProfile)(nil)).Elem() -} - -type ActiveVMsBlockingEVC struct { - EVCConfigFault - - EvcMode string `xml:"evcMode,omitempty"` - Host []ManagedObjectReference `xml:"host,omitempty"` - HostName []string `xml:"hostName,omitempty"` -} - -func init() { - t["ActiveVMsBlockingEVC"] = reflect.TypeOf((*ActiveVMsBlockingEVC)(nil)).Elem() -} - -type ActiveVMsBlockingEVCFault ActiveVMsBlockingEVC - -func init() { - t["ActiveVMsBlockingEVCFault"] = reflect.TypeOf((*ActiveVMsBlockingEVCFault)(nil)).Elem() -} - -type AddAuthorizationRole AddAuthorizationRoleRequestType - -func init() { - t["AddAuthorizationRole"] = reflect.TypeOf((*AddAuthorizationRole)(nil)).Elem() -} - -type AddAuthorizationRoleRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - PrivIds []string `xml:"privIds,omitempty"` -} - -func init() { - t["AddAuthorizationRoleRequestType"] = reflect.TypeOf((*AddAuthorizationRoleRequestType)(nil)).Elem() -} - -type AddAuthorizationRoleResponse struct { - Returnval int32 `xml:"returnval"` -} - -type AddCustomFieldDef AddCustomFieldDefRequestType - -func init() { - t["AddCustomFieldDef"] = reflect.TypeOf((*AddCustomFieldDef)(nil)).Elem() -} - -type AddCustomFieldDefRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - MoType string `xml:"moType,omitempty"` - FieldDefPolicy *PrivilegePolicyDef `xml:"fieldDefPolicy,omitempty"` - FieldPolicy *PrivilegePolicyDef `xml:"fieldPolicy,omitempty"` -} - -func init() { - t["AddCustomFieldDefRequestType"] = reflect.TypeOf((*AddCustomFieldDefRequestType)(nil)).Elem() -} - -type AddCustomFieldDefResponse struct { - Returnval CustomFieldDef `xml:"returnval"` -} - -type AddDVPortgroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec []DVPortgroupConfigSpec `xml:"spec"` -} - -func init() { - t["AddDVPortgroupRequestType"] = reflect.TypeOf((*AddDVPortgroupRequestType)(nil)).Elem() -} - -type AddDVPortgroup_Task AddDVPortgroupRequestType - -func init() { - t["AddDVPortgroup_Task"] = reflect.TypeOf((*AddDVPortgroup_Task)(nil)).Elem() -} - -type AddDVPortgroup_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AddDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` - Disk []HostScsiDisk `xml:"disk"` -} - -func init() { - t["AddDisksRequestType"] = reflect.TypeOf((*AddDisksRequestType)(nil)).Elem() -} - -type AddDisks_Task AddDisksRequestType - -func init() { - t["AddDisks_Task"] = reflect.TypeOf((*AddDisks_Task)(nil)).Elem() -} - -type AddDisks_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AddFilter AddFilterRequestType - -func init() { - t["AddFilter"] = reflect.TypeOf((*AddFilter)(nil)).Elem() -} - -type AddFilterEntities AddFilterEntitiesRequestType - -func init() { - t["AddFilterEntities"] = reflect.TypeOf((*AddFilterEntities)(nil)).Elem() -} - -type AddFilterEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - Entities []ManagedObjectReference `xml:"entities,omitempty"` -} - -func init() { - t["AddFilterEntitiesRequestType"] = reflect.TypeOf((*AddFilterEntitiesRequestType)(nil)).Elem() -} - -type AddFilterEntitiesResponse struct { -} - -type AddFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - FilterName string `xml:"filterName"` - InfoIds []string `xml:"infoIds,omitempty"` -} - -func init() { - t["AddFilterRequestType"] = reflect.TypeOf((*AddFilterRequestType)(nil)).Elem() -} - -type AddFilterResponse struct { - Returnval string `xml:"returnval"` -} - -type AddGuestAlias AddGuestAliasRequestType - -func init() { - t["AddGuestAlias"] = reflect.TypeOf((*AddGuestAlias)(nil)).Elem() -} - -type AddGuestAliasRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Username string `xml:"username"` - MapCert bool `xml:"mapCert"` - Base64Cert string `xml:"base64Cert"` - AliasInfo GuestAuthAliasInfo `xml:"aliasInfo"` -} - -func init() { - t["AddGuestAliasRequestType"] = reflect.TypeOf((*AddGuestAliasRequestType)(nil)).Elem() -} - -type AddGuestAliasResponse struct { -} - -type AddHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostConnectSpec `xml:"spec"` - AsConnected bool `xml:"asConnected"` - ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` - License string `xml:"license,omitempty"` -} - -func init() { - t["AddHostRequestType"] = reflect.TypeOf((*AddHostRequestType)(nil)).Elem() -} - -type AddHost_Task AddHostRequestType - -func init() { - t["AddHost_Task"] = reflect.TypeOf((*AddHost_Task)(nil)).Elem() -} - -type AddHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AddInternetScsiSendTargets AddInternetScsiSendTargetsRequestType - -func init() { - t["AddInternetScsiSendTargets"] = reflect.TypeOf((*AddInternetScsiSendTargets)(nil)).Elem() -} - -type AddInternetScsiSendTargetsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - Targets []HostInternetScsiHbaSendTarget `xml:"targets"` -} - -func init() { - t["AddInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiSendTargetsRequestType)(nil)).Elem() -} - -type AddInternetScsiSendTargetsResponse struct { -} - -type AddInternetScsiStaticTargets AddInternetScsiStaticTargetsRequestType - -func init() { - t["AddInternetScsiStaticTargets"] = reflect.TypeOf((*AddInternetScsiStaticTargets)(nil)).Elem() -} - -type AddInternetScsiStaticTargetsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - Targets []HostInternetScsiHbaStaticTarget `xml:"targets"` -} - -func init() { - t["AddInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*AddInternetScsiStaticTargetsRequestType)(nil)).Elem() -} - -type AddInternetScsiStaticTargetsResponse struct { -} - -type AddKey AddKeyRequestType - -func init() { - t["AddKey"] = reflect.TypeOf((*AddKey)(nil)).Elem() -} - -type AddKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key CryptoKeyPlain `xml:"key"` -} - -func init() { - t["AddKeyRequestType"] = reflect.TypeOf((*AddKeyRequestType)(nil)).Elem() -} - -type AddKeyResponse struct { -} - -type AddKeys AddKeysRequestType - -func init() { - t["AddKeys"] = reflect.TypeOf((*AddKeys)(nil)).Elem() -} - -type AddKeysRequestType struct { - This ManagedObjectReference `xml:"_this"` - Keys []CryptoKeyPlain `xml:"keys,omitempty"` -} - -func init() { - t["AddKeysRequestType"] = reflect.TypeOf((*AddKeysRequestType)(nil)).Elem() -} - -type AddKeysResponse struct { - Returnval []CryptoKeyResult `xml:"returnval,omitempty"` -} - -type AddLicense AddLicenseRequestType - -func init() { - t["AddLicense"] = reflect.TypeOf((*AddLicense)(nil)).Elem() -} - -type AddLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` - Labels []KeyValue `xml:"labels,omitempty"` -} - -func init() { - t["AddLicenseRequestType"] = reflect.TypeOf((*AddLicenseRequestType)(nil)).Elem() -} - -type AddLicenseResponse struct { - Returnval LicenseManagerLicenseInfo `xml:"returnval"` -} - -type AddMonitoredEntities AddMonitoredEntitiesRequestType - -func init() { - t["AddMonitoredEntities"] = reflect.TypeOf((*AddMonitoredEntities)(nil)).Elem() -} - -type AddMonitoredEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - Entities []ManagedObjectReference `xml:"entities,omitempty"` -} - -func init() { - t["AddMonitoredEntitiesRequestType"] = reflect.TypeOf((*AddMonitoredEntitiesRequestType)(nil)).Elem() -} - -type AddMonitoredEntitiesResponse struct { -} - -type AddNetworkResourcePool AddNetworkResourcePoolRequestType - -func init() { - t["AddNetworkResourcePool"] = reflect.TypeOf((*AddNetworkResourcePool)(nil)).Elem() -} - -type AddNetworkResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"` -} - -func init() { - t["AddNetworkResourcePoolRequestType"] = reflect.TypeOf((*AddNetworkResourcePoolRequestType)(nil)).Elem() -} - -type AddNetworkResourcePoolResponse struct { -} - -type AddPortGroup AddPortGroupRequestType - -func init() { - t["AddPortGroup"] = reflect.TypeOf((*AddPortGroup)(nil)).Elem() -} - -type AddPortGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - Portgrp HostPortGroupSpec `xml:"portgrp"` -} - -func init() { - t["AddPortGroupRequestType"] = reflect.TypeOf((*AddPortGroupRequestType)(nil)).Elem() -} - -type AddPortGroupResponse struct { -} - -type AddServiceConsoleVirtualNic AddServiceConsoleVirtualNicRequestType - -func init() { - t["AddServiceConsoleVirtualNic"] = reflect.TypeOf((*AddServiceConsoleVirtualNic)(nil)).Elem() -} - -type AddServiceConsoleVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Portgroup string `xml:"portgroup"` - Nic HostVirtualNicSpec `xml:"nic"` -} - -func init() { - t["AddServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*AddServiceConsoleVirtualNicRequestType)(nil)).Elem() -} - -type AddServiceConsoleVirtualNicResponse struct { - Returnval string `xml:"returnval"` -} - -type AddStandaloneHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostConnectSpec `xml:"spec"` - CompResSpec BaseComputeResourceConfigSpec `xml:"compResSpec,omitempty,typeattr"` - AddConnected bool `xml:"addConnected"` - License string `xml:"license,omitempty"` -} - -func init() { - t["AddStandaloneHostRequestType"] = reflect.TypeOf((*AddStandaloneHostRequestType)(nil)).Elem() -} - -type AddStandaloneHost_Task AddStandaloneHostRequestType - -func init() { - t["AddStandaloneHost_Task"] = reflect.TypeOf((*AddStandaloneHost_Task)(nil)).Elem() -} - -type AddStandaloneHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AddVirtualNic AddVirtualNicRequestType - -func init() { - t["AddVirtualNic"] = reflect.TypeOf((*AddVirtualNic)(nil)).Elem() -} - -type AddVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Portgroup string `xml:"portgroup"` - Nic HostVirtualNicSpec `xml:"nic"` -} - -func init() { - t["AddVirtualNicRequestType"] = reflect.TypeOf((*AddVirtualNicRequestType)(nil)).Elem() -} - -type AddVirtualNicResponse struct { - Returnval string `xml:"returnval"` -} - -type AddVirtualSwitch AddVirtualSwitchRequestType - -func init() { - t["AddVirtualSwitch"] = reflect.TypeOf((*AddVirtualSwitch)(nil)).Elem() -} - -type AddVirtualSwitchRequestType struct { - This ManagedObjectReference `xml:"_this"` - VswitchName string `xml:"vswitchName"` - Spec *HostVirtualSwitchSpec `xml:"spec,omitempty"` -} - -func init() { - t["AddVirtualSwitchRequestType"] = reflect.TypeOf((*AddVirtualSwitchRequestType)(nil)).Elem() -} - -type AddVirtualSwitchResponse struct { -} - -type AdminDisabled struct { - HostConfigFault -} - -func init() { - t["AdminDisabled"] = reflect.TypeOf((*AdminDisabled)(nil)).Elem() -} - -type AdminDisabledFault AdminDisabled - -func init() { - t["AdminDisabledFault"] = reflect.TypeOf((*AdminDisabledFault)(nil)).Elem() -} - -type AdminNotDisabled struct { - HostConfigFault -} - -func init() { - t["AdminNotDisabled"] = reflect.TypeOf((*AdminNotDisabled)(nil)).Elem() -} - -type AdminNotDisabledFault AdminNotDisabled - -func init() { - t["AdminNotDisabledFault"] = reflect.TypeOf((*AdminNotDisabledFault)(nil)).Elem() -} - -type AdminPasswordNotChangedEvent struct { - HostEvent -} - -func init() { - t["AdminPasswordNotChangedEvent"] = reflect.TypeOf((*AdminPasswordNotChangedEvent)(nil)).Elem() -} - -type AffinityConfigured struct { - MigrationFault - - ConfiguredAffinity []string `xml:"configuredAffinity"` -} - -func init() { - t["AffinityConfigured"] = reflect.TypeOf((*AffinityConfigured)(nil)).Elem() -} - -type AffinityConfiguredFault AffinityConfigured - -func init() { - t["AffinityConfiguredFault"] = reflect.TypeOf((*AffinityConfiguredFault)(nil)).Elem() -} - -type AfterStartupTaskScheduler struct { - TaskScheduler - - Minute int32 `xml:"minute"` -} - -func init() { - t["AfterStartupTaskScheduler"] = reflect.TypeOf((*AfterStartupTaskScheduler)(nil)).Elem() -} - -type AgentInstallFailed struct { - HostConnectFault - - Reason string `xml:"reason,omitempty"` - StatusCode int32 `xml:"statusCode,omitempty"` - InstallerOutput string `xml:"installerOutput,omitempty"` -} - -func init() { - t["AgentInstallFailed"] = reflect.TypeOf((*AgentInstallFailed)(nil)).Elem() -} - -type AgentInstallFailedFault AgentInstallFailed - -func init() { - t["AgentInstallFailedFault"] = reflect.TypeOf((*AgentInstallFailedFault)(nil)).Elem() -} - -type AlarmAcknowledgedEvent struct { - AlarmEvent - - Source ManagedEntityEventArgument `xml:"source"` - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["AlarmAcknowledgedEvent"] = reflect.TypeOf((*AlarmAcknowledgedEvent)(nil)).Elem() -} - -type AlarmAction struct { - DynamicData -} - -func init() { - t["AlarmAction"] = reflect.TypeOf((*AlarmAction)(nil)).Elem() -} - -type AlarmActionTriggeredEvent struct { - AlarmEvent - - Source ManagedEntityEventArgument `xml:"source"` - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["AlarmActionTriggeredEvent"] = reflect.TypeOf((*AlarmActionTriggeredEvent)(nil)).Elem() -} - -type AlarmClearedEvent struct { - AlarmEvent - - Source ManagedEntityEventArgument `xml:"source"` - Entity ManagedEntityEventArgument `xml:"entity"` - From string `xml:"from"` -} - -func init() { - t["AlarmClearedEvent"] = reflect.TypeOf((*AlarmClearedEvent)(nil)).Elem() -} - -type AlarmCreatedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["AlarmCreatedEvent"] = reflect.TypeOf((*AlarmCreatedEvent)(nil)).Elem() -} - -type AlarmDescription struct { - DynamicData - - Expr []BaseTypeDescription `xml:"expr,typeattr"` - StateOperator []BaseElementDescription `xml:"stateOperator,typeattr"` - MetricOperator []BaseElementDescription `xml:"metricOperator,typeattr"` - HostSystemConnectionState []BaseElementDescription `xml:"hostSystemConnectionState,typeattr"` - VirtualMachinePowerState []BaseElementDescription `xml:"virtualMachinePowerState,typeattr"` - DatastoreConnectionState []BaseElementDescription `xml:"datastoreConnectionState,omitempty,typeattr"` - HostSystemPowerState []BaseElementDescription `xml:"hostSystemPowerState,omitempty,typeattr"` - VirtualMachineGuestHeartbeatStatus []BaseElementDescription `xml:"virtualMachineGuestHeartbeatStatus,omitempty,typeattr"` - EntityStatus []BaseElementDescription `xml:"entityStatus,typeattr"` - Action []BaseTypeDescription `xml:"action,typeattr"` -} - -func init() { - t["AlarmDescription"] = reflect.TypeOf((*AlarmDescription)(nil)).Elem() -} - -type AlarmEmailCompletedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - To string `xml:"to"` -} - -func init() { - t["AlarmEmailCompletedEvent"] = reflect.TypeOf((*AlarmEmailCompletedEvent)(nil)).Elem() -} - -type AlarmEmailFailedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - To string `xml:"to"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["AlarmEmailFailedEvent"] = reflect.TypeOf((*AlarmEmailFailedEvent)(nil)).Elem() -} - -type AlarmEvent struct { - Event - - Alarm AlarmEventArgument `xml:"alarm"` -} - -func init() { - t["AlarmEvent"] = reflect.TypeOf((*AlarmEvent)(nil)).Elem() -} - -type AlarmEventArgument struct { - EntityEventArgument - - Alarm ManagedObjectReference `xml:"alarm"` -} - -func init() { - t["AlarmEventArgument"] = reflect.TypeOf((*AlarmEventArgument)(nil)).Elem() -} - -type AlarmExpression struct { - DynamicData -} - -func init() { - t["AlarmExpression"] = reflect.TypeOf((*AlarmExpression)(nil)).Elem() -} - -type AlarmFilterSpec struct { - DynamicData - - Status []ManagedEntityStatus `xml:"status,omitempty"` - TypeEntity string `xml:"typeEntity,omitempty"` - TypeTrigger string `xml:"typeTrigger,omitempty"` -} - -func init() { - t["AlarmFilterSpec"] = reflect.TypeOf((*AlarmFilterSpec)(nil)).Elem() -} - -type AlarmInfo struct { - AlarmSpec - - Key string `xml:"key"` - Alarm ManagedObjectReference `xml:"alarm"` - Entity ManagedObjectReference `xml:"entity"` - LastModifiedTime time.Time `xml:"lastModifiedTime"` - LastModifiedUser string `xml:"lastModifiedUser"` - CreationEventId int32 `xml:"creationEventId"` -} - -func init() { - t["AlarmInfo"] = reflect.TypeOf((*AlarmInfo)(nil)).Elem() -} - -type AlarmReconfiguredEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["AlarmReconfiguredEvent"] = reflect.TypeOf((*AlarmReconfiguredEvent)(nil)).Elem() -} - -type AlarmRemovedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["AlarmRemovedEvent"] = reflect.TypeOf((*AlarmRemovedEvent)(nil)).Elem() -} - -type AlarmScriptCompleteEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - Script string `xml:"script"` -} - -func init() { - t["AlarmScriptCompleteEvent"] = reflect.TypeOf((*AlarmScriptCompleteEvent)(nil)).Elem() -} - -type AlarmScriptFailedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - Script string `xml:"script"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["AlarmScriptFailedEvent"] = reflect.TypeOf((*AlarmScriptFailedEvent)(nil)).Elem() -} - -type AlarmSetting struct { - DynamicData - - ToleranceRange int32 `xml:"toleranceRange"` - ReportingFrequency int32 `xml:"reportingFrequency"` -} - -func init() { - t["AlarmSetting"] = reflect.TypeOf((*AlarmSetting)(nil)).Elem() -} - -type AlarmSnmpCompletedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["AlarmSnmpCompletedEvent"] = reflect.TypeOf((*AlarmSnmpCompletedEvent)(nil)).Elem() -} - -type AlarmSnmpFailedEvent struct { - AlarmEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["AlarmSnmpFailedEvent"] = reflect.TypeOf((*AlarmSnmpFailedEvent)(nil)).Elem() -} - -type AlarmSpec struct { - DynamicData - - Name string `xml:"name"` - SystemName string `xml:"systemName,omitempty"` - Description string `xml:"description"` - Enabled bool `xml:"enabled"` - Expression BaseAlarmExpression `xml:"expression,typeattr"` - Action BaseAlarmAction `xml:"action,omitempty,typeattr"` - ActionFrequency int32 `xml:"actionFrequency,omitempty"` - Setting *AlarmSetting `xml:"setting,omitempty"` -} - -func init() { - t["AlarmSpec"] = reflect.TypeOf((*AlarmSpec)(nil)).Elem() -} - -type AlarmState struct { - DynamicData - - Key string `xml:"key"` - Entity ManagedObjectReference `xml:"entity"` - Alarm ManagedObjectReference `xml:"alarm"` - OverallStatus ManagedEntityStatus `xml:"overallStatus"` - Time time.Time `xml:"time"` - Acknowledged *bool `xml:"acknowledged"` - AcknowledgedByUser string `xml:"acknowledgedByUser,omitempty"` - AcknowledgedTime *time.Time `xml:"acknowledgedTime"` - EventKey int32 `xml:"eventKey,omitempty"` - Disabled *bool `xml:"disabled"` -} - -func init() { - t["AlarmState"] = reflect.TypeOf((*AlarmState)(nil)).Elem() -} - -type AlarmStatusChangedEvent struct { - AlarmEvent - - Source ManagedEntityEventArgument `xml:"source"` - Entity ManagedEntityEventArgument `xml:"entity"` - From string `xml:"from"` - To string `xml:"to"` -} - -func init() { - t["AlarmStatusChangedEvent"] = reflect.TypeOf((*AlarmStatusChangedEvent)(nil)).Elem() -} - -type AlarmTriggeringAction struct { - AlarmAction - - Action BaseAction `xml:"action,typeattr"` - TransitionSpecs []AlarmTriggeringActionTransitionSpec `xml:"transitionSpecs,omitempty"` - Green2yellow bool `xml:"green2yellow"` - Yellow2red bool `xml:"yellow2red"` - Red2yellow bool `xml:"red2yellow"` - Yellow2green bool `xml:"yellow2green"` -} - -func init() { - t["AlarmTriggeringAction"] = reflect.TypeOf((*AlarmTriggeringAction)(nil)).Elem() -} - -type AlarmTriggeringActionTransitionSpec struct { - DynamicData - - StartState ManagedEntityStatus `xml:"startState"` - FinalState ManagedEntityStatus `xml:"finalState"` - Repeats bool `xml:"repeats"` -} - -func init() { - t["AlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*AlarmTriggeringActionTransitionSpec)(nil)).Elem() -} - -type AllVirtualMachinesLicensedEvent struct { - LicenseEvent -} - -func init() { - t["AllVirtualMachinesLicensedEvent"] = reflect.TypeOf((*AllVirtualMachinesLicensedEvent)(nil)).Elem() -} - -type AllocateIpv4Address AllocateIpv4AddressRequestType - -func init() { - t["AllocateIpv4Address"] = reflect.TypeOf((*AllocateIpv4Address)(nil)).Elem() -} - -type AllocateIpv4AddressRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - PoolId int32 `xml:"poolId"` - AllocationId string `xml:"allocationId"` -} - -func init() { - t["AllocateIpv4AddressRequestType"] = reflect.TypeOf((*AllocateIpv4AddressRequestType)(nil)).Elem() -} - -type AllocateIpv4AddressResponse struct { - Returnval string `xml:"returnval"` -} - -type AllocateIpv6Address AllocateIpv6AddressRequestType - -func init() { - t["AllocateIpv6Address"] = reflect.TypeOf((*AllocateIpv6Address)(nil)).Elem() -} - -type AllocateIpv6AddressRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - PoolId int32 `xml:"poolId"` - AllocationId string `xml:"allocationId"` -} - -func init() { - t["AllocateIpv6AddressRequestType"] = reflect.TypeOf((*AllocateIpv6AddressRequestType)(nil)).Elem() -} - -type AllocateIpv6AddressResponse struct { - Returnval string `xml:"returnval"` -} - -type AlreadyAuthenticatedSessionEvent struct { - SessionEvent -} - -func init() { - t["AlreadyAuthenticatedSessionEvent"] = reflect.TypeOf((*AlreadyAuthenticatedSessionEvent)(nil)).Elem() -} - -type AlreadyBeingManaged struct { - HostConnectFault - - IpAddress string `xml:"ipAddress"` -} - -func init() { - t["AlreadyBeingManaged"] = reflect.TypeOf((*AlreadyBeingManaged)(nil)).Elem() -} - -type AlreadyBeingManagedFault AlreadyBeingManaged - -func init() { - t["AlreadyBeingManagedFault"] = reflect.TypeOf((*AlreadyBeingManagedFault)(nil)).Elem() -} - -type AlreadyConnected struct { - HostConnectFault - - Name string `xml:"name"` -} - -func init() { - t["AlreadyConnected"] = reflect.TypeOf((*AlreadyConnected)(nil)).Elem() -} - -type AlreadyConnectedFault AlreadyConnected - -func init() { - t["AlreadyConnectedFault"] = reflect.TypeOf((*AlreadyConnectedFault)(nil)).Elem() -} - -type AlreadyExists struct { - VimFault - - Name string `xml:"name,omitempty"` -} - -func init() { - t["AlreadyExists"] = reflect.TypeOf((*AlreadyExists)(nil)).Elem() -} - -type AlreadyExistsFault AlreadyExists - -func init() { - t["AlreadyExistsFault"] = reflect.TypeOf((*AlreadyExistsFault)(nil)).Elem() -} - -type AlreadyUpgraded struct { - VimFault -} - -func init() { - t["AlreadyUpgraded"] = reflect.TypeOf((*AlreadyUpgraded)(nil)).Elem() -} - -type AlreadyUpgradedFault AlreadyUpgraded - -func init() { - t["AlreadyUpgradedFault"] = reflect.TypeOf((*AlreadyUpgradedFault)(nil)).Elem() -} - -type AndAlarmExpression struct { - AlarmExpression - - Expression []BaseAlarmExpression `xml:"expression,typeattr"` -} - -func init() { - t["AndAlarmExpression"] = reflect.TypeOf((*AndAlarmExpression)(nil)).Elem() -} - -type AnswerFile struct { - DynamicData - - UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` - CreatedTime time.Time `xml:"createdTime"` - ModifiedTime time.Time `xml:"modifiedTime"` -} - -func init() { - t["AnswerFile"] = reflect.TypeOf((*AnswerFile)(nil)).Elem() -} - -type AnswerFileCreateSpec struct { - DynamicData - - Validating *bool `xml:"validating"` -} - -func init() { - t["AnswerFileCreateSpec"] = reflect.TypeOf((*AnswerFileCreateSpec)(nil)).Elem() -} - -type AnswerFileOptionsCreateSpec struct { - AnswerFileCreateSpec - - UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` -} - -func init() { - t["AnswerFileOptionsCreateSpec"] = reflect.TypeOf((*AnswerFileOptionsCreateSpec)(nil)).Elem() -} - -type AnswerFileSerializedCreateSpec struct { - AnswerFileCreateSpec - - AnswerFileConfigString string `xml:"answerFileConfigString"` -} - -func init() { - t["AnswerFileSerializedCreateSpec"] = reflect.TypeOf((*AnswerFileSerializedCreateSpec)(nil)).Elem() -} - -type AnswerFileStatusError struct { - DynamicData - - UserInputPath ProfilePropertyPath `xml:"userInputPath"` - ErrMsg LocalizableMessage `xml:"errMsg"` -} - -func init() { - t["AnswerFileStatusError"] = reflect.TypeOf((*AnswerFileStatusError)(nil)).Elem() -} - -type AnswerFileStatusResult struct { - DynamicData - - CheckedTime time.Time `xml:"checkedTime"` - Host ManagedObjectReference `xml:"host"` - Status string `xml:"status"` - Error []AnswerFileStatusError `xml:"error,omitempty"` -} - -func init() { - t["AnswerFileStatusResult"] = reflect.TypeOf((*AnswerFileStatusResult)(nil)).Elem() -} - -type AnswerFileUpdateFailed struct { - VimFault - - Failure []AnswerFileUpdateFailure `xml:"failure"` -} - -func init() { - t["AnswerFileUpdateFailed"] = reflect.TypeOf((*AnswerFileUpdateFailed)(nil)).Elem() -} - -type AnswerFileUpdateFailedFault AnswerFileUpdateFailed - -func init() { - t["AnswerFileUpdateFailedFault"] = reflect.TypeOf((*AnswerFileUpdateFailedFault)(nil)).Elem() -} - -type AnswerFileUpdateFailure struct { - DynamicData - - UserInputPath ProfilePropertyPath `xml:"userInputPath"` - ErrMsg LocalizableMessage `xml:"errMsg"` -} - -func init() { - t["AnswerFileUpdateFailure"] = reflect.TypeOf((*AnswerFileUpdateFailure)(nil)).Elem() -} - -type AnswerVM AnswerVMRequestType - -func init() { - t["AnswerVM"] = reflect.TypeOf((*AnswerVM)(nil)).Elem() -} - -type AnswerVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - QuestionId string `xml:"questionId"` - AnswerChoice string `xml:"answerChoice"` -} - -func init() { - t["AnswerVMRequestType"] = reflect.TypeOf((*AnswerVMRequestType)(nil)).Elem() -} - -type AnswerVMResponse struct { -} - -type ApplicationQuiesceFault struct { - SnapshotFault -} - -func init() { - t["ApplicationQuiesceFault"] = reflect.TypeOf((*ApplicationQuiesceFault)(nil)).Elem() -} - -type ApplicationQuiesceFaultFault ApplicationQuiesceFault - -func init() { - t["ApplicationQuiesceFaultFault"] = reflect.TypeOf((*ApplicationQuiesceFaultFault)(nil)).Elem() -} - -type ApplyEntitiesConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - ApplyConfigSpecs []ApplyHostProfileConfigurationSpec `xml:"applyConfigSpecs,omitempty"` -} - -func init() { - t["ApplyEntitiesConfigRequestType"] = reflect.TypeOf((*ApplyEntitiesConfigRequestType)(nil)).Elem() -} - -type ApplyEntitiesConfig_Task ApplyEntitiesConfigRequestType - -func init() { - t["ApplyEntitiesConfig_Task"] = reflect.TypeOf((*ApplyEntitiesConfig_Task)(nil)).Elem() -} - -type ApplyEntitiesConfig_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ApplyEvcModeVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mask []HostFeatureMask `xml:"mask,omitempty"` - CompleteMasks *bool `xml:"completeMasks"` -} - -func init() { - t["ApplyEvcModeVMRequestType"] = reflect.TypeOf((*ApplyEvcModeVMRequestType)(nil)).Elem() -} - -type ApplyEvcModeVM_Task ApplyEvcModeVMRequestType - -func init() { - t["ApplyEvcModeVM_Task"] = reflect.TypeOf((*ApplyEvcModeVM_Task)(nil)).Elem() -} - -type ApplyEvcModeVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ApplyHostConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - ConfigSpec HostConfigSpec `xml:"configSpec"` - UserInput []ProfileDeferredPolicyOptionParameter `xml:"userInput,omitempty"` -} - -func init() { - t["ApplyHostConfigRequestType"] = reflect.TypeOf((*ApplyHostConfigRequestType)(nil)).Elem() -} - -type ApplyHostConfig_Task ApplyHostConfigRequestType - -func init() { - t["ApplyHostConfig_Task"] = reflect.TypeOf((*ApplyHostConfig_Task)(nil)).Elem() -} - -type ApplyHostConfig_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ApplyHostProfileConfigurationResult struct { - DynamicData - - StartTime time.Time `xml:"startTime"` - CompleteTime time.Time `xml:"completeTime"` - Host ManagedObjectReference `xml:"host"` - Status string `xml:"status"` - Errors []LocalizedMethodFault `xml:"errors,omitempty"` -} - -func init() { - t["ApplyHostProfileConfigurationResult"] = reflect.TypeOf((*ApplyHostProfileConfigurationResult)(nil)).Elem() -} - -type ApplyHostProfileConfigurationSpec struct { - ProfileExecuteResult - - Host ManagedObjectReference `xml:"host"` - TaskListRequirement []string `xml:"taskListRequirement,omitempty"` - TaskDescription []LocalizableMessage `xml:"taskDescription,omitempty"` - RebootStateless *bool `xml:"rebootStateless"` - RebootHost *bool `xml:"rebootHost"` - FaultData *LocalizedMethodFault `xml:"faultData,omitempty"` -} - -func init() { - t["ApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ApplyHostProfileConfigurationSpec)(nil)).Elem() -} - -type ApplyProfile struct { - DynamicData - - Enabled bool `xml:"enabled"` - Policy []ProfilePolicy `xml:"policy,omitempty"` - ProfileTypeName string `xml:"profileTypeName,omitempty"` - ProfileVersion string `xml:"profileVersion,omitempty"` - Property []ProfileApplyProfileProperty `xml:"property,omitempty"` - Favorite *bool `xml:"favorite"` - ToBeMerged *bool `xml:"toBeMerged"` - ToReplaceWith *bool `xml:"toReplaceWith"` - ToBeDeleted *bool `xml:"toBeDeleted"` - CopyEnableStatus *bool `xml:"copyEnableStatus"` - Hidden *bool `xml:"hidden"` -} - -func init() { - t["ApplyProfile"] = reflect.TypeOf((*ApplyProfile)(nil)).Elem() -} - -type ApplyRecommendation ApplyRecommendationRequestType - -func init() { - t["ApplyRecommendation"] = reflect.TypeOf((*ApplyRecommendation)(nil)).Elem() -} - -type ApplyRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key string `xml:"key"` -} - -func init() { - t["ApplyRecommendationRequestType"] = reflect.TypeOf((*ApplyRecommendationRequestType)(nil)).Elem() -} - -type ApplyRecommendationResponse struct { -} - -type ApplyStorageDrsRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key []string `xml:"key"` -} - -func init() { - t["ApplyStorageDrsRecommendationRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationRequestType)(nil)).Elem() -} - -type ApplyStorageDrsRecommendationToPodRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pod ManagedObjectReference `xml:"pod"` - Key string `xml:"key"` -} - -func init() { - t["ApplyStorageDrsRecommendationToPodRequestType"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPodRequestType)(nil)).Elem() -} - -type ApplyStorageDrsRecommendationToPod_Task ApplyStorageDrsRecommendationToPodRequestType - -func init() { - t["ApplyStorageDrsRecommendationToPod_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendationToPod_Task)(nil)).Elem() -} - -type ApplyStorageDrsRecommendationToPod_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ApplyStorageDrsRecommendation_Task ApplyStorageDrsRecommendationRequestType - -func init() { - t["ApplyStorageDrsRecommendation_Task"] = reflect.TypeOf((*ApplyStorageDrsRecommendation_Task)(nil)).Elem() -} - -type ApplyStorageDrsRecommendation_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ApplyStorageRecommendationResult struct { - DynamicData - - Vm *ManagedObjectReference `xml:"vm,omitempty"` -} - -func init() { - t["ApplyStorageRecommendationResult"] = reflect.TypeOf((*ApplyStorageRecommendationResult)(nil)).Elem() -} - -type AreAlarmActionsEnabled AreAlarmActionsEnabledRequestType - -func init() { - t["AreAlarmActionsEnabled"] = reflect.TypeOf((*AreAlarmActionsEnabled)(nil)).Elem() -} - -type AreAlarmActionsEnabledRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["AreAlarmActionsEnabledRequestType"] = reflect.TypeOf((*AreAlarmActionsEnabledRequestType)(nil)).Elem() -} - -type AreAlarmActionsEnabledResponse struct { - Returnval bool `xml:"returnval"` -} - -type ArrayOfAlarmAction struct { - AlarmAction []BaseAlarmAction `xml:"AlarmAction,omitempty,typeattr"` -} - -func init() { - t["ArrayOfAlarmAction"] = reflect.TypeOf((*ArrayOfAlarmAction)(nil)).Elem() -} - -type ArrayOfAlarmExpression struct { - AlarmExpression []BaseAlarmExpression `xml:"AlarmExpression,omitempty,typeattr"` -} - -func init() { - t["ArrayOfAlarmExpression"] = reflect.TypeOf((*ArrayOfAlarmExpression)(nil)).Elem() -} - -type ArrayOfAlarmState struct { - AlarmState []AlarmState `xml:"AlarmState,omitempty"` -} - -func init() { - t["ArrayOfAlarmState"] = reflect.TypeOf((*ArrayOfAlarmState)(nil)).Elem() -} - -type ArrayOfAlarmTriggeringActionTransitionSpec struct { - AlarmTriggeringActionTransitionSpec []AlarmTriggeringActionTransitionSpec `xml:"AlarmTriggeringActionTransitionSpec,omitempty"` -} - -func init() { - t["ArrayOfAlarmTriggeringActionTransitionSpec"] = reflect.TypeOf((*ArrayOfAlarmTriggeringActionTransitionSpec)(nil)).Elem() -} - -type ArrayOfAnswerFileStatusError struct { - AnswerFileStatusError []AnswerFileStatusError `xml:"AnswerFileStatusError,omitempty"` -} - -func init() { - t["ArrayOfAnswerFileStatusError"] = reflect.TypeOf((*ArrayOfAnswerFileStatusError)(nil)).Elem() -} - -type ArrayOfAnswerFileStatusResult struct { - AnswerFileStatusResult []AnswerFileStatusResult `xml:"AnswerFileStatusResult,omitempty"` -} - -func init() { - t["ArrayOfAnswerFileStatusResult"] = reflect.TypeOf((*ArrayOfAnswerFileStatusResult)(nil)).Elem() -} - -type ArrayOfAnswerFileUpdateFailure struct { - AnswerFileUpdateFailure []AnswerFileUpdateFailure `xml:"AnswerFileUpdateFailure,omitempty"` -} - -func init() { - t["ArrayOfAnswerFileUpdateFailure"] = reflect.TypeOf((*ArrayOfAnswerFileUpdateFailure)(nil)).Elem() -} - -type ArrayOfAnyType struct { - AnyType []AnyType `xml:"anyType,omitempty,typeattr"` -} - -func init() { - t["ArrayOfAnyType"] = reflect.TypeOf((*ArrayOfAnyType)(nil)).Elem() -} - -type ArrayOfAnyURI struct { - AnyURI []string `xml:"anyURI,omitempty"` -} - -func init() { - t["ArrayOfAnyURI"] = reflect.TypeOf((*ArrayOfAnyURI)(nil)).Elem() -} - -type ArrayOfApplyHostProfileConfigurationResult struct { - ApplyHostProfileConfigurationResult []ApplyHostProfileConfigurationResult `xml:"ApplyHostProfileConfigurationResult,omitempty"` -} - -func init() { - t["ArrayOfApplyHostProfileConfigurationResult"] = reflect.TypeOf((*ArrayOfApplyHostProfileConfigurationResult)(nil)).Elem() -} - -type ArrayOfApplyHostProfileConfigurationSpec struct { - ApplyHostProfileConfigurationSpec []ApplyHostProfileConfigurationSpec `xml:"ApplyHostProfileConfigurationSpec,omitempty"` -} - -func init() { - t["ArrayOfApplyHostProfileConfigurationSpec"] = reflect.TypeOf((*ArrayOfApplyHostProfileConfigurationSpec)(nil)).Elem() -} - -type ArrayOfApplyProfile struct { - ApplyProfile []BaseApplyProfile `xml:"ApplyProfile,omitempty,typeattr"` -} - -func init() { - t["ArrayOfApplyProfile"] = reflect.TypeOf((*ArrayOfApplyProfile)(nil)).Elem() -} - -type ArrayOfAuthorizationPrivilege struct { - AuthorizationPrivilege []AuthorizationPrivilege `xml:"AuthorizationPrivilege,omitempty"` -} - -func init() { - t["ArrayOfAuthorizationPrivilege"] = reflect.TypeOf((*ArrayOfAuthorizationPrivilege)(nil)).Elem() -} - -type ArrayOfAuthorizationRole struct { - AuthorizationRole []AuthorizationRole `xml:"AuthorizationRole,omitempty"` -} - -func init() { - t["ArrayOfAuthorizationRole"] = reflect.TypeOf((*ArrayOfAuthorizationRole)(nil)).Elem() -} - -type ArrayOfAutoStartPowerInfo struct { - AutoStartPowerInfo []AutoStartPowerInfo `xml:"AutoStartPowerInfo,omitempty"` -} - -func init() { - t["ArrayOfAutoStartPowerInfo"] = reflect.TypeOf((*ArrayOfAutoStartPowerInfo)(nil)).Elem() -} - -type ArrayOfBase64Binary struct { - Base64Binary [][]byte `xml:"base64Binary,omitempty"` -} - -func init() { - t["ArrayOfBase64Binary"] = reflect.TypeOf((*ArrayOfBase64Binary)(nil)).Elem() -} - -type ArrayOfBoolean struct { - Boolean []bool `xml:"boolean,omitempty"` -} - -func init() { - t["ArrayOfBoolean"] = reflect.TypeOf((*ArrayOfBoolean)(nil)).Elem() -} - -type ArrayOfByte struct { - Byte []byte `xml:"byte,omitempty"` -} - -func init() { - t["ArrayOfByte"] = reflect.TypeOf((*ArrayOfByte)(nil)).Elem() -} - -type ArrayOfChangesInfoEventArgument struct { - ChangesInfoEventArgument []ChangesInfoEventArgument `xml:"ChangesInfoEventArgument,omitempty"` -} - -func init() { - t["ArrayOfChangesInfoEventArgument"] = reflect.TypeOf((*ArrayOfChangesInfoEventArgument)(nil)).Elem() -} - -type ArrayOfCheckResult struct { - CheckResult []CheckResult `xml:"CheckResult,omitempty"` -} - -func init() { - t["ArrayOfCheckResult"] = reflect.TypeOf((*ArrayOfCheckResult)(nil)).Elem() -} - -type ArrayOfClusterAction struct { - ClusterAction []BaseClusterAction `xml:"ClusterAction,omitempty,typeattr"` -} - -func init() { - t["ArrayOfClusterAction"] = reflect.TypeOf((*ArrayOfClusterAction)(nil)).Elem() -} - -type ArrayOfClusterActionHistory struct { - ClusterActionHistory []ClusterActionHistory `xml:"ClusterActionHistory,omitempty"` -} - -func init() { - t["ArrayOfClusterActionHistory"] = reflect.TypeOf((*ArrayOfClusterActionHistory)(nil)).Elem() -} - -type ArrayOfClusterAttemptedVmInfo struct { - ClusterAttemptedVmInfo []ClusterAttemptedVmInfo `xml:"ClusterAttemptedVmInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterAttemptedVmInfo)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceDVSSetting struct { - ClusterComputeResourceDVSSetting []ClusterComputeResourceDVSSetting `xml:"ClusterComputeResourceDVSSetting,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceDVSSetting"] = reflect.TypeOf((*ArrayOfClusterComputeResourceDVSSetting)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceDVSSettingDVPortgroupToServiceMapping struct { - ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping []ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping `xml:"ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceDVSSettingDVPortgroupToServiceMapping"] = reflect.TypeOf((*ArrayOfClusterComputeResourceDVSSettingDVPortgroupToServiceMapping)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceDvsProfile struct { - ClusterComputeResourceDvsProfile []ClusterComputeResourceDvsProfile `xml:"ClusterComputeResourceDvsProfile,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceDvsProfile"] = reflect.TypeOf((*ArrayOfClusterComputeResourceDvsProfile)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping struct { - ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping []ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping `xml:"ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping"] = reflect.TypeOf((*ArrayOfClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceHostConfigurationInput struct { - ClusterComputeResourceHostConfigurationInput []ClusterComputeResourceHostConfigurationInput `xml:"ClusterComputeResourceHostConfigurationInput,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceHostConfigurationInput"] = reflect.TypeOf((*ArrayOfClusterComputeResourceHostConfigurationInput)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceHostVmkNicInfo struct { - ClusterComputeResourceHostVmkNicInfo []ClusterComputeResourceHostVmkNicInfo `xml:"ClusterComputeResourceHostVmkNicInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceHostVmkNicInfo"] = reflect.TypeOf((*ArrayOfClusterComputeResourceHostVmkNicInfo)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceValidationResultBase struct { - ClusterComputeResourceValidationResultBase []BaseClusterComputeResourceValidationResultBase `xml:"ClusterComputeResourceValidationResultBase,omitempty,typeattr"` -} - -func init() { - t["ArrayOfClusterComputeResourceValidationResultBase"] = reflect.TypeOf((*ArrayOfClusterComputeResourceValidationResultBase)(nil)).Elem() -} - -type ArrayOfClusterComputeResourceVcsSlots struct { - ClusterComputeResourceVcsSlots []ClusterComputeResourceVcsSlots `xml:"ClusterComputeResourceVcsSlots,omitempty"` -} - -func init() { - t["ArrayOfClusterComputeResourceVcsSlots"] = reflect.TypeOf((*ArrayOfClusterComputeResourceVcsSlots)(nil)).Elem() -} - -type ArrayOfClusterDasAamNodeState struct { - ClusterDasAamNodeState []ClusterDasAamNodeState `xml:"ClusterDasAamNodeState,omitempty"` -} - -func init() { - t["ArrayOfClusterDasAamNodeState"] = reflect.TypeOf((*ArrayOfClusterDasAamNodeState)(nil)).Elem() -} - -type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct { - ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots,omitempty"` -} - -func init() { - t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem() -} - -type ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct { - ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots `xml:"ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots,omitempty"` -} - -func init() { - t["ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ArrayOfClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem() -} - -type ArrayOfClusterDasVmConfigInfo struct { - ClusterDasVmConfigInfo []ClusterDasVmConfigInfo `xml:"ClusterDasVmConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterDasVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigInfo)(nil)).Elem() -} - -type ArrayOfClusterDasVmConfigSpec struct { - ClusterDasVmConfigSpec []ClusterDasVmConfigSpec `xml:"ClusterDasVmConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterDasVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDasVmConfigSpec)(nil)).Elem() -} - -type ArrayOfClusterDatastoreUpdateSpec struct { - ClusterDatastoreUpdateSpec []ClusterDatastoreUpdateSpec `xml:"ClusterDatastoreUpdateSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterDatastoreUpdateSpec"] = reflect.TypeOf((*ArrayOfClusterDatastoreUpdateSpec)(nil)).Elem() -} - -type ArrayOfClusterDpmHostConfigInfo struct { - ClusterDpmHostConfigInfo []ClusterDpmHostConfigInfo `xml:"ClusterDpmHostConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterDpmHostConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigInfo)(nil)).Elem() -} - -type ArrayOfClusterDpmHostConfigSpec struct { - ClusterDpmHostConfigSpec []ClusterDpmHostConfigSpec `xml:"ClusterDpmHostConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterDpmHostConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDpmHostConfigSpec)(nil)).Elem() -} - -type ArrayOfClusterDrsFaults struct { - ClusterDrsFaults []ClusterDrsFaults `xml:"ClusterDrsFaults,omitempty"` -} - -func init() { - t["ArrayOfClusterDrsFaults"] = reflect.TypeOf((*ArrayOfClusterDrsFaults)(nil)).Elem() -} - -type ArrayOfClusterDrsFaultsFaultsByVm struct { - ClusterDrsFaultsFaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"ClusterDrsFaultsFaultsByVm,omitempty,typeattr"` -} - -func init() { - t["ArrayOfClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ArrayOfClusterDrsFaultsFaultsByVm)(nil)).Elem() -} - -type ArrayOfClusterDrsMigration struct { - ClusterDrsMigration []ClusterDrsMigration `xml:"ClusterDrsMigration,omitempty"` -} - -func init() { - t["ArrayOfClusterDrsMigration"] = reflect.TypeOf((*ArrayOfClusterDrsMigration)(nil)).Elem() -} - -type ArrayOfClusterDrsRecommendation struct { - ClusterDrsRecommendation []ClusterDrsRecommendation `xml:"ClusterDrsRecommendation,omitempty"` -} - -func init() { - t["ArrayOfClusterDrsRecommendation"] = reflect.TypeOf((*ArrayOfClusterDrsRecommendation)(nil)).Elem() -} - -type ArrayOfClusterDrsVmConfigInfo struct { - ClusterDrsVmConfigInfo []ClusterDrsVmConfigInfo `xml:"ClusterDrsVmConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigInfo)(nil)).Elem() -} - -type ArrayOfClusterDrsVmConfigSpec struct { - ClusterDrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"ClusterDrsVmConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfClusterDrsVmConfigSpec)(nil)).Elem() -} - -type ArrayOfClusterEVCManagerCheckResult struct { - ClusterEVCManagerCheckResult []ClusterEVCManagerCheckResult `xml:"ClusterEVCManagerCheckResult,omitempty"` -} - -func init() { - t["ArrayOfClusterEVCManagerCheckResult"] = reflect.TypeOf((*ArrayOfClusterEVCManagerCheckResult)(nil)).Elem() -} - -type ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus struct { - ClusterFailoverHostAdmissionControlInfoHostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"ClusterFailoverHostAdmissionControlInfoHostStatus,omitempty"` -} - -func init() { - t["ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem() -} - -type ArrayOfClusterGroupInfo struct { - ClusterGroupInfo []BaseClusterGroupInfo `xml:"ClusterGroupInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfClusterGroupInfo"] = reflect.TypeOf((*ArrayOfClusterGroupInfo)(nil)).Elem() -} - -type ArrayOfClusterGroupSpec struct { - ClusterGroupSpec []ClusterGroupSpec `xml:"ClusterGroupSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterGroupSpec"] = reflect.TypeOf((*ArrayOfClusterGroupSpec)(nil)).Elem() -} - -type ArrayOfClusterHostRecommendation struct { - ClusterHostRecommendation []ClusterHostRecommendation `xml:"ClusterHostRecommendation,omitempty"` -} - -func init() { - t["ArrayOfClusterHostRecommendation"] = reflect.TypeOf((*ArrayOfClusterHostRecommendation)(nil)).Elem() -} - -type ArrayOfClusterIoFilterInfo struct { - ClusterIoFilterInfo []ClusterIoFilterInfo `xml:"ClusterIoFilterInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterIoFilterInfo"] = reflect.TypeOf((*ArrayOfClusterIoFilterInfo)(nil)).Elem() -} - -type ArrayOfClusterNotAttemptedVmInfo struct { - ClusterNotAttemptedVmInfo []ClusterNotAttemptedVmInfo `xml:"ClusterNotAttemptedVmInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ArrayOfClusterNotAttemptedVmInfo)(nil)).Elem() -} - -type ArrayOfClusterRecommendation struct { - ClusterRecommendation []ClusterRecommendation `xml:"ClusterRecommendation,omitempty"` -} - -func init() { - t["ArrayOfClusterRecommendation"] = reflect.TypeOf((*ArrayOfClusterRecommendation)(nil)).Elem() -} - -type ArrayOfClusterRuleInfo struct { - ClusterRuleInfo []BaseClusterRuleInfo `xml:"ClusterRuleInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfClusterRuleInfo"] = reflect.TypeOf((*ArrayOfClusterRuleInfo)(nil)).Elem() -} - -type ArrayOfClusterRuleSpec struct { - ClusterRuleSpec []ClusterRuleSpec `xml:"ClusterRuleSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterRuleSpec"] = reflect.TypeOf((*ArrayOfClusterRuleSpec)(nil)).Elem() -} - -type ArrayOfClusterTagCategoryUpdateSpec struct { - ClusterTagCategoryUpdateSpec []ClusterTagCategoryUpdateSpec `xml:"ClusterTagCategoryUpdateSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterTagCategoryUpdateSpec"] = reflect.TypeOf((*ArrayOfClusterTagCategoryUpdateSpec)(nil)).Elem() -} - -type ArrayOfClusterVmOrchestrationInfo struct { - ClusterVmOrchestrationInfo []ClusterVmOrchestrationInfo `xml:"ClusterVmOrchestrationInfo,omitempty"` -} - -func init() { - t["ArrayOfClusterVmOrchestrationInfo"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationInfo)(nil)).Elem() -} - -type ArrayOfClusterVmOrchestrationSpec struct { - ClusterVmOrchestrationSpec []ClusterVmOrchestrationSpec `xml:"ClusterVmOrchestrationSpec,omitempty"` -} - -func init() { - t["ArrayOfClusterVmOrchestrationSpec"] = reflect.TypeOf((*ArrayOfClusterVmOrchestrationSpec)(nil)).Elem() -} - -type ArrayOfComplianceFailure struct { - ComplianceFailure []ComplianceFailure `xml:"ComplianceFailure,omitempty"` -} - -func init() { - t["ArrayOfComplianceFailure"] = reflect.TypeOf((*ArrayOfComplianceFailure)(nil)).Elem() -} - -type ArrayOfComplianceFailureComplianceFailureValues struct { - ComplianceFailureComplianceFailureValues []ComplianceFailureComplianceFailureValues `xml:"ComplianceFailureComplianceFailureValues,omitempty"` -} - -func init() { - t["ArrayOfComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ArrayOfComplianceFailureComplianceFailureValues)(nil)).Elem() -} - -type ArrayOfComplianceLocator struct { - ComplianceLocator []ComplianceLocator `xml:"ComplianceLocator,omitempty"` -} - -func init() { - t["ArrayOfComplianceLocator"] = reflect.TypeOf((*ArrayOfComplianceLocator)(nil)).Elem() -} - -type ArrayOfComplianceResult struct { - ComplianceResult []ComplianceResult `xml:"ComplianceResult,omitempty"` -} - -func init() { - t["ArrayOfComplianceResult"] = reflect.TypeOf((*ArrayOfComplianceResult)(nil)).Elem() -} - -type ArrayOfComputeResourceHostSPBMLicenseInfo struct { - ComputeResourceHostSPBMLicenseInfo []ComputeResourceHostSPBMLicenseInfo `xml:"ComputeResourceHostSPBMLicenseInfo,omitempty"` -} - -func init() { - t["ArrayOfComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ArrayOfComputeResourceHostSPBMLicenseInfo)(nil)).Elem() -} - -type ArrayOfConflictingConfigurationConfig struct { - ConflictingConfigurationConfig []ConflictingConfigurationConfig `xml:"ConflictingConfigurationConfig,omitempty"` -} - -func init() { - t["ArrayOfConflictingConfigurationConfig"] = reflect.TypeOf((*ArrayOfConflictingConfigurationConfig)(nil)).Elem() -} - -type ArrayOfCryptoKeyId struct { - CryptoKeyId []CryptoKeyId `xml:"CryptoKeyId,omitempty"` -} - -func init() { - t["ArrayOfCryptoKeyId"] = reflect.TypeOf((*ArrayOfCryptoKeyId)(nil)).Elem() -} - -type ArrayOfCryptoKeyPlain struct { - CryptoKeyPlain []CryptoKeyPlain `xml:"CryptoKeyPlain,omitempty"` -} - -func init() { - t["ArrayOfCryptoKeyPlain"] = reflect.TypeOf((*ArrayOfCryptoKeyPlain)(nil)).Elem() -} - -type ArrayOfCryptoKeyResult struct { - CryptoKeyResult []CryptoKeyResult `xml:"CryptoKeyResult,omitempty"` -} - -func init() { - t["ArrayOfCryptoKeyResult"] = reflect.TypeOf((*ArrayOfCryptoKeyResult)(nil)).Elem() -} - -type ArrayOfCryptoManagerKmipClusterStatus struct { - CryptoManagerKmipClusterStatus []CryptoManagerKmipClusterStatus `xml:"CryptoManagerKmipClusterStatus,omitempty"` -} - -func init() { - t["ArrayOfCryptoManagerKmipClusterStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipClusterStatus)(nil)).Elem() -} - -type ArrayOfCryptoManagerKmipCryptoKeyStatus struct { - CryptoManagerKmipCryptoKeyStatus []CryptoManagerKmipCryptoKeyStatus `xml:"CryptoManagerKmipCryptoKeyStatus,omitempty"` -} - -func init() { - t["ArrayOfCryptoManagerKmipCryptoKeyStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipCryptoKeyStatus)(nil)).Elem() -} - -type ArrayOfCryptoManagerKmipServerStatus struct { - CryptoManagerKmipServerStatus []CryptoManagerKmipServerStatus `xml:"CryptoManagerKmipServerStatus,omitempty"` -} - -func init() { - t["ArrayOfCryptoManagerKmipServerStatus"] = reflect.TypeOf((*ArrayOfCryptoManagerKmipServerStatus)(nil)).Elem() -} - -type ArrayOfCustomFieldDef struct { - CustomFieldDef []CustomFieldDef `xml:"CustomFieldDef,omitempty"` -} - -func init() { - t["ArrayOfCustomFieldDef"] = reflect.TypeOf((*ArrayOfCustomFieldDef)(nil)).Elem() -} - -type ArrayOfCustomFieldValue struct { - CustomFieldValue []BaseCustomFieldValue `xml:"CustomFieldValue,omitempty,typeattr"` -} - -func init() { - t["ArrayOfCustomFieldValue"] = reflect.TypeOf((*ArrayOfCustomFieldValue)(nil)).Elem() -} - -type ArrayOfCustomizationAdapterMapping struct { - CustomizationAdapterMapping []CustomizationAdapterMapping `xml:"CustomizationAdapterMapping,omitempty"` -} - -func init() { - t["ArrayOfCustomizationAdapterMapping"] = reflect.TypeOf((*ArrayOfCustomizationAdapterMapping)(nil)).Elem() -} - -type ArrayOfCustomizationIpV6Generator struct { - CustomizationIpV6Generator []BaseCustomizationIpV6Generator `xml:"CustomizationIpV6Generator,omitempty,typeattr"` -} - -func init() { - t["ArrayOfCustomizationIpV6Generator"] = reflect.TypeOf((*ArrayOfCustomizationIpV6Generator)(nil)).Elem() -} - -type ArrayOfCustomizationSpecInfo struct { - CustomizationSpecInfo []CustomizationSpecInfo `xml:"CustomizationSpecInfo,omitempty"` -} - -func init() { - t["ArrayOfCustomizationSpecInfo"] = reflect.TypeOf((*ArrayOfCustomizationSpecInfo)(nil)).Elem() -} - -type ArrayOfDVPortConfigSpec struct { - DVPortConfigSpec []DVPortConfigSpec `xml:"DVPortConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfDVPortConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortConfigSpec)(nil)).Elem() -} - -type ArrayOfDVPortgroupConfigSpec struct { - DVPortgroupConfigSpec []DVPortgroupConfigSpec `xml:"DVPortgroupConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfDVPortgroupConfigSpec"] = reflect.TypeOf((*ArrayOfDVPortgroupConfigSpec)(nil)).Elem() -} - -type ArrayOfDVSHealthCheckConfig struct { - DVSHealthCheckConfig []BaseDVSHealthCheckConfig `xml:"DVSHealthCheckConfig,omitempty,typeattr"` -} - -func init() { - t["ArrayOfDVSHealthCheckConfig"] = reflect.TypeOf((*ArrayOfDVSHealthCheckConfig)(nil)).Elem() -} - -type ArrayOfDVSManagerPhysicalNicsList struct { - DVSManagerPhysicalNicsList []DVSManagerPhysicalNicsList `xml:"DVSManagerPhysicalNicsList,omitempty"` -} - -func init() { - t["ArrayOfDVSManagerPhysicalNicsList"] = reflect.TypeOf((*ArrayOfDVSManagerPhysicalNicsList)(nil)).Elem() -} - -type ArrayOfDVSNetworkResourcePool struct { - DVSNetworkResourcePool []DVSNetworkResourcePool `xml:"DVSNetworkResourcePool,omitempty"` -} - -func init() { - t["ArrayOfDVSNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePool)(nil)).Elem() -} - -type ArrayOfDVSNetworkResourcePoolConfigSpec struct { - DVSNetworkResourcePoolConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"DVSNetworkResourcePoolConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfDVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDVSNetworkResourcePoolConfigSpec)(nil)).Elem() -} - -type ArrayOfDVSVmVnicNetworkResourcePool struct { - DVSVmVnicNetworkResourcePool []DVSVmVnicNetworkResourcePool `xml:"DVSVmVnicNetworkResourcePool,omitempty"` -} - -func init() { - t["ArrayOfDVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*ArrayOfDVSVmVnicNetworkResourcePool)(nil)).Elem() -} - -type ArrayOfDasHeartbeatDatastoreInfo struct { - DasHeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo `xml:"DasHeartbeatDatastoreInfo,omitempty"` -} - -func init() { - t["ArrayOfDasHeartbeatDatastoreInfo"] = reflect.TypeOf((*ArrayOfDasHeartbeatDatastoreInfo)(nil)).Elem() -} - -type ArrayOfDatacenterBasicConnectInfo struct { - DatacenterBasicConnectInfo []DatacenterBasicConnectInfo `xml:"DatacenterBasicConnectInfo,omitempty"` -} - -func init() { - t["ArrayOfDatacenterBasicConnectInfo"] = reflect.TypeOf((*ArrayOfDatacenterBasicConnectInfo)(nil)).Elem() -} - -type ArrayOfDatacenterMismatchArgument struct { - DatacenterMismatchArgument []DatacenterMismatchArgument `xml:"DatacenterMismatchArgument,omitempty"` -} - -func init() { - t["ArrayOfDatacenterMismatchArgument"] = reflect.TypeOf((*ArrayOfDatacenterMismatchArgument)(nil)).Elem() -} - -type ArrayOfDatastoreHostMount struct { - DatastoreHostMount []DatastoreHostMount `xml:"DatastoreHostMount,omitempty"` -} - -func init() { - t["ArrayOfDatastoreHostMount"] = reflect.TypeOf((*ArrayOfDatastoreHostMount)(nil)).Elem() -} - -type ArrayOfDatastoreMountPathDatastorePair struct { - DatastoreMountPathDatastorePair []DatastoreMountPathDatastorePair `xml:"DatastoreMountPathDatastorePair,omitempty"` -} - -func init() { - t["ArrayOfDatastoreMountPathDatastorePair"] = reflect.TypeOf((*ArrayOfDatastoreMountPathDatastorePair)(nil)).Elem() -} - -type ArrayOfDatastoreVVolContainerFailoverPair struct { - DatastoreVVolContainerFailoverPair []DatastoreVVolContainerFailoverPair `xml:"DatastoreVVolContainerFailoverPair,omitempty"` -} - -func init() { - t["ArrayOfDatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*ArrayOfDatastoreVVolContainerFailoverPair)(nil)).Elem() -} - -type ArrayOfDesiredSoftwareSpecComponentSpec struct { - DesiredSoftwareSpecComponentSpec []DesiredSoftwareSpecComponentSpec `xml:"DesiredSoftwareSpecComponentSpec,omitempty"` -} - -func init() { - t["ArrayOfDesiredSoftwareSpecComponentSpec"] = reflect.TypeOf((*ArrayOfDesiredSoftwareSpecComponentSpec)(nil)).Elem() -} - -type ArrayOfDiagnosticManagerBundleInfo struct { - DiagnosticManagerBundleInfo []DiagnosticManagerBundleInfo `xml:"DiagnosticManagerBundleInfo,omitempty"` -} - -func init() { - t["ArrayOfDiagnosticManagerBundleInfo"] = reflect.TypeOf((*ArrayOfDiagnosticManagerBundleInfo)(nil)).Elem() -} - -type ArrayOfDiagnosticManagerLogDescriptor struct { - DiagnosticManagerLogDescriptor []DiagnosticManagerLogDescriptor `xml:"DiagnosticManagerLogDescriptor,omitempty"` -} - -func init() { - t["ArrayOfDiagnosticManagerLogDescriptor"] = reflect.TypeOf((*ArrayOfDiagnosticManagerLogDescriptor)(nil)).Elem() -} - -type ArrayOfDiskChangeExtent struct { - DiskChangeExtent []DiskChangeExtent `xml:"DiskChangeExtent,omitempty"` -} - -func init() { - t["ArrayOfDiskChangeExtent"] = reflect.TypeOf((*ArrayOfDiskChangeExtent)(nil)).Elem() -} - -type ArrayOfDistributedVirtualPort struct { - DistributedVirtualPort []DistributedVirtualPort `xml:"DistributedVirtualPort,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualPort"] = reflect.TypeOf((*ArrayOfDistributedVirtualPort)(nil)).Elem() -} - -type ArrayOfDistributedVirtualPortgroupInfo struct { - DistributedVirtualPortgroupInfo []DistributedVirtualPortgroupInfo `xml:"DistributedVirtualPortgroupInfo,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualPortgroupInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualPortgroupInfo)(nil)).Elem() -} - -type ArrayOfDistributedVirtualPortgroupProblem struct { - DistributedVirtualPortgroupProblem []DistributedVirtualPortgroupProblem `xml:"DistributedVirtualPortgroupProblem,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualPortgroupProblem"] = reflect.TypeOf((*ArrayOfDistributedVirtualPortgroupProblem)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchHostMember struct { - DistributedVirtualSwitchHostMember []DistributedVirtualSwitchHostMember `xml:"DistributedVirtualSwitchHostMember,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchHostMember"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMember)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchHostMemberConfigSpec struct { - DistributedVirtualSwitchHostMemberConfigSpec []DistributedVirtualSwitchHostMemberConfigSpec `xml:"DistributedVirtualSwitchHostMemberConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchHostMemberPnicSpec struct { - DistributedVirtualSwitchHostMemberPnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"DistributedVirtualSwitchHostMemberPnicSpec,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchHostMemberTransportZoneInfo struct { - DistributedVirtualSwitchHostMemberTransportZoneInfo []DistributedVirtualSwitchHostMemberTransportZoneInfo `xml:"DistributedVirtualSwitchHostMemberTransportZoneInfo,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchHostMemberTransportZoneInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostMemberTransportZoneInfo)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchHostProductSpec struct { - DistributedVirtualSwitchHostProductSpec []DistributedVirtualSwitchHostProductSpec `xml:"DistributedVirtualSwitchHostProductSpec,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchHostProductSpec)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchInfo struct { - DistributedVirtualSwitchInfo []DistributedVirtualSwitchInfo `xml:"DistributedVirtualSwitchInfo,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchInfo"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchInfo)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob struct { - DistributedVirtualSwitchKeyedOpaqueBlob []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"DistributedVirtualSwitchKeyedOpaqueBlob,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchManagerCompatibilityResult struct { - DistributedVirtualSwitchManagerCompatibilityResult []DistributedVirtualSwitchManagerCompatibilityResult `xml:"DistributedVirtualSwitchManagerCompatibilityResult,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec struct { - DistributedVirtualSwitchManagerHostDvsFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"DistributedVirtualSwitchManagerHostDvsFilterSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchNetworkOffloadSpec struct { - DistributedVirtualSwitchNetworkOffloadSpec []DistributedVirtualSwitchNetworkOffloadSpec `xml:"DistributedVirtualSwitchNetworkOffloadSpec,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchNetworkOffloadSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchNetworkOffloadSpec)(nil)).Elem() -} - -type ArrayOfDistributedVirtualSwitchProductSpec struct { - DistributedVirtualSwitchProductSpec []DistributedVirtualSwitchProductSpec `xml:"DistributedVirtualSwitchProductSpec,omitempty"` -} - -func init() { - t["ArrayOfDistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*ArrayOfDistributedVirtualSwitchProductSpec)(nil)).Elem() -} - -type ArrayOfDouble struct { - Double []float64 `xml:"double,omitempty"` -} - -func init() { - t["ArrayOfDouble"] = reflect.TypeOf((*ArrayOfDouble)(nil)).Elem() -} - -type ArrayOfDpuStatusInfo struct { - DpuStatusInfo []DpuStatusInfo `xml:"DpuStatusInfo,omitempty"` -} - -func init() { - t["ArrayOfDpuStatusInfo"] = reflect.TypeOf((*ArrayOfDpuStatusInfo)(nil)).Elem() -} - -type ArrayOfDpuStatusInfoOperationalInfo struct { - DpuStatusInfoOperationalInfo []DpuStatusInfoOperationalInfo `xml:"DpuStatusInfoOperationalInfo,omitempty"` -} - -func init() { - t["ArrayOfDpuStatusInfoOperationalInfo"] = reflect.TypeOf((*ArrayOfDpuStatusInfoOperationalInfo)(nil)).Elem() -} - -type ArrayOfDvsApplyOperationFaultFaultOnObject struct { - DvsApplyOperationFaultFaultOnObject []DvsApplyOperationFaultFaultOnObject `xml:"DvsApplyOperationFaultFaultOnObject,omitempty"` -} - -func init() { - t["ArrayOfDvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*ArrayOfDvsApplyOperationFaultFaultOnObject)(nil)).Elem() -} - -type ArrayOfDvsFilterConfig struct { - DvsFilterConfig []BaseDvsFilterConfig `xml:"DvsFilterConfig,omitempty,typeattr"` -} - -func init() { - t["ArrayOfDvsFilterConfig"] = reflect.TypeOf((*ArrayOfDvsFilterConfig)(nil)).Elem() -} - -type ArrayOfDvsHostInfrastructureTrafficResource struct { - DvsHostInfrastructureTrafficResource []DvsHostInfrastructureTrafficResource `xml:"DvsHostInfrastructureTrafficResource,omitempty"` -} - -func init() { - t["ArrayOfDvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*ArrayOfDvsHostInfrastructureTrafficResource)(nil)).Elem() -} - -type ArrayOfDvsHostVNicProfile struct { - DvsHostVNicProfile []DvsHostVNicProfile `xml:"DvsHostVNicProfile,omitempty"` -} - -func init() { - t["ArrayOfDvsHostVNicProfile"] = reflect.TypeOf((*ArrayOfDvsHostVNicProfile)(nil)).Elem() -} - -type ArrayOfDvsNetworkRuleQualifier struct { - DvsNetworkRuleQualifier []BaseDvsNetworkRuleQualifier `xml:"DvsNetworkRuleQualifier,omitempty,typeattr"` -} - -func init() { - t["ArrayOfDvsNetworkRuleQualifier"] = reflect.TypeOf((*ArrayOfDvsNetworkRuleQualifier)(nil)).Elem() -} - -type ArrayOfDvsOperationBulkFaultFaultOnHost struct { - DvsOperationBulkFaultFaultOnHost []DvsOperationBulkFaultFaultOnHost `xml:"DvsOperationBulkFaultFaultOnHost,omitempty"` -} - -func init() { - t["ArrayOfDvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*ArrayOfDvsOperationBulkFaultFaultOnHost)(nil)).Elem() -} - -type ArrayOfDvsOutOfSyncHostArgument struct { - DvsOutOfSyncHostArgument []DvsOutOfSyncHostArgument `xml:"DvsOutOfSyncHostArgument,omitempty"` -} - -func init() { - t["ArrayOfDvsOutOfSyncHostArgument"] = reflect.TypeOf((*ArrayOfDvsOutOfSyncHostArgument)(nil)).Elem() -} - -type ArrayOfDvsProfile struct { - DvsProfile []DvsProfile `xml:"DvsProfile,omitempty"` -} - -func init() { - t["ArrayOfDvsProfile"] = reflect.TypeOf((*ArrayOfDvsProfile)(nil)).Elem() -} - -type ArrayOfDvsServiceConsoleVNicProfile struct { - DvsServiceConsoleVNicProfile []DvsServiceConsoleVNicProfile `xml:"DvsServiceConsoleVNicProfile,omitempty"` -} - -func init() { - t["ArrayOfDvsServiceConsoleVNicProfile"] = reflect.TypeOf((*ArrayOfDvsServiceConsoleVNicProfile)(nil)).Elem() -} - -type ArrayOfDvsTrafficRule struct { - DvsTrafficRule []DvsTrafficRule `xml:"DvsTrafficRule,omitempty"` -} - -func init() { - t["ArrayOfDvsTrafficRule"] = reflect.TypeOf((*ArrayOfDvsTrafficRule)(nil)).Elem() -} - -type ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo struct { - DvsVmVnicNetworkResourcePoolRuntimeInfo []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"DvsVmVnicNetworkResourcePoolRuntimeInfo,omitempty"` -} - -func init() { - t["ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*ArrayOfDvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem() -} - -type ArrayOfDvsVmVnicResourcePoolConfigSpec struct { - DvsVmVnicResourcePoolConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"DvsVmVnicResourcePoolConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfDvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*ArrayOfDvsVmVnicResourcePoolConfigSpec)(nil)).Elem() -} - -type ArrayOfDvsVnicAllocatedResource struct { - DvsVnicAllocatedResource []DvsVnicAllocatedResource `xml:"DvsVnicAllocatedResource,omitempty"` -} - -func init() { - t["ArrayOfDvsVnicAllocatedResource"] = reflect.TypeOf((*ArrayOfDvsVnicAllocatedResource)(nil)).Elem() -} - -type ArrayOfDynamicProperty struct { - DynamicProperty []DynamicProperty `xml:"DynamicProperty,omitempty"` -} - -func init() { - t["ArrayOfDynamicProperty"] = reflect.TypeOf((*ArrayOfDynamicProperty)(nil)).Elem() -} - -type ArrayOfEVCMode struct { - EVCMode []EVCMode `xml:"EVCMode,omitempty"` -} - -func init() { - t["ArrayOfEVCMode"] = reflect.TypeOf((*ArrayOfEVCMode)(nil)).Elem() -} - -type ArrayOfElementDescription struct { - ElementDescription []BaseElementDescription `xml:"ElementDescription,omitempty,typeattr"` -} - -func init() { - t["ArrayOfElementDescription"] = reflect.TypeOf((*ArrayOfElementDescription)(nil)).Elem() -} - -type ArrayOfEntityBackupConfig struct { - EntityBackupConfig []EntityBackupConfig `xml:"EntityBackupConfig,omitempty"` -} - -func init() { - t["ArrayOfEntityBackupConfig"] = reflect.TypeOf((*ArrayOfEntityBackupConfig)(nil)).Elem() -} - -type ArrayOfEntityPrivilege struct { - EntityPrivilege []EntityPrivilege `xml:"EntityPrivilege,omitempty"` -} - -func init() { - t["ArrayOfEntityPrivilege"] = reflect.TypeOf((*ArrayOfEntityPrivilege)(nil)).Elem() -} - -type ArrayOfEnumDescription struct { - EnumDescription []EnumDescription `xml:"EnumDescription,omitempty"` -} - -func init() { - t["ArrayOfEnumDescription"] = reflect.TypeOf((*ArrayOfEnumDescription)(nil)).Elem() -} - -type ArrayOfEvent struct { - Event []BaseEvent `xml:"Event,omitempty,typeattr"` -} - -func init() { - t["ArrayOfEvent"] = reflect.TypeOf((*ArrayOfEvent)(nil)).Elem() -} - -type ArrayOfEventAlarmExpressionComparison struct { - EventAlarmExpressionComparison []EventAlarmExpressionComparison `xml:"EventAlarmExpressionComparison,omitempty"` -} - -func init() { - t["ArrayOfEventAlarmExpressionComparison"] = reflect.TypeOf((*ArrayOfEventAlarmExpressionComparison)(nil)).Elem() -} - -type ArrayOfEventArgDesc struct { - EventArgDesc []EventArgDesc `xml:"EventArgDesc,omitempty"` -} - -func init() { - t["ArrayOfEventArgDesc"] = reflect.TypeOf((*ArrayOfEventArgDesc)(nil)).Elem() -} - -type ArrayOfEventDescriptionEventDetail struct { - EventDescriptionEventDetail []EventDescriptionEventDetail `xml:"EventDescriptionEventDetail,omitempty"` -} - -func init() { - t["ArrayOfEventDescriptionEventDetail"] = reflect.TypeOf((*ArrayOfEventDescriptionEventDetail)(nil)).Elem() -} - -type ArrayOfExtManagedEntityInfo struct { - ExtManagedEntityInfo []ExtManagedEntityInfo `xml:"ExtManagedEntityInfo,omitempty"` -} - -func init() { - t["ArrayOfExtManagedEntityInfo"] = reflect.TypeOf((*ArrayOfExtManagedEntityInfo)(nil)).Elem() -} - -type ArrayOfExtSolutionManagerInfoTabInfo struct { - ExtSolutionManagerInfoTabInfo []ExtSolutionManagerInfoTabInfo `xml:"ExtSolutionManagerInfoTabInfo,omitempty"` -} - -func init() { - t["ArrayOfExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ArrayOfExtSolutionManagerInfoTabInfo)(nil)).Elem() -} - -type ArrayOfExtendedEventPair struct { - ExtendedEventPair []ExtendedEventPair `xml:"ExtendedEventPair,omitempty"` -} - -func init() { - t["ArrayOfExtendedEventPair"] = reflect.TypeOf((*ArrayOfExtendedEventPair)(nil)).Elem() -} - -type ArrayOfExtension struct { - Extension []Extension `xml:"Extension,omitempty"` -} - -func init() { - t["ArrayOfExtension"] = reflect.TypeOf((*ArrayOfExtension)(nil)).Elem() -} - -type ArrayOfExtensionClientInfo struct { - ExtensionClientInfo []ExtensionClientInfo `xml:"ExtensionClientInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionClientInfo"] = reflect.TypeOf((*ArrayOfExtensionClientInfo)(nil)).Elem() -} - -type ArrayOfExtensionEventTypeInfo struct { - ExtensionEventTypeInfo []ExtensionEventTypeInfo `xml:"ExtensionEventTypeInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionEventTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionEventTypeInfo)(nil)).Elem() -} - -type ArrayOfExtensionFaultTypeInfo struct { - ExtensionFaultTypeInfo []ExtensionFaultTypeInfo `xml:"ExtensionFaultTypeInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionFaultTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionFaultTypeInfo)(nil)).Elem() -} - -type ArrayOfExtensionManagerIpAllocationUsage struct { - ExtensionManagerIpAllocationUsage []ExtensionManagerIpAllocationUsage `xml:"ExtensionManagerIpAllocationUsage,omitempty"` -} - -func init() { - t["ArrayOfExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ArrayOfExtensionManagerIpAllocationUsage)(nil)).Elem() -} - -type ArrayOfExtensionPrivilegeInfo struct { - ExtensionPrivilegeInfo []ExtensionPrivilegeInfo `xml:"ExtensionPrivilegeInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionPrivilegeInfo"] = reflect.TypeOf((*ArrayOfExtensionPrivilegeInfo)(nil)).Elem() -} - -type ArrayOfExtensionResourceInfo struct { - ExtensionResourceInfo []ExtensionResourceInfo `xml:"ExtensionResourceInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionResourceInfo"] = reflect.TypeOf((*ArrayOfExtensionResourceInfo)(nil)).Elem() -} - -type ArrayOfExtensionServerInfo struct { - ExtensionServerInfo []ExtensionServerInfo `xml:"ExtensionServerInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionServerInfo"] = reflect.TypeOf((*ArrayOfExtensionServerInfo)(nil)).Elem() -} - -type ArrayOfExtensionTaskTypeInfo struct { - ExtensionTaskTypeInfo []ExtensionTaskTypeInfo `xml:"ExtensionTaskTypeInfo,omitempty"` -} - -func init() { - t["ArrayOfExtensionTaskTypeInfo"] = reflect.TypeOf((*ArrayOfExtensionTaskTypeInfo)(nil)).Elem() -} - -type ArrayOfFaultToleranceDiskSpec struct { - FaultToleranceDiskSpec []FaultToleranceDiskSpec `xml:"FaultToleranceDiskSpec,omitempty"` -} - -func init() { - t["ArrayOfFaultToleranceDiskSpec"] = reflect.TypeOf((*ArrayOfFaultToleranceDiskSpec)(nil)).Elem() -} - -type ArrayOfFaultsByHost struct { - FaultsByHost []FaultsByHost `xml:"FaultsByHost,omitempty"` -} - -func init() { - t["ArrayOfFaultsByHost"] = reflect.TypeOf((*ArrayOfFaultsByHost)(nil)).Elem() -} - -type ArrayOfFaultsByVM struct { - FaultsByVM []FaultsByVM `xml:"FaultsByVM,omitempty"` -} - -func init() { - t["ArrayOfFaultsByVM"] = reflect.TypeOf((*ArrayOfFaultsByVM)(nil)).Elem() -} - -type ArrayOfFcoeConfigVlanRange struct { - FcoeConfigVlanRange []FcoeConfigVlanRange `xml:"FcoeConfigVlanRange,omitempty"` -} - -func init() { - t["ArrayOfFcoeConfigVlanRange"] = reflect.TypeOf((*ArrayOfFcoeConfigVlanRange)(nil)).Elem() -} - -type ArrayOfFeatureEVCMode struct { - FeatureEVCMode []FeatureEVCMode `xml:"FeatureEVCMode,omitempty"` -} - -func init() { - t["ArrayOfFeatureEVCMode"] = reflect.TypeOf((*ArrayOfFeatureEVCMode)(nil)).Elem() -} - -type ArrayOfFileInfo struct { - FileInfo []BaseFileInfo `xml:"FileInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfFileInfo"] = reflect.TypeOf((*ArrayOfFileInfo)(nil)).Elem() -} - -type ArrayOfFileQuery struct { - FileQuery []BaseFileQuery `xml:"FileQuery,omitempty,typeattr"` -} - -func init() { - t["ArrayOfFileQuery"] = reflect.TypeOf((*ArrayOfFileQuery)(nil)).Elem() -} - -type ArrayOfFirewallProfileRulesetProfile struct { - FirewallProfileRulesetProfile []FirewallProfileRulesetProfile `xml:"FirewallProfileRulesetProfile,omitempty"` -} - -func init() { - t["ArrayOfFirewallProfileRulesetProfile"] = reflect.TypeOf((*ArrayOfFirewallProfileRulesetProfile)(nil)).Elem() -} - -type ArrayOfFolderFailedHostResult struct { - FolderFailedHostResult []FolderFailedHostResult `xml:"FolderFailedHostResult,omitempty"` -} - -func init() { - t["ArrayOfFolderFailedHostResult"] = reflect.TypeOf((*ArrayOfFolderFailedHostResult)(nil)).Elem() -} - -type ArrayOfFolderNewHostSpec struct { - FolderNewHostSpec []FolderNewHostSpec `xml:"FolderNewHostSpec,omitempty"` -} - -func init() { - t["ArrayOfFolderNewHostSpec"] = reflect.TypeOf((*ArrayOfFolderNewHostSpec)(nil)).Elem() -} - -type ArrayOfGuestAliases struct { - GuestAliases []GuestAliases `xml:"GuestAliases,omitempty"` -} - -func init() { - t["ArrayOfGuestAliases"] = reflect.TypeOf((*ArrayOfGuestAliases)(nil)).Elem() -} - -type ArrayOfGuestAuthAliasInfo struct { - GuestAuthAliasInfo []GuestAuthAliasInfo `xml:"GuestAuthAliasInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestAuthAliasInfo"] = reflect.TypeOf((*ArrayOfGuestAuthAliasInfo)(nil)).Elem() -} - -type ArrayOfGuestAuthSubject struct { - GuestAuthSubject []BaseGuestAuthSubject `xml:"GuestAuthSubject,omitempty,typeattr"` -} - -func init() { - t["ArrayOfGuestAuthSubject"] = reflect.TypeOf((*ArrayOfGuestAuthSubject)(nil)).Elem() -} - -type ArrayOfGuestDiskInfo struct { - GuestDiskInfo []GuestDiskInfo `xml:"GuestDiskInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestDiskInfo"] = reflect.TypeOf((*ArrayOfGuestDiskInfo)(nil)).Elem() -} - -type ArrayOfGuestFileInfo struct { - GuestFileInfo []GuestFileInfo `xml:"GuestFileInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestFileInfo"] = reflect.TypeOf((*ArrayOfGuestFileInfo)(nil)).Elem() -} - -type ArrayOfGuestInfoNamespaceGenerationInfo struct { - GuestInfoNamespaceGenerationInfo []GuestInfoNamespaceGenerationInfo `xml:"GuestInfoNamespaceGenerationInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*ArrayOfGuestInfoNamespaceGenerationInfo)(nil)).Elem() -} - -type ArrayOfGuestInfoVirtualDiskMapping struct { - GuestInfoVirtualDiskMapping []GuestInfoVirtualDiskMapping `xml:"GuestInfoVirtualDiskMapping,omitempty"` -} - -func init() { - t["ArrayOfGuestInfoVirtualDiskMapping"] = reflect.TypeOf((*ArrayOfGuestInfoVirtualDiskMapping)(nil)).Elem() -} - -type ArrayOfGuestMappedAliases struct { - GuestMappedAliases []GuestMappedAliases `xml:"GuestMappedAliases,omitempty"` -} - -func init() { - t["ArrayOfGuestMappedAliases"] = reflect.TypeOf((*ArrayOfGuestMappedAliases)(nil)).Elem() -} - -type ArrayOfGuestNicInfo struct { - GuestNicInfo []GuestNicInfo `xml:"GuestNicInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestNicInfo"] = reflect.TypeOf((*ArrayOfGuestNicInfo)(nil)).Elem() -} - -type ArrayOfGuestOsDescriptor struct { - GuestOsDescriptor []GuestOsDescriptor `xml:"GuestOsDescriptor,omitempty"` -} - -func init() { - t["ArrayOfGuestOsDescriptor"] = reflect.TypeOf((*ArrayOfGuestOsDescriptor)(nil)).Elem() -} - -type ArrayOfGuestProcessInfo struct { - GuestProcessInfo []GuestProcessInfo `xml:"GuestProcessInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestProcessInfo"] = reflect.TypeOf((*ArrayOfGuestProcessInfo)(nil)).Elem() -} - -type ArrayOfGuestRegKeyRecordSpec struct { - GuestRegKeyRecordSpec []GuestRegKeyRecordSpec `xml:"GuestRegKeyRecordSpec,omitempty"` -} - -func init() { - t["ArrayOfGuestRegKeyRecordSpec"] = reflect.TypeOf((*ArrayOfGuestRegKeyRecordSpec)(nil)).Elem() -} - -type ArrayOfGuestRegValueSpec struct { - GuestRegValueSpec []GuestRegValueSpec `xml:"GuestRegValueSpec,omitempty"` -} - -func init() { - t["ArrayOfGuestRegValueSpec"] = reflect.TypeOf((*ArrayOfGuestRegValueSpec)(nil)).Elem() -} - -type ArrayOfGuestStackInfo struct { - GuestStackInfo []GuestStackInfo `xml:"GuestStackInfo,omitempty"` -} - -func init() { - t["ArrayOfGuestStackInfo"] = reflect.TypeOf((*ArrayOfGuestStackInfo)(nil)).Elem() -} - -type ArrayOfHbrManagerVmReplicationCapability struct { - HbrManagerVmReplicationCapability []HbrManagerVmReplicationCapability `xml:"HbrManagerVmReplicationCapability,omitempty"` -} - -func init() { - t["ArrayOfHbrManagerVmReplicationCapability"] = reflect.TypeOf((*ArrayOfHbrManagerVmReplicationCapability)(nil)).Elem() -} - -type ArrayOfHealthUpdate struct { - HealthUpdate []HealthUpdate `xml:"HealthUpdate,omitempty"` -} - -func init() { - t["ArrayOfHealthUpdate"] = reflect.TypeOf((*ArrayOfHealthUpdate)(nil)).Elem() -} - -type ArrayOfHealthUpdateInfo struct { - HealthUpdateInfo []HealthUpdateInfo `xml:"HealthUpdateInfo,omitempty"` -} - -func init() { - t["ArrayOfHealthUpdateInfo"] = reflect.TypeOf((*ArrayOfHealthUpdateInfo)(nil)).Elem() -} - -type ArrayOfHostAccessControlEntry struct { - HostAccessControlEntry []HostAccessControlEntry `xml:"HostAccessControlEntry,omitempty"` -} - -func init() { - t["ArrayOfHostAccessControlEntry"] = reflect.TypeOf((*ArrayOfHostAccessControlEntry)(nil)).Elem() -} - -type ArrayOfHostAccountSpec struct { - HostAccountSpec []BaseHostAccountSpec `xml:"HostAccountSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostAccountSpec"] = reflect.TypeOf((*ArrayOfHostAccountSpec)(nil)).Elem() -} - -type ArrayOfHostActiveDirectory struct { - HostActiveDirectory []HostActiveDirectory `xml:"HostActiveDirectory,omitempty"` -} - -func init() { - t["ArrayOfHostActiveDirectory"] = reflect.TypeOf((*ArrayOfHostActiveDirectory)(nil)).Elem() -} - -type ArrayOfHostAssignableHardwareBinding struct { - HostAssignableHardwareBinding []HostAssignableHardwareBinding `xml:"HostAssignableHardwareBinding,omitempty"` -} - -func init() { - t["ArrayOfHostAssignableHardwareBinding"] = reflect.TypeOf((*ArrayOfHostAssignableHardwareBinding)(nil)).Elem() -} - -type ArrayOfHostAssignableHardwareConfigAttributeOverride struct { - HostAssignableHardwareConfigAttributeOverride []HostAssignableHardwareConfigAttributeOverride `xml:"HostAssignableHardwareConfigAttributeOverride,omitempty"` -} - -func init() { - t["ArrayOfHostAssignableHardwareConfigAttributeOverride"] = reflect.TypeOf((*ArrayOfHostAssignableHardwareConfigAttributeOverride)(nil)).Elem() -} - -type ArrayOfHostAuthenticationStoreInfo struct { - HostAuthenticationStoreInfo []BaseHostAuthenticationStoreInfo `xml:"HostAuthenticationStoreInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostAuthenticationStoreInfo"] = reflect.TypeOf((*ArrayOfHostAuthenticationStoreInfo)(nil)).Elem() -} - -type ArrayOfHostBootDevice struct { - HostBootDevice []HostBootDevice `xml:"HostBootDevice,omitempty"` -} - -func init() { - t["ArrayOfHostBootDevice"] = reflect.TypeOf((*ArrayOfHostBootDevice)(nil)).Elem() -} - -type ArrayOfHostCacheConfigurationInfo struct { - HostCacheConfigurationInfo []HostCacheConfigurationInfo `xml:"HostCacheConfigurationInfo,omitempty"` -} - -func init() { - t["ArrayOfHostCacheConfigurationInfo"] = reflect.TypeOf((*ArrayOfHostCacheConfigurationInfo)(nil)).Elem() -} - -type ArrayOfHostConnectInfoNetworkInfo struct { - HostConnectInfoNetworkInfo []BaseHostConnectInfoNetworkInfo `xml:"HostConnectInfoNetworkInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostConnectInfoNetworkInfo"] = reflect.TypeOf((*ArrayOfHostConnectInfoNetworkInfo)(nil)).Elem() -} - -type ArrayOfHostConnectSpec struct { - HostConnectSpec []HostConnectSpec `xml:"HostConnectSpec,omitempty"` -} - -func init() { - t["ArrayOfHostConnectSpec"] = reflect.TypeOf((*ArrayOfHostConnectSpec)(nil)).Elem() -} - -type ArrayOfHostCpuIdInfo struct { - HostCpuIdInfo []HostCpuIdInfo `xml:"HostCpuIdInfo,omitempty"` -} - -func init() { - t["ArrayOfHostCpuIdInfo"] = reflect.TypeOf((*ArrayOfHostCpuIdInfo)(nil)).Elem() -} - -type ArrayOfHostCpuPackage struct { - HostCpuPackage []HostCpuPackage `xml:"HostCpuPackage,omitempty"` -} - -func init() { - t["ArrayOfHostCpuPackage"] = reflect.TypeOf((*ArrayOfHostCpuPackage)(nil)).Elem() -} - -type ArrayOfHostDatastoreBrowserSearchResults struct { - HostDatastoreBrowserSearchResults []HostDatastoreBrowserSearchResults `xml:"HostDatastoreBrowserSearchResults,omitempty"` -} - -func init() { - t["ArrayOfHostDatastoreBrowserSearchResults"] = reflect.TypeOf((*ArrayOfHostDatastoreBrowserSearchResults)(nil)).Elem() -} - -type ArrayOfHostDatastoreConnectInfo struct { - HostDatastoreConnectInfo []BaseHostDatastoreConnectInfo `xml:"HostDatastoreConnectInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostDatastoreConnectInfo"] = reflect.TypeOf((*ArrayOfHostDatastoreConnectInfo)(nil)).Elem() -} - -type ArrayOfHostDatastoreSystemDatastoreResult struct { - HostDatastoreSystemDatastoreResult []HostDatastoreSystemDatastoreResult `xml:"HostDatastoreSystemDatastoreResult,omitempty"` -} - -func init() { - t["ArrayOfHostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*ArrayOfHostDatastoreSystemDatastoreResult)(nil)).Elem() -} - -type ArrayOfHostDateTimeSystemTimeZone struct { - HostDateTimeSystemTimeZone []HostDateTimeSystemTimeZone `xml:"HostDateTimeSystemTimeZone,omitempty"` -} - -func init() { - t["ArrayOfHostDateTimeSystemTimeZone"] = reflect.TypeOf((*ArrayOfHostDateTimeSystemTimeZone)(nil)).Elem() -} - -type ArrayOfHostDhcpService struct { - HostDhcpService []HostDhcpService `xml:"HostDhcpService,omitempty"` -} - -func init() { - t["ArrayOfHostDhcpService"] = reflect.TypeOf((*ArrayOfHostDhcpService)(nil)).Elem() -} - -type ArrayOfHostDhcpServiceConfig struct { - HostDhcpServiceConfig []HostDhcpServiceConfig `xml:"HostDhcpServiceConfig,omitempty"` -} - -func init() { - t["ArrayOfHostDhcpServiceConfig"] = reflect.TypeOf((*ArrayOfHostDhcpServiceConfig)(nil)).Elem() -} - -type ArrayOfHostDiagnosticPartition struct { - HostDiagnosticPartition []HostDiagnosticPartition `xml:"HostDiagnosticPartition,omitempty"` -} - -func init() { - t["ArrayOfHostDiagnosticPartition"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartition)(nil)).Elem() -} - -type ArrayOfHostDiagnosticPartitionCreateOption struct { - HostDiagnosticPartitionCreateOption []HostDiagnosticPartitionCreateOption `xml:"HostDiagnosticPartitionCreateOption,omitempty"` -} - -func init() { - t["ArrayOfHostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*ArrayOfHostDiagnosticPartitionCreateOption)(nil)).Elem() -} - -type ArrayOfHostDiskConfigurationResult struct { - HostDiskConfigurationResult []HostDiskConfigurationResult `xml:"HostDiskConfigurationResult,omitempty"` -} - -func init() { - t["ArrayOfHostDiskConfigurationResult"] = reflect.TypeOf((*ArrayOfHostDiskConfigurationResult)(nil)).Elem() -} - -type ArrayOfHostDiskMappingPartitionOption struct { - HostDiskMappingPartitionOption []HostDiskMappingPartitionOption `xml:"HostDiskMappingPartitionOption,omitempty"` -} - -func init() { - t["ArrayOfHostDiskMappingPartitionOption"] = reflect.TypeOf((*ArrayOfHostDiskMappingPartitionOption)(nil)).Elem() -} - -type ArrayOfHostDiskPartitionAttributes struct { - HostDiskPartitionAttributes []HostDiskPartitionAttributes `xml:"HostDiskPartitionAttributes,omitempty"` -} - -func init() { - t["ArrayOfHostDiskPartitionAttributes"] = reflect.TypeOf((*ArrayOfHostDiskPartitionAttributes)(nil)).Elem() -} - -type ArrayOfHostDiskPartitionBlockRange struct { - HostDiskPartitionBlockRange []HostDiskPartitionBlockRange `xml:"HostDiskPartitionBlockRange,omitempty"` -} - -func init() { - t["ArrayOfHostDiskPartitionBlockRange"] = reflect.TypeOf((*ArrayOfHostDiskPartitionBlockRange)(nil)).Elem() -} - -type ArrayOfHostDiskPartitionInfo struct { - HostDiskPartitionInfo []HostDiskPartitionInfo `xml:"HostDiskPartitionInfo,omitempty"` -} - -func init() { - t["ArrayOfHostDiskPartitionInfo"] = reflect.TypeOf((*ArrayOfHostDiskPartitionInfo)(nil)).Elem() -} - -type ArrayOfHostDvxClass struct { - HostDvxClass []HostDvxClass `xml:"HostDvxClass,omitempty"` -} - -func init() { - t["ArrayOfHostDvxClass"] = reflect.TypeOf((*ArrayOfHostDvxClass)(nil)).Elem() -} - -type ArrayOfHostEventArgument struct { - HostEventArgument []HostEventArgument `xml:"HostEventArgument,omitempty"` -} - -func init() { - t["ArrayOfHostEventArgument"] = reflect.TypeOf((*ArrayOfHostEventArgument)(nil)).Elem() -} - -type ArrayOfHostFeatureCapability struct { - HostFeatureCapability []HostFeatureCapability `xml:"HostFeatureCapability,omitempty"` -} - -func init() { - t["ArrayOfHostFeatureCapability"] = reflect.TypeOf((*ArrayOfHostFeatureCapability)(nil)).Elem() -} - -type ArrayOfHostFeatureMask struct { - HostFeatureMask []HostFeatureMask `xml:"HostFeatureMask,omitempty"` -} - -func init() { - t["ArrayOfHostFeatureMask"] = reflect.TypeOf((*ArrayOfHostFeatureMask)(nil)).Elem() -} - -type ArrayOfHostFeatureVersionInfo struct { - HostFeatureVersionInfo []HostFeatureVersionInfo `xml:"HostFeatureVersionInfo,omitempty"` -} - -func init() { - t["ArrayOfHostFeatureVersionInfo"] = reflect.TypeOf((*ArrayOfHostFeatureVersionInfo)(nil)).Elem() -} - -type ArrayOfHostFileSystemMountInfo struct { - HostFileSystemMountInfo []HostFileSystemMountInfo `xml:"HostFileSystemMountInfo,omitempty"` -} - -func init() { - t["ArrayOfHostFileSystemMountInfo"] = reflect.TypeOf((*ArrayOfHostFileSystemMountInfo)(nil)).Elem() -} - -type ArrayOfHostFirewallConfigRuleSetConfig struct { - HostFirewallConfigRuleSetConfig []HostFirewallConfigRuleSetConfig `xml:"HostFirewallConfigRuleSetConfig,omitempty"` -} - -func init() { - t["ArrayOfHostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*ArrayOfHostFirewallConfigRuleSetConfig)(nil)).Elem() -} - -type ArrayOfHostFirewallRule struct { - HostFirewallRule []HostFirewallRule `xml:"HostFirewallRule,omitempty"` -} - -func init() { - t["ArrayOfHostFirewallRule"] = reflect.TypeOf((*ArrayOfHostFirewallRule)(nil)).Elem() -} - -type ArrayOfHostFirewallRuleset struct { - HostFirewallRuleset []HostFirewallRuleset `xml:"HostFirewallRuleset,omitempty"` -} - -func init() { - t["ArrayOfHostFirewallRuleset"] = reflect.TypeOf((*ArrayOfHostFirewallRuleset)(nil)).Elem() -} - -type ArrayOfHostFirewallRulesetIpNetwork struct { - HostFirewallRulesetIpNetwork []HostFirewallRulesetIpNetwork `xml:"HostFirewallRulesetIpNetwork,omitempty"` -} - -func init() { - t["ArrayOfHostFirewallRulesetIpNetwork"] = reflect.TypeOf((*ArrayOfHostFirewallRulesetIpNetwork)(nil)).Elem() -} - -type ArrayOfHostGraphicsConfigDeviceType struct { - HostGraphicsConfigDeviceType []HostGraphicsConfigDeviceType `xml:"HostGraphicsConfigDeviceType,omitempty"` -} - -func init() { - t["ArrayOfHostGraphicsConfigDeviceType"] = reflect.TypeOf((*ArrayOfHostGraphicsConfigDeviceType)(nil)).Elem() -} - -type ArrayOfHostGraphicsInfo struct { - HostGraphicsInfo []HostGraphicsInfo `xml:"HostGraphicsInfo,omitempty"` -} - -func init() { - t["ArrayOfHostGraphicsInfo"] = reflect.TypeOf((*ArrayOfHostGraphicsInfo)(nil)).Elem() -} - -type ArrayOfHostHardwareElementInfo struct { - HostHardwareElementInfo []BaseHostHardwareElementInfo `xml:"HostHardwareElementInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostHardwareElementInfo"] = reflect.TypeOf((*ArrayOfHostHardwareElementInfo)(nil)).Elem() -} - -type ArrayOfHostHostBusAdapter struct { - HostHostBusAdapter []BaseHostHostBusAdapter `xml:"HostHostBusAdapter,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostHostBusAdapter"] = reflect.TypeOf((*ArrayOfHostHostBusAdapter)(nil)).Elem() -} - -type ArrayOfHostInternetScsiHbaIscsiIpv6Address struct { - HostInternetScsiHbaIscsiIpv6Address []HostInternetScsiHbaIscsiIpv6Address `xml:"HostInternetScsiHbaIscsiIpv6Address,omitempty"` -} - -func init() { - t["ArrayOfHostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaIscsiIpv6Address)(nil)).Elem() -} - -type ArrayOfHostInternetScsiHbaParamValue struct { - HostInternetScsiHbaParamValue []HostInternetScsiHbaParamValue `xml:"HostInternetScsiHbaParamValue,omitempty"` -} - -func init() { - t["ArrayOfHostInternetScsiHbaParamValue"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaParamValue)(nil)).Elem() -} - -type ArrayOfHostInternetScsiHbaSendTarget struct { - HostInternetScsiHbaSendTarget []HostInternetScsiHbaSendTarget `xml:"HostInternetScsiHbaSendTarget,omitempty"` -} - -func init() { - t["ArrayOfHostInternetScsiHbaSendTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaSendTarget)(nil)).Elem() -} - -type ArrayOfHostInternetScsiHbaStaticTarget struct { - HostInternetScsiHbaStaticTarget []HostInternetScsiHbaStaticTarget `xml:"HostInternetScsiHbaStaticTarget,omitempty"` -} - -func init() { - t["ArrayOfHostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*ArrayOfHostInternetScsiHbaStaticTarget)(nil)).Elem() -} - -type ArrayOfHostIoFilterInfo struct { - HostIoFilterInfo []HostIoFilterInfo `xml:"HostIoFilterInfo,omitempty"` -} - -func init() { - t["ArrayOfHostIoFilterInfo"] = reflect.TypeOf((*ArrayOfHostIoFilterInfo)(nil)).Elem() -} - -type ArrayOfHostIpConfigIpV6Address struct { - HostIpConfigIpV6Address []HostIpConfigIpV6Address `xml:"HostIpConfigIpV6Address,omitempty"` -} - -func init() { - t["ArrayOfHostIpConfigIpV6Address"] = reflect.TypeOf((*ArrayOfHostIpConfigIpV6Address)(nil)).Elem() -} - -type ArrayOfHostIpRouteEntry struct { - HostIpRouteEntry []HostIpRouteEntry `xml:"HostIpRouteEntry,omitempty"` -} - -func init() { - t["ArrayOfHostIpRouteEntry"] = reflect.TypeOf((*ArrayOfHostIpRouteEntry)(nil)).Elem() -} - -type ArrayOfHostIpRouteOp struct { - HostIpRouteOp []HostIpRouteOp `xml:"HostIpRouteOp,omitempty"` -} - -func init() { - t["ArrayOfHostIpRouteOp"] = reflect.TypeOf((*ArrayOfHostIpRouteOp)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec struct { - HostLowLevelProvisioningManagerDiskLayoutSpec []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"HostLowLevelProvisioningManagerDiskLayoutSpec,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerFileDeleteResult struct { - HostLowLevelProvisioningManagerFileDeleteResult []HostLowLevelProvisioningManagerFileDeleteResult `xml:"HostLowLevelProvisioningManagerFileDeleteResult,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec struct { - HostLowLevelProvisioningManagerFileDeleteSpec []HostLowLevelProvisioningManagerFileDeleteSpec `xml:"HostLowLevelProvisioningManagerFileDeleteSpec,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerFileReserveResult struct { - HostLowLevelProvisioningManagerFileReserveResult []HostLowLevelProvisioningManagerFileReserveResult `xml:"HostLowLevelProvisioningManagerFileReserveResult,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerFileReserveSpec struct { - HostLowLevelProvisioningManagerFileReserveSpec []HostLowLevelProvisioningManagerFileReserveSpec `xml:"HostLowLevelProvisioningManagerFileReserveSpec,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem() -} - -type ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec struct { - HostLowLevelProvisioningManagerSnapshotLayoutSpec []HostLowLevelProvisioningManagerSnapshotLayoutSpec `xml:"HostLowLevelProvisioningManagerSnapshotLayoutSpec,omitempty"` -} - -func init() { - t["ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*ArrayOfHostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem() -} - -type ArrayOfHostMemberHealthCheckResult struct { - HostMemberHealthCheckResult []BaseHostMemberHealthCheckResult `xml:"HostMemberHealthCheckResult,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostMemberHealthCheckResult"] = reflect.TypeOf((*ArrayOfHostMemberHealthCheckResult)(nil)).Elem() -} - -type ArrayOfHostMemberRuntimeInfo struct { - HostMemberRuntimeInfo []HostMemberRuntimeInfo `xml:"HostMemberRuntimeInfo,omitempty"` -} - -func init() { - t["ArrayOfHostMemberRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostMemberRuntimeInfo)(nil)).Elem() -} - -type ArrayOfHostMemoryTierInfo struct { - HostMemoryTierInfo []HostMemoryTierInfo `xml:"HostMemoryTierInfo,omitempty"` -} - -func init() { - t["ArrayOfHostMemoryTierInfo"] = reflect.TypeOf((*ArrayOfHostMemoryTierInfo)(nil)).Elem() -} - -type ArrayOfHostMultipathInfoLogicalUnit struct { - HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"` -} - -func init() { - t["ArrayOfHostMultipathInfoLogicalUnit"] = reflect.TypeOf((*ArrayOfHostMultipathInfoLogicalUnit)(nil)).Elem() -} - -type ArrayOfHostMultipathInfoPath struct { - HostMultipathInfoPath []HostMultipathInfoPath `xml:"HostMultipathInfoPath,omitempty"` -} - -func init() { - t["ArrayOfHostMultipathInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathInfoPath)(nil)).Elem() -} - -type ArrayOfHostMultipathStateInfoPath struct { - HostMultipathStateInfoPath []HostMultipathStateInfoPath `xml:"HostMultipathStateInfoPath,omitempty"` -} - -func init() { - t["ArrayOfHostMultipathStateInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathStateInfoPath)(nil)).Elem() -} - -type ArrayOfHostNasVolumeConfig struct { - HostNasVolumeConfig []HostNasVolumeConfig `xml:"HostNasVolumeConfig,omitempty"` -} - -func init() { - t["ArrayOfHostNasVolumeConfig"] = reflect.TypeOf((*ArrayOfHostNasVolumeConfig)(nil)).Elem() -} - -type ArrayOfHostNatService struct { - HostNatService []HostNatService `xml:"HostNatService,omitempty"` -} - -func init() { - t["ArrayOfHostNatService"] = reflect.TypeOf((*ArrayOfHostNatService)(nil)).Elem() -} - -type ArrayOfHostNatServiceConfig struct { - HostNatServiceConfig []HostNatServiceConfig `xml:"HostNatServiceConfig,omitempty"` -} - -func init() { - t["ArrayOfHostNatServiceConfig"] = reflect.TypeOf((*ArrayOfHostNatServiceConfig)(nil)).Elem() -} - -type ArrayOfHostNatServicePortForwardSpec struct { - HostNatServicePortForwardSpec []HostNatServicePortForwardSpec `xml:"HostNatServicePortForwardSpec,omitempty"` -} - -func init() { - t["ArrayOfHostNatServicePortForwardSpec"] = reflect.TypeOf((*ArrayOfHostNatServicePortForwardSpec)(nil)).Elem() -} - -type ArrayOfHostNetStackInstance struct { - HostNetStackInstance []HostNetStackInstance `xml:"HostNetStackInstance,omitempty"` -} - -func init() { - t["ArrayOfHostNetStackInstance"] = reflect.TypeOf((*ArrayOfHostNetStackInstance)(nil)).Elem() -} - -type ArrayOfHostNetworkConfigNetStackSpec struct { - HostNetworkConfigNetStackSpec []HostNetworkConfigNetStackSpec `xml:"HostNetworkConfigNetStackSpec,omitempty"` -} - -func init() { - t["ArrayOfHostNetworkConfigNetStackSpec"] = reflect.TypeOf((*ArrayOfHostNetworkConfigNetStackSpec)(nil)).Elem() -} - -type ArrayOfHostNumaNode struct { - HostNumaNode []HostNumaNode `xml:"HostNumaNode,omitempty"` -} - -func init() { - t["ArrayOfHostNumaNode"] = reflect.TypeOf((*ArrayOfHostNumaNode)(nil)).Elem() -} - -type ArrayOfHostNumericSensorInfo struct { - HostNumericSensorInfo []HostNumericSensorInfo `xml:"HostNumericSensorInfo,omitempty"` -} - -func init() { - t["ArrayOfHostNumericSensorInfo"] = reflect.TypeOf((*ArrayOfHostNumericSensorInfo)(nil)).Elem() -} - -type ArrayOfHostNvmeConnectSpec struct { - HostNvmeConnectSpec []HostNvmeConnectSpec `xml:"HostNvmeConnectSpec,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeConnectSpec"] = reflect.TypeOf((*ArrayOfHostNvmeConnectSpec)(nil)).Elem() -} - -type ArrayOfHostNvmeController struct { - HostNvmeController []HostNvmeController `xml:"HostNvmeController,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeController"] = reflect.TypeOf((*ArrayOfHostNvmeController)(nil)).Elem() -} - -type ArrayOfHostNvmeDisconnectSpec struct { - HostNvmeDisconnectSpec []HostNvmeDisconnectSpec `xml:"HostNvmeDisconnectSpec,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeDisconnectSpec"] = reflect.TypeOf((*ArrayOfHostNvmeDisconnectSpec)(nil)).Elem() -} - -type ArrayOfHostNvmeDiscoveryLogEntry struct { - HostNvmeDiscoveryLogEntry []HostNvmeDiscoveryLogEntry `xml:"HostNvmeDiscoveryLogEntry,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeDiscoveryLogEntry"] = reflect.TypeOf((*ArrayOfHostNvmeDiscoveryLogEntry)(nil)).Elem() -} - -type ArrayOfHostNvmeNamespace struct { - HostNvmeNamespace []HostNvmeNamespace `xml:"HostNvmeNamespace,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeNamespace"] = reflect.TypeOf((*ArrayOfHostNvmeNamespace)(nil)).Elem() -} - -type ArrayOfHostNvmeTopologyInterface struct { - HostNvmeTopologyInterface []HostNvmeTopologyInterface `xml:"HostNvmeTopologyInterface,omitempty"` -} - -func init() { - t["ArrayOfHostNvmeTopologyInterface"] = reflect.TypeOf((*ArrayOfHostNvmeTopologyInterface)(nil)).Elem() -} - -type ArrayOfHostOpaqueNetworkInfo struct { - HostOpaqueNetworkInfo []HostOpaqueNetworkInfo `xml:"HostOpaqueNetworkInfo,omitempty"` -} - -func init() { - t["ArrayOfHostOpaqueNetworkInfo"] = reflect.TypeOf((*ArrayOfHostOpaqueNetworkInfo)(nil)).Elem() -} - -type ArrayOfHostOpaqueSwitch struct { - HostOpaqueSwitch []HostOpaqueSwitch `xml:"HostOpaqueSwitch,omitempty"` -} - -func init() { - t["ArrayOfHostOpaqueSwitch"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitch)(nil)).Elem() -} - -type ArrayOfHostOpaqueSwitchPhysicalNicZone struct { - HostOpaqueSwitchPhysicalNicZone []HostOpaqueSwitchPhysicalNicZone `xml:"HostOpaqueSwitchPhysicalNicZone,omitempty"` -} - -func init() { - t["ArrayOfHostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*ArrayOfHostOpaqueSwitchPhysicalNicZone)(nil)).Elem() -} - -type ArrayOfHostPatchManagerStatus struct { - HostPatchManagerStatus []HostPatchManagerStatus `xml:"HostPatchManagerStatus,omitempty"` -} - -func init() { - t["ArrayOfHostPatchManagerStatus"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatus)(nil)).Elem() -} - -type ArrayOfHostPatchManagerStatusPrerequisitePatch struct { - HostPatchManagerStatusPrerequisitePatch []HostPatchManagerStatusPrerequisitePatch `xml:"HostPatchManagerStatusPrerequisitePatch,omitempty"` -} - -func init() { - t["ArrayOfHostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*ArrayOfHostPatchManagerStatusPrerequisitePatch)(nil)).Elem() -} - -type ArrayOfHostPathSelectionPolicyOption struct { - HostPathSelectionPolicyOption []HostPathSelectionPolicyOption `xml:"HostPathSelectionPolicyOption,omitempty"` -} - -func init() { - t["ArrayOfHostPathSelectionPolicyOption"] = reflect.TypeOf((*ArrayOfHostPathSelectionPolicyOption)(nil)).Elem() -} - -type ArrayOfHostPciDevice struct { - HostPciDevice []HostPciDevice `xml:"HostPciDevice,omitempty"` -} - -func init() { - t["ArrayOfHostPciDevice"] = reflect.TypeOf((*ArrayOfHostPciDevice)(nil)).Elem() -} - -type ArrayOfHostPciPassthruConfig struct { - HostPciPassthruConfig []BaseHostPciPassthruConfig `xml:"HostPciPassthruConfig,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostPciPassthruConfig"] = reflect.TypeOf((*ArrayOfHostPciPassthruConfig)(nil)).Elem() -} - -type ArrayOfHostPciPassthruInfo struct { - HostPciPassthruInfo []BaseHostPciPassthruInfo `xml:"HostPciPassthruInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostPciPassthruInfo"] = reflect.TypeOf((*ArrayOfHostPciPassthruInfo)(nil)).Elem() -} - -type ArrayOfHostPlacedVirtualNicIdentifier struct { - HostPlacedVirtualNicIdentifier []HostPlacedVirtualNicIdentifier `xml:"HostPlacedVirtualNicIdentifier,omitempty"` -} - -func init() { - t["ArrayOfHostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*ArrayOfHostPlacedVirtualNicIdentifier)(nil)).Elem() -} - -type ArrayOfHostPlugStoreTopologyAdapter struct { - HostPlugStoreTopologyAdapter []HostPlugStoreTopologyAdapter `xml:"HostPlugStoreTopologyAdapter,omitempty"` -} - -func init() { - t["ArrayOfHostPlugStoreTopologyAdapter"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyAdapter)(nil)).Elem() -} - -type ArrayOfHostPlugStoreTopologyDevice struct { - HostPlugStoreTopologyDevice []HostPlugStoreTopologyDevice `xml:"HostPlugStoreTopologyDevice,omitempty"` -} - -func init() { - t["ArrayOfHostPlugStoreTopologyDevice"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyDevice)(nil)).Elem() -} - -type ArrayOfHostPlugStoreTopologyPath struct { - HostPlugStoreTopologyPath []HostPlugStoreTopologyPath `xml:"HostPlugStoreTopologyPath,omitempty"` -} - -func init() { - t["ArrayOfHostPlugStoreTopologyPath"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPath)(nil)).Elem() -} - -type ArrayOfHostPlugStoreTopologyPlugin struct { - HostPlugStoreTopologyPlugin []HostPlugStoreTopologyPlugin `xml:"HostPlugStoreTopologyPlugin,omitempty"` -} - -func init() { - t["ArrayOfHostPlugStoreTopologyPlugin"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPlugin)(nil)).Elem() -} - -type ArrayOfHostPlugStoreTopologyTarget struct { - HostPlugStoreTopologyTarget []HostPlugStoreTopologyTarget `xml:"HostPlugStoreTopologyTarget,omitempty"` -} - -func init() { - t["ArrayOfHostPlugStoreTopologyTarget"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyTarget)(nil)).Elem() -} - -type ArrayOfHostPnicNetworkResourceInfo struct { - HostPnicNetworkResourceInfo []HostPnicNetworkResourceInfo `xml:"HostPnicNetworkResourceInfo,omitempty"` -} - -func init() { - t["ArrayOfHostPnicNetworkResourceInfo"] = reflect.TypeOf((*ArrayOfHostPnicNetworkResourceInfo)(nil)).Elem() -} - -type ArrayOfHostPortGroup struct { - HostPortGroup []HostPortGroup `xml:"HostPortGroup,omitempty"` -} - -func init() { - t["ArrayOfHostPortGroup"] = reflect.TypeOf((*ArrayOfHostPortGroup)(nil)).Elem() -} - -type ArrayOfHostPortGroupConfig struct { - HostPortGroupConfig []HostPortGroupConfig `xml:"HostPortGroupConfig,omitempty"` -} - -func init() { - t["ArrayOfHostPortGroupConfig"] = reflect.TypeOf((*ArrayOfHostPortGroupConfig)(nil)).Elem() -} - -type ArrayOfHostPortGroupPort struct { - HostPortGroupPort []HostPortGroupPort `xml:"HostPortGroupPort,omitempty"` -} - -func init() { - t["ArrayOfHostPortGroupPort"] = reflect.TypeOf((*ArrayOfHostPortGroupPort)(nil)).Elem() -} - -type ArrayOfHostPortGroupProfile struct { - HostPortGroupProfile []HostPortGroupProfile `xml:"HostPortGroupProfile,omitempty"` -} - -func init() { - t["ArrayOfHostPortGroupProfile"] = reflect.TypeOf((*ArrayOfHostPortGroupProfile)(nil)).Elem() -} - -type ArrayOfHostPowerPolicy struct { - HostPowerPolicy []HostPowerPolicy `xml:"HostPowerPolicy,omitempty"` -} - -func init() { - t["ArrayOfHostPowerPolicy"] = reflect.TypeOf((*ArrayOfHostPowerPolicy)(nil)).Elem() -} - -type ArrayOfHostProfileManagerCompositionResultResultElement struct { - HostProfileManagerCompositionResultResultElement []HostProfileManagerCompositionResultResultElement `xml:"HostProfileManagerCompositionResultResultElement,omitempty"` -} - -func init() { - t["ArrayOfHostProfileManagerCompositionResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionResultResultElement)(nil)).Elem() -} - -type ArrayOfHostProfileManagerCompositionValidationResultResultElement struct { - HostProfileManagerCompositionValidationResultResultElement []HostProfileManagerCompositionValidationResultResultElement `xml:"HostProfileManagerCompositionValidationResultResultElement,omitempty"` -} - -func init() { - t["ArrayOfHostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*ArrayOfHostProfileManagerCompositionValidationResultResultElement)(nil)).Elem() -} - -type ArrayOfHostProfileManagerHostToConfigSpecMap struct { - HostProfileManagerHostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"HostProfileManagerHostToConfigSpecMap,omitempty"` -} - -func init() { - t["ArrayOfHostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*ArrayOfHostProfileManagerHostToConfigSpecMap)(nil)).Elem() -} - -type ArrayOfHostProfilesEntityCustomizations struct { - HostProfilesEntityCustomizations []BaseHostProfilesEntityCustomizations `xml:"HostProfilesEntityCustomizations,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostProfilesEntityCustomizations"] = reflect.TypeOf((*ArrayOfHostProfilesEntityCustomizations)(nil)).Elem() -} - -type ArrayOfHostProtocolEndpoint struct { - HostProtocolEndpoint []HostProtocolEndpoint `xml:"HostProtocolEndpoint,omitempty"` -} - -func init() { - t["ArrayOfHostProtocolEndpoint"] = reflect.TypeOf((*ArrayOfHostProtocolEndpoint)(nil)).Elem() -} - -type ArrayOfHostProxySwitch struct { - HostProxySwitch []HostProxySwitch `xml:"HostProxySwitch,omitempty"` -} - -func init() { - t["ArrayOfHostProxySwitch"] = reflect.TypeOf((*ArrayOfHostProxySwitch)(nil)).Elem() -} - -type ArrayOfHostProxySwitchConfig struct { - HostProxySwitchConfig []HostProxySwitchConfig `xml:"HostProxySwitchConfig,omitempty"` -} - -func init() { - t["ArrayOfHostProxySwitchConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchConfig)(nil)).Elem() -} - -type ArrayOfHostProxySwitchHostLagConfig struct { - HostProxySwitchHostLagConfig []HostProxySwitchHostLagConfig `xml:"HostProxySwitchHostLagConfig,omitempty"` -} - -func init() { - t["ArrayOfHostProxySwitchHostLagConfig"] = reflect.TypeOf((*ArrayOfHostProxySwitchHostLagConfig)(nil)).Elem() -} - -type ArrayOfHostPtpConfigPtpPort struct { - HostPtpConfigPtpPort []HostPtpConfigPtpPort `xml:"HostPtpConfigPtpPort,omitempty"` -} - -func init() { - t["ArrayOfHostPtpConfigPtpPort"] = reflect.TypeOf((*ArrayOfHostPtpConfigPtpPort)(nil)).Elem() -} - -type ArrayOfHostQualifiedName struct { - HostQualifiedName []HostQualifiedName `xml:"HostQualifiedName,omitempty"` -} - -func init() { - t["ArrayOfHostQualifiedName"] = reflect.TypeOf((*ArrayOfHostQualifiedName)(nil)).Elem() -} - -type ArrayOfHostRdmaDevice struct { - HostRdmaDevice []HostRdmaDevice `xml:"HostRdmaDevice,omitempty"` -} - -func init() { - t["ArrayOfHostRdmaDevice"] = reflect.TypeOf((*ArrayOfHostRdmaDevice)(nil)).Elem() -} - -type ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo struct { - HostRuntimeInfoNetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"HostRuntimeInfoNetStackInstanceRuntimeInfo,omitempty"` -} - -func init() { - t["ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*ArrayOfHostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem() -} - -type ArrayOfHostScsiDisk struct { - HostScsiDisk []HostScsiDisk `xml:"HostScsiDisk,omitempty"` -} - -func init() { - t["ArrayOfHostScsiDisk"] = reflect.TypeOf((*ArrayOfHostScsiDisk)(nil)).Elem() -} - -type ArrayOfHostScsiDiskPartition struct { - HostScsiDiskPartition []HostScsiDiskPartition `xml:"HostScsiDiskPartition,omitempty"` -} - -func init() { - t["ArrayOfHostScsiDiskPartition"] = reflect.TypeOf((*ArrayOfHostScsiDiskPartition)(nil)).Elem() -} - -type ArrayOfHostScsiTopologyInterface struct { - HostScsiTopologyInterface []HostScsiTopologyInterface `xml:"HostScsiTopologyInterface,omitempty"` -} - -func init() { - t["ArrayOfHostScsiTopologyInterface"] = reflect.TypeOf((*ArrayOfHostScsiTopologyInterface)(nil)).Elem() -} - -type ArrayOfHostScsiTopologyLun struct { - HostScsiTopologyLun []HostScsiTopologyLun `xml:"HostScsiTopologyLun,omitempty"` -} - -func init() { - t["ArrayOfHostScsiTopologyLun"] = reflect.TypeOf((*ArrayOfHostScsiTopologyLun)(nil)).Elem() -} - -type ArrayOfHostScsiTopologyTarget struct { - HostScsiTopologyTarget []HostScsiTopologyTarget `xml:"HostScsiTopologyTarget,omitempty"` -} - -func init() { - t["ArrayOfHostScsiTopologyTarget"] = reflect.TypeOf((*ArrayOfHostScsiTopologyTarget)(nil)).Elem() -} - -type ArrayOfHostService struct { - HostService []HostService `xml:"HostService,omitempty"` -} - -func init() { - t["ArrayOfHostService"] = reflect.TypeOf((*ArrayOfHostService)(nil)).Elem() -} - -type ArrayOfHostServiceConfig struct { - HostServiceConfig []HostServiceConfig `xml:"HostServiceConfig,omitempty"` -} - -func init() { - t["ArrayOfHostServiceConfig"] = reflect.TypeOf((*ArrayOfHostServiceConfig)(nil)).Elem() -} - -type ArrayOfHostSharedGpuCapabilities struct { - HostSharedGpuCapabilities []HostSharedGpuCapabilities `xml:"HostSharedGpuCapabilities,omitempty"` -} - -func init() { - t["ArrayOfHostSharedGpuCapabilities"] = reflect.TypeOf((*ArrayOfHostSharedGpuCapabilities)(nil)).Elem() -} - -type ArrayOfHostSnmpDestination struct { - HostSnmpDestination []HostSnmpDestination `xml:"HostSnmpDestination,omitempty"` -} - -func init() { - t["ArrayOfHostSnmpDestination"] = reflect.TypeOf((*ArrayOfHostSnmpDestination)(nil)).Elem() -} - -type ArrayOfHostSriovDevicePoolInfo struct { - HostSriovDevicePoolInfo []BaseHostSriovDevicePoolInfo `xml:"HostSriovDevicePoolInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostSriovDevicePoolInfo"] = reflect.TypeOf((*ArrayOfHostSriovDevicePoolInfo)(nil)).Elem() -} - -type ArrayOfHostSslThumbprintInfo struct { - HostSslThumbprintInfo []HostSslThumbprintInfo `xml:"HostSslThumbprintInfo,omitempty"` -} - -func init() { - t["ArrayOfHostSslThumbprintInfo"] = reflect.TypeOf((*ArrayOfHostSslThumbprintInfo)(nil)).Elem() -} - -type ArrayOfHostStorageArrayTypePolicyOption struct { - HostStorageArrayTypePolicyOption []HostStorageArrayTypePolicyOption `xml:"HostStorageArrayTypePolicyOption,omitempty"` -} - -func init() { - t["ArrayOfHostStorageArrayTypePolicyOption"] = reflect.TypeOf((*ArrayOfHostStorageArrayTypePolicyOption)(nil)).Elem() -} - -type ArrayOfHostStorageElementInfo struct { - HostStorageElementInfo []HostStorageElementInfo `xml:"HostStorageElementInfo,omitempty"` -} - -func init() { - t["ArrayOfHostStorageElementInfo"] = reflect.TypeOf((*ArrayOfHostStorageElementInfo)(nil)).Elem() -} - -type ArrayOfHostStorageOperationalInfo struct { - HostStorageOperationalInfo []HostStorageOperationalInfo `xml:"HostStorageOperationalInfo,omitempty"` -} - -func init() { - t["ArrayOfHostStorageOperationalInfo"] = reflect.TypeOf((*ArrayOfHostStorageOperationalInfo)(nil)).Elem() -} - -type ArrayOfHostStorageSystemDiskLocatorLedResult struct { - HostStorageSystemDiskLocatorLedResult []HostStorageSystemDiskLocatorLedResult `xml:"HostStorageSystemDiskLocatorLedResult,omitempty"` -} - -func init() { - t["ArrayOfHostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemDiskLocatorLedResult)(nil)).Elem() -} - -type ArrayOfHostStorageSystemScsiLunResult struct { - HostStorageSystemScsiLunResult []HostStorageSystemScsiLunResult `xml:"HostStorageSystemScsiLunResult,omitempty"` -} - -func init() { - t["ArrayOfHostStorageSystemScsiLunResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemScsiLunResult)(nil)).Elem() -} - -type ArrayOfHostStorageSystemVmfsVolumeResult struct { - HostStorageSystemVmfsVolumeResult []HostStorageSystemVmfsVolumeResult `xml:"HostStorageSystemVmfsVolumeResult,omitempty"` -} - -func init() { - t["ArrayOfHostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*ArrayOfHostStorageSystemVmfsVolumeResult)(nil)).Elem() -} - -type ArrayOfHostSubSpecification struct { - HostSubSpecification []HostSubSpecification `xml:"HostSubSpecification,omitempty"` -} - -func init() { - t["ArrayOfHostSubSpecification"] = reflect.TypeOf((*ArrayOfHostSubSpecification)(nil)).Elem() -} - -type ArrayOfHostSystemIdentificationInfo struct { - HostSystemIdentificationInfo []HostSystemIdentificationInfo `xml:"HostSystemIdentificationInfo,omitempty"` -} - -func init() { - t["ArrayOfHostSystemIdentificationInfo"] = reflect.TypeOf((*ArrayOfHostSystemIdentificationInfo)(nil)).Elem() -} - -type ArrayOfHostSystemResourceInfo struct { - HostSystemResourceInfo []HostSystemResourceInfo `xml:"HostSystemResourceInfo,omitempty"` -} - -func init() { - t["ArrayOfHostSystemResourceInfo"] = reflect.TypeOf((*ArrayOfHostSystemResourceInfo)(nil)).Elem() -} - -type ArrayOfHostSystemSwapConfigurationSystemSwapOption struct { - HostSystemSwapConfigurationSystemSwapOption []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"HostSystemSwapConfigurationSystemSwapOption,omitempty,typeattr"` -} - -func init() { - t["ArrayOfHostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*ArrayOfHostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() -} - -type ArrayOfHostTpmDigestInfo struct { - HostTpmDigestInfo []HostTpmDigestInfo `xml:"HostTpmDigestInfo,omitempty"` -} - -func init() { - t["ArrayOfHostTpmDigestInfo"] = reflect.TypeOf((*ArrayOfHostTpmDigestInfo)(nil)).Elem() -} - -type ArrayOfHostTpmEventLogEntry struct { - HostTpmEventLogEntry []HostTpmEventLogEntry `xml:"HostTpmEventLogEntry,omitempty"` -} - -func init() { - t["ArrayOfHostTpmEventLogEntry"] = reflect.TypeOf((*ArrayOfHostTpmEventLogEntry)(nil)).Elem() -} - -type ArrayOfHostTrustAuthorityAttestationInfo struct { - HostTrustAuthorityAttestationInfo []HostTrustAuthorityAttestationInfo `xml:"HostTrustAuthorityAttestationInfo,omitempty"` -} - -func init() { - t["ArrayOfHostTrustAuthorityAttestationInfo"] = reflect.TypeOf((*ArrayOfHostTrustAuthorityAttestationInfo)(nil)).Elem() -} - -type ArrayOfHostUnresolvedVmfsExtent struct { - HostUnresolvedVmfsExtent []HostUnresolvedVmfsExtent `xml:"HostUnresolvedVmfsExtent,omitempty"` -} - -func init() { - t["ArrayOfHostUnresolvedVmfsExtent"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsExtent)(nil)).Elem() -} - -type ArrayOfHostUnresolvedVmfsResolutionResult struct { - HostUnresolvedVmfsResolutionResult []HostUnresolvedVmfsResolutionResult `xml:"HostUnresolvedVmfsResolutionResult,omitempty"` -} - -func init() { - t["ArrayOfHostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionResult)(nil)).Elem() -} - -type ArrayOfHostUnresolvedVmfsResolutionSpec struct { - HostUnresolvedVmfsResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"HostUnresolvedVmfsResolutionSpec,omitempty"` -} - -func init() { - t["ArrayOfHostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsResolutionSpec)(nil)).Elem() -} - -type ArrayOfHostUnresolvedVmfsVolume struct { - HostUnresolvedVmfsVolume []HostUnresolvedVmfsVolume `xml:"HostUnresolvedVmfsVolume,omitempty"` -} - -func init() { - t["ArrayOfHostUnresolvedVmfsVolume"] = reflect.TypeOf((*ArrayOfHostUnresolvedVmfsVolume)(nil)).Elem() -} - -type ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct { - HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption,omitempty"` -} - -func init() { - t["ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*ArrayOfHostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem() -} - -type ArrayOfHostVMotionCompatibility struct { - HostVMotionCompatibility []HostVMotionCompatibility `xml:"HostVMotionCompatibility,omitempty"` -} - -func init() { - t["ArrayOfHostVMotionCompatibility"] = reflect.TypeOf((*ArrayOfHostVMotionCompatibility)(nil)).Elem() -} - -type ArrayOfHostVirtualNic struct { - HostVirtualNic []HostVirtualNic `xml:"HostVirtualNic,omitempty"` -} - -func init() { - t["ArrayOfHostVirtualNic"] = reflect.TypeOf((*ArrayOfHostVirtualNic)(nil)).Elem() -} - -type ArrayOfHostVirtualNicConfig struct { - HostVirtualNicConfig []HostVirtualNicConfig `xml:"HostVirtualNicConfig,omitempty"` -} - -func init() { - t["ArrayOfHostVirtualNicConfig"] = reflect.TypeOf((*ArrayOfHostVirtualNicConfig)(nil)).Elem() -} - -type ArrayOfHostVirtualNicManagerNicTypeSelection struct { - HostVirtualNicManagerNicTypeSelection []HostVirtualNicManagerNicTypeSelection `xml:"HostVirtualNicManagerNicTypeSelection,omitempty"` -} - -func init() { - t["ArrayOfHostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*ArrayOfHostVirtualNicManagerNicTypeSelection)(nil)).Elem() -} - -type ArrayOfHostVirtualSwitch struct { - HostVirtualSwitch []HostVirtualSwitch `xml:"HostVirtualSwitch,omitempty"` -} - -func init() { - t["ArrayOfHostVirtualSwitch"] = reflect.TypeOf((*ArrayOfHostVirtualSwitch)(nil)).Elem() -} - -type ArrayOfHostVirtualSwitchConfig struct { - HostVirtualSwitchConfig []HostVirtualSwitchConfig `xml:"HostVirtualSwitchConfig,omitempty"` -} - -func init() { - t["ArrayOfHostVirtualSwitchConfig"] = reflect.TypeOf((*ArrayOfHostVirtualSwitchConfig)(nil)).Elem() -} - -type ArrayOfHostVmciAccessManagerAccessSpec struct { - HostVmciAccessManagerAccessSpec []HostVmciAccessManagerAccessSpec `xml:"HostVmciAccessManagerAccessSpec,omitempty"` -} - -func init() { - t["ArrayOfHostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*ArrayOfHostVmciAccessManagerAccessSpec)(nil)).Elem() -} - -type ArrayOfHostVmfsRescanResult struct { - HostVmfsRescanResult []HostVmfsRescanResult `xml:"HostVmfsRescanResult,omitempty"` -} - -func init() { - t["ArrayOfHostVmfsRescanResult"] = reflect.TypeOf((*ArrayOfHostVmfsRescanResult)(nil)).Elem() -} - -type ArrayOfHostVsanInternalSystemCmmdsQuery struct { - HostVsanInternalSystemCmmdsQuery []HostVsanInternalSystemCmmdsQuery `xml:"HostVsanInternalSystemCmmdsQuery,omitempty"` -} - -func init() { - t["ArrayOfHostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemCmmdsQuery)(nil)).Elem() -} - -type ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult struct { - HostVsanInternalSystemDeleteVsanObjectsResult []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"HostVsanInternalSystemDeleteVsanObjectsResult,omitempty"` -} - -func init() { - t["ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem() -} - -type ArrayOfHostVsanInternalSystemVsanObjectOperationResult struct { - HostVsanInternalSystemVsanObjectOperationResult []HostVsanInternalSystemVsanObjectOperationResult `xml:"HostVsanInternalSystemVsanObjectOperationResult,omitempty"` -} - -func init() { - t["ArrayOfHostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem() -} - -type ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct { - HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult,omitempty"` -} - -func init() { - t["ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*ArrayOfHostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseDatastoreLeaseInfo struct { - HttpNfcLeaseDatastoreLeaseInfo []HttpNfcLeaseDatastoreLeaseInfo `xml:"HttpNfcLeaseDatastoreLeaseInfo,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseDeviceUrl struct { - HttpNfcLeaseDeviceUrl []HttpNfcLeaseDeviceUrl `xml:"HttpNfcLeaseDeviceUrl,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseDeviceUrl)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseHostInfo struct { - HttpNfcLeaseHostInfo []HttpNfcLeaseHostInfo `xml:"HttpNfcLeaseHostInfo,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseHostInfo"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseHostInfo)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseManifestEntry struct { - HttpNfcLeaseManifestEntry []HttpNfcLeaseManifestEntry `xml:"HttpNfcLeaseManifestEntry,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseManifestEntry"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseManifestEntry)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseProbeResult struct { - HttpNfcLeaseProbeResult []HttpNfcLeaseProbeResult `xml:"HttpNfcLeaseProbeResult,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseProbeResult"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseProbeResult)(nil)).Elem() -} - -type ArrayOfHttpNfcLeaseSourceFile struct { - HttpNfcLeaseSourceFile []HttpNfcLeaseSourceFile `xml:"HttpNfcLeaseSourceFile,omitempty"` -} - -func init() { - t["ArrayOfHttpNfcLeaseSourceFile"] = reflect.TypeOf((*ArrayOfHttpNfcLeaseSourceFile)(nil)).Elem() -} - -type ArrayOfID struct { - ID []ID `xml:"ID,omitempty"` -} - -func init() { - t["ArrayOfID"] = reflect.TypeOf((*ArrayOfID)(nil)).Elem() -} - -type ArrayOfImportOperationBulkFaultFaultOnImport struct { - ImportOperationBulkFaultFaultOnImport []ImportOperationBulkFaultFaultOnImport `xml:"ImportOperationBulkFaultFaultOnImport,omitempty"` -} - -func init() { - t["ArrayOfImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ArrayOfImportOperationBulkFaultFaultOnImport)(nil)).Elem() -} - -type ArrayOfImportSpec struct { - ImportSpec []BaseImportSpec `xml:"ImportSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfImportSpec"] = reflect.TypeOf((*ArrayOfImportSpec)(nil)).Elem() -} - -type ArrayOfInt struct { - Int []int32 `xml:"int,omitempty"` -} - -func init() { - t["ArrayOfInt"] = reflect.TypeOf((*ArrayOfInt)(nil)).Elem() -} - -type ArrayOfIoFilterHostIssue struct { - IoFilterHostIssue []IoFilterHostIssue `xml:"IoFilterHostIssue,omitempty"` -} - -func init() { - t["ArrayOfIoFilterHostIssue"] = reflect.TypeOf((*ArrayOfIoFilterHostIssue)(nil)).Elem() -} - -type ArrayOfIpPool struct { - IpPool []IpPool `xml:"IpPool,omitempty"` -} - -func init() { - t["ArrayOfIpPool"] = reflect.TypeOf((*ArrayOfIpPool)(nil)).Elem() -} - -type ArrayOfIpPoolAssociation struct { - IpPoolAssociation []IpPoolAssociation `xml:"IpPoolAssociation,omitempty"` -} - -func init() { - t["ArrayOfIpPoolAssociation"] = reflect.TypeOf((*ArrayOfIpPoolAssociation)(nil)).Elem() -} - -type ArrayOfIpPoolManagerIpAllocation struct { - IpPoolManagerIpAllocation []IpPoolManagerIpAllocation `xml:"IpPoolManagerIpAllocation,omitempty"` -} - -func init() { - t["ArrayOfIpPoolManagerIpAllocation"] = reflect.TypeOf((*ArrayOfIpPoolManagerIpAllocation)(nil)).Elem() -} - -type ArrayOfIscsiDependencyEntity struct { - IscsiDependencyEntity []IscsiDependencyEntity `xml:"IscsiDependencyEntity,omitempty"` -} - -func init() { - t["ArrayOfIscsiDependencyEntity"] = reflect.TypeOf((*ArrayOfIscsiDependencyEntity)(nil)).Elem() -} - -type ArrayOfIscsiPortInfo struct { - IscsiPortInfo []IscsiPortInfo `xml:"IscsiPortInfo,omitempty"` -} - -func init() { - t["ArrayOfIscsiPortInfo"] = reflect.TypeOf((*ArrayOfIscsiPortInfo)(nil)).Elem() -} - -type ArrayOfKernelModuleInfo struct { - KernelModuleInfo []KernelModuleInfo `xml:"KernelModuleInfo,omitempty"` -} - -func init() { - t["ArrayOfKernelModuleInfo"] = reflect.TypeOf((*ArrayOfKernelModuleInfo)(nil)).Elem() -} - -type ArrayOfKeyAnyValue struct { - KeyAnyValue []KeyAnyValue `xml:"KeyAnyValue,omitempty"` -} - -func init() { - t["ArrayOfKeyAnyValue"] = reflect.TypeOf((*ArrayOfKeyAnyValue)(nil)).Elem() -} - -type ArrayOfKeyValue struct { - KeyValue []KeyValue `xml:"KeyValue,omitempty"` -} - -func init() { - t["ArrayOfKeyValue"] = reflect.TypeOf((*ArrayOfKeyValue)(nil)).Elem() -} - -type ArrayOfKmipClusterInfo struct { - KmipClusterInfo []KmipClusterInfo `xml:"KmipClusterInfo,omitempty"` -} - -func init() { - t["ArrayOfKmipClusterInfo"] = reflect.TypeOf((*ArrayOfKmipClusterInfo)(nil)).Elem() -} - -type ArrayOfKmipServerInfo struct { - KmipServerInfo []KmipServerInfo `xml:"KmipServerInfo,omitempty"` -} - -func init() { - t["ArrayOfKmipServerInfo"] = reflect.TypeOf((*ArrayOfKmipServerInfo)(nil)).Elem() -} - -type ArrayOfLicenseAssignmentManagerLicenseAssignment struct { - LicenseAssignmentManagerLicenseAssignment []LicenseAssignmentManagerLicenseAssignment `xml:"LicenseAssignmentManagerLicenseAssignment,omitempty"` -} - -func init() { - t["ArrayOfLicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*ArrayOfLicenseAssignmentManagerLicenseAssignment)(nil)).Elem() -} - -type ArrayOfLicenseAvailabilityInfo struct { - LicenseAvailabilityInfo []LicenseAvailabilityInfo `xml:"LicenseAvailabilityInfo,omitempty"` -} - -func init() { - t["ArrayOfLicenseAvailabilityInfo"] = reflect.TypeOf((*ArrayOfLicenseAvailabilityInfo)(nil)).Elem() -} - -type ArrayOfLicenseFeatureInfo struct { - LicenseFeatureInfo []LicenseFeatureInfo `xml:"LicenseFeatureInfo,omitempty"` -} - -func init() { - t["ArrayOfLicenseFeatureInfo"] = reflect.TypeOf((*ArrayOfLicenseFeatureInfo)(nil)).Elem() -} - -type ArrayOfLicenseManagerLicenseInfo struct { - LicenseManagerLicenseInfo []LicenseManagerLicenseInfo `xml:"LicenseManagerLicenseInfo,omitempty"` -} - -func init() { - t["ArrayOfLicenseManagerLicenseInfo"] = reflect.TypeOf((*ArrayOfLicenseManagerLicenseInfo)(nil)).Elem() -} - -type ArrayOfLicenseReservationInfo struct { - LicenseReservationInfo []LicenseReservationInfo `xml:"LicenseReservationInfo,omitempty"` -} - -func init() { - t["ArrayOfLicenseReservationInfo"] = reflect.TypeOf((*ArrayOfLicenseReservationInfo)(nil)).Elem() -} - -type ArrayOfLocalizableMessage struct { - LocalizableMessage []LocalizableMessage `xml:"LocalizableMessage,omitempty"` -} - -func init() { - t["ArrayOfLocalizableMessage"] = reflect.TypeOf((*ArrayOfLocalizableMessage)(nil)).Elem() -} - -type ArrayOfLocalizationManagerMessageCatalog struct { - LocalizationManagerMessageCatalog []LocalizationManagerMessageCatalog `xml:"LocalizationManagerMessageCatalog,omitempty"` -} - -func init() { - t["ArrayOfLocalizationManagerMessageCatalog"] = reflect.TypeOf((*ArrayOfLocalizationManagerMessageCatalog)(nil)).Elem() -} - -type ArrayOfLong struct { - Long []int64 `xml:"long,omitempty"` -} - -func init() { - t["ArrayOfLong"] = reflect.TypeOf((*ArrayOfLong)(nil)).Elem() -} - -type ArrayOfManagedEntityStatus struct { - ManagedEntityStatus []ManagedEntityStatus `xml:"ManagedEntityStatus,omitempty"` -} - -func init() { - t["ArrayOfManagedEntityStatus"] = reflect.TypeOf((*ArrayOfManagedEntityStatus)(nil)).Elem() -} - -type ArrayOfManagedObjectReference struct { - ManagedObjectReference []ManagedObjectReference `xml:"ManagedObjectReference,omitempty"` -} - -func init() { - t["ArrayOfManagedObjectReference"] = reflect.TypeOf((*ArrayOfManagedObjectReference)(nil)).Elem() -} - -type ArrayOfMethodActionArgument struct { - MethodActionArgument []MethodActionArgument `xml:"MethodActionArgument,omitempty"` -} - -func init() { - t["ArrayOfMethodActionArgument"] = reflect.TypeOf((*ArrayOfMethodActionArgument)(nil)).Elem() -} - -type ArrayOfMethodFault struct { - MethodFault []BaseMethodFault `xml:"MethodFault,omitempty,typeattr"` -} - -func init() { - t["ArrayOfMethodFault"] = reflect.TypeOf((*ArrayOfMethodFault)(nil)).Elem() -} - -type ArrayOfMissingObject struct { - MissingObject []MissingObject `xml:"MissingObject,omitempty"` -} - -func init() { - t["ArrayOfMissingObject"] = reflect.TypeOf((*ArrayOfMissingObject)(nil)).Elem() -} - -type ArrayOfMissingProperty struct { - MissingProperty []MissingProperty `xml:"MissingProperty,omitempty"` -} - -func init() { - t["ArrayOfMissingProperty"] = reflect.TypeOf((*ArrayOfMissingProperty)(nil)).Elem() -} - -type ArrayOfMultipleCertificatesVerifyFaultThumbprintData struct { - MultipleCertificatesVerifyFaultThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"MultipleCertificatesVerifyFaultThumbprintData,omitempty"` -} - -func init() { - t["ArrayOfMultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*ArrayOfMultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem() -} - -type ArrayOfNasStorageProfile struct { - NasStorageProfile []NasStorageProfile `xml:"NasStorageProfile,omitempty"` -} - -func init() { - t["ArrayOfNasStorageProfile"] = reflect.TypeOf((*ArrayOfNasStorageProfile)(nil)).Elem() -} - -type ArrayOfNetIpConfigInfoIpAddress struct { - NetIpConfigInfoIpAddress []NetIpConfigInfoIpAddress `xml:"NetIpConfigInfoIpAddress,omitempty"` -} - -func init() { - t["ArrayOfNetIpConfigInfoIpAddress"] = reflect.TypeOf((*ArrayOfNetIpConfigInfoIpAddress)(nil)).Elem() -} - -type ArrayOfNetIpConfigSpecIpAddressSpec struct { - NetIpConfigSpecIpAddressSpec []NetIpConfigSpecIpAddressSpec `xml:"NetIpConfigSpecIpAddressSpec,omitempty"` -} - -func init() { - t["ArrayOfNetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*ArrayOfNetIpConfigSpecIpAddressSpec)(nil)).Elem() -} - -type ArrayOfNetIpRouteConfigInfoIpRoute struct { - NetIpRouteConfigInfoIpRoute []NetIpRouteConfigInfoIpRoute `xml:"NetIpRouteConfigInfoIpRoute,omitempty"` -} - -func init() { - t["ArrayOfNetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigInfoIpRoute)(nil)).Elem() -} - -type ArrayOfNetIpRouteConfigSpecIpRouteSpec struct { - NetIpRouteConfigSpecIpRouteSpec []NetIpRouteConfigSpecIpRouteSpec `xml:"NetIpRouteConfigSpecIpRouteSpec,omitempty"` -} - -func init() { - t["ArrayOfNetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*ArrayOfNetIpRouteConfigSpecIpRouteSpec)(nil)).Elem() -} - -type ArrayOfNetIpStackInfoDefaultRouter struct { - NetIpStackInfoDefaultRouter []NetIpStackInfoDefaultRouter `xml:"NetIpStackInfoDefaultRouter,omitempty"` -} - -func init() { - t["ArrayOfNetIpStackInfoDefaultRouter"] = reflect.TypeOf((*ArrayOfNetIpStackInfoDefaultRouter)(nil)).Elem() -} - -type ArrayOfNetIpStackInfoNetToMedia struct { - NetIpStackInfoNetToMedia []NetIpStackInfoNetToMedia `xml:"NetIpStackInfoNetToMedia,omitempty"` -} - -func init() { - t["ArrayOfNetIpStackInfoNetToMedia"] = reflect.TypeOf((*ArrayOfNetIpStackInfoNetToMedia)(nil)).Elem() -} - -type ArrayOfNetStackInstanceProfile struct { - NetStackInstanceProfile []NetStackInstanceProfile `xml:"NetStackInstanceProfile,omitempty"` -} - -func init() { - t["ArrayOfNetStackInstanceProfile"] = reflect.TypeOf((*ArrayOfNetStackInstanceProfile)(nil)).Elem() -} - -type ArrayOfNoPermissionEntityPrivileges struct { - NoPermissionEntityPrivileges []NoPermissionEntityPrivileges `xml:"NoPermissionEntityPrivileges,omitempty"` -} - -func init() { - t["ArrayOfNoPermissionEntityPrivileges"] = reflect.TypeOf((*ArrayOfNoPermissionEntityPrivileges)(nil)).Elem() -} - -type ArrayOfNsxHostVNicProfile struct { - NsxHostVNicProfile []NsxHostVNicProfile `xml:"NsxHostVNicProfile,omitempty"` -} - -func init() { - t["ArrayOfNsxHostVNicProfile"] = reflect.TypeOf((*ArrayOfNsxHostVNicProfile)(nil)).Elem() -} - -type ArrayOfNumericRange struct { - NumericRange []NumericRange `xml:"NumericRange,omitempty"` -} - -func init() { - t["ArrayOfNumericRange"] = reflect.TypeOf((*ArrayOfNumericRange)(nil)).Elem() -} - -type ArrayOfNvdimmDimmInfo struct { - NvdimmDimmInfo []NvdimmDimmInfo `xml:"NvdimmDimmInfo,omitempty"` -} - -func init() { - t["ArrayOfNvdimmDimmInfo"] = reflect.TypeOf((*ArrayOfNvdimmDimmInfo)(nil)).Elem() -} - -type ArrayOfNvdimmGuid struct { - NvdimmGuid []NvdimmGuid `xml:"NvdimmGuid,omitempty"` -} - -func init() { - t["ArrayOfNvdimmGuid"] = reflect.TypeOf((*ArrayOfNvdimmGuid)(nil)).Elem() -} - -type ArrayOfNvdimmInterleaveSetInfo struct { - NvdimmInterleaveSetInfo []NvdimmInterleaveSetInfo `xml:"NvdimmInterleaveSetInfo,omitempty"` -} - -func init() { - t["ArrayOfNvdimmInterleaveSetInfo"] = reflect.TypeOf((*ArrayOfNvdimmInterleaveSetInfo)(nil)).Elem() -} - -type ArrayOfNvdimmNamespaceDetails struct { - NvdimmNamespaceDetails []NvdimmNamespaceDetails `xml:"NvdimmNamespaceDetails,omitempty"` -} - -func init() { - t["ArrayOfNvdimmNamespaceDetails"] = reflect.TypeOf((*ArrayOfNvdimmNamespaceDetails)(nil)).Elem() -} - -type ArrayOfNvdimmNamespaceInfo struct { - NvdimmNamespaceInfo []NvdimmNamespaceInfo `xml:"NvdimmNamespaceInfo,omitempty"` -} - -func init() { - t["ArrayOfNvdimmNamespaceInfo"] = reflect.TypeOf((*ArrayOfNvdimmNamespaceInfo)(nil)).Elem() -} - -type ArrayOfNvdimmRegionInfo struct { - NvdimmRegionInfo []NvdimmRegionInfo `xml:"NvdimmRegionInfo,omitempty"` -} - -func init() { - t["ArrayOfNvdimmRegionInfo"] = reflect.TypeOf((*ArrayOfNvdimmRegionInfo)(nil)).Elem() -} - -type ArrayOfObjectContent struct { - ObjectContent []ObjectContent `xml:"ObjectContent,omitempty"` -} - -func init() { - t["ArrayOfObjectContent"] = reflect.TypeOf((*ArrayOfObjectContent)(nil)).Elem() -} - -type ArrayOfObjectSpec struct { - ObjectSpec []ObjectSpec `xml:"ObjectSpec,omitempty"` -} - -func init() { - t["ArrayOfObjectSpec"] = reflect.TypeOf((*ArrayOfObjectSpec)(nil)).Elem() -} - -type ArrayOfObjectUpdate struct { - ObjectUpdate []ObjectUpdate `xml:"ObjectUpdate,omitempty"` -} - -func init() { - t["ArrayOfObjectUpdate"] = reflect.TypeOf((*ArrayOfObjectUpdate)(nil)).Elem() -} - -type ArrayOfOpaqueNetworkTargetInfo struct { - OpaqueNetworkTargetInfo []OpaqueNetworkTargetInfo `xml:"OpaqueNetworkTargetInfo,omitempty"` -} - -func init() { - t["ArrayOfOpaqueNetworkTargetInfo"] = reflect.TypeOf((*ArrayOfOpaqueNetworkTargetInfo)(nil)).Elem() -} - -type ArrayOfOptionDef struct { - OptionDef []OptionDef `xml:"OptionDef,omitempty"` -} - -func init() { - t["ArrayOfOptionDef"] = reflect.TypeOf((*ArrayOfOptionDef)(nil)).Elem() -} - -type ArrayOfOptionProfile struct { - OptionProfile []OptionProfile `xml:"OptionProfile,omitempty"` -} - -func init() { - t["ArrayOfOptionProfile"] = reflect.TypeOf((*ArrayOfOptionProfile)(nil)).Elem() -} - -type ArrayOfOptionValue struct { - OptionValue []BaseOptionValue `xml:"OptionValue,omitempty,typeattr"` -} - -func init() { - t["ArrayOfOptionValue"] = reflect.TypeOf((*ArrayOfOptionValue)(nil)).Elem() -} - -type ArrayOfOvfConsumerOstNode struct { - OvfConsumerOstNode []OvfConsumerOstNode `xml:"OvfConsumerOstNode,omitempty"` -} - -func init() { - t["ArrayOfOvfConsumerOstNode"] = reflect.TypeOf((*ArrayOfOvfConsumerOstNode)(nil)).Elem() -} - -type ArrayOfOvfConsumerOvfSection struct { - OvfConsumerOvfSection []OvfConsumerOvfSection `xml:"OvfConsumerOvfSection,omitempty"` -} - -func init() { - t["ArrayOfOvfConsumerOvfSection"] = reflect.TypeOf((*ArrayOfOvfConsumerOvfSection)(nil)).Elem() -} - -type ArrayOfOvfDeploymentOption struct { - OvfDeploymentOption []OvfDeploymentOption `xml:"OvfDeploymentOption,omitempty"` -} - -func init() { - t["ArrayOfOvfDeploymentOption"] = reflect.TypeOf((*ArrayOfOvfDeploymentOption)(nil)).Elem() -} - -type ArrayOfOvfFile struct { - OvfFile []OvfFile `xml:"OvfFile,omitempty"` -} - -func init() { - t["ArrayOfOvfFile"] = reflect.TypeOf((*ArrayOfOvfFile)(nil)).Elem() -} - -type ArrayOfOvfFileItem struct { - OvfFileItem []OvfFileItem `xml:"OvfFileItem,omitempty"` -} - -func init() { - t["ArrayOfOvfFileItem"] = reflect.TypeOf((*ArrayOfOvfFileItem)(nil)).Elem() -} - -type ArrayOfOvfNetworkInfo struct { - OvfNetworkInfo []OvfNetworkInfo `xml:"OvfNetworkInfo,omitempty"` -} - -func init() { - t["ArrayOfOvfNetworkInfo"] = reflect.TypeOf((*ArrayOfOvfNetworkInfo)(nil)).Elem() -} - -type ArrayOfOvfNetworkMapping struct { - OvfNetworkMapping []OvfNetworkMapping `xml:"OvfNetworkMapping,omitempty"` -} - -func init() { - t["ArrayOfOvfNetworkMapping"] = reflect.TypeOf((*ArrayOfOvfNetworkMapping)(nil)).Elem() -} - -type ArrayOfOvfOptionInfo struct { - OvfOptionInfo []OvfOptionInfo `xml:"OvfOptionInfo,omitempty"` -} - -func init() { - t["ArrayOfOvfOptionInfo"] = reflect.TypeOf((*ArrayOfOvfOptionInfo)(nil)).Elem() -} - -type ArrayOfOvfResourceMap struct { - OvfResourceMap []OvfResourceMap `xml:"OvfResourceMap,omitempty"` -} - -func init() { - t["ArrayOfOvfResourceMap"] = reflect.TypeOf((*ArrayOfOvfResourceMap)(nil)).Elem() -} - -type ArrayOfPerfCounterInfo struct { - PerfCounterInfo []PerfCounterInfo `xml:"PerfCounterInfo,omitempty"` -} - -func init() { - t["ArrayOfPerfCounterInfo"] = reflect.TypeOf((*ArrayOfPerfCounterInfo)(nil)).Elem() -} - -type ArrayOfPerfEntityMetricBase struct { - PerfEntityMetricBase []BasePerfEntityMetricBase `xml:"PerfEntityMetricBase,omitempty,typeattr"` -} - -func init() { - t["ArrayOfPerfEntityMetricBase"] = reflect.TypeOf((*ArrayOfPerfEntityMetricBase)(nil)).Elem() -} - -type ArrayOfPerfInterval struct { - PerfInterval []PerfInterval `xml:"PerfInterval,omitempty"` -} - -func init() { - t["ArrayOfPerfInterval"] = reflect.TypeOf((*ArrayOfPerfInterval)(nil)).Elem() -} - -type ArrayOfPerfMetricId struct { - PerfMetricId []PerfMetricId `xml:"PerfMetricId,omitempty"` -} - -func init() { - t["ArrayOfPerfMetricId"] = reflect.TypeOf((*ArrayOfPerfMetricId)(nil)).Elem() -} - -type ArrayOfPerfMetricSeries struct { - PerfMetricSeries []BasePerfMetricSeries `xml:"PerfMetricSeries,omitempty,typeattr"` -} - -func init() { - t["ArrayOfPerfMetricSeries"] = reflect.TypeOf((*ArrayOfPerfMetricSeries)(nil)).Elem() -} - -type ArrayOfPerfMetricSeriesCSV struct { - PerfMetricSeriesCSV []PerfMetricSeriesCSV `xml:"PerfMetricSeriesCSV,omitempty"` -} - -func init() { - t["ArrayOfPerfMetricSeriesCSV"] = reflect.TypeOf((*ArrayOfPerfMetricSeriesCSV)(nil)).Elem() -} - -type ArrayOfPerfQuerySpec struct { - PerfQuerySpec []PerfQuerySpec `xml:"PerfQuerySpec,omitempty"` -} - -func init() { - t["ArrayOfPerfQuerySpec"] = reflect.TypeOf((*ArrayOfPerfQuerySpec)(nil)).Elem() -} - -type ArrayOfPerfSampleInfo struct { - PerfSampleInfo []PerfSampleInfo `xml:"PerfSampleInfo,omitempty"` -} - -func init() { - t["ArrayOfPerfSampleInfo"] = reflect.TypeOf((*ArrayOfPerfSampleInfo)(nil)).Elem() -} - -type ArrayOfPerformanceManagerCounterLevelMapping struct { - PerformanceManagerCounterLevelMapping []PerformanceManagerCounterLevelMapping `xml:"PerformanceManagerCounterLevelMapping,omitempty"` -} - -func init() { - t["ArrayOfPerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*ArrayOfPerformanceManagerCounterLevelMapping)(nil)).Elem() -} - -type ArrayOfPermission struct { - Permission []Permission `xml:"Permission,omitempty"` -} - -func init() { - t["ArrayOfPermission"] = reflect.TypeOf((*ArrayOfPermission)(nil)).Elem() -} - -type ArrayOfPermissionProfile struct { - PermissionProfile []PermissionProfile `xml:"PermissionProfile,omitempty"` -} - -func init() { - t["ArrayOfPermissionProfile"] = reflect.TypeOf((*ArrayOfPermissionProfile)(nil)).Elem() -} - -type ArrayOfPhysicalNic struct { - PhysicalNic []PhysicalNic `xml:"PhysicalNic,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNic"] = reflect.TypeOf((*ArrayOfPhysicalNic)(nil)).Elem() -} - -type ArrayOfPhysicalNicConfig struct { - PhysicalNicConfig []PhysicalNicConfig `xml:"PhysicalNicConfig,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicConfig"] = reflect.TypeOf((*ArrayOfPhysicalNicConfig)(nil)).Elem() -} - -type ArrayOfPhysicalNicHintInfo struct { - PhysicalNicHintInfo []PhysicalNicHintInfo `xml:"PhysicalNicHintInfo,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicHintInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicHintInfo)(nil)).Elem() -} - -type ArrayOfPhysicalNicIpHint struct { - PhysicalNicIpHint []PhysicalNicIpHint `xml:"PhysicalNicIpHint,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicIpHint"] = reflect.TypeOf((*ArrayOfPhysicalNicIpHint)(nil)).Elem() -} - -type ArrayOfPhysicalNicLinkInfo struct { - PhysicalNicLinkInfo []PhysicalNicLinkInfo `xml:"PhysicalNicLinkInfo,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicLinkInfo"] = reflect.TypeOf((*ArrayOfPhysicalNicLinkInfo)(nil)).Elem() -} - -type ArrayOfPhysicalNicNameHint struct { - PhysicalNicNameHint []PhysicalNicNameHint `xml:"PhysicalNicNameHint,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicNameHint"] = reflect.TypeOf((*ArrayOfPhysicalNicNameHint)(nil)).Elem() -} - -type ArrayOfPhysicalNicProfile struct { - PhysicalNicProfile []PhysicalNicProfile `xml:"PhysicalNicProfile,omitempty"` -} - -func init() { - t["ArrayOfPhysicalNicProfile"] = reflect.TypeOf((*ArrayOfPhysicalNicProfile)(nil)).Elem() -} - -type ArrayOfPlacementAffinityRule struct { - PlacementAffinityRule []PlacementAffinityRule `xml:"PlacementAffinityRule,omitempty"` -} - -func init() { - t["ArrayOfPlacementAffinityRule"] = reflect.TypeOf((*ArrayOfPlacementAffinityRule)(nil)).Elem() -} - -type ArrayOfPlacementSpec struct { - PlacementSpec []PlacementSpec `xml:"PlacementSpec,omitempty"` -} - -func init() { - t["ArrayOfPlacementSpec"] = reflect.TypeOf((*ArrayOfPlacementSpec)(nil)).Elem() -} - -type ArrayOfPnicUplinkProfile struct { - PnicUplinkProfile []PnicUplinkProfile `xml:"PnicUplinkProfile,omitempty"` -} - -func init() { - t["ArrayOfPnicUplinkProfile"] = reflect.TypeOf((*ArrayOfPnicUplinkProfile)(nil)).Elem() -} - -type ArrayOfPodDiskLocator struct { - PodDiskLocator []PodDiskLocator `xml:"PodDiskLocator,omitempty"` -} - -func init() { - t["ArrayOfPodDiskLocator"] = reflect.TypeOf((*ArrayOfPodDiskLocator)(nil)).Elem() -} - -type ArrayOfPolicyOption struct { - PolicyOption []BasePolicyOption `xml:"PolicyOption,omitempty,typeattr"` -} - -func init() { - t["ArrayOfPolicyOption"] = reflect.TypeOf((*ArrayOfPolicyOption)(nil)).Elem() -} - -type ArrayOfPrivilegeAvailability struct { - PrivilegeAvailability []PrivilegeAvailability `xml:"PrivilegeAvailability,omitempty"` -} - -func init() { - t["ArrayOfPrivilegeAvailability"] = reflect.TypeOf((*ArrayOfPrivilegeAvailability)(nil)).Elem() -} - -type ArrayOfProductComponentInfo struct { - ProductComponentInfo []ProductComponentInfo `xml:"ProductComponentInfo,omitempty"` -} - -func init() { - t["ArrayOfProductComponentInfo"] = reflect.TypeOf((*ArrayOfProductComponentInfo)(nil)).Elem() -} - -type ArrayOfProfileApplyProfileProperty struct { - ProfileApplyProfileProperty []ProfileApplyProfileProperty `xml:"ProfileApplyProfileProperty,omitempty"` -} - -func init() { - t["ArrayOfProfileApplyProfileProperty"] = reflect.TypeOf((*ArrayOfProfileApplyProfileProperty)(nil)).Elem() -} - -type ArrayOfProfileDeferredPolicyOptionParameter struct { - ProfileDeferredPolicyOptionParameter []ProfileDeferredPolicyOptionParameter `xml:"ProfileDeferredPolicyOptionParameter,omitempty"` -} - -func init() { - t["ArrayOfProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ArrayOfProfileDeferredPolicyOptionParameter)(nil)).Elem() -} - -type ArrayOfProfileDescriptionSection struct { - ProfileDescriptionSection []ProfileDescriptionSection `xml:"ProfileDescriptionSection,omitempty"` -} - -func init() { - t["ArrayOfProfileDescriptionSection"] = reflect.TypeOf((*ArrayOfProfileDescriptionSection)(nil)).Elem() -} - -type ArrayOfProfileExecuteError struct { - ProfileExecuteError []ProfileExecuteError `xml:"ProfileExecuteError,omitempty"` -} - -func init() { - t["ArrayOfProfileExecuteError"] = reflect.TypeOf((*ArrayOfProfileExecuteError)(nil)).Elem() -} - -type ArrayOfProfileExpression struct { - ProfileExpression []BaseProfileExpression `xml:"ProfileExpression,omitempty,typeattr"` -} - -func init() { - t["ArrayOfProfileExpression"] = reflect.TypeOf((*ArrayOfProfileExpression)(nil)).Elem() -} - -type ArrayOfProfileExpressionMetadata struct { - ProfileExpressionMetadata []ProfileExpressionMetadata `xml:"ProfileExpressionMetadata,omitempty"` -} - -func init() { - t["ArrayOfProfileExpressionMetadata"] = reflect.TypeOf((*ArrayOfProfileExpressionMetadata)(nil)).Elem() -} - -type ArrayOfProfileMetadata struct { - ProfileMetadata []ProfileMetadata `xml:"ProfileMetadata,omitempty"` -} - -func init() { - t["ArrayOfProfileMetadata"] = reflect.TypeOf((*ArrayOfProfileMetadata)(nil)).Elem() -} - -type ArrayOfProfileMetadataProfileOperationMessage struct { - ProfileMetadataProfileOperationMessage []ProfileMetadataProfileOperationMessage `xml:"ProfileMetadataProfileOperationMessage,omitempty"` -} - -func init() { - t["ArrayOfProfileMetadataProfileOperationMessage"] = reflect.TypeOf((*ArrayOfProfileMetadataProfileOperationMessage)(nil)).Elem() -} - -type ArrayOfProfileMetadataProfileSortSpec struct { - ProfileMetadataProfileSortSpec []ProfileMetadataProfileSortSpec `xml:"ProfileMetadataProfileSortSpec,omitempty"` -} - -func init() { - t["ArrayOfProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ArrayOfProfileMetadataProfileSortSpec)(nil)).Elem() -} - -type ArrayOfProfileParameterMetadata struct { - ProfileParameterMetadata []ProfileParameterMetadata `xml:"ProfileParameterMetadata,omitempty"` -} - -func init() { - t["ArrayOfProfileParameterMetadata"] = reflect.TypeOf((*ArrayOfProfileParameterMetadata)(nil)).Elem() -} - -type ArrayOfProfileParameterMetadataParameterRelationMetadata struct { - ProfileParameterMetadataParameterRelationMetadata []ProfileParameterMetadataParameterRelationMetadata `xml:"ProfileParameterMetadataParameterRelationMetadata,omitempty"` -} - -func init() { - t["ArrayOfProfileParameterMetadataParameterRelationMetadata"] = reflect.TypeOf((*ArrayOfProfileParameterMetadataParameterRelationMetadata)(nil)).Elem() -} - -type ArrayOfProfilePolicy struct { - ProfilePolicy []ProfilePolicy `xml:"ProfilePolicy,omitempty"` -} - -func init() { - t["ArrayOfProfilePolicy"] = reflect.TypeOf((*ArrayOfProfilePolicy)(nil)).Elem() -} - -type ArrayOfProfilePolicyMetadata struct { - ProfilePolicyMetadata []ProfilePolicyMetadata `xml:"ProfilePolicyMetadata,omitempty"` -} - -func init() { - t["ArrayOfProfilePolicyMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyMetadata)(nil)).Elem() -} - -type ArrayOfProfilePolicyOptionMetadata struct { - ProfilePolicyOptionMetadata []BaseProfilePolicyOptionMetadata `xml:"ProfilePolicyOptionMetadata,omitempty,typeattr"` -} - -func init() { - t["ArrayOfProfilePolicyOptionMetadata"] = reflect.TypeOf((*ArrayOfProfilePolicyOptionMetadata)(nil)).Elem() -} - -type ArrayOfProfileProfileStructureProperty struct { - ProfileProfileStructureProperty []ProfileProfileStructureProperty `xml:"ProfileProfileStructureProperty,omitempty"` -} - -func init() { - t["ArrayOfProfileProfileStructureProperty"] = reflect.TypeOf((*ArrayOfProfileProfileStructureProperty)(nil)).Elem() -} - -type ArrayOfProfilePropertyPath struct { - ProfilePropertyPath []ProfilePropertyPath `xml:"ProfilePropertyPath,omitempty"` -} - -func init() { - t["ArrayOfProfilePropertyPath"] = reflect.TypeOf((*ArrayOfProfilePropertyPath)(nil)).Elem() -} - -type ArrayOfProfileUpdateFailedUpdateFailure struct { - ProfileUpdateFailedUpdateFailure []ProfileUpdateFailedUpdateFailure `xml:"ProfileUpdateFailedUpdateFailure,omitempty"` -} - -func init() { - t["ArrayOfProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ArrayOfProfileUpdateFailedUpdateFailure)(nil)).Elem() -} - -type ArrayOfPropertyChange struct { - PropertyChange []PropertyChange `xml:"PropertyChange,omitempty"` -} - -func init() { - t["ArrayOfPropertyChange"] = reflect.TypeOf((*ArrayOfPropertyChange)(nil)).Elem() -} - -type ArrayOfPropertyFilterSpec struct { - PropertyFilterSpec []PropertyFilterSpec `xml:"PropertyFilterSpec,omitempty"` -} - -func init() { - t["ArrayOfPropertyFilterSpec"] = reflect.TypeOf((*ArrayOfPropertyFilterSpec)(nil)).Elem() -} - -type ArrayOfPropertyFilterUpdate struct { - PropertyFilterUpdate []PropertyFilterUpdate `xml:"PropertyFilterUpdate,omitempty"` -} - -func init() { - t["ArrayOfPropertyFilterUpdate"] = reflect.TypeOf((*ArrayOfPropertyFilterUpdate)(nil)).Elem() -} - -type ArrayOfPropertySpec struct { - PropertySpec []PropertySpec `xml:"PropertySpec,omitempty"` -} - -func init() { - t["ArrayOfPropertySpec"] = reflect.TypeOf((*ArrayOfPropertySpec)(nil)).Elem() -} - -type ArrayOfRelation struct { - Relation []Relation `xml:"Relation,omitempty"` -} - -func init() { - t["ArrayOfRelation"] = reflect.TypeOf((*ArrayOfRelation)(nil)).Elem() -} - -type ArrayOfReplicationInfoDiskSettings struct { - ReplicationInfoDiskSettings []ReplicationInfoDiskSettings `xml:"ReplicationInfoDiskSettings,omitempty"` -} - -func init() { - t["ArrayOfReplicationInfoDiskSettings"] = reflect.TypeOf((*ArrayOfReplicationInfoDiskSettings)(nil)).Elem() -} - -type ArrayOfResourceConfigSpec struct { - ResourceConfigSpec []ResourceConfigSpec `xml:"ResourceConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfResourceConfigSpec"] = reflect.TypeOf((*ArrayOfResourceConfigSpec)(nil)).Elem() -} - -type ArrayOfRetrieveVStorageObjSpec struct { - RetrieveVStorageObjSpec []RetrieveVStorageObjSpec `xml:"RetrieveVStorageObjSpec,omitempty"` -} - -func init() { - t["ArrayOfRetrieveVStorageObjSpec"] = reflect.TypeOf((*ArrayOfRetrieveVStorageObjSpec)(nil)).Elem() -} - -type ArrayOfScheduledTaskDetail struct { - ScheduledTaskDetail []ScheduledTaskDetail `xml:"ScheduledTaskDetail,omitempty"` -} - -func init() { - t["ArrayOfScheduledTaskDetail"] = reflect.TypeOf((*ArrayOfScheduledTaskDetail)(nil)).Elem() -} - -type ArrayOfScsiLun struct { - ScsiLun []BaseScsiLun `xml:"ScsiLun,omitempty,typeattr"` -} - -func init() { - t["ArrayOfScsiLun"] = reflect.TypeOf((*ArrayOfScsiLun)(nil)).Elem() -} - -type ArrayOfScsiLunDescriptor struct { - ScsiLunDescriptor []ScsiLunDescriptor `xml:"ScsiLunDescriptor,omitempty"` -} - -func init() { - t["ArrayOfScsiLunDescriptor"] = reflect.TypeOf((*ArrayOfScsiLunDescriptor)(nil)).Elem() -} - -type ArrayOfScsiLunDurableName struct { - ScsiLunDurableName []ScsiLunDurableName `xml:"ScsiLunDurableName,omitempty"` -} - -func init() { - t["ArrayOfScsiLunDurableName"] = reflect.TypeOf((*ArrayOfScsiLunDurableName)(nil)).Elem() -} - -type ArrayOfSelectionSet struct { - SelectionSet []BaseSelectionSet `xml:"SelectionSet,omitempty,typeattr"` -} - -func init() { - t["ArrayOfSelectionSet"] = reflect.TypeOf((*ArrayOfSelectionSet)(nil)).Elem() -} - -type ArrayOfSelectionSpec struct { - SelectionSpec []BaseSelectionSpec `xml:"SelectionSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfSelectionSpec"] = reflect.TypeOf((*ArrayOfSelectionSpec)(nil)).Elem() -} - -type ArrayOfServiceConsolePortGroupProfile struct { - ServiceConsolePortGroupProfile []ServiceConsolePortGroupProfile `xml:"ServiceConsolePortGroupProfile,omitempty"` -} - -func init() { - t["ArrayOfServiceConsolePortGroupProfile"] = reflect.TypeOf((*ArrayOfServiceConsolePortGroupProfile)(nil)).Elem() -} - -type ArrayOfServiceLocator struct { - ServiceLocator []ServiceLocator `xml:"ServiceLocator,omitempty"` -} - -func init() { - t["ArrayOfServiceLocator"] = reflect.TypeOf((*ArrayOfServiceLocator)(nil)).Elem() -} - -type ArrayOfServiceManagerServiceInfo struct { - ServiceManagerServiceInfo []ServiceManagerServiceInfo `xml:"ServiceManagerServiceInfo,omitempty"` -} - -func init() { - t["ArrayOfServiceManagerServiceInfo"] = reflect.TypeOf((*ArrayOfServiceManagerServiceInfo)(nil)).Elem() -} - -type ArrayOfServiceProfile struct { - ServiceProfile []ServiceProfile `xml:"ServiceProfile,omitempty"` -} - -func init() { - t["ArrayOfServiceProfile"] = reflect.TypeOf((*ArrayOfServiceProfile)(nil)).Elem() -} - -type ArrayOfShort struct { - Short []int16 `xml:"short,omitempty"` -} - -func init() { - t["ArrayOfShort"] = reflect.TypeOf((*ArrayOfShort)(nil)).Elem() -} - -type ArrayOfSoftwarePackage struct { - SoftwarePackage []SoftwarePackage `xml:"SoftwarePackage,omitempty"` -} - -func init() { - t["ArrayOfSoftwarePackage"] = reflect.TypeOf((*ArrayOfSoftwarePackage)(nil)).Elem() -} - -type ArrayOfStaticRouteProfile struct { - StaticRouteProfile []StaticRouteProfile `xml:"StaticRouteProfile,omitempty"` -} - -func init() { - t["ArrayOfStaticRouteProfile"] = reflect.TypeOf((*ArrayOfStaticRouteProfile)(nil)).Elem() -} - -type ArrayOfStorageDrsOptionSpec struct { - StorageDrsOptionSpec []StorageDrsOptionSpec `xml:"StorageDrsOptionSpec,omitempty"` -} - -func init() { - t["ArrayOfStorageDrsOptionSpec"] = reflect.TypeOf((*ArrayOfStorageDrsOptionSpec)(nil)).Elem() -} - -type ArrayOfStorageDrsPlacementRankVmSpec struct { - StorageDrsPlacementRankVmSpec []StorageDrsPlacementRankVmSpec `xml:"StorageDrsPlacementRankVmSpec,omitempty"` -} - -func init() { - t["ArrayOfStorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*ArrayOfStorageDrsPlacementRankVmSpec)(nil)).Elem() -} - -type ArrayOfStorageDrsVmConfigInfo struct { - StorageDrsVmConfigInfo []StorageDrsVmConfigInfo `xml:"StorageDrsVmConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfStorageDrsVmConfigInfo"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigInfo)(nil)).Elem() -} - -type ArrayOfStorageDrsVmConfigSpec struct { - StorageDrsVmConfigSpec []StorageDrsVmConfigSpec `xml:"StorageDrsVmConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfStorageDrsVmConfigSpec"] = reflect.TypeOf((*ArrayOfStorageDrsVmConfigSpec)(nil)).Elem() -} - -type ArrayOfStoragePerformanceSummary struct { - StoragePerformanceSummary []StoragePerformanceSummary `xml:"StoragePerformanceSummary,omitempty"` -} - -func init() { - t["ArrayOfStoragePerformanceSummary"] = reflect.TypeOf((*ArrayOfStoragePerformanceSummary)(nil)).Elem() -} - -type ArrayOfStorageRequirement struct { - StorageRequirement []StorageRequirement `xml:"StorageRequirement,omitempty"` -} - -func init() { - t["ArrayOfStorageRequirement"] = reflect.TypeOf((*ArrayOfStorageRequirement)(nil)).Elem() -} - -type ArrayOfString struct { - String []string `xml:"string,omitempty"` -} - -func init() { - t["ArrayOfString"] = reflect.TypeOf((*ArrayOfString)(nil)).Elem() -} - -type ArrayOfStructuredCustomizations struct { - StructuredCustomizations []StructuredCustomizations `xml:"StructuredCustomizations,omitempty"` -} - -func init() { - t["ArrayOfStructuredCustomizations"] = reflect.TypeOf((*ArrayOfStructuredCustomizations)(nil)).Elem() -} - -type ArrayOfSystemEventInfo struct { - SystemEventInfo []SystemEventInfo `xml:"SystemEventInfo,omitempty"` -} - -func init() { - t["ArrayOfSystemEventInfo"] = reflect.TypeOf((*ArrayOfSystemEventInfo)(nil)).Elem() -} - -type ArrayOfTag struct { - Tag []Tag `xml:"Tag,omitempty"` -} - -func init() { - t["ArrayOfTag"] = reflect.TypeOf((*ArrayOfTag)(nil)).Elem() -} - -type ArrayOfTaskInfo struct { - TaskInfo []TaskInfo `xml:"TaskInfo,omitempty"` -} - -func init() { - t["ArrayOfTaskInfo"] = reflect.TypeOf((*ArrayOfTaskInfo)(nil)).Elem() -} - -type ArrayOfTaskInfoState struct { - TaskInfoState []TaskInfoState `xml:"TaskInfoState,omitempty"` -} - -func init() { - t["ArrayOfTaskInfoState"] = reflect.TypeOf((*ArrayOfTaskInfoState)(nil)).Elem() -} - -type ArrayOfTypeDescription struct { - TypeDescription []BaseTypeDescription `xml:"TypeDescription,omitempty,typeattr"` -} - -func init() { - t["ArrayOfTypeDescription"] = reflect.TypeOf((*ArrayOfTypeDescription)(nil)).Elem() -} - -type ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo struct { - UpdateVirtualMachineFilesResultFailedVmFileInfo []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"UpdateVirtualMachineFilesResultFailedVmFileInfo,omitempty"` -} - -func init() { - t["ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*ArrayOfUpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem() -} - -type ArrayOfUri struct { - Uri []string `xml:"uri,omitempty"` -} - -func init() { - t["ArrayOfUri"] = reflect.TypeOf((*ArrayOfUri)(nil)).Elem() -} - -type ArrayOfUsbScanCodeSpecKeyEvent struct { - UsbScanCodeSpecKeyEvent []UsbScanCodeSpecKeyEvent `xml:"UsbScanCodeSpecKeyEvent,omitempty"` -} - -func init() { - t["ArrayOfUsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*ArrayOfUsbScanCodeSpecKeyEvent)(nil)).Elem() -} - -type ArrayOfUserGroupProfile struct { - UserGroupProfile []UserGroupProfile `xml:"UserGroupProfile,omitempty"` -} - -func init() { - t["ArrayOfUserGroupProfile"] = reflect.TypeOf((*ArrayOfUserGroupProfile)(nil)).Elem() -} - -type ArrayOfUserPrivilegeResult struct { - UserPrivilegeResult []UserPrivilegeResult `xml:"UserPrivilegeResult,omitempty"` -} - -func init() { - t["ArrayOfUserPrivilegeResult"] = reflect.TypeOf((*ArrayOfUserPrivilegeResult)(nil)).Elem() -} - -type ArrayOfUserProfile struct { - UserProfile []UserProfile `xml:"UserProfile,omitempty"` -} - -func init() { - t["ArrayOfUserProfile"] = reflect.TypeOf((*ArrayOfUserProfile)(nil)).Elem() -} - -type ArrayOfUserSearchResult struct { - UserSearchResult []BaseUserSearchResult `xml:"UserSearchResult,omitempty,typeattr"` -} - -func init() { - t["ArrayOfUserSearchResult"] = reflect.TypeOf((*ArrayOfUserSearchResult)(nil)).Elem() -} - -type ArrayOfUserSession struct { - UserSession []UserSession `xml:"UserSession,omitempty"` -} - -func init() { - t["ArrayOfUserSession"] = reflect.TypeOf((*ArrayOfUserSession)(nil)).Elem() -} - -type ArrayOfVASAStorageArray struct { - VASAStorageArray []VASAStorageArray `xml:"VASAStorageArray,omitempty"` -} - -func init() { - t["ArrayOfVASAStorageArray"] = reflect.TypeOf((*ArrayOfVASAStorageArray)(nil)).Elem() -} - -type ArrayOfVASAStorageArrayDiscoverySvcInfo struct { - VASAStorageArrayDiscoverySvcInfo []VASAStorageArrayDiscoverySvcInfo `xml:"VASAStorageArrayDiscoverySvcInfo,omitempty"` -} - -func init() { - t["ArrayOfVASAStorageArrayDiscoverySvcInfo"] = reflect.TypeOf((*ArrayOfVASAStorageArrayDiscoverySvcInfo)(nil)).Elem() -} - -type ArrayOfVAppCloneSpecNetworkMappingPair struct { - VAppCloneSpecNetworkMappingPair []VAppCloneSpecNetworkMappingPair `xml:"VAppCloneSpecNetworkMappingPair,omitempty"` -} - -func init() { - t["ArrayOfVAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*ArrayOfVAppCloneSpecNetworkMappingPair)(nil)).Elem() -} - -type ArrayOfVAppCloneSpecResourceMap struct { - VAppCloneSpecResourceMap []VAppCloneSpecResourceMap `xml:"VAppCloneSpecResourceMap,omitempty"` -} - -func init() { - t["ArrayOfVAppCloneSpecResourceMap"] = reflect.TypeOf((*ArrayOfVAppCloneSpecResourceMap)(nil)).Elem() -} - -type ArrayOfVAppEntityConfigInfo struct { - VAppEntityConfigInfo []VAppEntityConfigInfo `xml:"VAppEntityConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfVAppEntityConfigInfo"] = reflect.TypeOf((*ArrayOfVAppEntityConfigInfo)(nil)).Elem() -} - -type ArrayOfVAppOvfSectionInfo struct { - VAppOvfSectionInfo []VAppOvfSectionInfo `xml:"VAppOvfSectionInfo,omitempty"` -} - -func init() { - t["ArrayOfVAppOvfSectionInfo"] = reflect.TypeOf((*ArrayOfVAppOvfSectionInfo)(nil)).Elem() -} - -type ArrayOfVAppOvfSectionSpec struct { - VAppOvfSectionSpec []VAppOvfSectionSpec `xml:"VAppOvfSectionSpec,omitempty"` -} - -func init() { - t["ArrayOfVAppOvfSectionSpec"] = reflect.TypeOf((*ArrayOfVAppOvfSectionSpec)(nil)).Elem() -} - -type ArrayOfVAppProductInfo struct { - VAppProductInfo []VAppProductInfo `xml:"VAppProductInfo,omitempty"` -} - -func init() { - t["ArrayOfVAppProductInfo"] = reflect.TypeOf((*ArrayOfVAppProductInfo)(nil)).Elem() -} - -type ArrayOfVAppProductSpec struct { - VAppProductSpec []VAppProductSpec `xml:"VAppProductSpec,omitempty"` -} - -func init() { - t["ArrayOfVAppProductSpec"] = reflect.TypeOf((*ArrayOfVAppProductSpec)(nil)).Elem() -} - -type ArrayOfVAppPropertyInfo struct { - VAppPropertyInfo []VAppPropertyInfo `xml:"VAppPropertyInfo,omitempty"` -} - -func init() { - t["ArrayOfVAppPropertyInfo"] = reflect.TypeOf((*ArrayOfVAppPropertyInfo)(nil)).Elem() -} - -type ArrayOfVAppPropertySpec struct { - VAppPropertySpec []VAppPropertySpec `xml:"VAppPropertySpec,omitempty"` -} - -func init() { - t["ArrayOfVAppPropertySpec"] = reflect.TypeOf((*ArrayOfVAppPropertySpec)(nil)).Elem() -} - -type ArrayOfVMwareDVSPvlanConfigSpec struct { - VMwareDVSPvlanConfigSpec []VMwareDVSPvlanConfigSpec `xml:"VMwareDVSPvlanConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfVMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanConfigSpec)(nil)).Elem() -} - -type ArrayOfVMwareDVSPvlanMapEntry struct { - VMwareDVSPvlanMapEntry []VMwareDVSPvlanMapEntry `xml:"VMwareDVSPvlanMapEntry,omitempty"` -} - -func init() { - t["ArrayOfVMwareDVSPvlanMapEntry"] = reflect.TypeOf((*ArrayOfVMwareDVSPvlanMapEntry)(nil)).Elem() -} - -type ArrayOfVMwareDVSVspanConfigSpec struct { - VMwareDVSVspanConfigSpec []VMwareDVSVspanConfigSpec `xml:"VMwareDVSVspanConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfVMwareDVSVspanConfigSpec"] = reflect.TypeOf((*ArrayOfVMwareDVSVspanConfigSpec)(nil)).Elem() -} - -type ArrayOfVMwareDvsLacpGroupConfig struct { - VMwareDvsLacpGroupConfig []VMwareDvsLacpGroupConfig `xml:"VMwareDvsLacpGroupConfig,omitempty"` -} - -func init() { - t["ArrayOfVMwareDvsLacpGroupConfig"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupConfig)(nil)).Elem() -} - -type ArrayOfVMwareDvsLacpGroupSpec struct { - VMwareDvsLacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"VMwareDvsLacpGroupSpec,omitempty"` -} - -func init() { - t["ArrayOfVMwareDvsLacpGroupSpec"] = reflect.TypeOf((*ArrayOfVMwareDvsLacpGroupSpec)(nil)).Elem() -} - -type ArrayOfVMwareVspanSession struct { - VMwareVspanSession []VMwareVspanSession `xml:"VMwareVspanSession,omitempty"` -} - -func init() { - t["ArrayOfVMwareVspanSession"] = reflect.TypeOf((*ArrayOfVMwareVspanSession)(nil)).Elem() -} - -type ArrayOfVStorageObjectAssociations struct { - VStorageObjectAssociations []VStorageObjectAssociations `xml:"VStorageObjectAssociations,omitempty"` -} - -func init() { - t["ArrayOfVStorageObjectAssociations"] = reflect.TypeOf((*ArrayOfVStorageObjectAssociations)(nil)).Elem() -} - -type ArrayOfVStorageObjectAssociationsVmDiskAssociations struct { - VStorageObjectAssociationsVmDiskAssociations []VStorageObjectAssociationsVmDiskAssociations `xml:"VStorageObjectAssociationsVmDiskAssociations,omitempty"` -} - -func init() { - t["ArrayOfVStorageObjectAssociationsVmDiskAssociations"] = reflect.TypeOf((*ArrayOfVStorageObjectAssociationsVmDiskAssociations)(nil)).Elem() -} - -type ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot struct { - VStorageObjectSnapshotInfoVStorageObjectSnapshot []VStorageObjectSnapshotInfoVStorageObjectSnapshot `xml:"VStorageObjectSnapshotInfoVStorageObjectSnapshot,omitempty"` -} - -func init() { - t["ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot"] = reflect.TypeOf((*ArrayOfVStorageObjectSnapshotInfoVStorageObjectSnapshot)(nil)).Elem() -} - -type ArrayOfVVolHostPE struct { - VVolHostPE []VVolHostPE `xml:"VVolHostPE,omitempty"` -} - -func init() { - t["ArrayOfVVolHostPE"] = reflect.TypeOf((*ArrayOfVVolHostPE)(nil)).Elem() -} - -type ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct { - VVolVmConfigFileUpdateResultFailedVmConfigFileInfo []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"VVolVmConfigFileUpdateResultFailedVmConfigFileInfo,omitempty"` -} - -func init() { - t["ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*ArrayOfVVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem() -} - -type ArrayOfVchaNodeRuntimeInfo struct { - VchaNodeRuntimeInfo []VchaNodeRuntimeInfo `xml:"VchaNodeRuntimeInfo,omitempty"` -} - -func init() { - t["ArrayOfVchaNodeRuntimeInfo"] = reflect.TypeOf((*ArrayOfVchaNodeRuntimeInfo)(nil)).Elem() -} - -type ArrayOfVimVasaProviderInfo struct { - VimVasaProviderInfo []VimVasaProviderInfo `xml:"VimVasaProviderInfo,omitempty"` -} - -func init() { - t["ArrayOfVimVasaProviderInfo"] = reflect.TypeOf((*ArrayOfVimVasaProviderInfo)(nil)).Elem() -} - -type ArrayOfVimVasaProviderStatePerArray struct { - VimVasaProviderStatePerArray []VimVasaProviderStatePerArray `xml:"VimVasaProviderStatePerArray,omitempty"` -} - -func init() { - t["ArrayOfVimVasaProviderStatePerArray"] = reflect.TypeOf((*ArrayOfVimVasaProviderStatePerArray)(nil)).Elem() -} - -type ArrayOfVirtualAppLinkInfo struct { - VirtualAppLinkInfo []VirtualAppLinkInfo `xml:"VirtualAppLinkInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualAppLinkInfo"] = reflect.TypeOf((*ArrayOfVirtualAppLinkInfo)(nil)).Elem() -} - -type ArrayOfVirtualDevice struct { - VirtualDevice []BaseVirtualDevice `xml:"VirtualDevice,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualDevice"] = reflect.TypeOf((*ArrayOfVirtualDevice)(nil)).Elem() -} - -type ArrayOfVirtualDeviceBackingOption struct { - VirtualDeviceBackingOption []BaseVirtualDeviceBackingOption `xml:"VirtualDeviceBackingOption,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualDeviceBackingOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceBackingOption)(nil)).Elem() -} - -type ArrayOfVirtualDeviceConfigSpec struct { - VirtualDeviceConfigSpec []BaseVirtualDeviceConfigSpec `xml:"VirtualDeviceConfigSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualDeviceConfigSpec"] = reflect.TypeOf((*ArrayOfVirtualDeviceConfigSpec)(nil)).Elem() -} - -type ArrayOfVirtualDeviceOption struct { - VirtualDeviceOption []BaseVirtualDeviceOption `xml:"VirtualDeviceOption,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualDeviceOption"] = reflect.TypeOf((*ArrayOfVirtualDeviceOption)(nil)).Elem() -} - -type ArrayOfVirtualDisk struct { - VirtualDisk []VirtualDisk `xml:"VirtualDisk,omitempty"` -} - -func init() { - t["ArrayOfVirtualDisk"] = reflect.TypeOf((*ArrayOfVirtualDisk)(nil)).Elem() -} - -type ArrayOfVirtualDiskDeltaDiskFormatsSupported struct { - VirtualDiskDeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"VirtualDiskDeltaDiskFormatsSupported,omitempty"` -} - -func init() { - t["ArrayOfVirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*ArrayOfVirtualDiskDeltaDiskFormatsSupported)(nil)).Elem() -} - -type ArrayOfVirtualDiskId struct { - VirtualDiskId []VirtualDiskId `xml:"VirtualDiskId,omitempty"` -} - -func init() { - t["ArrayOfVirtualDiskId"] = reflect.TypeOf((*ArrayOfVirtualDiskId)(nil)).Elem() -} - -type ArrayOfVirtualDiskRuleSpec struct { - VirtualDiskRuleSpec []VirtualDiskRuleSpec `xml:"VirtualDiskRuleSpec,omitempty"` -} - -func init() { - t["ArrayOfVirtualDiskRuleSpec"] = reflect.TypeOf((*ArrayOfVirtualDiskRuleSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachineBaseIndependentFilterSpec struct { - VirtualMachineBaseIndependentFilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"VirtualMachineBaseIndependentFilterSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineBaseIndependentFilterSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachineBootOptionsBootableDevice struct { - VirtualMachineBootOptionsBootableDevice []BaseVirtualMachineBootOptionsBootableDevice `xml:"VirtualMachineBootOptionsBootableDevice,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*ArrayOfVirtualMachineBootOptionsBootableDevice)(nil)).Elem() -} - -type ArrayOfVirtualMachineCdromInfo struct { - VirtualMachineCdromInfo []VirtualMachineCdromInfo `xml:"VirtualMachineCdromInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineCdromInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineCdromInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineCertThumbprint struct { - VirtualMachineCertThumbprint []VirtualMachineCertThumbprint `xml:"VirtualMachineCertThumbprint,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineCertThumbprint"] = reflect.TypeOf((*ArrayOfVirtualMachineCertThumbprint)(nil)).Elem() -} - -type ArrayOfVirtualMachineConfigInfoDatastoreUrlPair struct { - VirtualMachineConfigInfoDatastoreUrlPair []VirtualMachineConfigInfoDatastoreUrlPair `xml:"VirtualMachineConfigInfoDatastoreUrlPair,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem() -} - -type ArrayOfVirtualMachineConfigOptionDescriptor struct { - VirtualMachineConfigOptionDescriptor []VirtualMachineConfigOptionDescriptor `xml:"VirtualMachineConfigOptionDescriptor,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigOptionDescriptor)(nil)).Elem() -} - -type ArrayOfVirtualMachineConfigSpec struct { - VirtualMachineConfigSpec []VirtualMachineConfigSpec `xml:"VirtualMachineConfigSpec,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineConfigSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineConfigSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachineConnection struct { - VirtualMachineConnection []BaseVirtualMachineConnection `xml:"VirtualMachineConnection,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachineConnection"] = reflect.TypeOf((*ArrayOfVirtualMachineConnection)(nil)).Elem() -} - -type ArrayOfVirtualMachineCpuIdInfoSpec struct { - VirtualMachineCpuIdInfoSpec []VirtualMachineCpuIdInfoSpec `xml:"VirtualMachineCpuIdInfoSpec,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineCpuIdInfoSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachineDatastoreInfo struct { - VirtualMachineDatastoreInfo []VirtualMachineDatastoreInfo `xml:"VirtualMachineDatastoreInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDatastoreInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineDatastoreVolumeOption struct { - VirtualMachineDatastoreVolumeOption []VirtualMachineDatastoreVolumeOption `xml:"VirtualMachineDatastoreVolumeOption,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*ArrayOfVirtualMachineDatastoreVolumeOption)(nil)).Elem() -} - -type ArrayOfVirtualMachineDeviceRuntimeInfo struct { - VirtualMachineDeviceRuntimeInfo []VirtualMachineDeviceRuntimeInfo `xml:"VirtualMachineDeviceRuntimeInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDeviceRuntimeInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineDisplayTopology struct { - VirtualMachineDisplayTopology []VirtualMachineDisplayTopology `xml:"VirtualMachineDisplayTopology,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDisplayTopology"] = reflect.TypeOf((*ArrayOfVirtualMachineDisplayTopology)(nil)).Elem() -} - -type ArrayOfVirtualMachineDvxClassInfo struct { - VirtualMachineDvxClassInfo []VirtualMachineDvxClassInfo `xml:"VirtualMachineDvxClassInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDvxClassInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDvxClassInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineDynamicPassthroughInfo struct { - VirtualMachineDynamicPassthroughInfo []VirtualMachineDynamicPassthroughInfo `xml:"VirtualMachineDynamicPassthroughInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineDynamicPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineDynamicPassthroughInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineFeatureRequirement struct { - VirtualMachineFeatureRequirement []VirtualMachineFeatureRequirement `xml:"VirtualMachineFeatureRequirement,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFeatureRequirement"] = reflect.TypeOf((*ArrayOfVirtualMachineFeatureRequirement)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutDiskLayout struct { - VirtualMachineFileLayoutDiskLayout []VirtualMachineFileLayoutDiskLayout `xml:"VirtualMachineFileLayoutDiskLayout,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutDiskLayout)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutExDiskLayout struct { - VirtualMachineFileLayoutExDiskLayout []VirtualMachineFileLayoutExDiskLayout `xml:"VirtualMachineFileLayoutExDiskLayout,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskLayout)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutExDiskUnit struct { - VirtualMachineFileLayoutExDiskUnit []VirtualMachineFileLayoutExDiskUnit `xml:"VirtualMachineFileLayoutExDiskUnit,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExDiskUnit)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutExFileInfo struct { - VirtualMachineFileLayoutExFileInfo []VirtualMachineFileLayoutExFileInfo `xml:"VirtualMachineFileLayoutExFileInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExFileInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutExSnapshotLayout struct { - VirtualMachineFileLayoutExSnapshotLayout []VirtualMachineFileLayoutExSnapshotLayout `xml:"VirtualMachineFileLayoutExSnapshotLayout,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem() -} - -type ArrayOfVirtualMachineFileLayoutSnapshotLayout struct { - VirtualMachineFileLayoutSnapshotLayout []VirtualMachineFileLayoutSnapshotLayout `xml:"VirtualMachineFileLayoutSnapshotLayout,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*ArrayOfVirtualMachineFileLayoutSnapshotLayout)(nil)).Elem() -} - -type ArrayOfVirtualMachineFloppyInfo struct { - VirtualMachineFloppyInfo []VirtualMachineFloppyInfo `xml:"VirtualMachineFloppyInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineFloppyInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineFloppyInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineIdeDiskDeviceInfo struct { - VirtualMachineIdeDiskDeviceInfo []VirtualMachineIdeDiskDeviceInfo `xml:"VirtualMachineIdeDiskDeviceInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDeviceInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineIdeDiskDevicePartitionInfo struct { - VirtualMachineIdeDiskDevicePartitionInfo []VirtualMachineIdeDiskDevicePartitionInfo `xml:"VirtualMachineIdeDiskDevicePartitionInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineLegacyNetworkSwitchInfo struct { - VirtualMachineLegacyNetworkSwitchInfo []VirtualMachineLegacyNetworkSwitchInfo `xml:"VirtualMachineLegacyNetworkSwitchInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineMessage struct { - VirtualMachineMessage []VirtualMachineMessage `xml:"VirtualMachineMessage,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineMessage"] = reflect.TypeOf((*ArrayOfVirtualMachineMessage)(nil)).Elem() -} - -type ArrayOfVirtualMachineMetadataManagerVmMetadataInput struct { - VirtualMachineMetadataManagerVmMetadataInput []VirtualMachineMetadataManagerVmMetadataInput `xml:"VirtualMachineMetadataManagerVmMetadataInput,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem() -} - -type ArrayOfVirtualMachineMetadataManagerVmMetadataResult struct { - VirtualMachineMetadataManagerVmMetadataResult []VirtualMachineMetadataManagerVmMetadataResult `xml:"VirtualMachineMetadataManagerVmMetadataResult,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*ArrayOfVirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem() -} - -type ArrayOfVirtualMachineNetworkInfo struct { - VirtualMachineNetworkInfo []VirtualMachineNetworkInfo `xml:"VirtualMachineNetworkInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineNetworkInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineNetworkInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineParallelInfo struct { - VirtualMachineParallelInfo []VirtualMachineParallelInfo `xml:"VirtualMachineParallelInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineParallelInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineParallelInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachinePciPassthroughInfo struct { - VirtualMachinePciPassthroughInfo []BaseVirtualMachinePciPassthroughInfo `xml:"VirtualMachinePciPassthroughInfo,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciPassthroughInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachinePciSharedGpuPassthroughInfo struct { - VirtualMachinePciSharedGpuPassthroughInfo []VirtualMachinePciSharedGpuPassthroughInfo `xml:"VirtualMachinePciSharedGpuPassthroughInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachinePrecisionClockInfo struct { - VirtualMachinePrecisionClockInfo []VirtualMachinePrecisionClockInfo `xml:"VirtualMachinePrecisionClockInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachinePrecisionClockInfo"] = reflect.TypeOf((*ArrayOfVirtualMachinePrecisionClockInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineProfileDetailsDiskProfileDetails struct { - VirtualMachineProfileDetailsDiskProfileDetails []VirtualMachineProfileDetailsDiskProfileDetails `xml:"VirtualMachineProfileDetailsDiskProfileDetails,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineProfileDetailsDiskProfileDetails"] = reflect.TypeOf((*ArrayOfVirtualMachineProfileDetailsDiskProfileDetails)(nil)).Elem() -} - -type ArrayOfVirtualMachineProfileSpec struct { - VirtualMachineProfileSpec []BaseVirtualMachineProfileSpec `xml:"VirtualMachineProfileSpec,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachineProfileSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineProfileSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachinePropertyRelation struct { - VirtualMachinePropertyRelation []VirtualMachinePropertyRelation `xml:"VirtualMachinePropertyRelation,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachinePropertyRelation"] = reflect.TypeOf((*ArrayOfVirtualMachinePropertyRelation)(nil)).Elem() -} - -type ArrayOfVirtualMachineQuickStatsMemoryTierStats struct { - VirtualMachineQuickStatsMemoryTierStats []VirtualMachineQuickStatsMemoryTierStats `xml:"VirtualMachineQuickStatsMemoryTierStats,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineQuickStatsMemoryTierStats"] = reflect.TypeOf((*ArrayOfVirtualMachineQuickStatsMemoryTierStats)(nil)).Elem() -} - -type ArrayOfVirtualMachineRelocateSpecDiskLocator struct { - VirtualMachineRelocateSpecDiskLocator []VirtualMachineRelocateSpecDiskLocator `xml:"VirtualMachineRelocateSpecDiskLocator,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*ArrayOfVirtualMachineRelocateSpecDiskLocator)(nil)).Elem() -} - -type ArrayOfVirtualMachineScsiDiskDeviceInfo struct { - VirtualMachineScsiDiskDeviceInfo []VirtualMachineScsiDiskDeviceInfo `xml:"VirtualMachineScsiDiskDeviceInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiDiskDeviceInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineScsiPassthroughInfo struct { - VirtualMachineScsiPassthroughInfo []VirtualMachineScsiPassthroughInfo `xml:"VirtualMachineScsiPassthroughInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineScsiPassthroughInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineSerialInfo struct { - VirtualMachineSerialInfo []VirtualMachineSerialInfo `xml:"VirtualMachineSerialInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineSerialInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSerialInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineSnapshotTree struct { - VirtualMachineSnapshotTree []VirtualMachineSnapshotTree `xml:"VirtualMachineSnapshotTree,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineSnapshotTree"] = reflect.TypeOf((*ArrayOfVirtualMachineSnapshotTree)(nil)).Elem() -} - -type ArrayOfVirtualMachineSoundInfo struct { - VirtualMachineSoundInfo []VirtualMachineSoundInfo `xml:"VirtualMachineSoundInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineSoundInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSoundInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineSriovInfo struct { - VirtualMachineSriovInfo []VirtualMachineSriovInfo `xml:"VirtualMachineSriovInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineSriovInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineSriovInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineSummary struct { - VirtualMachineSummary []VirtualMachineSummary `xml:"VirtualMachineSummary,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineSummary"] = reflect.TypeOf((*ArrayOfVirtualMachineSummary)(nil)).Elem() -} - -type ArrayOfVirtualMachineUsageOnDatastore struct { - VirtualMachineUsageOnDatastore []VirtualMachineUsageOnDatastore `xml:"VirtualMachineUsageOnDatastore,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineUsageOnDatastore"] = reflect.TypeOf((*ArrayOfVirtualMachineUsageOnDatastore)(nil)).Elem() -} - -type ArrayOfVirtualMachineUsbInfo struct { - VirtualMachineUsbInfo []VirtualMachineUsbInfo `xml:"VirtualMachineUsbInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineUsbInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineUsbInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVFlashModuleInfo struct { - VirtualMachineVFlashModuleInfo []VirtualMachineVFlashModuleInfo `xml:"VirtualMachineVFlashModuleInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVFlashModuleInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVMCIDeviceFilterSpec struct { - VirtualMachineVMCIDeviceFilterSpec []VirtualMachineVMCIDeviceFilterSpec `xml:"VirtualMachineVMCIDeviceFilterSpec,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*ArrayOfVirtualMachineVMCIDeviceFilterSpec)(nil)).Elem() -} - -type ArrayOfVirtualMachineVcpuConfig struct { - VirtualMachineVcpuConfig []VirtualMachineVcpuConfig `xml:"VirtualMachineVcpuConfig,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVcpuConfig"] = reflect.TypeOf((*ArrayOfVirtualMachineVcpuConfig)(nil)).Elem() -} - -type ArrayOfVirtualMachineVendorDeviceGroupInfo struct { - VirtualMachineVendorDeviceGroupInfo []VirtualMachineVendorDeviceGroupInfo `xml:"VirtualMachineVendorDeviceGroupInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVendorDeviceGroupInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVendorDeviceGroupInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVendorDeviceGroupInfoComponentDeviceInfo struct { - VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo []VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo `xml:"VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVendorDeviceGroupInfoComponentDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVendorDeviceGroupInfoComponentDeviceInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVgpuDeviceInfo struct { - VirtualMachineVgpuDeviceInfo []VirtualMachineVgpuDeviceInfo `xml:"VirtualMachineVgpuDeviceInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVgpuDeviceInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVgpuDeviceInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVgpuProfileInfo struct { - VirtualMachineVgpuProfileInfo []VirtualMachineVgpuProfileInfo `xml:"VirtualMachineVgpuProfileInfo,omitempty"` -} - -func init() { - t["ArrayOfVirtualMachineVgpuProfileInfo"] = reflect.TypeOf((*ArrayOfVirtualMachineVgpuProfileInfo)(nil)).Elem() -} - -type ArrayOfVirtualMachineVirtualDeviceGroupsDeviceGroup struct { - VirtualMachineVirtualDeviceGroupsDeviceGroup []BaseVirtualMachineVirtualDeviceGroupsDeviceGroup `xml:"VirtualMachineVirtualDeviceGroupsDeviceGroup,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVirtualMachineVirtualDeviceGroupsDeviceGroup"] = reflect.TypeOf((*ArrayOfVirtualMachineVirtualDeviceGroupsDeviceGroup)(nil)).Elem() -} - -type ArrayOfVirtualNicManagerNetConfig struct { - VirtualNicManagerNetConfig []VirtualNicManagerNetConfig `xml:"VirtualNicManagerNetConfig,omitempty"` -} - -func init() { - t["ArrayOfVirtualNicManagerNetConfig"] = reflect.TypeOf((*ArrayOfVirtualNicManagerNetConfig)(nil)).Elem() -} - -type ArrayOfVirtualPCIPassthroughAllowedDevice struct { - VirtualPCIPassthroughAllowedDevice []VirtualPCIPassthroughAllowedDevice `xml:"VirtualPCIPassthroughAllowedDevice,omitempty"` -} - -func init() { - t["ArrayOfVirtualPCIPassthroughAllowedDevice"] = reflect.TypeOf((*ArrayOfVirtualPCIPassthroughAllowedDevice)(nil)).Elem() -} - -type ArrayOfVirtualSCSISharing struct { - VirtualSCSISharing []VirtualSCSISharing `xml:"VirtualSCSISharing,omitempty"` -} - -func init() { - t["ArrayOfVirtualSCSISharing"] = reflect.TypeOf((*ArrayOfVirtualSCSISharing)(nil)).Elem() -} - -type ArrayOfVirtualSwitchProfile struct { - VirtualSwitchProfile []VirtualSwitchProfile `xml:"VirtualSwitchProfile,omitempty"` -} - -func init() { - t["ArrayOfVirtualSwitchProfile"] = reflect.TypeOf((*ArrayOfVirtualSwitchProfile)(nil)).Elem() -} - -type ArrayOfVmEventArgument struct { - VmEventArgument []VmEventArgument `xml:"VmEventArgument,omitempty"` -} - -func init() { - t["ArrayOfVmEventArgument"] = reflect.TypeOf((*ArrayOfVmEventArgument)(nil)).Elem() -} - -type ArrayOfVmPodConfigForPlacement struct { - VmPodConfigForPlacement []VmPodConfigForPlacement `xml:"VmPodConfigForPlacement,omitempty"` -} - -func init() { - t["ArrayOfVmPodConfigForPlacement"] = reflect.TypeOf((*ArrayOfVmPodConfigForPlacement)(nil)).Elem() -} - -type ArrayOfVmPortGroupProfile struct { - VmPortGroupProfile []VmPortGroupProfile `xml:"VmPortGroupProfile,omitempty"` -} - -func init() { - t["ArrayOfVmPortGroupProfile"] = reflect.TypeOf((*ArrayOfVmPortGroupProfile)(nil)).Elem() -} - -type ArrayOfVmfsConfigOption struct { - VmfsConfigOption []VmfsConfigOption `xml:"VmfsConfigOption,omitempty"` -} - -func init() { - t["ArrayOfVmfsConfigOption"] = reflect.TypeOf((*ArrayOfVmfsConfigOption)(nil)).Elem() -} - -type ArrayOfVmfsDatastoreOption struct { - VmfsDatastoreOption []VmfsDatastoreOption `xml:"VmfsDatastoreOption,omitempty"` -} - -func init() { - t["ArrayOfVmfsDatastoreOption"] = reflect.TypeOf((*ArrayOfVmfsDatastoreOption)(nil)).Elem() -} - -type ArrayOfVnicPortArgument struct { - VnicPortArgument []VnicPortArgument `xml:"VnicPortArgument,omitempty"` -} - -func init() { - t["ArrayOfVnicPortArgument"] = reflect.TypeOf((*ArrayOfVnicPortArgument)(nil)).Elem() -} - -type ArrayOfVsanHostConfigInfo struct { - VsanHostConfigInfo []VsanHostConfigInfo `xml:"VsanHostConfigInfo,omitempty"` -} - -func init() { - t["ArrayOfVsanHostConfigInfo"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfo)(nil)).Elem() -} - -type ArrayOfVsanHostConfigInfoNetworkInfoPortConfig struct { - VsanHostConfigInfoNetworkInfoPortConfig []VsanHostConfigInfoNetworkInfoPortConfig `xml:"VsanHostConfigInfoNetworkInfoPortConfig,omitempty"` -} - -func init() { - t["ArrayOfVsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*ArrayOfVsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem() -} - -type ArrayOfVsanHostDiskMapInfo struct { - VsanHostDiskMapInfo []VsanHostDiskMapInfo `xml:"VsanHostDiskMapInfo,omitempty"` -} - -func init() { - t["ArrayOfVsanHostDiskMapInfo"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapInfo)(nil)).Elem() -} - -type ArrayOfVsanHostDiskMapResult struct { - VsanHostDiskMapResult []VsanHostDiskMapResult `xml:"VsanHostDiskMapResult,omitempty"` -} - -func init() { - t["ArrayOfVsanHostDiskMapResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapResult)(nil)).Elem() -} - -type ArrayOfVsanHostDiskMapping struct { - VsanHostDiskMapping []VsanHostDiskMapping `xml:"VsanHostDiskMapping,omitempty"` -} - -func init() { - t["ArrayOfVsanHostDiskMapping"] = reflect.TypeOf((*ArrayOfVsanHostDiskMapping)(nil)).Elem() -} - -type ArrayOfVsanHostDiskResult struct { - VsanHostDiskResult []VsanHostDiskResult `xml:"VsanHostDiskResult,omitempty"` -} - -func init() { - t["ArrayOfVsanHostDiskResult"] = reflect.TypeOf((*ArrayOfVsanHostDiskResult)(nil)).Elem() -} - -type ArrayOfVsanHostMembershipInfo struct { - VsanHostMembershipInfo []VsanHostMembershipInfo `xml:"VsanHostMembershipInfo,omitempty"` -} - -func init() { - t["ArrayOfVsanHostMembershipInfo"] = reflect.TypeOf((*ArrayOfVsanHostMembershipInfo)(nil)).Elem() -} - -type ArrayOfVsanHostRuntimeInfoDiskIssue struct { - VsanHostRuntimeInfoDiskIssue []VsanHostRuntimeInfoDiskIssue `xml:"VsanHostRuntimeInfoDiskIssue,omitempty"` -} - -func init() { - t["ArrayOfVsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*ArrayOfVsanHostRuntimeInfoDiskIssue)(nil)).Elem() -} - -type ArrayOfVsanNewPolicyBatch struct { - VsanNewPolicyBatch []VsanNewPolicyBatch `xml:"VsanNewPolicyBatch,omitempty"` -} - -func init() { - t["ArrayOfVsanNewPolicyBatch"] = reflect.TypeOf((*ArrayOfVsanNewPolicyBatch)(nil)).Elem() -} - -type ArrayOfVsanPolicyChangeBatch struct { - VsanPolicyChangeBatch []VsanPolicyChangeBatch `xml:"VsanPolicyChangeBatch,omitempty"` -} - -func init() { - t["ArrayOfVsanPolicyChangeBatch"] = reflect.TypeOf((*ArrayOfVsanPolicyChangeBatch)(nil)).Elem() -} - -type ArrayOfVsanPolicySatisfiability struct { - VsanPolicySatisfiability []VsanPolicySatisfiability `xml:"VsanPolicySatisfiability,omitempty"` -} - -func init() { - t["ArrayOfVsanPolicySatisfiability"] = reflect.TypeOf((*ArrayOfVsanPolicySatisfiability)(nil)).Elem() -} - -type ArrayOfVsanUpgradeSystemNetworkPartitionInfo struct { - VsanUpgradeSystemNetworkPartitionInfo []VsanUpgradeSystemNetworkPartitionInfo `xml:"VsanUpgradeSystemNetworkPartitionInfo,omitempty"` -} - -func init() { - t["ArrayOfVsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem() -} - -type ArrayOfVsanUpgradeSystemPreflightCheckIssue struct { - VsanUpgradeSystemPreflightCheckIssue []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"VsanUpgradeSystemPreflightCheckIssue,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() -} - -type ArrayOfVsanUpgradeSystemUpgradeHistoryItem struct { - VsanUpgradeSystemUpgradeHistoryItem []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"VsanUpgradeSystemUpgradeHistoryItem,omitempty,typeattr"` -} - -func init() { - t["ArrayOfVsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*ArrayOfVsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() -} - -type ArrayOfVslmTagEntry struct { - VslmTagEntry []VslmTagEntry `xml:"VslmTagEntry,omitempty"` -} - -func init() { - t["ArrayOfVslmTagEntry"] = reflect.TypeOf((*ArrayOfVslmTagEntry)(nil)).Elem() -} - -type ArrayOfVslmInfrastructureObjectPolicy struct { - VslmInfrastructureObjectPolicy []VslmInfrastructureObjectPolicy `xml:"vslmInfrastructureObjectPolicy,omitempty"` -} - -func init() { - t["ArrayOfvslmInfrastructureObjectPolicy"] = reflect.TypeOf((*ArrayOfVslmInfrastructureObjectPolicy)(nil)).Elem() -} - -type ArrayUpdateSpec struct { - DynamicData - - Operation ArrayUpdateOperation `xml:"operation"` - RemoveKey AnyType `xml:"removeKey,omitempty,typeattr"` -} - -func init() { - t["ArrayUpdateSpec"] = reflect.TypeOf((*ArrayUpdateSpec)(nil)).Elem() -} - -type AssignUserToGroup AssignUserToGroupRequestType - -func init() { - t["AssignUserToGroup"] = reflect.TypeOf((*AssignUserToGroup)(nil)).Elem() -} - -type AssignUserToGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - User string `xml:"user"` - Group string `xml:"group"` -} - -func init() { - t["AssignUserToGroupRequestType"] = reflect.TypeOf((*AssignUserToGroupRequestType)(nil)).Elem() -} - -type AssignUserToGroupResponse struct { -} - -type AssociateProfile AssociateProfileRequestType - -func init() { - t["AssociateProfile"] = reflect.TypeOf((*AssociateProfile)(nil)).Elem() -} - -type AssociateProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity"` -} - -func init() { - t["AssociateProfileRequestType"] = reflect.TypeOf((*AssociateProfileRequestType)(nil)).Elem() -} - -type AssociateProfileResponse struct { -} - -type AttachDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - DiskId ID `xml:"diskId"` - Datastore ManagedObjectReference `xml:"datastore"` - ControllerKey int32 `xml:"controllerKey,omitempty"` - UnitNumber *int32 `xml:"unitNumber"` -} - -func init() { - t["AttachDiskRequestType"] = reflect.TypeOf((*AttachDiskRequestType)(nil)).Elem() -} - -type AttachDisk_Task AttachDiskRequestType - -func init() { - t["AttachDisk_Task"] = reflect.TypeOf((*AttachDisk_Task)(nil)).Elem() -} - -type AttachDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AttachScsiLun AttachScsiLunRequestType - -func init() { - t["AttachScsiLun"] = reflect.TypeOf((*AttachScsiLun)(nil)).Elem() -} - -type AttachScsiLunExRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid []string `xml:"lunUuid"` -} - -func init() { - t["AttachScsiLunExRequestType"] = reflect.TypeOf((*AttachScsiLunExRequestType)(nil)).Elem() -} - -type AttachScsiLunEx_Task AttachScsiLunExRequestType - -func init() { - t["AttachScsiLunEx_Task"] = reflect.TypeOf((*AttachScsiLunEx_Task)(nil)).Elem() -} - -type AttachScsiLunEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type AttachScsiLunRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid string `xml:"lunUuid"` -} - -func init() { - t["AttachScsiLunRequestType"] = reflect.TypeOf((*AttachScsiLunRequestType)(nil)).Elem() -} - -type AttachScsiLunResponse struct { -} - -type AttachTagToVStorageObject AttachTagToVStorageObjectRequestType - -func init() { - t["AttachTagToVStorageObject"] = reflect.TypeOf((*AttachTagToVStorageObject)(nil)).Elem() -} - -type AttachTagToVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Category string `xml:"category"` - Tag string `xml:"tag"` -} - -func init() { - t["AttachTagToVStorageObjectRequestType"] = reflect.TypeOf((*AttachTagToVStorageObjectRequestType)(nil)).Elem() -} - -type AttachTagToVStorageObjectResponse struct { -} - -type AttachVmfsExtent AttachVmfsExtentRequestType - -func init() { - t["AttachVmfsExtent"] = reflect.TypeOf((*AttachVmfsExtent)(nil)).Elem() -} - -type AttachVmfsExtentRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsPath string `xml:"vmfsPath"` - Extent HostScsiDiskPartition `xml:"extent"` -} - -func init() { - t["AttachVmfsExtentRequestType"] = reflect.TypeOf((*AttachVmfsExtentRequestType)(nil)).Elem() -} - -type AttachVmfsExtentResponse struct { -} - -type AuthMinimumAdminPermission struct { - VimFault -} - -func init() { - t["AuthMinimumAdminPermission"] = reflect.TypeOf((*AuthMinimumAdminPermission)(nil)).Elem() -} - -type AuthMinimumAdminPermissionFault AuthMinimumAdminPermission - -func init() { - t["AuthMinimumAdminPermissionFault"] = reflect.TypeOf((*AuthMinimumAdminPermissionFault)(nil)).Elem() -} - -type AuthenticationProfile struct { - ApplyProfile - - ActiveDirectory *ActiveDirectoryProfile `xml:"activeDirectory,omitempty"` -} - -func init() { - t["AuthenticationProfile"] = reflect.TypeOf((*AuthenticationProfile)(nil)).Elem() -} - -type AuthorizationDescription struct { - DynamicData - - Privilege []BaseElementDescription `xml:"privilege,typeattr"` - PrivilegeGroup []BaseElementDescription `xml:"privilegeGroup,typeattr"` -} - -func init() { - t["AuthorizationDescription"] = reflect.TypeOf((*AuthorizationDescription)(nil)).Elem() -} - -type AuthorizationEvent struct { - Event -} - -func init() { - t["AuthorizationEvent"] = reflect.TypeOf((*AuthorizationEvent)(nil)).Elem() -} - -type AuthorizationPrivilege struct { - DynamicData - - PrivId string `xml:"privId"` - OnParent bool `xml:"onParent"` - Name string `xml:"name"` - PrivGroupName string `xml:"privGroupName"` -} - -func init() { - t["AuthorizationPrivilege"] = reflect.TypeOf((*AuthorizationPrivilege)(nil)).Elem() -} - -type AuthorizationRole struct { - DynamicData - - RoleId int32 `xml:"roleId"` - System bool `xml:"system"` - Name string `xml:"name"` - Info BaseDescription `xml:"info,typeattr"` - Privilege []string `xml:"privilege,omitempty"` -} - -func init() { - t["AuthorizationRole"] = reflect.TypeOf((*AuthorizationRole)(nil)).Elem() -} - -type AutoStartDefaults struct { - DynamicData - - Enabled *bool `xml:"enabled"` - StartDelay int32 `xml:"startDelay,omitempty"` - StopDelay int32 `xml:"stopDelay,omitempty"` - WaitForHeartbeat *bool `xml:"waitForHeartbeat"` - StopAction string `xml:"stopAction,omitempty"` -} - -func init() { - t["AutoStartDefaults"] = reflect.TypeOf((*AutoStartDefaults)(nil)).Elem() -} - -type AutoStartPowerInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - StartOrder int32 `xml:"startOrder"` - StartDelay int32 `xml:"startDelay"` - WaitForHeartbeat AutoStartWaitHeartbeatSetting `xml:"waitForHeartbeat"` - StartAction string `xml:"startAction"` - StopDelay int32 `xml:"stopDelay"` - StopAction string `xml:"stopAction"` -} - -func init() { - t["AutoStartPowerInfo"] = reflect.TypeOf((*AutoStartPowerInfo)(nil)).Elem() -} - -type AutoStartPowerOff AutoStartPowerOffRequestType - -func init() { - t["AutoStartPowerOff"] = reflect.TypeOf((*AutoStartPowerOff)(nil)).Elem() -} - -type AutoStartPowerOffRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AutoStartPowerOffRequestType"] = reflect.TypeOf((*AutoStartPowerOffRequestType)(nil)).Elem() -} - -type AutoStartPowerOffResponse struct { -} - -type AutoStartPowerOn AutoStartPowerOnRequestType - -func init() { - t["AutoStartPowerOn"] = reflect.TypeOf((*AutoStartPowerOn)(nil)).Elem() -} - -type AutoStartPowerOnRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["AutoStartPowerOnRequestType"] = reflect.TypeOf((*AutoStartPowerOnRequestType)(nil)).Elem() -} - -type AutoStartPowerOnResponse struct { -} - -type BackupBlobReadFailure struct { - DvsFault - - EntityName string `xml:"entityName"` - EntityType string `xml:"entityType"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["BackupBlobReadFailure"] = reflect.TypeOf((*BackupBlobReadFailure)(nil)).Elem() -} - -type BackupBlobReadFailureFault BackupBlobReadFailure - -func init() { - t["BackupBlobReadFailureFault"] = reflect.TypeOf((*BackupBlobReadFailureFault)(nil)).Elem() -} - -type BackupBlobWriteFailure struct { - DvsFault - - EntityName string `xml:"entityName"` - EntityType string `xml:"entityType"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["BackupBlobWriteFailure"] = reflect.TypeOf((*BackupBlobWriteFailure)(nil)).Elem() -} - -type BackupBlobWriteFailureFault BackupBlobWriteFailure - -func init() { - t["BackupBlobWriteFailureFault"] = reflect.TypeOf((*BackupBlobWriteFailureFault)(nil)).Elem() -} - -type BackupFirmwareConfiguration BackupFirmwareConfigurationRequestType - -func init() { - t["BackupFirmwareConfiguration"] = reflect.TypeOf((*BackupFirmwareConfiguration)(nil)).Elem() -} - -type BackupFirmwareConfigurationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["BackupFirmwareConfigurationRequestType"] = reflect.TypeOf((*BackupFirmwareConfigurationRequestType)(nil)).Elem() -} - -type BackupFirmwareConfigurationResponse struct { - Returnval string `xml:"returnval"` -} - -type BadUsernameSessionEvent struct { - SessionEvent - - IpAddress string `xml:"ipAddress"` -} - -func init() { - t["BadUsernameSessionEvent"] = reflect.TypeOf((*BadUsernameSessionEvent)(nil)).Elem() -} - -type BaseConfigInfo struct { - DynamicData - - Id ID `xml:"id"` - Name string `xml:"name"` - CreateTime time.Time `xml:"createTime"` - KeepAfterDeleteVm *bool `xml:"keepAfterDeleteVm"` - RelocationDisabled *bool `xml:"relocationDisabled"` - NativeSnapshotSupported *bool `xml:"nativeSnapshotSupported"` - ChangedBlockTrackingEnabled *bool `xml:"changedBlockTrackingEnabled"` - Backing BaseBaseConfigInfoBackingInfo `xml:"backing,typeattr"` - Metadata []KeyValue `xml:"metadata,omitempty"` - Vclock *VslmVClockInfo `xml:"vclock,omitempty"` - Iofilter []string `xml:"iofilter,omitempty"` -} - -func init() { - t["BaseConfigInfo"] = reflect.TypeOf((*BaseConfigInfo)(nil)).Elem() -} - -type BaseConfigInfoBackingInfo struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["BaseConfigInfoBackingInfo"] = reflect.TypeOf((*BaseConfigInfoBackingInfo)(nil)).Elem() -} - -type BaseConfigInfoDiskFileBackingInfo struct { - BaseConfigInfoFileBackingInfo - - ProvisioningType string `xml:"provisioningType"` -} - -func init() { - t["BaseConfigInfoDiskFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoDiskFileBackingInfo)(nil)).Elem() -} - -type BaseConfigInfoFileBackingInfo struct { - BaseConfigInfoBackingInfo - - FilePath string `xml:"filePath"` - BackingObjectId string `xml:"backingObjectId,omitempty"` - Parent BaseBaseConfigInfoFileBackingInfo `xml:"parent,omitempty,typeattr"` - DeltaSizeInMB int64 `xml:"deltaSizeInMB,omitempty"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["BaseConfigInfoFileBackingInfo"] = reflect.TypeOf((*BaseConfigInfoFileBackingInfo)(nil)).Elem() -} - -type BaseConfigInfoRawDiskMappingBackingInfo struct { - BaseConfigInfoFileBackingInfo - - LunUuid string `xml:"lunUuid"` - CompatibilityMode string `xml:"compatibilityMode"` -} - -func init() { - t["BaseConfigInfoRawDiskMappingBackingInfo"] = reflect.TypeOf((*BaseConfigInfoRawDiskMappingBackingInfo)(nil)).Elem() -} - -type BatchAddHostsToClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster ManagedObjectReference `xml:"cluster"` - NewHosts []FolderNewHostSpec `xml:"newHosts,omitempty"` - ExistingHosts []ManagedObjectReference `xml:"existingHosts,omitempty"` - CompResSpec BaseComputeResourceConfigSpec `xml:"compResSpec,omitempty,typeattr"` - DesiredState string `xml:"desiredState,omitempty"` -} - -func init() { - t["BatchAddHostsToClusterRequestType"] = reflect.TypeOf((*BatchAddHostsToClusterRequestType)(nil)).Elem() -} - -type BatchAddHostsToCluster_Task BatchAddHostsToClusterRequestType - -func init() { - t["BatchAddHostsToCluster_Task"] = reflect.TypeOf((*BatchAddHostsToCluster_Task)(nil)).Elem() -} - -type BatchAddHostsToCluster_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type BatchAddStandaloneHostsRequestType struct { - This ManagedObjectReference `xml:"_this"` - NewHosts []FolderNewHostSpec `xml:"newHosts,omitempty"` - CompResSpec BaseComputeResourceConfigSpec `xml:"compResSpec,omitempty,typeattr"` - AddConnected bool `xml:"addConnected"` -} - -func init() { - t["BatchAddStandaloneHostsRequestType"] = reflect.TypeOf((*BatchAddStandaloneHostsRequestType)(nil)).Elem() -} - -type BatchAddStandaloneHosts_Task BatchAddStandaloneHostsRequestType - -func init() { - t["BatchAddStandaloneHosts_Task"] = reflect.TypeOf((*BatchAddStandaloneHosts_Task)(nil)).Elem() -} - -type BatchAddStandaloneHosts_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type BatchQueryConnectInfo BatchQueryConnectInfoRequestType - -func init() { - t["BatchQueryConnectInfo"] = reflect.TypeOf((*BatchQueryConnectInfo)(nil)).Elem() -} - -type BatchQueryConnectInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - HostSpecs []HostConnectSpec `xml:"hostSpecs,omitempty"` -} - -func init() { - t["BatchQueryConnectInfoRequestType"] = reflect.TypeOf((*BatchQueryConnectInfoRequestType)(nil)).Elem() -} - -type BatchQueryConnectInfoResponse struct { - Returnval []DatacenterBasicConnectInfo `xml:"returnval,omitempty"` -} - -type BatchResult struct { - DynamicData - - Result string `xml:"result"` - HostKey string `xml:"hostKey"` - Ds *ManagedObjectReference `xml:"ds,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["BatchResult"] = reflect.TypeOf((*BatchResult)(nil)).Elem() -} - -type BindVnic BindVnicRequestType - -func init() { - t["BindVnic"] = reflect.TypeOf((*BindVnic)(nil)).Elem() -} - -type BindVnicRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaName string `xml:"iScsiHbaName"` - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["BindVnicRequestType"] = reflect.TypeOf((*BindVnicRequestType)(nil)).Elem() -} - -type BindVnicResponse struct { -} - -type BlockedByFirewall struct { - HostConfigFault -} - -func init() { - t["BlockedByFirewall"] = reflect.TypeOf((*BlockedByFirewall)(nil)).Elem() -} - -type BlockedByFirewallFault BlockedByFirewall - -func init() { - t["BlockedByFirewallFault"] = reflect.TypeOf((*BlockedByFirewallFault)(nil)).Elem() -} - -type BoolOption struct { - OptionType - - Supported bool `xml:"supported"` - DefaultValue bool `xml:"defaultValue"` -} - -func init() { - t["BoolOption"] = reflect.TypeOf((*BoolOption)(nil)).Elem() -} - -type BoolPolicy struct { - InheritablePolicy - - Value *bool `xml:"value"` -} - -func init() { - t["BoolPolicy"] = reflect.TypeOf((*BoolPolicy)(nil)).Elem() -} - -type BrowseDiagnosticLog BrowseDiagnosticLogRequestType - -func init() { - t["BrowseDiagnosticLog"] = reflect.TypeOf((*BrowseDiagnosticLog)(nil)).Elem() -} - -type BrowseDiagnosticLogRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Key string `xml:"key"` - Start int32 `xml:"start,omitempty"` - Lines int32 `xml:"lines,omitempty"` -} - -func init() { - t["BrowseDiagnosticLogRequestType"] = reflect.TypeOf((*BrowseDiagnosticLogRequestType)(nil)).Elem() -} - -type BrowseDiagnosticLogResponse struct { - Returnval DiagnosticManagerLogHeader `xml:"returnval"` -} - -type CAMServerRefusedConnection struct { - InvalidCAMServer -} - -func init() { - t["CAMServerRefusedConnection"] = reflect.TypeOf((*CAMServerRefusedConnection)(nil)).Elem() -} - -type CAMServerRefusedConnectionFault CAMServerRefusedConnection - -func init() { - t["CAMServerRefusedConnectionFault"] = reflect.TypeOf((*CAMServerRefusedConnectionFault)(nil)).Elem() -} - -type CanProvisionObjects CanProvisionObjectsRequestType - -func init() { - t["CanProvisionObjects"] = reflect.TypeOf((*CanProvisionObjects)(nil)).Elem() -} - -type CanProvisionObjectsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Npbs []VsanNewPolicyBatch `xml:"npbs"` - IgnoreSatisfiability *bool `xml:"ignoreSatisfiability"` -} - -func init() { - t["CanProvisionObjectsRequestType"] = reflect.TypeOf((*CanProvisionObjectsRequestType)(nil)).Elem() -} - -type CanProvisionObjectsResponse struct { - Returnval []VsanPolicySatisfiability `xml:"returnval"` -} - -type CancelRecommendation CancelRecommendationRequestType - -func init() { - t["CancelRecommendation"] = reflect.TypeOf((*CancelRecommendation)(nil)).Elem() -} - -type CancelRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key string `xml:"key"` -} - -func init() { - t["CancelRecommendationRequestType"] = reflect.TypeOf((*CancelRecommendationRequestType)(nil)).Elem() -} - -type CancelRecommendationResponse struct { -} - -type CancelRetrievePropertiesEx CancelRetrievePropertiesExRequestType - -func init() { - t["CancelRetrievePropertiesEx"] = reflect.TypeOf((*CancelRetrievePropertiesEx)(nil)).Elem() -} - -type CancelRetrievePropertiesExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Token string `xml:"token"` -} - -func init() { - t["CancelRetrievePropertiesExRequestType"] = reflect.TypeOf((*CancelRetrievePropertiesExRequestType)(nil)).Elem() -} - -type CancelRetrievePropertiesExResponse struct { -} - -type CancelStorageDrsRecommendation CancelStorageDrsRecommendationRequestType - -func init() { - t["CancelStorageDrsRecommendation"] = reflect.TypeOf((*CancelStorageDrsRecommendation)(nil)).Elem() -} - -type CancelStorageDrsRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key []string `xml:"key"` -} - -func init() { - t["CancelStorageDrsRecommendationRequestType"] = reflect.TypeOf((*CancelStorageDrsRecommendationRequestType)(nil)).Elem() -} - -type CancelStorageDrsRecommendationResponse struct { -} - -type CancelTask CancelTaskRequestType - -func init() { - t["CancelTask"] = reflect.TypeOf((*CancelTask)(nil)).Elem() -} - -type CancelTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CancelTaskRequestType"] = reflect.TypeOf((*CancelTaskRequestType)(nil)).Elem() -} - -type CancelTaskResponse struct { -} - -type CancelWaitForUpdates CancelWaitForUpdatesRequestType - -func init() { - t["CancelWaitForUpdates"] = reflect.TypeOf((*CancelWaitForUpdates)(nil)).Elem() -} - -type CancelWaitForUpdatesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CancelWaitForUpdatesRequestType"] = reflect.TypeOf((*CancelWaitForUpdatesRequestType)(nil)).Elem() -} - -type CancelWaitForUpdatesResponse struct { -} - -type CanceledHostOperationEvent struct { - HostEvent -} - -func init() { - t["CanceledHostOperationEvent"] = reflect.TypeOf((*CanceledHostOperationEvent)(nil)).Elem() -} - -type CannotAccessFile struct { - FileFault -} - -func init() { - t["CannotAccessFile"] = reflect.TypeOf((*CannotAccessFile)(nil)).Elem() -} - -type CannotAccessFileFault CannotAccessFile - -func init() { - t["CannotAccessFileFault"] = reflect.TypeOf((*CannotAccessFileFault)(nil)).Elem() -} - -type CannotAccessLocalSource struct { - VimFault -} - -func init() { - t["CannotAccessLocalSource"] = reflect.TypeOf((*CannotAccessLocalSource)(nil)).Elem() -} - -type CannotAccessLocalSourceFault CannotAccessLocalSource - -func init() { - t["CannotAccessLocalSourceFault"] = reflect.TypeOf((*CannotAccessLocalSourceFault)(nil)).Elem() -} - -type CannotAccessNetwork struct { - CannotAccessVmDevice - - Network *ManagedObjectReference `xml:"network,omitempty"` -} - -func init() { - t["CannotAccessNetwork"] = reflect.TypeOf((*CannotAccessNetwork)(nil)).Elem() -} - -type CannotAccessNetworkFault BaseCannotAccessNetwork - -func init() { - t["CannotAccessNetworkFault"] = reflect.TypeOf((*CannotAccessNetworkFault)(nil)).Elem() -} - -type CannotAccessVmComponent struct { - VmConfigFault -} - -func init() { - t["CannotAccessVmComponent"] = reflect.TypeOf((*CannotAccessVmComponent)(nil)).Elem() -} - -type CannotAccessVmComponentFault BaseCannotAccessVmComponent - -func init() { - t["CannotAccessVmComponentFault"] = reflect.TypeOf((*CannotAccessVmComponentFault)(nil)).Elem() -} - -type CannotAccessVmConfig struct { - CannotAccessVmComponent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["CannotAccessVmConfig"] = reflect.TypeOf((*CannotAccessVmConfig)(nil)).Elem() -} - -type CannotAccessVmConfigFault CannotAccessVmConfig - -func init() { - t["CannotAccessVmConfigFault"] = reflect.TypeOf((*CannotAccessVmConfigFault)(nil)).Elem() -} - -type CannotAccessVmDevice struct { - CannotAccessVmComponent - - Device string `xml:"device"` - Backing string `xml:"backing"` - Connected bool `xml:"connected"` -} - -func init() { - t["CannotAccessVmDevice"] = reflect.TypeOf((*CannotAccessVmDevice)(nil)).Elem() -} - -type CannotAccessVmDeviceFault BaseCannotAccessVmDevice - -func init() { - t["CannotAccessVmDeviceFault"] = reflect.TypeOf((*CannotAccessVmDeviceFault)(nil)).Elem() -} - -type CannotAccessVmDisk struct { - CannotAccessVmDevice - - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["CannotAccessVmDisk"] = reflect.TypeOf((*CannotAccessVmDisk)(nil)).Elem() -} - -type CannotAccessVmDiskFault BaseCannotAccessVmDisk - -func init() { - t["CannotAccessVmDiskFault"] = reflect.TypeOf((*CannotAccessVmDiskFault)(nil)).Elem() -} - -type CannotAddHostWithFTVmAsStandalone struct { - HostConnectFault -} - -func init() { - t["CannotAddHostWithFTVmAsStandalone"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandalone)(nil)).Elem() -} - -type CannotAddHostWithFTVmAsStandaloneFault CannotAddHostWithFTVmAsStandalone - -func init() { - t["CannotAddHostWithFTVmAsStandaloneFault"] = reflect.TypeOf((*CannotAddHostWithFTVmAsStandaloneFault)(nil)).Elem() -} - -type CannotAddHostWithFTVmToDifferentCluster struct { - HostConnectFault -} - -func init() { - t["CannotAddHostWithFTVmToDifferentCluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentCluster)(nil)).Elem() -} - -type CannotAddHostWithFTVmToDifferentClusterFault CannotAddHostWithFTVmToDifferentCluster - -func init() { - t["CannotAddHostWithFTVmToDifferentClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToDifferentClusterFault)(nil)).Elem() -} - -type CannotAddHostWithFTVmToNonHACluster struct { - HostConnectFault -} - -func init() { - t["CannotAddHostWithFTVmToNonHACluster"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHACluster)(nil)).Elem() -} - -type CannotAddHostWithFTVmToNonHAClusterFault CannotAddHostWithFTVmToNonHACluster - -func init() { - t["CannotAddHostWithFTVmToNonHAClusterFault"] = reflect.TypeOf((*CannotAddHostWithFTVmToNonHAClusterFault)(nil)).Elem() -} - -type CannotChangeDrsBehaviorForFtSecondary struct { - VmFaultToleranceIssue - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["CannotChangeDrsBehaviorForFtSecondary"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondary)(nil)).Elem() -} - -type CannotChangeDrsBehaviorForFtSecondaryFault CannotChangeDrsBehaviorForFtSecondary - -func init() { - t["CannotChangeDrsBehaviorForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeDrsBehaviorForFtSecondaryFault)(nil)).Elem() -} - -type CannotChangeHaSettingsForFtSecondary struct { - VmFaultToleranceIssue - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["CannotChangeHaSettingsForFtSecondary"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondary)(nil)).Elem() -} - -type CannotChangeHaSettingsForFtSecondaryFault CannotChangeHaSettingsForFtSecondary - -func init() { - t["CannotChangeHaSettingsForFtSecondaryFault"] = reflect.TypeOf((*CannotChangeHaSettingsForFtSecondaryFault)(nil)).Elem() -} - -type CannotChangeVsanClusterUuid struct { - VsanFault -} - -func init() { - t["CannotChangeVsanClusterUuid"] = reflect.TypeOf((*CannotChangeVsanClusterUuid)(nil)).Elem() -} - -type CannotChangeVsanClusterUuidFault CannotChangeVsanClusterUuid - -func init() { - t["CannotChangeVsanClusterUuidFault"] = reflect.TypeOf((*CannotChangeVsanClusterUuidFault)(nil)).Elem() -} - -type CannotChangeVsanNodeUuid struct { - VsanFault -} - -func init() { - t["CannotChangeVsanNodeUuid"] = reflect.TypeOf((*CannotChangeVsanNodeUuid)(nil)).Elem() -} - -type CannotChangeVsanNodeUuidFault CannotChangeVsanNodeUuid - -func init() { - t["CannotChangeVsanNodeUuidFault"] = reflect.TypeOf((*CannotChangeVsanNodeUuidFault)(nil)).Elem() -} - -type CannotComputeFTCompatibleHosts struct { - VmFaultToleranceIssue - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["CannotComputeFTCompatibleHosts"] = reflect.TypeOf((*CannotComputeFTCompatibleHosts)(nil)).Elem() -} - -type CannotComputeFTCompatibleHostsFault CannotComputeFTCompatibleHosts - -func init() { - t["CannotComputeFTCompatibleHostsFault"] = reflect.TypeOf((*CannotComputeFTCompatibleHostsFault)(nil)).Elem() -} - -type CannotCreateFile struct { - FileFault -} - -func init() { - t["CannotCreateFile"] = reflect.TypeOf((*CannotCreateFile)(nil)).Elem() -} - -type CannotCreateFileFault CannotCreateFile - -func init() { - t["CannotCreateFileFault"] = reflect.TypeOf((*CannotCreateFileFault)(nil)).Elem() -} - -type CannotDecryptPasswords struct { - CustomizationFault -} - -func init() { - t["CannotDecryptPasswords"] = reflect.TypeOf((*CannotDecryptPasswords)(nil)).Elem() -} - -type CannotDecryptPasswordsFault CannotDecryptPasswords - -func init() { - t["CannotDecryptPasswordsFault"] = reflect.TypeOf((*CannotDecryptPasswordsFault)(nil)).Elem() -} - -type CannotDeleteFile struct { - FileFault -} - -func init() { - t["CannotDeleteFile"] = reflect.TypeOf((*CannotDeleteFile)(nil)).Elem() -} - -type CannotDeleteFileFault CannotDeleteFile - -func init() { - t["CannotDeleteFileFault"] = reflect.TypeOf((*CannotDeleteFileFault)(nil)).Elem() -} - -type CannotDisableDrsOnClustersWithVApps struct { - RuntimeFault -} - -func init() { - t["CannotDisableDrsOnClustersWithVApps"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVApps)(nil)).Elem() -} - -type CannotDisableDrsOnClustersWithVAppsFault CannotDisableDrsOnClustersWithVApps - -func init() { - t["CannotDisableDrsOnClustersWithVAppsFault"] = reflect.TypeOf((*CannotDisableDrsOnClustersWithVAppsFault)(nil)).Elem() -} - -type CannotDisableSnapshot struct { - VmConfigFault -} - -func init() { - t["CannotDisableSnapshot"] = reflect.TypeOf((*CannotDisableSnapshot)(nil)).Elem() -} - -type CannotDisableSnapshotFault CannotDisableSnapshot - -func init() { - t["CannotDisableSnapshotFault"] = reflect.TypeOf((*CannotDisableSnapshotFault)(nil)).Elem() -} - -type CannotDisconnectHostWithFaultToleranceVm struct { - VimFault - - HostName string `xml:"hostName"` -} - -func init() { - t["CannotDisconnectHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVm)(nil)).Elem() -} - -type CannotDisconnectHostWithFaultToleranceVmFault CannotDisconnectHostWithFaultToleranceVm - -func init() { - t["CannotDisconnectHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotDisconnectHostWithFaultToleranceVmFault)(nil)).Elem() -} - -type CannotEnableVmcpForCluster struct { - VimFault - - Host *ManagedObjectReference `xml:"host,omitempty"` - HostName string `xml:"hostName,omitempty"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["CannotEnableVmcpForCluster"] = reflect.TypeOf((*CannotEnableVmcpForCluster)(nil)).Elem() -} - -type CannotEnableVmcpForClusterFault CannotEnableVmcpForCluster - -func init() { - t["CannotEnableVmcpForClusterFault"] = reflect.TypeOf((*CannotEnableVmcpForClusterFault)(nil)).Elem() -} - -type CannotModifyConfigCpuRequirements struct { - MigrationFault -} - -func init() { - t["CannotModifyConfigCpuRequirements"] = reflect.TypeOf((*CannotModifyConfigCpuRequirements)(nil)).Elem() -} - -type CannotModifyConfigCpuRequirementsFault CannotModifyConfigCpuRequirements - -func init() { - t["CannotModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*CannotModifyConfigCpuRequirementsFault)(nil)).Elem() -} - -type CannotMoveFaultToleranceVm struct { - VimFault - - MoveType string `xml:"moveType"` - VmName string `xml:"vmName"` -} - -func init() { - t["CannotMoveFaultToleranceVm"] = reflect.TypeOf((*CannotMoveFaultToleranceVm)(nil)).Elem() -} - -type CannotMoveFaultToleranceVmFault CannotMoveFaultToleranceVm - -func init() { - t["CannotMoveFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveFaultToleranceVmFault)(nil)).Elem() -} - -type CannotMoveHostWithFaultToleranceVm struct { - VimFault -} - -func init() { - t["CannotMoveHostWithFaultToleranceVm"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVm)(nil)).Elem() -} - -type CannotMoveHostWithFaultToleranceVmFault CannotMoveHostWithFaultToleranceVm - -func init() { - t["CannotMoveHostWithFaultToleranceVmFault"] = reflect.TypeOf((*CannotMoveHostWithFaultToleranceVmFault)(nil)).Elem() -} - -type CannotMoveVmWithDeltaDisk struct { - MigrationFault - - Device string `xml:"device"` -} - -func init() { - t["CannotMoveVmWithDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithDeltaDisk)(nil)).Elem() -} - -type CannotMoveVmWithDeltaDiskFault CannotMoveVmWithDeltaDisk - -func init() { - t["CannotMoveVmWithDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithDeltaDiskFault)(nil)).Elem() -} - -type CannotMoveVmWithNativeDeltaDisk struct { - MigrationFault -} - -func init() { - t["CannotMoveVmWithNativeDeltaDisk"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDisk)(nil)).Elem() -} - -type CannotMoveVmWithNativeDeltaDiskFault CannotMoveVmWithNativeDeltaDisk - -func init() { - t["CannotMoveVmWithNativeDeltaDiskFault"] = reflect.TypeOf((*CannotMoveVmWithNativeDeltaDiskFault)(nil)).Elem() -} - -type CannotMoveVsanEnabledHost struct { - VsanFault -} - -func init() { - t["CannotMoveVsanEnabledHost"] = reflect.TypeOf((*CannotMoveVsanEnabledHost)(nil)).Elem() -} - -type CannotMoveVsanEnabledHostFault BaseCannotMoveVsanEnabledHost - -func init() { - t["CannotMoveVsanEnabledHostFault"] = reflect.TypeOf((*CannotMoveVsanEnabledHostFault)(nil)).Elem() -} - -type CannotPlaceWithoutPrerequisiteMoves struct { - VimFault -} - -func init() { - t["CannotPlaceWithoutPrerequisiteMoves"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMoves)(nil)).Elem() -} - -type CannotPlaceWithoutPrerequisiteMovesFault CannotPlaceWithoutPrerequisiteMoves - -func init() { - t["CannotPlaceWithoutPrerequisiteMovesFault"] = reflect.TypeOf((*CannotPlaceWithoutPrerequisiteMovesFault)(nil)).Elem() -} - -type CannotPowerOffVmInCluster struct { - InvalidState - - Operation string `xml:"operation"` - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["CannotPowerOffVmInCluster"] = reflect.TypeOf((*CannotPowerOffVmInCluster)(nil)).Elem() -} - -type CannotPowerOffVmInClusterFault CannotPowerOffVmInCluster - -func init() { - t["CannotPowerOffVmInClusterFault"] = reflect.TypeOf((*CannotPowerOffVmInClusterFault)(nil)).Elem() -} - -type CannotReconfigureVsanWhenHaEnabled struct { - VsanFault -} - -func init() { - t["CannotReconfigureVsanWhenHaEnabled"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabled)(nil)).Elem() -} - -type CannotReconfigureVsanWhenHaEnabledFault CannotReconfigureVsanWhenHaEnabled - -func init() { - t["CannotReconfigureVsanWhenHaEnabledFault"] = reflect.TypeOf((*CannotReconfigureVsanWhenHaEnabledFault)(nil)).Elem() -} - -type CannotUseNetwork struct { - VmConfigFault - - Device string `xml:"device"` - Backing string `xml:"backing"` - Connected bool `xml:"connected"` - Reason string `xml:"reason"` - Network *ManagedObjectReference `xml:"network,omitempty"` -} - -func init() { - t["CannotUseNetwork"] = reflect.TypeOf((*CannotUseNetwork)(nil)).Elem() -} - -type CannotUseNetworkFault CannotUseNetwork - -func init() { - t["CannotUseNetworkFault"] = reflect.TypeOf((*CannotUseNetworkFault)(nil)).Elem() -} - -type Capability struct { - DynamicData - - ProvisioningSupported bool `xml:"provisioningSupported"` - MultiHostSupported bool `xml:"multiHostSupported"` - UserShellAccessSupported bool `xml:"userShellAccessSupported"` - SupportedEVCMode []EVCMode `xml:"supportedEVCMode,omitempty"` - SupportedEVCGraphicsMode []FeatureEVCMode `xml:"supportedEVCGraphicsMode,omitempty"` - NetworkBackupAndRestoreSupported *bool `xml:"networkBackupAndRestoreSupported"` - FtDrsWithoutEvcSupported *bool `xml:"ftDrsWithoutEvcSupported"` - HciWorkflowSupported *bool `xml:"hciWorkflowSupported"` - ComputePolicyVersion int32 `xml:"computePolicyVersion,omitempty"` - ClusterPlacementSupported *bool `xml:"clusterPlacementSupported"` - LifecycleManagementSupported *bool `xml:"lifecycleManagementSupported"` - HostSeedingSupported *bool `xml:"hostSeedingSupported"` - ScalableSharesSupported *bool `xml:"scalableSharesSupported"` - HadcsSupported *bool `xml:"hadcsSupported"` - ConfigMgmtSupported *bool `xml:"configMgmtSupported"` -} - -func init() { - t["Capability"] = reflect.TypeOf((*Capability)(nil)).Elem() -} - -type CertMgrRefreshCACertificatesAndCRLsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["CertMgrRefreshCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLsRequestType)(nil)).Elem() -} - -type CertMgrRefreshCACertificatesAndCRLs_Task CertMgrRefreshCACertificatesAndCRLsRequestType - -func init() { - t["CertMgrRefreshCACertificatesAndCRLs_Task"] = reflect.TypeOf((*CertMgrRefreshCACertificatesAndCRLs_Task)(nil)).Elem() -} - -type CertMgrRefreshCACertificatesAndCRLs_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CertMgrRefreshCertificatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["CertMgrRefreshCertificatesRequestType"] = reflect.TypeOf((*CertMgrRefreshCertificatesRequestType)(nil)).Elem() -} - -type CertMgrRefreshCertificates_Task CertMgrRefreshCertificatesRequestType - -func init() { - t["CertMgrRefreshCertificates_Task"] = reflect.TypeOf((*CertMgrRefreshCertificates_Task)(nil)).Elem() -} - -type CertMgrRefreshCertificates_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CertMgrRevokeCertificatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["CertMgrRevokeCertificatesRequestType"] = reflect.TypeOf((*CertMgrRevokeCertificatesRequestType)(nil)).Elem() -} - -type CertMgrRevokeCertificates_Task CertMgrRevokeCertificatesRequestType - -func init() { - t["CertMgrRevokeCertificates_Task"] = reflect.TypeOf((*CertMgrRevokeCertificates_Task)(nil)).Elem() -} - -type CertMgrRevokeCertificates_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ChangeAccessMode ChangeAccessModeRequestType - -func init() { - t["ChangeAccessMode"] = reflect.TypeOf((*ChangeAccessMode)(nil)).Elem() -} - -type ChangeAccessModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Principal string `xml:"principal"` - IsGroup bool `xml:"isGroup"` - AccessMode HostAccessMode `xml:"accessMode"` -} - -func init() { - t["ChangeAccessModeRequestType"] = reflect.TypeOf((*ChangeAccessModeRequestType)(nil)).Elem() -} - -type ChangeAccessModeResponse struct { -} - -type ChangeFileAttributesInGuest ChangeFileAttributesInGuestRequestType - -func init() { - t["ChangeFileAttributesInGuest"] = reflect.TypeOf((*ChangeFileAttributesInGuest)(nil)).Elem() -} - -type ChangeFileAttributesInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - GuestFilePath string `xml:"guestFilePath"` - FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"` -} - -func init() { - t["ChangeFileAttributesInGuestRequestType"] = reflect.TypeOf((*ChangeFileAttributesInGuestRequestType)(nil)).Elem() -} - -type ChangeFileAttributesInGuestResponse struct { -} - -type ChangeKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - NewKey CryptoKeyPlain `xml:"newKey"` -} - -func init() { - t["ChangeKeyRequestType"] = reflect.TypeOf((*ChangeKeyRequestType)(nil)).Elem() -} - -type ChangeKey_Task ChangeKeyRequestType - -func init() { - t["ChangeKey_Task"] = reflect.TypeOf((*ChangeKey_Task)(nil)).Elem() -} - -type ChangeKey_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ChangeLockdownMode ChangeLockdownModeRequestType - -func init() { - t["ChangeLockdownMode"] = reflect.TypeOf((*ChangeLockdownMode)(nil)).Elem() -} - -type ChangeLockdownModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mode HostLockdownMode `xml:"mode"` -} - -func init() { - t["ChangeLockdownModeRequestType"] = reflect.TypeOf((*ChangeLockdownModeRequestType)(nil)).Elem() -} - -type ChangeLockdownModeResponse struct { -} - -type ChangeNFSUserPassword ChangeNFSUserPasswordRequestType - -func init() { - t["ChangeNFSUserPassword"] = reflect.TypeOf((*ChangeNFSUserPassword)(nil)).Elem() -} - -type ChangeNFSUserPasswordRequestType struct { - This ManagedObjectReference `xml:"_this"` - Password string `xml:"password"` -} - -func init() { - t["ChangeNFSUserPasswordRequestType"] = reflect.TypeOf((*ChangeNFSUserPasswordRequestType)(nil)).Elem() -} - -type ChangeNFSUserPasswordResponse struct { -} - -type ChangeOwner ChangeOwnerRequestType - -func init() { - t["ChangeOwner"] = reflect.TypeOf((*ChangeOwner)(nil)).Elem() -} - -type ChangeOwnerRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Owner string `xml:"owner"` -} - -func init() { - t["ChangeOwnerRequestType"] = reflect.TypeOf((*ChangeOwnerRequestType)(nil)).Elem() -} - -type ChangeOwnerResponse struct { -} - -type ChangePassword ChangePasswordRequestType - -func init() { - t["ChangePassword"] = reflect.TypeOf((*ChangePassword)(nil)).Elem() -} - -type ChangePasswordRequestType struct { - This ManagedObjectReference `xml:"_this"` - User string `xml:"user"` - OldPassword string `xml:"oldPassword"` - NewPassword string `xml:"newPassword"` -} - -func init() { - t["ChangePasswordRequestType"] = reflect.TypeOf((*ChangePasswordRequestType)(nil)).Elem() -} - -type ChangePasswordResponse struct { -} - -type ChangesInfoEventArgument struct { - DynamicData - - Modified string `xml:"modified,omitempty"` - Added string `xml:"added,omitempty"` - Deleted string `xml:"deleted,omitempty"` -} - -func init() { - t["ChangesInfoEventArgument"] = reflect.TypeOf((*ChangesInfoEventArgument)(nil)).Elem() -} - -type CheckAddHostEvcRequestType struct { - This ManagedObjectReference `xml:"_this"` - CnxSpec HostConnectSpec `xml:"cnxSpec"` -} - -func init() { - t["CheckAddHostEvcRequestType"] = reflect.TypeOf((*CheckAddHostEvcRequestType)(nil)).Elem() -} - -type CheckAddHostEvc_Task CheckAddHostEvcRequestType - -func init() { - t["CheckAddHostEvc_Task"] = reflect.TypeOf((*CheckAddHostEvc_Task)(nil)).Elem() -} - -type CheckAddHostEvc_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckAnswerFileStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["CheckAnswerFileStatusRequestType"] = reflect.TypeOf((*CheckAnswerFileStatusRequestType)(nil)).Elem() -} - -type CheckAnswerFileStatus_Task CheckAnswerFileStatusRequestType - -func init() { - t["CheckAnswerFileStatus_Task"] = reflect.TypeOf((*CheckAnswerFileStatus_Task)(nil)).Elem() -} - -type CheckAnswerFileStatus_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckCloneRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Folder ManagedObjectReference `xml:"folder"` - Name string `xml:"name"` - Spec VirtualMachineCloneSpec `xml:"spec"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckCloneRequestType"] = reflect.TypeOf((*CheckCloneRequestType)(nil)).Elem() -} - -type CheckClone_Task CheckCloneRequestType - -func init() { - t["CheckClone_Task"] = reflect.TypeOf((*CheckClone_Task)(nil)).Elem() -} - -type CheckClone_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckCompatibilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckCompatibilityRequestType"] = reflect.TypeOf((*CheckCompatibilityRequestType)(nil)).Elem() -} - -type CheckCompatibility_Task CheckCompatibilityRequestType - -func init() { - t["CheckCompatibility_Task"] = reflect.TypeOf((*CheckCompatibility_Task)(nil)).Elem() -} - -type CheckCompatibility_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckComplianceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Profile []ManagedObjectReference `xml:"profile,omitempty"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["CheckComplianceRequestType"] = reflect.TypeOf((*CheckComplianceRequestType)(nil)).Elem() -} - -type CheckCompliance_Task CheckComplianceRequestType - -func init() { - t["CheckCompliance_Task"] = reflect.TypeOf((*CheckCompliance_Task)(nil)).Elem() -} - -type CheckCompliance_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckConfigureEvcModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - EvcModeKey string `xml:"evcModeKey"` - EvcGraphicsModeKey string `xml:"evcGraphicsModeKey,omitempty"` -} - -func init() { - t["CheckConfigureEvcModeRequestType"] = reflect.TypeOf((*CheckConfigureEvcModeRequestType)(nil)).Elem() -} - -type CheckConfigureEvcMode_Task CheckConfigureEvcModeRequestType - -func init() { - t["CheckConfigureEvcMode_Task"] = reflect.TypeOf((*CheckConfigureEvcMode_Task)(nil)).Elem() -} - -type CheckConfigureEvcMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckCustomizationResources CheckCustomizationResourcesRequestType - -func init() { - t["CheckCustomizationResources"] = reflect.TypeOf((*CheckCustomizationResources)(nil)).Elem() -} - -type CheckCustomizationResourcesRequestType struct { - This ManagedObjectReference `xml:"_this"` - GuestOs string `xml:"guestOs"` -} - -func init() { - t["CheckCustomizationResourcesRequestType"] = reflect.TypeOf((*CheckCustomizationResourcesRequestType)(nil)).Elem() -} - -type CheckCustomizationResourcesResponse struct { -} - -type CheckCustomizationSpec CheckCustomizationSpecRequestType - -func init() { - t["CheckCustomizationSpec"] = reflect.TypeOf((*CheckCustomizationSpec)(nil)).Elem() -} - -type CheckCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec CustomizationSpec `xml:"spec"` -} - -func init() { - t["CheckCustomizationSpecRequestType"] = reflect.TypeOf((*CheckCustomizationSpecRequestType)(nil)).Elem() -} - -type CheckCustomizationSpecResponse struct { -} - -type CheckForUpdates CheckForUpdatesRequestType - -func init() { - t["CheckForUpdates"] = reflect.TypeOf((*CheckForUpdates)(nil)).Elem() -} - -type CheckForUpdatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["CheckForUpdatesRequestType"] = reflect.TypeOf((*CheckForUpdatesRequestType)(nil)).Elem() -} - -type CheckForUpdatesResponse struct { - Returnval *UpdateSet `xml:"returnval,omitempty"` -} - -type CheckHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - MetaUrls []string `xml:"metaUrls,omitempty"` - BundleUrls []string `xml:"bundleUrls,omitempty"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["CheckHostPatchRequestType"] = reflect.TypeOf((*CheckHostPatchRequestType)(nil)).Elem() -} - -type CheckHostPatch_Task CheckHostPatchRequestType - -func init() { - t["CheckHostPatch_Task"] = reflect.TypeOf((*CheckHostPatch_Task)(nil)).Elem() -} - -type CheckHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckInstantCloneRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Spec VirtualMachineInstantCloneSpec `xml:"spec"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckInstantCloneRequestType"] = reflect.TypeOf((*CheckInstantCloneRequestType)(nil)).Elem() -} - -type CheckInstantClone_Task CheckInstantCloneRequestType - -func init() { - t["CheckInstantClone_Task"] = reflect.TypeOf((*CheckInstantClone_Task)(nil)).Elem() -} - -type CheckInstantClone_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckLicenseFeature CheckLicenseFeatureRequestType - -func init() { - t["CheckLicenseFeature"] = reflect.TypeOf((*CheckLicenseFeature)(nil)).Elem() -} - -type CheckLicenseFeatureRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - FeatureKey string `xml:"featureKey"` -} - -func init() { - t["CheckLicenseFeatureRequestType"] = reflect.TypeOf((*CheckLicenseFeatureRequestType)(nil)).Elem() -} - -type CheckLicenseFeatureResponse struct { - Returnval bool `xml:"returnval"` -} - -type CheckMigrateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - State VirtualMachinePowerState `xml:"state,omitempty"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckMigrateRequestType"] = reflect.TypeOf((*CheckMigrateRequestType)(nil)).Elem() -} - -type CheckMigrate_Task CheckMigrateRequestType - -func init() { - t["CheckMigrate_Task"] = reflect.TypeOf((*CheckMigrate_Task)(nil)).Elem() -} - -type CheckMigrate_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckPowerOnRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckPowerOnRequestType"] = reflect.TypeOf((*CheckPowerOnRequestType)(nil)).Elem() -} - -type CheckPowerOn_Task CheckPowerOnRequestType - -func init() { - t["CheckPowerOn_Task"] = reflect.TypeOf((*CheckPowerOn_Task)(nil)).Elem() -} - -type CheckPowerOn_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckProfileComplianceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["CheckProfileComplianceRequestType"] = reflect.TypeOf((*CheckProfileComplianceRequestType)(nil)).Elem() -} - -type CheckProfileCompliance_Task CheckProfileComplianceRequestType - -func init() { - t["CheckProfileCompliance_Task"] = reflect.TypeOf((*CheckProfileCompliance_Task)(nil)).Elem() -} - -type CheckProfileCompliance_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckRelocateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Spec VirtualMachineRelocateSpec `xml:"spec"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckRelocateRequestType"] = reflect.TypeOf((*CheckRelocateRequestType)(nil)).Elem() -} - -type CheckRelocate_Task CheckRelocateRequestType - -func init() { - t["CheckRelocate_Task"] = reflect.TypeOf((*CheckRelocate_Task)(nil)).Elem() -} - -type CheckRelocate_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CheckResult struct { - DynamicData - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Warning []LocalizedMethodFault `xml:"warning,omitempty"` - Error []LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["CheckResult"] = reflect.TypeOf((*CheckResult)(nil)).Elem() -} - -type CheckVmConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VirtualMachineConfigSpec `xml:"spec"` - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - TestType []string `xml:"testType,omitempty"` -} - -func init() { - t["CheckVmConfigRequestType"] = reflect.TypeOf((*CheckVmConfigRequestType)(nil)).Elem() -} - -type CheckVmConfig_Task CheckVmConfigRequestType - -func init() { - t["CheckVmConfig_Task"] = reflect.TypeOf((*CheckVmConfig_Task)(nil)).Elem() -} - -type CheckVmConfig_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ChoiceOption struct { - OptionType - - ChoiceInfo []BaseElementDescription `xml:"choiceInfo,typeattr"` - DefaultIndex int32 `xml:"defaultIndex,omitempty"` -} - -func init() { - t["ChoiceOption"] = reflect.TypeOf((*ChoiceOption)(nil)).Elem() -} - -type ClearComplianceStatus ClearComplianceStatusRequestType - -func init() { - t["ClearComplianceStatus"] = reflect.TypeOf((*ClearComplianceStatus)(nil)).Elem() -} - -type ClearComplianceStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Profile []ManagedObjectReference `xml:"profile,omitempty"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["ClearComplianceStatusRequestType"] = reflect.TypeOf((*ClearComplianceStatusRequestType)(nil)).Elem() -} - -type ClearComplianceStatusResponse struct { -} - -type ClearNFSUser ClearNFSUserRequestType - -func init() { - t["ClearNFSUser"] = reflect.TypeOf((*ClearNFSUser)(nil)).Elem() -} - -type ClearNFSUserRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ClearNFSUserRequestType"] = reflect.TypeOf((*ClearNFSUserRequestType)(nil)).Elem() -} - -type ClearNFSUserResponse struct { -} - -type ClearSystemEventLog ClearSystemEventLogRequestType - -func init() { - t["ClearSystemEventLog"] = reflect.TypeOf((*ClearSystemEventLog)(nil)).Elem() -} - -type ClearSystemEventLogRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ClearSystemEventLogRequestType"] = reflect.TypeOf((*ClearSystemEventLogRequestType)(nil)).Elem() -} - -type ClearSystemEventLogResponse struct { -} - -type ClearTriggeredAlarms ClearTriggeredAlarmsRequestType - -func init() { - t["ClearTriggeredAlarms"] = reflect.TypeOf((*ClearTriggeredAlarms)(nil)).Elem() -} - -type ClearTriggeredAlarmsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Filter AlarmFilterSpec `xml:"filter"` -} - -func init() { - t["ClearTriggeredAlarmsRequestType"] = reflect.TypeOf((*ClearTriggeredAlarmsRequestType)(nil)).Elem() -} - -type ClearTriggeredAlarmsResponse struct { -} - -type ClearVStorageObjectControlFlags ClearVStorageObjectControlFlagsRequestType - -func init() { - t["ClearVStorageObjectControlFlags"] = reflect.TypeOf((*ClearVStorageObjectControlFlags)(nil)).Elem() -} - -type ClearVStorageObjectControlFlagsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - ControlFlags []string `xml:"controlFlags,omitempty"` -} - -func init() { - t["ClearVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*ClearVStorageObjectControlFlagsRequestType)(nil)).Elem() -} - -type ClearVStorageObjectControlFlagsResponse struct { -} - -type ClockSkew struct { - HostConfigFault -} - -func init() { - t["ClockSkew"] = reflect.TypeOf((*ClockSkew)(nil)).Elem() -} - -type ClockSkewFault ClockSkew - -func init() { - t["ClockSkewFault"] = reflect.TypeOf((*ClockSkewFault)(nil)).Elem() -} - -type CloneFromSnapshotNotSupported struct { - MigrationFault -} - -func init() { - t["CloneFromSnapshotNotSupported"] = reflect.TypeOf((*CloneFromSnapshotNotSupported)(nil)).Elem() -} - -type CloneFromSnapshotNotSupportedFault CloneFromSnapshotNotSupported - -func init() { - t["CloneFromSnapshotNotSupportedFault"] = reflect.TypeOf((*CloneFromSnapshotNotSupportedFault)(nil)).Elem() -} - -type CloneSession CloneSessionRequestType - -func init() { - t["CloneSession"] = reflect.TypeOf((*CloneSession)(nil)).Elem() -} - -type CloneSessionRequestType struct { - This ManagedObjectReference `xml:"_this"` - CloneTicket string `xml:"cloneTicket"` -} - -func init() { - t["CloneSessionRequestType"] = reflect.TypeOf((*CloneSessionRequestType)(nil)).Elem() -} - -type CloneSessionResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type CloneVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Target ManagedObjectReference `xml:"target"` - Spec VAppCloneSpec `xml:"spec"` -} - -func init() { - t["CloneVAppRequestType"] = reflect.TypeOf((*CloneVAppRequestType)(nil)).Elem() -} - -type CloneVApp_Task CloneVAppRequestType - -func init() { - t["CloneVApp_Task"] = reflect.TypeOf((*CloneVApp_Task)(nil)).Elem() -} - -type CloneVApp_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CloneVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Folder ManagedObjectReference `xml:"folder"` - Name string `xml:"name"` - Spec VirtualMachineCloneSpec `xml:"spec"` -} - -func init() { - t["CloneVMRequestType"] = reflect.TypeOf((*CloneVMRequestType)(nil)).Elem() -} - -type CloneVM_Task CloneVMRequestType - -func init() { - t["CloneVM_Task"] = reflect.TypeOf((*CloneVM_Task)(nil)).Elem() -} - -type CloneVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CloneVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VslmCloneSpec `xml:"spec"` -} - -func init() { - t["CloneVStorageObjectRequestType"] = reflect.TypeOf((*CloneVStorageObjectRequestType)(nil)).Elem() -} - -type CloneVStorageObject_Task CloneVStorageObjectRequestType - -func init() { - t["CloneVStorageObject_Task"] = reflect.TypeOf((*CloneVStorageObject_Task)(nil)).Elem() -} - -type CloneVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CloseInventoryViewFolder CloseInventoryViewFolderRequestType - -func init() { - t["CloseInventoryViewFolder"] = reflect.TypeOf((*CloseInventoryViewFolder)(nil)).Elem() -} - -type CloseInventoryViewFolderRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity"` -} - -func init() { - t["CloseInventoryViewFolderRequestType"] = reflect.TypeOf((*CloseInventoryViewFolderRequestType)(nil)).Elem() -} - -type CloseInventoryViewFolderResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type ClusterAction struct { - DynamicData - - Type string `xml:"type"` - Target *ManagedObjectReference `xml:"target,omitempty"` -} - -func init() { - t["ClusterAction"] = reflect.TypeOf((*ClusterAction)(nil)).Elem() -} - -type ClusterActionHistory struct { - DynamicData - - Action BaseClusterAction `xml:"action,typeattr"` - Time time.Time `xml:"time"` -} - -func init() { - t["ClusterActionHistory"] = reflect.TypeOf((*ClusterActionHistory)(nil)).Elem() -} - -type ClusterAffinityRuleSpec struct { - ClusterRuleInfo - - Vm []ManagedObjectReference `xml:"vm"` -} - -func init() { - t["ClusterAffinityRuleSpec"] = reflect.TypeOf((*ClusterAffinityRuleSpec)(nil)).Elem() -} - -type ClusterAntiAffinityRuleSpec struct { - ClusterRuleInfo - - Vm []ManagedObjectReference `xml:"vm"` -} - -func init() { - t["ClusterAntiAffinityRuleSpec"] = reflect.TypeOf((*ClusterAntiAffinityRuleSpec)(nil)).Elem() -} - -type ClusterAttemptedVmInfo struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - Task *ManagedObjectReference `xml:"task,omitempty"` -} - -func init() { - t["ClusterAttemptedVmInfo"] = reflect.TypeOf((*ClusterAttemptedVmInfo)(nil)).Elem() -} - -type ClusterClusterInitialPlacementAction struct { - ClusterAction - - TargetHost *ManagedObjectReference `xml:"targetHost,omitempty"` - Pool ManagedObjectReference `xml:"pool"` - ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` -} - -func init() { - t["ClusterClusterInitialPlacementAction"] = reflect.TypeOf((*ClusterClusterInitialPlacementAction)(nil)).Elem() -} - -type ClusterComplianceCheckedEvent struct { - ClusterEvent - - Profile ProfileEventArgument `xml:"profile"` -} - -func init() { - t["ClusterComplianceCheckedEvent"] = reflect.TypeOf((*ClusterComplianceCheckedEvent)(nil)).Elem() -} - -type ClusterComputeResourceClusterConfigResult struct { - DynamicData - - FailedHosts []FolderFailedHostResult `xml:"failedHosts,omitempty"` - ConfiguredHosts []ManagedObjectReference `xml:"configuredHosts,omitempty"` -} - -func init() { - t["ClusterComputeResourceClusterConfigResult"] = reflect.TypeOf((*ClusterComputeResourceClusterConfigResult)(nil)).Elem() -} - -type ClusterComputeResourceDVSConfigurationValidation struct { - ClusterComputeResourceValidationResultBase - - IsDvsValid bool `xml:"isDvsValid"` - IsDvpgValid bool `xml:"isDvpgValid"` -} - -func init() { - t["ClusterComputeResourceDVSConfigurationValidation"] = reflect.TypeOf((*ClusterComputeResourceDVSConfigurationValidation)(nil)).Elem() -} - -type ClusterComputeResourceDVSSetting struct { - DynamicData - - DvSwitch ManagedObjectReference `xml:"dvSwitch"` - PnicDevices []string `xml:"pnicDevices,omitempty"` - DvPortgroupSetting []ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping `xml:"dvPortgroupSetting,omitempty"` -} - -func init() { - t["ClusterComputeResourceDVSSetting"] = reflect.TypeOf((*ClusterComputeResourceDVSSetting)(nil)).Elem() -} - -type ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping struct { - DynamicData - - DvPortgroup ManagedObjectReference `xml:"dvPortgroup"` - Service string `xml:"service"` -} - -func init() { - t["ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping"] = reflect.TypeOf((*ClusterComputeResourceDVSSettingDVPortgroupToServiceMapping)(nil)).Elem() -} - -type ClusterComputeResourceDvsProfile struct { - DynamicData - - DvsName string `xml:"dvsName,omitempty"` - DvSwitch *ManagedObjectReference `xml:"dvSwitch,omitempty"` - PnicDevices []string `xml:"pnicDevices,omitempty"` - DvPortgroupMapping []ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping `xml:"dvPortgroupMapping,omitempty"` -} - -func init() { - t["ClusterComputeResourceDvsProfile"] = reflect.TypeOf((*ClusterComputeResourceDvsProfile)(nil)).Elem() -} - -type ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping struct { - DynamicData - - DvPortgroupSpec *DVPortgroupConfigSpec `xml:"dvPortgroupSpec,omitempty"` - DvPortgroup *ManagedObjectReference `xml:"dvPortgroup,omitempty"` - Service string `xml:"service"` -} - -func init() { - t["ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping"] = reflect.TypeOf((*ClusterComputeResourceDvsProfileDVPortgroupSpecToServiceMapping)(nil)).Elem() -} - -type ClusterComputeResourceHCIConfigInfo struct { - DynamicData - - WorkflowState string `xml:"workflowState"` - DvsSetting []ClusterComputeResourceDVSSetting `xml:"dvsSetting,omitempty"` - ConfiguredHosts []ManagedObjectReference `xml:"configuredHosts,omitempty"` - HostConfigProfile *ClusterComputeResourceHostConfigurationProfile `xml:"hostConfigProfile,omitempty"` -} - -func init() { - t["ClusterComputeResourceHCIConfigInfo"] = reflect.TypeOf((*ClusterComputeResourceHCIConfigInfo)(nil)).Elem() -} - -type ClusterComputeResourceHCIConfigSpec struct { - DynamicData - - DvsProf []ClusterComputeResourceDvsProfile `xml:"dvsProf,omitempty"` - HostConfigProfile *ClusterComputeResourceHostConfigurationProfile `xml:"hostConfigProfile,omitempty"` - VSanConfigSpec *SDDCBase `xml:"vSanConfigSpec,omitempty"` - VcProf *ClusterComputeResourceVCProfile `xml:"vcProf,omitempty"` -} - -func init() { - t["ClusterComputeResourceHCIConfigSpec"] = reflect.TypeOf((*ClusterComputeResourceHCIConfigSpec)(nil)).Elem() -} - -type ClusterComputeResourceHostConfigurationInput struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - HostVmkNics []ClusterComputeResourceHostVmkNicInfo `xml:"hostVmkNics,omitempty"` - AllowedInNonMaintenanceMode *bool `xml:"allowedInNonMaintenanceMode"` -} - -func init() { - t["ClusterComputeResourceHostConfigurationInput"] = reflect.TypeOf((*ClusterComputeResourceHostConfigurationInput)(nil)).Elem() -} - -type ClusterComputeResourceHostConfigurationProfile struct { - DynamicData - - DateTimeConfig *HostDateTimeConfig `xml:"dateTimeConfig,omitempty"` - LockdownMode HostLockdownMode `xml:"lockdownMode,omitempty"` -} - -func init() { - t["ClusterComputeResourceHostConfigurationProfile"] = reflect.TypeOf((*ClusterComputeResourceHostConfigurationProfile)(nil)).Elem() -} - -type ClusterComputeResourceHostConfigurationValidation struct { - ClusterComputeResourceValidationResultBase - - Host ManagedObjectReference `xml:"host"` - IsDvsSettingValid *bool `xml:"isDvsSettingValid"` - IsVmknicSettingValid *bool `xml:"isVmknicSettingValid"` - IsNtpSettingValid *bool `xml:"isNtpSettingValid"` - IsLockdownModeValid *bool `xml:"isLockdownModeValid"` -} - -func init() { - t["ClusterComputeResourceHostConfigurationValidation"] = reflect.TypeOf((*ClusterComputeResourceHostConfigurationValidation)(nil)).Elem() -} - -type ClusterComputeResourceHostVmkNicInfo struct { - DynamicData - - NicSpec HostVirtualNicSpec `xml:"nicSpec"` - Service string `xml:"service"` -} - -func init() { - t["ClusterComputeResourceHostVmkNicInfo"] = reflect.TypeOf((*ClusterComputeResourceHostVmkNicInfo)(nil)).Elem() -} - -type ClusterComputeResourceSummary struct { - ComputeResourceSummary - - CurrentFailoverLevel int32 `xml:"currentFailoverLevel"` - AdmissionControlInfo BaseClusterDasAdmissionControlInfo `xml:"admissionControlInfo,omitempty,typeattr"` - NumVmotions int32 `xml:"numVmotions"` - TargetBalance int32 `xml:"targetBalance,omitempty"` - CurrentBalance int32 `xml:"currentBalance,omitempty"` - DrsScore int32 `xml:"drsScore,omitempty"` - NumVmsPerDrsScoreBucket []int32 `xml:"numVmsPerDrsScoreBucket,omitempty"` - UsageSummary *ClusterUsageSummary `xml:"usageSummary,omitempty"` - CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` - CurrentEVCGraphicsModeKey string `xml:"currentEVCGraphicsModeKey,omitempty"` - DasData BaseClusterDasData `xml:"dasData,omitempty,typeattr"` - ClusterMaintenanceModeStatus string `xml:"clusterMaintenanceModeStatus,omitempty"` - VcsHealthStatus string `xml:"vcsHealthStatus,omitempty"` - VcsSlots []ClusterComputeResourceVcsSlots `xml:"vcsSlots,omitempty"` -} - -func init() { - t["ClusterComputeResourceSummary"] = reflect.TypeOf((*ClusterComputeResourceSummary)(nil)).Elem() -} - -type ClusterComputeResourceVCProfile struct { - DynamicData - - ClusterSpec *ClusterConfigSpecEx `xml:"clusterSpec,omitempty"` - EvcModeKey string `xml:"evcModeKey,omitempty"` - EvcGraphicsModeKey string `xml:"evcGraphicsModeKey,omitempty"` -} - -func init() { - t["ClusterComputeResourceVCProfile"] = reflect.TypeOf((*ClusterComputeResourceVCProfile)(nil)).Elem() -} - -type ClusterComputeResourceValidationResultBase struct { - DynamicData - - Info []LocalizableMessage `xml:"info,omitempty"` -} - -func init() { - t["ClusterComputeResourceValidationResultBase"] = reflect.TypeOf((*ClusterComputeResourceValidationResultBase)(nil)).Elem() -} - -type ClusterComputeResourceVcsSlots struct { - DynamicData - - SystemId string `xml:"systemId,omitempty"` - Host ManagedObjectReference `xml:"host"` - Datastore []ManagedObjectReference `xml:"datastore,omitempty"` - TotalSlots int32 `xml:"totalSlots"` -} - -func init() { - t["ClusterComputeResourceVcsSlots"] = reflect.TypeOf((*ClusterComputeResourceVcsSlots)(nil)).Elem() -} - -type ClusterConfigInfo struct { - DynamicData - - DasConfig ClusterDasConfigInfo `xml:"dasConfig"` - DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"` - DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"` - DrsVmConfig []ClusterDrsVmConfigInfo `xml:"drsVmConfig,omitempty"` - Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` -} - -func init() { - t["ClusterConfigInfo"] = reflect.TypeOf((*ClusterConfigInfo)(nil)).Elem() -} - -type ClusterConfigInfoEx struct { - ComputeResourceConfigInfo - - SystemVMsConfig *ClusterSystemVMsConfigInfo `xml:"systemVMsConfig,omitempty"` - DasConfig ClusterDasConfigInfo `xml:"dasConfig"` - DasVmConfig []ClusterDasVmConfigInfo `xml:"dasVmConfig,omitempty"` - DrsConfig ClusterDrsConfigInfo `xml:"drsConfig"` - DrsVmConfig []ClusterDrsVmConfigInfo `xml:"drsVmConfig,omitempty"` - Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` - Orchestration *ClusterOrchestrationInfo `xml:"orchestration,omitempty"` - VmOrchestration []ClusterVmOrchestrationInfo `xml:"vmOrchestration,omitempty"` - DpmConfigInfo *ClusterDpmConfigInfo `xml:"dpmConfigInfo,omitempty"` - DpmHostConfig []ClusterDpmHostConfigInfo `xml:"dpmHostConfig,omitempty"` - VsanConfigInfo *VsanClusterConfigInfo `xml:"vsanConfigInfo,omitempty"` - VsanHostConfig []VsanHostConfigInfo `xml:"vsanHostConfig,omitempty"` - Group []BaseClusterGroupInfo `xml:"group,omitempty,typeattr"` - InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"` - ProactiveDrsConfig *ClusterProactiveDrsConfigInfo `xml:"proactiveDrsConfig,omitempty"` - CryptoConfig *ClusterCryptoConfigInfo `xml:"cryptoConfig,omitempty"` -} - -func init() { - t["ClusterConfigInfoEx"] = reflect.TypeOf((*ClusterConfigInfoEx)(nil)).Elem() -} - -type ClusterConfigSpec struct { - DynamicData - - DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"` - DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"` - DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"` - DrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"drsVmConfigSpec,omitempty"` - RulesSpec []ClusterRuleSpec `xml:"rulesSpec,omitempty"` -} - -func init() { - t["ClusterConfigSpec"] = reflect.TypeOf((*ClusterConfigSpec)(nil)).Elem() -} - -type ClusterConfigSpecEx struct { - ComputeResourceConfigSpec - - SystemVMsConfig *ClusterSystemVMsConfigSpec `xml:"systemVMsConfig,omitempty"` - DasConfig *ClusterDasConfigInfo `xml:"dasConfig,omitempty"` - DasVmConfigSpec []ClusterDasVmConfigSpec `xml:"dasVmConfigSpec,omitempty"` - DrsConfig *ClusterDrsConfigInfo `xml:"drsConfig,omitempty"` - DrsVmConfigSpec []ClusterDrsVmConfigSpec `xml:"drsVmConfigSpec,omitempty"` - RulesSpec []ClusterRuleSpec `xml:"rulesSpec,omitempty"` - Orchestration *ClusterOrchestrationInfo `xml:"orchestration,omitempty"` - VmOrchestrationSpec []ClusterVmOrchestrationSpec `xml:"vmOrchestrationSpec,omitempty"` - DpmConfig *ClusterDpmConfigInfo `xml:"dpmConfig,omitempty"` - DpmHostConfigSpec []ClusterDpmHostConfigSpec `xml:"dpmHostConfigSpec,omitempty"` - VsanConfig *VsanClusterConfigInfo `xml:"vsanConfig,omitempty"` - VsanHostConfigSpec []VsanHostConfigInfo `xml:"vsanHostConfigSpec,omitempty"` - GroupSpec []ClusterGroupSpec `xml:"groupSpec,omitempty"` - InfraUpdateHaConfig *ClusterInfraUpdateHaConfigInfo `xml:"infraUpdateHaConfig,omitempty"` - ProactiveDrsConfig *ClusterProactiveDrsConfigInfo `xml:"proactiveDrsConfig,omitempty"` - InHciWorkflow *bool `xml:"inHciWorkflow"` - CryptoConfig *ClusterCryptoConfigInfo `xml:"cryptoConfig,omitempty"` -} - -func init() { - t["ClusterConfigSpecEx"] = reflect.TypeOf((*ClusterConfigSpecEx)(nil)).Elem() -} - -type ClusterCreatedEvent struct { - ClusterEvent - - Parent FolderEventArgument `xml:"parent"` -} - -func init() { - t["ClusterCreatedEvent"] = reflect.TypeOf((*ClusterCreatedEvent)(nil)).Elem() -} - -type ClusterCryptoConfigInfo struct { - DynamicData - - CryptoMode string `xml:"cryptoMode,omitempty"` -} - -func init() { - t["ClusterCryptoConfigInfo"] = reflect.TypeOf((*ClusterCryptoConfigInfo)(nil)).Elem() -} - -type ClusterDasAamHostInfo struct { - ClusterDasHostInfo - - HostDasState []ClusterDasAamNodeState `xml:"hostDasState,omitempty"` - PrimaryHosts []string `xml:"primaryHosts,omitempty"` -} - -func init() { - t["ClusterDasAamHostInfo"] = reflect.TypeOf((*ClusterDasAamHostInfo)(nil)).Elem() -} - -type ClusterDasAamNodeState struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Name string `xml:"name"` - ConfigState string `xml:"configState"` - RuntimeState string `xml:"runtimeState"` -} - -func init() { - t["ClusterDasAamNodeState"] = reflect.TypeOf((*ClusterDasAamNodeState)(nil)).Elem() -} - -type ClusterDasAdmissionControlInfo struct { - DynamicData -} - -func init() { - t["ClusterDasAdmissionControlInfo"] = reflect.TypeOf((*ClusterDasAdmissionControlInfo)(nil)).Elem() -} - -type ClusterDasAdmissionControlPolicy struct { - DynamicData - - ResourceReductionToToleratePercent *int32 `xml:"resourceReductionToToleratePercent"` - PMemAdmissionControlEnabled *bool `xml:"pMemAdmissionControlEnabled"` -} - -func init() { - t["ClusterDasAdmissionControlPolicy"] = reflect.TypeOf((*ClusterDasAdmissionControlPolicy)(nil)).Elem() -} - -type ClusterDasAdvancedRuntimeInfo struct { - DynamicData - - DasHostInfo BaseClusterDasHostInfo `xml:"dasHostInfo,omitempty,typeattr"` - VmcpSupported *ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo `xml:"vmcpSupported,omitempty"` - HeartbeatDatastoreInfo []DasHeartbeatDatastoreInfo `xml:"heartbeatDatastoreInfo,omitempty"` -} - -func init() { - t["ClusterDasAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfo)(nil)).Elem() -} - -type ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo struct { - DynamicData - - StorageAPDSupported bool `xml:"storageAPDSupported"` - StoragePDLSupported bool `xml:"storagePDLSupported"` -} - -func init() { - t["ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo"] = reflect.TypeOf((*ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo)(nil)).Elem() -} - -type ClusterDasConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - VmMonitoring string `xml:"vmMonitoring,omitempty"` - HostMonitoring string `xml:"hostMonitoring,omitempty"` - VmComponentProtecting string `xml:"vmComponentProtecting,omitempty"` - FailoverLevel int32 `xml:"failoverLevel,omitempty"` - AdmissionControlPolicy BaseClusterDasAdmissionControlPolicy `xml:"admissionControlPolicy,omitempty,typeattr"` - AdmissionControlEnabled *bool `xml:"admissionControlEnabled"` - DefaultVmSettings *ClusterDasVmSettings `xml:"defaultVmSettings,omitempty"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` - HeartbeatDatastore []ManagedObjectReference `xml:"heartbeatDatastore,omitempty"` - HBDatastoreCandidatePolicy string `xml:"hBDatastoreCandidatePolicy,omitempty"` -} - -func init() { - t["ClusterDasConfigInfo"] = reflect.TypeOf((*ClusterDasConfigInfo)(nil)).Elem() -} - -type ClusterDasData struct { - DynamicData -} - -func init() { - t["ClusterDasData"] = reflect.TypeOf((*ClusterDasData)(nil)).Elem() -} - -type ClusterDasDataSummary struct { - ClusterDasData - - HostListVersion int64 `xml:"hostListVersion"` - ClusterConfigVersion int64 `xml:"clusterConfigVersion"` - CompatListVersion int64 `xml:"compatListVersion"` -} - -func init() { - t["ClusterDasDataSummary"] = reflect.TypeOf((*ClusterDasDataSummary)(nil)).Elem() -} - -type ClusterDasFailoverLevelAdvancedRuntimeInfo struct { - ClusterDasAdvancedRuntimeInfo - - SlotInfo ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo `xml:"slotInfo"` - TotalSlots int32 `xml:"totalSlots"` - UsedSlots int32 `xml:"usedSlots"` - UnreservedSlots int32 `xml:"unreservedSlots"` - TotalVms int32 `xml:"totalVms"` - TotalHosts int32 `xml:"totalHosts"` - TotalGoodHosts int32 `xml:"totalGoodHosts"` - HostSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots `xml:"hostSlots,omitempty"` - VmsRequiringMultipleSlots []ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots `xml:"vmsRequiringMultipleSlots,omitempty"` -} - -func init() { - t["ClusterDasFailoverLevelAdvancedRuntimeInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfo)(nil)).Elem() -} - -type ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Slots int32 `xml:"slots"` -} - -func init() { - t["ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots)(nil)).Elem() -} - -type ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo struct { - DynamicData - - NumVcpus int32 `xml:"numVcpus"` - CpuMHz int32 `xml:"cpuMHz"` - MemoryMB int32 `xml:"memoryMB"` -} - -func init() { - t["ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo)(nil)).Elem() -} - -type ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - Slots int32 `xml:"slots"` -} - -func init() { - t["ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots"] = reflect.TypeOf((*ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots)(nil)).Elem() -} - -type ClusterDasFdmHostState struct { - DynamicData - - State string `xml:"state"` - StateReporter *ManagedObjectReference `xml:"stateReporter,omitempty"` -} - -func init() { - t["ClusterDasFdmHostState"] = reflect.TypeOf((*ClusterDasFdmHostState)(nil)).Elem() -} - -type ClusterDasHostInfo struct { - DynamicData -} - -func init() { - t["ClusterDasHostInfo"] = reflect.TypeOf((*ClusterDasHostInfo)(nil)).Elem() -} - -type ClusterDasHostRecommendation struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - DrsRating int32 `xml:"drsRating,omitempty"` -} - -func init() { - t["ClusterDasHostRecommendation"] = reflect.TypeOf((*ClusterDasHostRecommendation)(nil)).Elem() -} - -type ClusterDasVmConfigInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - RestartPriority DasVmPriority `xml:"restartPriority,omitempty"` - PowerOffOnIsolation *bool `xml:"powerOffOnIsolation"` - DasSettings *ClusterDasVmSettings `xml:"dasSettings,omitempty"` -} - -func init() { - t["ClusterDasVmConfigInfo"] = reflect.TypeOf((*ClusterDasVmConfigInfo)(nil)).Elem() -} - -type ClusterDasVmConfigSpec struct { - ArrayUpdateSpec - - Info *ClusterDasVmConfigInfo `xml:"info,omitempty"` -} - -func init() { - t["ClusterDasVmConfigSpec"] = reflect.TypeOf((*ClusterDasVmConfigSpec)(nil)).Elem() -} - -type ClusterDasVmSettings struct { - DynamicData - - RestartPriority string `xml:"restartPriority,omitempty"` - RestartPriorityTimeout int32 `xml:"restartPriorityTimeout,omitempty"` - IsolationResponse string `xml:"isolationResponse,omitempty"` - VmToolsMonitoringSettings *ClusterVmToolsMonitoringSettings `xml:"vmToolsMonitoringSettings,omitempty"` - VmComponentProtectionSettings *ClusterVmComponentProtectionSettings `xml:"vmComponentProtectionSettings,omitempty"` -} - -func init() { - t["ClusterDasVmSettings"] = reflect.TypeOf((*ClusterDasVmSettings)(nil)).Elem() -} - -type ClusterDatastoreUpdateSpec struct { - ArrayUpdateSpec - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["ClusterDatastoreUpdateSpec"] = reflect.TypeOf((*ClusterDatastoreUpdateSpec)(nil)).Elem() -} - -type ClusterDependencyRuleInfo struct { - ClusterRuleInfo - - VmGroup string `xml:"vmGroup"` - DependsOnVmGroup string `xml:"dependsOnVmGroup"` -} - -func init() { - t["ClusterDependencyRuleInfo"] = reflect.TypeOf((*ClusterDependencyRuleInfo)(nil)).Elem() -} - -type ClusterDestroyedEvent struct { - ClusterEvent -} - -func init() { - t["ClusterDestroyedEvent"] = reflect.TypeOf((*ClusterDestroyedEvent)(nil)).Elem() -} - -type ClusterDpmConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - DefaultDpmBehavior DpmBehavior `xml:"defaultDpmBehavior,omitempty"` - HostPowerActionRate int32 `xml:"hostPowerActionRate,omitempty"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["ClusterDpmConfigInfo"] = reflect.TypeOf((*ClusterDpmConfigInfo)(nil)).Elem() -} - -type ClusterDpmHostConfigInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - Enabled *bool `xml:"enabled"` - Behavior DpmBehavior `xml:"behavior,omitempty"` -} - -func init() { - t["ClusterDpmHostConfigInfo"] = reflect.TypeOf((*ClusterDpmHostConfigInfo)(nil)).Elem() -} - -type ClusterDpmHostConfigSpec struct { - ArrayUpdateSpec - - Info *ClusterDpmHostConfigInfo `xml:"info,omitempty"` -} - -func init() { - t["ClusterDpmHostConfigSpec"] = reflect.TypeOf((*ClusterDpmHostConfigSpec)(nil)).Elem() -} - -type ClusterDrsConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - EnableVmBehaviorOverrides *bool `xml:"enableVmBehaviorOverrides"` - DefaultVmBehavior DrsBehavior `xml:"defaultVmBehavior,omitempty"` - VmotionRate int32 `xml:"vmotionRate,omitempty"` - ScaleDescendantsShares string `xml:"scaleDescendantsShares,omitempty"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["ClusterDrsConfigInfo"] = reflect.TypeOf((*ClusterDrsConfigInfo)(nil)).Elem() -} - -type ClusterDrsFaults struct { - DynamicData - - Reason string `xml:"reason"` - FaultsByVm []BaseClusterDrsFaultsFaultsByVm `xml:"faultsByVm,typeattr"` -} - -func init() { - t["ClusterDrsFaults"] = reflect.TypeOf((*ClusterDrsFaults)(nil)).Elem() -} - -type ClusterDrsFaultsFaultsByVirtualDisk struct { - ClusterDrsFaultsFaultsByVm - - Disk *VirtualDiskId `xml:"disk,omitempty"` -} - -func init() { - t["ClusterDrsFaultsFaultsByVirtualDisk"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVirtualDisk)(nil)).Elem() -} - -type ClusterDrsFaultsFaultsByVm struct { - DynamicData - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Fault []LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["ClusterDrsFaultsFaultsByVm"] = reflect.TypeOf((*ClusterDrsFaultsFaultsByVm)(nil)).Elem() -} - -type ClusterDrsMigration struct { - DynamicData - - Key string `xml:"key"` - Time time.Time `xml:"time"` - Vm ManagedObjectReference `xml:"vm"` - CpuLoad int32 `xml:"cpuLoad,omitempty"` - MemoryLoad int64 `xml:"memoryLoad,omitempty"` - Source ManagedObjectReference `xml:"source"` - SourceCpuLoad int32 `xml:"sourceCpuLoad,omitempty"` - SourceMemoryLoad int64 `xml:"sourceMemoryLoad,omitempty"` - Destination ManagedObjectReference `xml:"destination"` - DestinationCpuLoad int32 `xml:"destinationCpuLoad,omitempty"` - DestinationMemoryLoad int64 `xml:"destinationMemoryLoad,omitempty"` -} - -func init() { - t["ClusterDrsMigration"] = reflect.TypeOf((*ClusterDrsMigration)(nil)).Elem() -} - -type ClusterDrsRecommendation struct { - DynamicData - - Key string `xml:"key"` - Rating int32 `xml:"rating"` - Reason string `xml:"reason"` - ReasonText string `xml:"reasonText"` - MigrationList []ClusterDrsMigration `xml:"migrationList"` -} - -func init() { - t["ClusterDrsRecommendation"] = reflect.TypeOf((*ClusterDrsRecommendation)(nil)).Elem() -} - -type ClusterDrsVmConfigInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - Enabled *bool `xml:"enabled"` - Behavior DrsBehavior `xml:"behavior,omitempty"` -} - -func init() { - t["ClusterDrsVmConfigInfo"] = reflect.TypeOf((*ClusterDrsVmConfigInfo)(nil)).Elem() -} - -type ClusterDrsVmConfigSpec struct { - ArrayUpdateSpec - - Info *ClusterDrsVmConfigInfo `xml:"info,omitempty"` -} - -func init() { - t["ClusterDrsVmConfigSpec"] = reflect.TypeOf((*ClusterDrsVmConfigSpec)(nil)).Elem() -} - -type ClusterEVCManagerCheckResult struct { - DynamicData - - EvcModeKey string `xml:"evcModeKey"` - Error LocalizedMethodFault `xml:"error"` - Host []ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["ClusterEVCManagerCheckResult"] = reflect.TypeOf((*ClusterEVCManagerCheckResult)(nil)).Elem() -} - -type ClusterEVCManagerEVCState struct { - DynamicData - - SupportedEVCMode []EVCMode `xml:"supportedEVCMode"` - CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` - GuaranteedCPUFeatures []HostCpuIdInfo `xml:"guaranteedCPUFeatures,omitempty"` - FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` - FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` - FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` -} - -func init() { - t["ClusterEVCManagerEVCState"] = reflect.TypeOf((*ClusterEVCManagerEVCState)(nil)).Elem() -} - -type ClusterEnterMaintenanceMode ClusterEnterMaintenanceModeRequestType - -func init() { - t["ClusterEnterMaintenanceMode"] = reflect.TypeOf((*ClusterEnterMaintenanceMode)(nil)).Elem() -} - -type ClusterEnterMaintenanceModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["ClusterEnterMaintenanceModeRequestType"] = reflect.TypeOf((*ClusterEnterMaintenanceModeRequestType)(nil)).Elem() -} - -type ClusterEnterMaintenanceModeResponse struct { - Returnval ClusterEnterMaintenanceResult `xml:"returnval"` -} - -type ClusterEnterMaintenanceResult struct { - DynamicData - - Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` - Fault *ClusterDrsFaults `xml:"fault,omitempty"` -} - -func init() { - t["ClusterEnterMaintenanceResult"] = reflect.TypeOf((*ClusterEnterMaintenanceResult)(nil)).Elem() -} - -type ClusterEvent struct { - Event -} - -func init() { - t["ClusterEvent"] = reflect.TypeOf((*ClusterEvent)(nil)).Elem() -} - -type ClusterFailoverHostAdmissionControlInfo struct { - ClusterDasAdmissionControlInfo - - HostStatus []ClusterFailoverHostAdmissionControlInfoHostStatus `xml:"hostStatus,omitempty"` -} - -func init() { - t["ClusterFailoverHostAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfo)(nil)).Elem() -} - -type ClusterFailoverHostAdmissionControlInfoHostStatus struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Status ManagedEntityStatus `xml:"status"` -} - -func init() { - t["ClusterFailoverHostAdmissionControlInfoHostStatus"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlInfoHostStatus)(nil)).Elem() -} - -type ClusterFailoverHostAdmissionControlPolicy struct { - ClusterDasAdmissionControlPolicy - - FailoverHosts []ManagedObjectReference `xml:"failoverHosts,omitempty"` - FailoverLevel int32 `xml:"failoverLevel,omitempty"` -} - -func init() { - t["ClusterFailoverHostAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverHostAdmissionControlPolicy)(nil)).Elem() -} - -type ClusterFailoverLevelAdmissionControlInfo struct { - ClusterDasAdmissionControlInfo - - CurrentFailoverLevel int32 `xml:"currentFailoverLevel"` -} - -func init() { - t["ClusterFailoverLevelAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlInfo)(nil)).Elem() -} - -type ClusterFailoverLevelAdmissionControlPolicy struct { - ClusterDasAdmissionControlPolicy - - FailoverLevel int32 `xml:"failoverLevel"` - SlotPolicy BaseClusterSlotPolicy `xml:"slotPolicy,omitempty,typeattr"` -} - -func init() { - t["ClusterFailoverLevelAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverLevelAdmissionControlPolicy)(nil)).Elem() -} - -type ClusterFailoverResourcesAdmissionControlInfo struct { - ClusterDasAdmissionControlInfo - - CurrentCpuFailoverResourcesPercent int32 `xml:"currentCpuFailoverResourcesPercent"` - CurrentMemoryFailoverResourcesPercent int32 `xml:"currentMemoryFailoverResourcesPercent"` - CurrentPMemFailoverResourcesPercent int32 `xml:"currentPMemFailoverResourcesPercent,omitempty"` -} - -func init() { - t["ClusterFailoverResourcesAdmissionControlInfo"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlInfo)(nil)).Elem() -} - -type ClusterFailoverResourcesAdmissionControlPolicy struct { - ClusterDasAdmissionControlPolicy - - CpuFailoverResourcesPercent int32 `xml:"cpuFailoverResourcesPercent"` - MemoryFailoverResourcesPercent int32 `xml:"memoryFailoverResourcesPercent"` - FailoverLevel int32 `xml:"failoverLevel,omitempty"` - AutoComputePercentages *bool `xml:"autoComputePercentages"` - PMemFailoverResourcesPercent int32 `xml:"pMemFailoverResourcesPercent,omitempty"` - AutoComputePMemFailoverResourcesPercent *bool `xml:"autoComputePMemFailoverResourcesPercent"` -} - -func init() { - t["ClusterFailoverResourcesAdmissionControlPolicy"] = reflect.TypeOf((*ClusterFailoverResourcesAdmissionControlPolicy)(nil)).Elem() -} - -type ClusterFixedSizeSlotPolicy struct { - ClusterSlotPolicy - - Cpu int32 `xml:"cpu"` - Memory int32 `xml:"memory"` -} - -func init() { - t["ClusterFixedSizeSlotPolicy"] = reflect.TypeOf((*ClusterFixedSizeSlotPolicy)(nil)).Elem() -} - -type ClusterGroupInfo struct { - DynamicData - - Name string `xml:"name"` - UserCreated *bool `xml:"userCreated"` - UniqueID string `xml:"uniqueID,omitempty"` -} - -func init() { - t["ClusterGroupInfo"] = reflect.TypeOf((*ClusterGroupInfo)(nil)).Elem() -} - -type ClusterGroupSpec struct { - ArrayUpdateSpec - - Info BaseClusterGroupInfo `xml:"info,omitempty,typeattr"` -} - -func init() { - t["ClusterGroupSpec"] = reflect.TypeOf((*ClusterGroupSpec)(nil)).Elem() -} - -type ClusterHostGroup struct { - ClusterGroupInfo - - Host []ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["ClusterHostGroup"] = reflect.TypeOf((*ClusterHostGroup)(nil)).Elem() -} - -type ClusterHostInfraUpdateHaModeAction struct { - ClusterAction - - OperationType string `xml:"operationType"` -} - -func init() { - t["ClusterHostInfraUpdateHaModeAction"] = reflect.TypeOf((*ClusterHostInfraUpdateHaModeAction)(nil)).Elem() -} - -type ClusterHostPowerAction struct { - ClusterAction - - OperationType HostPowerOperationType `xml:"operationType"` - PowerConsumptionWatt int32 `xml:"powerConsumptionWatt,omitempty"` - CpuCapacityMHz int32 `xml:"cpuCapacityMHz,omitempty"` - MemCapacityMB int32 `xml:"memCapacityMB,omitempty"` -} - -func init() { - t["ClusterHostPowerAction"] = reflect.TypeOf((*ClusterHostPowerAction)(nil)).Elem() -} - -type ClusterHostRecommendation struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Rating int32 `xml:"rating"` -} - -func init() { - t["ClusterHostRecommendation"] = reflect.TypeOf((*ClusterHostRecommendation)(nil)).Elem() -} - -type ClusterInfraUpdateHaConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - Behavior string `xml:"behavior,omitempty"` - ModerateRemediation string `xml:"moderateRemediation,omitempty"` - SevereRemediation string `xml:"severeRemediation,omitempty"` - Providers []string `xml:"providers,omitempty"` -} - -func init() { - t["ClusterInfraUpdateHaConfigInfo"] = reflect.TypeOf((*ClusterInfraUpdateHaConfigInfo)(nil)).Elem() -} - -type ClusterInitialPlacementAction struct { - ClusterAction - - TargetHost ManagedObjectReference `xml:"targetHost"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` -} - -func init() { - t["ClusterInitialPlacementAction"] = reflect.TypeOf((*ClusterInitialPlacementAction)(nil)).Elem() -} - -type ClusterIoFilterInfo struct { - IoFilterInfo - - OpType string `xml:"opType"` - VibUrl string `xml:"vibUrl,omitempty"` -} - -func init() { - t["ClusterIoFilterInfo"] = reflect.TypeOf((*ClusterIoFilterInfo)(nil)).Elem() -} - -type ClusterMigrationAction struct { - ClusterAction - - DrsMigration *ClusterDrsMigration `xml:"drsMigration,omitempty"` -} - -func init() { - t["ClusterMigrationAction"] = reflect.TypeOf((*ClusterMigrationAction)(nil)).Elem() -} - -type ClusterNetworkConfigSpec struct { - DynamicData - - NetworkPortGroup ManagedObjectReference `xml:"networkPortGroup"` - IpSettings CustomizationIPSettings `xml:"ipSettings"` -} - -func init() { - t["ClusterNetworkConfigSpec"] = reflect.TypeOf((*ClusterNetworkConfigSpec)(nil)).Elem() -} - -type ClusterNotAttemptedVmInfo struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["ClusterNotAttemptedVmInfo"] = reflect.TypeOf((*ClusterNotAttemptedVmInfo)(nil)).Elem() -} - -type ClusterOrchestrationInfo struct { - DynamicData - - DefaultVmReadiness *ClusterVmReadiness `xml:"defaultVmReadiness,omitempty"` -} - -func init() { - t["ClusterOrchestrationInfo"] = reflect.TypeOf((*ClusterOrchestrationInfo)(nil)).Elem() -} - -type ClusterOvercommittedEvent struct { - ClusterEvent -} - -func init() { - t["ClusterOvercommittedEvent"] = reflect.TypeOf((*ClusterOvercommittedEvent)(nil)).Elem() -} - -type ClusterPowerOnVmResult struct { - DynamicData - - Attempted []ClusterAttemptedVmInfo `xml:"attempted,omitempty"` - NotAttempted []ClusterNotAttemptedVmInfo `xml:"notAttempted,omitempty"` - Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` -} - -func init() { - t["ClusterPowerOnVmResult"] = reflect.TypeOf((*ClusterPowerOnVmResult)(nil)).Elem() -} - -type ClusterPreemptibleVmPairInfo struct { - DynamicData - - Id int32 `xml:"id,omitempty"` - MonitoredVm ManagedObjectReference `xml:"monitoredVm"` - PreemptibleVm ManagedObjectReference `xml:"preemptibleVm"` -} - -func init() { - t["ClusterPreemptibleVmPairInfo"] = reflect.TypeOf((*ClusterPreemptibleVmPairInfo)(nil)).Elem() -} - -type ClusterPreemptibleVmPairSpec struct { - ArrayUpdateSpec - - Info *ClusterPreemptibleVmPairInfo `xml:"info,omitempty"` -} - -func init() { - t["ClusterPreemptibleVmPairSpec"] = reflect.TypeOf((*ClusterPreemptibleVmPairSpec)(nil)).Elem() -} - -type ClusterProactiveDrsConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` -} - -func init() { - t["ClusterProactiveDrsConfigInfo"] = reflect.TypeOf((*ClusterProactiveDrsConfigInfo)(nil)).Elem() -} - -type ClusterProfileCompleteConfigSpec struct { - ClusterProfileConfigSpec - - ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"` -} - -func init() { - t["ClusterProfileCompleteConfigSpec"] = reflect.TypeOf((*ClusterProfileCompleteConfigSpec)(nil)).Elem() -} - -type ClusterProfileConfigInfo struct { - ProfileConfigInfo - - ComplyProfile *ComplianceProfile `xml:"complyProfile,omitempty"` -} - -func init() { - t["ClusterProfileConfigInfo"] = reflect.TypeOf((*ClusterProfileConfigInfo)(nil)).Elem() -} - -type ClusterProfileConfigServiceCreateSpec struct { - ClusterProfileConfigSpec - - ServiceType []string `xml:"serviceType,omitempty"` -} - -func init() { - t["ClusterProfileConfigServiceCreateSpec"] = reflect.TypeOf((*ClusterProfileConfigServiceCreateSpec)(nil)).Elem() -} - -type ClusterProfileConfigSpec struct { - ClusterProfileCreateSpec -} - -func init() { - t["ClusterProfileConfigSpec"] = reflect.TypeOf((*ClusterProfileConfigSpec)(nil)).Elem() -} - -type ClusterProfileCreateSpec struct { - ProfileCreateSpec -} - -func init() { - t["ClusterProfileCreateSpec"] = reflect.TypeOf((*ClusterProfileCreateSpec)(nil)).Elem() -} - -type ClusterRecommendation struct { - DynamicData - - Key string `xml:"key"` - Type string `xml:"type"` - Time time.Time `xml:"time"` - Rating int32 `xml:"rating"` - Reason string `xml:"reason"` - ReasonText string `xml:"reasonText"` - WarningText string `xml:"warningText,omitempty"` - WarningDetails *LocalizableMessage `xml:"warningDetails,omitempty"` - Prerequisite []string `xml:"prerequisite,omitempty"` - Action []BaseClusterAction `xml:"action,omitempty,typeattr"` - Target *ManagedObjectReference `xml:"target,omitempty"` -} - -func init() { - t["ClusterRecommendation"] = reflect.TypeOf((*ClusterRecommendation)(nil)).Elem() -} - -type ClusterReconfiguredEvent struct { - ClusterEvent - - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["ClusterReconfiguredEvent"] = reflect.TypeOf((*ClusterReconfiguredEvent)(nil)).Elem() -} - -type ClusterResourceUsageSummary struct { - DynamicData - - CpuUsedMHz int32 `xml:"cpuUsedMHz"` - CpuCapacityMHz int32 `xml:"cpuCapacityMHz"` - MemUsedMB int32 `xml:"memUsedMB"` - MemCapacityMB int32 `xml:"memCapacityMB"` - PMemAvailableMB int64 `xml:"pMemAvailableMB,omitempty"` - PMemCapacityMB int64 `xml:"pMemCapacityMB,omitempty"` - StorageUsedMB int64 `xml:"storageUsedMB"` - StorageCapacityMB int64 `xml:"storageCapacityMB"` -} - -func init() { - t["ClusterResourceUsageSummary"] = reflect.TypeOf((*ClusterResourceUsageSummary)(nil)).Elem() -} - -type ClusterRuleInfo struct { - DynamicData - - Key int32 `xml:"key,omitempty"` - Status ManagedEntityStatus `xml:"status,omitempty"` - Enabled *bool `xml:"enabled"` - Name string `xml:"name,omitempty"` - Mandatory *bool `xml:"mandatory"` - UserCreated *bool `xml:"userCreated"` - InCompliance *bool `xml:"inCompliance"` - RuleUuid string `xml:"ruleUuid,omitempty"` -} - -func init() { - t["ClusterRuleInfo"] = reflect.TypeOf((*ClusterRuleInfo)(nil)).Elem() -} - -type ClusterRuleSpec struct { - ArrayUpdateSpec - - Info BaseClusterRuleInfo `xml:"info,omitempty,typeattr"` -} - -func init() { - t["ClusterRuleSpec"] = reflect.TypeOf((*ClusterRuleSpec)(nil)).Elem() -} - -type ClusterSlotPolicy struct { - DynamicData -} - -func init() { - t["ClusterSlotPolicy"] = reflect.TypeOf((*ClusterSlotPolicy)(nil)).Elem() -} - -type ClusterStatusChangedEvent struct { - ClusterEvent - - OldStatus string `xml:"oldStatus"` - NewStatus string `xml:"newStatus"` -} - -func init() { - t["ClusterStatusChangedEvent"] = reflect.TypeOf((*ClusterStatusChangedEvent)(nil)).Elem() -} - -type ClusterSystemVMsConfigInfo struct { - DynamicData - - AllowedDatastores []ManagedObjectReference `xml:"allowedDatastores,omitempty"` - NotAllowedDatastores []ManagedObjectReference `xml:"notAllowedDatastores,omitempty"` - DsTagCategoriesToExclude []string `xml:"dsTagCategoriesToExclude,omitempty"` -} - -func init() { - t["ClusterSystemVMsConfigInfo"] = reflect.TypeOf((*ClusterSystemVMsConfigInfo)(nil)).Elem() -} - -type ClusterSystemVMsConfigSpec struct { - DynamicData - - AllowedDatastores []ClusterDatastoreUpdateSpec `xml:"allowedDatastores,omitempty"` - NotAllowedDatastores []ClusterDatastoreUpdateSpec `xml:"notAllowedDatastores,omitempty"` - DsTagCategoriesToExclude []ClusterTagCategoryUpdateSpec `xml:"dsTagCategoriesToExclude,omitempty"` -} - -func init() { - t["ClusterSystemVMsConfigSpec"] = reflect.TypeOf((*ClusterSystemVMsConfigSpec)(nil)).Elem() -} - -type ClusterTagCategoryUpdateSpec struct { - ArrayUpdateSpec - - Category string `xml:"category,omitempty"` -} - -func init() { - t["ClusterTagCategoryUpdateSpec"] = reflect.TypeOf((*ClusterTagCategoryUpdateSpec)(nil)).Elem() -} - -type ClusterUsageSummary struct { - DynamicData - - TotalCpuCapacityMhz int32 `xml:"totalCpuCapacityMhz"` - TotalMemCapacityMB int32 `xml:"totalMemCapacityMB"` - CpuReservationMhz int32 `xml:"cpuReservationMhz"` - MemReservationMB int32 `xml:"memReservationMB"` - PoweredOffCpuReservationMhz int32 `xml:"poweredOffCpuReservationMhz,omitempty"` - PoweredOffMemReservationMB int32 `xml:"poweredOffMemReservationMB,omitempty"` - CpuDemandMhz int32 `xml:"cpuDemandMhz"` - MemDemandMB int32 `xml:"memDemandMB"` - StatsGenNumber int64 `xml:"statsGenNumber"` - CpuEntitledMhz int32 `xml:"cpuEntitledMhz"` - MemEntitledMB int32 `xml:"memEntitledMB"` - PoweredOffVmCount int32 `xml:"poweredOffVmCount"` - TotalVmCount int32 `xml:"totalVmCount"` -} - -func init() { - t["ClusterUsageSummary"] = reflect.TypeOf((*ClusterUsageSummary)(nil)).Elem() -} - -type ClusterVmComponentProtectionSettings struct { - DynamicData - - VmStorageProtectionForAPD string `xml:"vmStorageProtectionForAPD,omitempty"` - EnableAPDTimeoutForHosts *bool `xml:"enableAPDTimeoutForHosts"` - VmTerminateDelayForAPDSec int32 `xml:"vmTerminateDelayForAPDSec,omitempty"` - VmReactionOnAPDCleared string `xml:"vmReactionOnAPDCleared,omitempty"` - VmStorageProtectionForPDL string `xml:"vmStorageProtectionForPDL,omitempty"` -} - -func init() { - t["ClusterVmComponentProtectionSettings"] = reflect.TypeOf((*ClusterVmComponentProtectionSettings)(nil)).Elem() -} - -type ClusterVmGroup struct { - ClusterGroupInfo - - Vm []ManagedObjectReference `xml:"vm,omitempty"` -} - -func init() { - t["ClusterVmGroup"] = reflect.TypeOf((*ClusterVmGroup)(nil)).Elem() -} - -type ClusterVmHostRuleInfo struct { - ClusterRuleInfo - - VmGroupName string `xml:"vmGroupName,omitempty"` - AffineHostGroupName string `xml:"affineHostGroupName,omitempty"` - AntiAffineHostGroupName string `xml:"antiAffineHostGroupName,omitempty"` -} - -func init() { - t["ClusterVmHostRuleInfo"] = reflect.TypeOf((*ClusterVmHostRuleInfo)(nil)).Elem() -} - -type ClusterVmOrchestrationInfo struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - VmReadiness ClusterVmReadiness `xml:"vmReadiness"` -} - -func init() { - t["ClusterVmOrchestrationInfo"] = reflect.TypeOf((*ClusterVmOrchestrationInfo)(nil)).Elem() -} - -type ClusterVmOrchestrationSpec struct { - ArrayUpdateSpec - - Info *ClusterVmOrchestrationInfo `xml:"info,omitempty"` -} - -func init() { - t["ClusterVmOrchestrationSpec"] = reflect.TypeOf((*ClusterVmOrchestrationSpec)(nil)).Elem() -} - -type ClusterVmReadiness struct { - DynamicData - - ReadyCondition string `xml:"readyCondition,omitempty"` - PostReadyDelay int32 `xml:"postReadyDelay,omitempty"` -} - -func init() { - t["ClusterVmReadiness"] = reflect.TypeOf((*ClusterVmReadiness)(nil)).Elem() -} - -type ClusterVmToolsMonitoringSettings struct { - DynamicData - - Enabled *bool `xml:"enabled"` - VmMonitoring string `xml:"vmMonitoring,omitempty"` - ClusterSettings *bool `xml:"clusterSettings"` - FailureInterval int32 `xml:"failureInterval,omitempty"` - MinUpTime int32 `xml:"minUpTime,omitempty"` - MaxFailures int32 `xml:"maxFailures,omitempty"` - MaxFailureWindow int32 `xml:"maxFailureWindow,omitempty"` -} - -func init() { - t["ClusterVmToolsMonitoringSettings"] = reflect.TypeOf((*ClusterVmToolsMonitoringSettings)(nil)).Elem() -} - -type CollectorAddressUnset struct { - DvsFault -} - -func init() { - t["CollectorAddressUnset"] = reflect.TypeOf((*CollectorAddressUnset)(nil)).Elem() -} - -type CollectorAddressUnsetFault CollectorAddressUnset - -func init() { - t["CollectorAddressUnsetFault"] = reflect.TypeOf((*CollectorAddressUnsetFault)(nil)).Elem() -} - -type ComplianceFailure struct { - DynamicData - - FailureType string `xml:"failureType"` - Message LocalizableMessage `xml:"message"` - ExpressionName string `xml:"expressionName,omitempty"` - FailureValues []ComplianceFailureComplianceFailureValues `xml:"failureValues,omitempty"` -} - -func init() { - t["ComplianceFailure"] = reflect.TypeOf((*ComplianceFailure)(nil)).Elem() -} - -type ComplianceFailureComplianceFailureValues struct { - DynamicData - - ComparisonIdentifier string `xml:"comparisonIdentifier"` - ProfileInstance string `xml:"profileInstance,omitempty"` - HostValue AnyType `xml:"hostValue,omitempty,typeattr"` - ProfileValue AnyType `xml:"profileValue,omitempty,typeattr"` -} - -func init() { - t["ComplianceFailureComplianceFailureValues"] = reflect.TypeOf((*ComplianceFailureComplianceFailureValues)(nil)).Elem() -} - -type ComplianceLocator struct { - DynamicData - - ExpressionName string `xml:"expressionName"` - ApplyPath ProfilePropertyPath `xml:"applyPath"` -} - -func init() { - t["ComplianceLocator"] = reflect.TypeOf((*ComplianceLocator)(nil)).Elem() -} - -type ComplianceProfile struct { - DynamicData - - Expression []BaseProfileExpression `xml:"expression,typeattr"` - RootExpression string `xml:"rootExpression"` -} - -func init() { - t["ComplianceProfile"] = reflect.TypeOf((*ComplianceProfile)(nil)).Elem() -} - -type ComplianceResult struct { - DynamicData - - Profile *ManagedObjectReference `xml:"profile,omitempty"` - ComplianceStatus string `xml:"complianceStatus"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` - CheckTime *time.Time `xml:"checkTime"` - Failure []ComplianceFailure `xml:"failure,omitempty"` -} - -func init() { - t["ComplianceResult"] = reflect.TypeOf((*ComplianceResult)(nil)).Elem() -} - -type CompositeHostProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Source ManagedObjectReference `xml:"source"` - Targets []ManagedObjectReference `xml:"targets,omitempty"` - ToBeMerged *HostApplyProfile `xml:"toBeMerged,omitempty"` - ToBeReplacedWith *HostApplyProfile `xml:"toBeReplacedWith,omitempty"` - ToBeDeleted *HostApplyProfile `xml:"toBeDeleted,omitempty"` - EnableStatusToBeCopied *HostApplyProfile `xml:"enableStatusToBeCopied,omitempty"` -} - -func init() { - t["CompositeHostProfileRequestType"] = reflect.TypeOf((*CompositeHostProfileRequestType)(nil)).Elem() -} - -type CompositeHostProfile_Task CompositeHostProfileRequestType - -func init() { - t["CompositeHostProfile_Task"] = reflect.TypeOf((*CompositeHostProfile_Task)(nil)).Elem() -} - -type CompositeHostProfile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CompositePolicyOption struct { - PolicyOption - - Option []BasePolicyOption `xml:"option,omitempty,typeattr"` -} - -func init() { - t["CompositePolicyOption"] = reflect.TypeOf((*CompositePolicyOption)(nil)).Elem() -} - -type ComputeDiskPartitionInfo ComputeDiskPartitionInfoRequestType - -func init() { - t["ComputeDiskPartitionInfo"] = reflect.TypeOf((*ComputeDiskPartitionInfo)(nil)).Elem() -} - -type ComputeDiskPartitionInfoForResize ComputeDiskPartitionInfoForResizeRequestType - -func init() { - t["ComputeDiskPartitionInfoForResize"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResize)(nil)).Elem() -} - -type ComputeDiskPartitionInfoForResizeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Partition HostScsiDiskPartition `xml:"partition"` - BlockRange HostDiskPartitionBlockRange `xml:"blockRange"` - PartitionFormat string `xml:"partitionFormat,omitempty"` -} - -func init() { - t["ComputeDiskPartitionInfoForResizeRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoForResizeRequestType)(nil)).Elem() -} - -type ComputeDiskPartitionInfoForResizeResponse struct { - Returnval HostDiskPartitionInfo `xml:"returnval"` -} - -type ComputeDiskPartitionInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - DevicePath string `xml:"devicePath"` - Layout HostDiskPartitionLayout `xml:"layout"` - PartitionFormat string `xml:"partitionFormat,omitempty"` -} - -func init() { - t["ComputeDiskPartitionInfoRequestType"] = reflect.TypeOf((*ComputeDiskPartitionInfoRequestType)(nil)).Elem() -} - -type ComputeDiskPartitionInfoResponse struct { - Returnval HostDiskPartitionInfo `xml:"returnval"` -} - -type ComputeResourceConfigInfo struct { - DynamicData - - VmSwapPlacement string `xml:"vmSwapPlacement"` - SpbmEnabled *bool `xml:"spbmEnabled"` - DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` - MaximumHardwareVersionKey string `xml:"maximumHardwareVersionKey,omitempty"` -} - -func init() { - t["ComputeResourceConfigInfo"] = reflect.TypeOf((*ComputeResourceConfigInfo)(nil)).Elem() -} - -type ComputeResourceConfigSpec struct { - DynamicData - - VmSwapPlacement string `xml:"vmSwapPlacement,omitempty"` - SpbmEnabled *bool `xml:"spbmEnabled"` - DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` - DesiredSoftwareSpec *DesiredSoftwareSpec `xml:"desiredSoftwareSpec,omitempty"` - MaximumHardwareVersionKey string `xml:"maximumHardwareVersionKey,omitempty"` - EnableConfigManager *bool `xml:"enableConfigManager"` -} - -func init() { - t["ComputeResourceConfigSpec"] = reflect.TypeOf((*ComputeResourceConfigSpec)(nil)).Elem() -} - -type ComputeResourceEventArgument struct { - EntityEventArgument - - ComputeResource ManagedObjectReference `xml:"computeResource"` -} - -func init() { - t["ComputeResourceEventArgument"] = reflect.TypeOf((*ComputeResourceEventArgument)(nil)).Elem() -} - -type ComputeResourceHostSPBMLicenseInfo struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - LicenseState ComputeResourceHostSPBMLicenseInfoHostSPBMLicenseState `xml:"licenseState"` -} - -func init() { - t["ComputeResourceHostSPBMLicenseInfo"] = reflect.TypeOf((*ComputeResourceHostSPBMLicenseInfo)(nil)).Elem() -} - -type ComputeResourceSummary struct { - DynamicData - - TotalCpu int32 `xml:"totalCpu"` - TotalMemory int64 `xml:"totalMemory"` - NumCpuCores int16 `xml:"numCpuCores"` - NumCpuThreads int16 `xml:"numCpuThreads"` - EffectiveCpu int32 `xml:"effectiveCpu"` - EffectiveMemory int64 `xml:"effectiveMemory"` - NumHosts int32 `xml:"numHosts"` - NumEffectiveHosts int32 `xml:"numEffectiveHosts"` - OverallStatus ManagedEntityStatus `xml:"overallStatus"` -} - -func init() { - t["ComputeResourceSummary"] = reflect.TypeOf((*ComputeResourceSummary)(nil)).Elem() -} - -type ConcurrentAccess struct { - VimFault -} - -func init() { - t["ConcurrentAccess"] = reflect.TypeOf((*ConcurrentAccess)(nil)).Elem() -} - -type ConcurrentAccessFault ConcurrentAccess - -func init() { - t["ConcurrentAccessFault"] = reflect.TypeOf((*ConcurrentAccessFault)(nil)).Elem() -} - -type ConfigTarget struct { - DynamicData - - NumCpus int32 `xml:"numCpus"` - NumCpuCores int32 `xml:"numCpuCores"` - NumNumaNodes int32 `xml:"numNumaNodes"` - MaxCpusPerHost int32 `xml:"maxCpusPerHost,omitempty"` - SmcPresent *bool `xml:"smcPresent"` - Datastore []VirtualMachineDatastoreInfo `xml:"datastore,omitempty"` - Network []VirtualMachineNetworkInfo `xml:"network,omitempty"` - OpaqueNetwork []OpaqueNetworkTargetInfo `xml:"opaqueNetwork,omitempty"` - DistributedVirtualPortgroup []DistributedVirtualPortgroupInfo `xml:"distributedVirtualPortgroup,omitempty"` - DistributedVirtualSwitch []DistributedVirtualSwitchInfo `xml:"distributedVirtualSwitch,omitempty"` - CdRom []VirtualMachineCdromInfo `xml:"cdRom,omitempty"` - Serial []VirtualMachineSerialInfo `xml:"serial,omitempty"` - Parallel []VirtualMachineParallelInfo `xml:"parallel,omitempty"` - Sound []VirtualMachineSoundInfo `xml:"sound,omitempty"` - Usb []VirtualMachineUsbInfo `xml:"usb,omitempty"` - Floppy []VirtualMachineFloppyInfo `xml:"floppy,omitempty"` - LegacyNetworkInfo []VirtualMachineLegacyNetworkSwitchInfo `xml:"legacyNetworkInfo,omitempty"` - ScsiPassthrough []VirtualMachineScsiPassthroughInfo `xml:"scsiPassthrough,omitempty"` - ScsiDisk []VirtualMachineScsiDiskDeviceInfo `xml:"scsiDisk,omitempty"` - IdeDisk []VirtualMachineIdeDiskDeviceInfo `xml:"ideDisk,omitempty"` - MaxMemMBOptimalPerf int32 `xml:"maxMemMBOptimalPerf"` - SupportedMaxMemMB int32 `xml:"supportedMaxMemMB,omitempty"` - ResourcePool *ResourcePoolRuntimeInfo `xml:"resourcePool,omitempty"` - AutoVmotion *bool `xml:"autoVmotion"` - PciPassthrough []BaseVirtualMachinePciPassthroughInfo `xml:"pciPassthrough,omitempty,typeattr"` - Sriov []VirtualMachineSriovInfo `xml:"sriov,omitempty"` - VFlashModule []VirtualMachineVFlashModuleInfo `xml:"vFlashModule,omitempty"` - SharedGpuPassthroughTypes []VirtualMachinePciSharedGpuPassthroughInfo `xml:"sharedGpuPassthroughTypes,omitempty"` - AvailablePersistentMemoryReservationMB int64 `xml:"availablePersistentMemoryReservationMB,omitempty"` - DynamicPassthrough []VirtualMachineDynamicPassthroughInfo `xml:"dynamicPassthrough,omitempty"` - SgxTargetInfo *VirtualMachineSgxTargetInfo `xml:"sgxTargetInfo,omitempty"` - PrecisionClockInfo []VirtualMachinePrecisionClockInfo `xml:"precisionClockInfo,omitempty"` - SevSupported *bool `xml:"sevSupported"` - VgpuDeviceInfo []VirtualMachineVgpuDeviceInfo `xml:"vgpuDeviceInfo,omitempty"` - VgpuProfileInfo []VirtualMachineVgpuProfileInfo `xml:"vgpuProfileInfo,omitempty"` - VendorDeviceGroupInfo []VirtualMachineVendorDeviceGroupInfo `xml:"vendorDeviceGroupInfo,omitempty"` - MaxSimultaneousThreads int32 `xml:"maxSimultaneousThreads,omitempty"` - DvxClassInfo []VirtualMachineDvxClassInfo `xml:"dvxClassInfo,omitempty"` -} - -func init() { - t["ConfigTarget"] = reflect.TypeOf((*ConfigTarget)(nil)).Elem() -} - -type ConfigureCryptoKey ConfigureCryptoKeyRequestType - -func init() { - t["ConfigureCryptoKey"] = reflect.TypeOf((*ConfigureCryptoKey)(nil)).Elem() -} - -type ConfigureCryptoKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["ConfigureCryptoKeyRequestType"] = reflect.TypeOf((*ConfigureCryptoKeyRequestType)(nil)).Elem() -} - -type ConfigureCryptoKeyResponse struct { -} - -type ConfigureDatastoreIORMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec StorageIORMConfigSpec `xml:"spec"` -} - -func init() { - t["ConfigureDatastoreIORMRequestType"] = reflect.TypeOf((*ConfigureDatastoreIORMRequestType)(nil)).Elem() -} - -type ConfigureDatastoreIORM_Task ConfigureDatastoreIORMRequestType - -func init() { - t["ConfigureDatastoreIORM_Task"] = reflect.TypeOf((*ConfigureDatastoreIORM_Task)(nil)).Elem() -} - -type ConfigureDatastoreIORM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureDatastorePrincipal ConfigureDatastorePrincipalRequestType - -func init() { - t["ConfigureDatastorePrincipal"] = reflect.TypeOf((*ConfigureDatastorePrincipal)(nil)).Elem() -} - -type ConfigureDatastorePrincipalRequestType struct { - This ManagedObjectReference `xml:"_this"` - UserName string `xml:"userName"` - Password string `xml:"password,omitempty"` -} - -func init() { - t["ConfigureDatastorePrincipalRequestType"] = reflect.TypeOf((*ConfigureDatastorePrincipalRequestType)(nil)).Elem() -} - -type ConfigureDatastorePrincipalResponse struct { -} - -type ConfigureEvcModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - EvcModeKey string `xml:"evcModeKey"` - EvcGraphicsModeKey string `xml:"evcGraphicsModeKey,omitempty"` -} - -func init() { - t["ConfigureEvcModeRequestType"] = reflect.TypeOf((*ConfigureEvcModeRequestType)(nil)).Elem() -} - -type ConfigureEvcMode_Task ConfigureEvcModeRequestType - -func init() { - t["ConfigureEvcMode_Task"] = reflect.TypeOf((*ConfigureEvcMode_Task)(nil)).Elem() -} - -type ConfigureEvcMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureHCIRequestType struct { - This ManagedObjectReference `xml:"_this"` - ClusterSpec ClusterComputeResourceHCIConfigSpec `xml:"clusterSpec"` - HostInputs []ClusterComputeResourceHostConfigurationInput `xml:"hostInputs,omitempty"` -} - -func init() { - t["ConfigureHCIRequestType"] = reflect.TypeOf((*ConfigureHCIRequestType)(nil)).Elem() -} - -type ConfigureHCI_Task ConfigureHCIRequestType - -func init() { - t["ConfigureHCI_Task"] = reflect.TypeOf((*ConfigureHCI_Task)(nil)).Elem() -} - -type ConfigureHCI_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureHostCacheRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostCacheConfigurationSpec `xml:"spec"` -} - -func init() { - t["ConfigureHostCacheRequestType"] = reflect.TypeOf((*ConfigureHostCacheRequestType)(nil)).Elem() -} - -type ConfigureHostCache_Task ConfigureHostCacheRequestType - -func init() { - t["ConfigureHostCache_Task"] = reflect.TypeOf((*ConfigureHostCache_Task)(nil)).Elem() -} - -type ConfigureHostCache_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureLicenseSource ConfigureLicenseSourceRequestType - -func init() { - t["ConfigureLicenseSource"] = reflect.TypeOf((*ConfigureLicenseSource)(nil)).Elem() -} - -type ConfigureLicenseSourceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - LicenseSource BaseLicenseSource `xml:"licenseSource,typeattr"` -} - -func init() { - t["ConfigureLicenseSourceRequestType"] = reflect.TypeOf((*ConfigureLicenseSourceRequestType)(nil)).Elem() -} - -type ConfigureLicenseSourceResponse struct { -} - -type ConfigurePowerPolicy ConfigurePowerPolicyRequestType - -func init() { - t["ConfigurePowerPolicy"] = reflect.TypeOf((*ConfigurePowerPolicy)(nil)).Elem() -} - -type ConfigurePowerPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key int32 `xml:"key"` -} - -func init() { - t["ConfigurePowerPolicyRequestType"] = reflect.TypeOf((*ConfigurePowerPolicyRequestType)(nil)).Elem() -} - -type ConfigurePowerPolicyResponse struct { -} - -type ConfigureStorageDrsForPodRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pod ManagedObjectReference `xml:"pod"` - Spec StorageDrsConfigSpec `xml:"spec"` - Modify bool `xml:"modify"` -} - -func init() { - t["ConfigureStorageDrsForPodRequestType"] = reflect.TypeOf((*ConfigureStorageDrsForPodRequestType)(nil)).Elem() -} - -type ConfigureStorageDrsForPod_Task ConfigureStorageDrsForPodRequestType - -func init() { - t["ConfigureStorageDrsForPod_Task"] = reflect.TypeOf((*ConfigureStorageDrsForPod_Task)(nil)).Elem() -} - -type ConfigureStorageDrsForPod_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureVFlashResourceExRequestType struct { - This ManagedObjectReference `xml:"_this"` - DevicePath []string `xml:"devicePath,omitempty"` -} - -func init() { - t["ConfigureVFlashResourceExRequestType"] = reflect.TypeOf((*ConfigureVFlashResourceExRequestType)(nil)).Elem() -} - -type ConfigureVFlashResourceEx_Task ConfigureVFlashResourceExRequestType - -func init() { - t["ConfigureVFlashResourceEx_Task"] = reflect.TypeOf((*ConfigureVFlashResourceEx_Task)(nil)).Elem() -} - -type ConfigureVFlashResourceEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConflictingConfiguration struct { - DvsFault - - ConfigInConflict []ConflictingConfigurationConfig `xml:"configInConflict"` -} - -func init() { - t["ConflictingConfiguration"] = reflect.TypeOf((*ConflictingConfiguration)(nil)).Elem() -} - -type ConflictingConfigurationConfig struct { - DynamicData - - Entity *ManagedObjectReference `xml:"entity,omitempty"` - PropertyPath string `xml:"propertyPath"` -} - -func init() { - t["ConflictingConfigurationConfig"] = reflect.TypeOf((*ConflictingConfigurationConfig)(nil)).Elem() -} - -type ConflictingConfigurationFault ConflictingConfiguration - -func init() { - t["ConflictingConfigurationFault"] = reflect.TypeOf((*ConflictingConfigurationFault)(nil)).Elem() -} - -type ConflictingDatastoreFound struct { - RuntimeFault - - Name string `xml:"name"` - Url string `xml:"url"` -} - -func init() { - t["ConflictingDatastoreFound"] = reflect.TypeOf((*ConflictingDatastoreFound)(nil)).Elem() -} - -type ConflictingDatastoreFoundFault ConflictingDatastoreFound - -func init() { - t["ConflictingDatastoreFoundFault"] = reflect.TypeOf((*ConflictingDatastoreFoundFault)(nil)).Elem() -} - -type ConnectNvmeController ConnectNvmeControllerRequestType - -func init() { - t["ConnectNvmeController"] = reflect.TypeOf((*ConnectNvmeController)(nil)).Elem() -} - -type ConnectNvmeControllerExRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConnectSpec []HostNvmeConnectSpec `xml:"connectSpec,omitempty"` -} - -func init() { - t["ConnectNvmeControllerExRequestType"] = reflect.TypeOf((*ConnectNvmeControllerExRequestType)(nil)).Elem() -} - -type ConnectNvmeControllerEx_Task ConnectNvmeControllerExRequestType - -func init() { - t["ConnectNvmeControllerEx_Task"] = reflect.TypeOf((*ConnectNvmeControllerEx_Task)(nil)).Elem() -} - -type ConnectNvmeControllerEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConnectNvmeControllerRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConnectSpec HostNvmeConnectSpec `xml:"connectSpec"` -} - -func init() { - t["ConnectNvmeControllerRequestType"] = reflect.TypeOf((*ConnectNvmeControllerRequestType)(nil)).Elem() -} - -type ConnectNvmeControllerResponse struct { -} - -type ConnectedIso struct { - OvfExport - - Cdrom VirtualCdrom `xml:"cdrom"` - Filename string `xml:"filename"` -} - -func init() { - t["ConnectedIso"] = reflect.TypeOf((*ConnectedIso)(nil)).Elem() -} - -type ConnectedIsoFault ConnectedIso - -func init() { - t["ConnectedIsoFault"] = reflect.TypeOf((*ConnectedIsoFault)(nil)).Elem() -} - -type ConsolidateVMDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ConsolidateVMDisksRequestType"] = reflect.TypeOf((*ConsolidateVMDisksRequestType)(nil)).Elem() -} - -type ConsolidateVMDisks_Task ConsolidateVMDisksRequestType - -func init() { - t["ConsolidateVMDisks_Task"] = reflect.TypeOf((*ConsolidateVMDisks_Task)(nil)).Elem() -} - -type ConsolidateVMDisks_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ContinueRetrievePropertiesEx ContinueRetrievePropertiesExRequestType - -func init() { - t["ContinueRetrievePropertiesEx"] = reflect.TypeOf((*ContinueRetrievePropertiesEx)(nil)).Elem() -} - -type ContinueRetrievePropertiesExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Token string `xml:"token"` -} - -func init() { - t["ContinueRetrievePropertiesExRequestType"] = reflect.TypeOf((*ContinueRetrievePropertiesExRequestType)(nil)).Elem() -} - -type ContinueRetrievePropertiesExResponse struct { - Returnval RetrieveResult `xml:"returnval"` -} - -type ConvertNamespacePathToUuidPath ConvertNamespacePathToUuidPathRequestType - -func init() { - t["ConvertNamespacePathToUuidPath"] = reflect.TypeOf((*ConvertNamespacePathToUuidPath)(nil)).Elem() -} - -type ConvertNamespacePathToUuidPathRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - NamespaceUrl string `xml:"namespaceUrl"` -} - -func init() { - t["ConvertNamespacePathToUuidPathRequestType"] = reflect.TypeOf((*ConvertNamespacePathToUuidPathRequestType)(nil)).Elem() -} - -type ConvertNamespacePathToUuidPathResponse struct { - Returnval string `xml:"returnval"` -} - -type CopyDatastoreFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - SourceName string `xml:"sourceName"` - SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` - DestinationName string `xml:"destinationName"` - DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"` - Force *bool `xml:"force"` -} - -func init() { - t["CopyDatastoreFileRequestType"] = reflect.TypeOf((*CopyDatastoreFileRequestType)(nil)).Elem() -} - -type CopyDatastoreFile_Task CopyDatastoreFileRequestType - -func init() { - t["CopyDatastoreFile_Task"] = reflect.TypeOf((*CopyDatastoreFile_Task)(nil)).Elem() -} - -type CopyDatastoreFile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CopyVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - SourceName string `xml:"sourceName"` - SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` - DestName string `xml:"destName"` - DestDatacenter *ManagedObjectReference `xml:"destDatacenter,omitempty"` - DestSpec BaseVirtualDiskSpec `xml:"destSpec,omitempty,typeattr"` - Force *bool `xml:"force"` -} - -func init() { - t["CopyVirtualDiskRequestType"] = reflect.TypeOf((*CopyVirtualDiskRequestType)(nil)).Elem() -} - -type CopyVirtualDisk_Task CopyVirtualDiskRequestType - -func init() { - t["CopyVirtualDisk_Task"] = reflect.TypeOf((*CopyVirtualDisk_Task)(nil)).Elem() -} - -type CopyVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CpuCompatibilityUnknown struct { - CpuIncompatible -} - -func init() { - t["CpuCompatibilityUnknown"] = reflect.TypeOf((*CpuCompatibilityUnknown)(nil)).Elem() -} - -type CpuCompatibilityUnknownFault CpuCompatibilityUnknown - -func init() { - t["CpuCompatibilityUnknownFault"] = reflect.TypeOf((*CpuCompatibilityUnknownFault)(nil)).Elem() -} - -type CpuHotPlugNotSupported struct { - VmConfigFault -} - -func init() { - t["CpuHotPlugNotSupported"] = reflect.TypeOf((*CpuHotPlugNotSupported)(nil)).Elem() -} - -type CpuHotPlugNotSupportedFault CpuHotPlugNotSupported - -func init() { - t["CpuHotPlugNotSupportedFault"] = reflect.TypeOf((*CpuHotPlugNotSupportedFault)(nil)).Elem() -} - -type CpuIncompatible struct { - VirtualHardwareCompatibilityIssue - - Level int32 `xml:"level"` - RegisterName string `xml:"registerName"` - RegisterBits string `xml:"registerBits,omitempty"` - DesiredBits string `xml:"desiredBits,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["CpuIncompatible"] = reflect.TypeOf((*CpuIncompatible)(nil)).Elem() -} - -type CpuIncompatible1ECX struct { - CpuIncompatible - - Sse3 bool `xml:"sse3"` - Pclmulqdq *bool `xml:"pclmulqdq"` - Ssse3 bool `xml:"ssse3"` - Sse41 bool `xml:"sse41"` - Sse42 bool `xml:"sse42"` - Aes *bool `xml:"aes"` - Other bool `xml:"other"` - OtherOnly bool `xml:"otherOnly"` -} - -func init() { - t["CpuIncompatible1ECX"] = reflect.TypeOf((*CpuIncompatible1ECX)(nil)).Elem() -} - -type CpuIncompatible1ECXFault CpuIncompatible1ECX - -func init() { - t["CpuIncompatible1ECXFault"] = reflect.TypeOf((*CpuIncompatible1ECXFault)(nil)).Elem() -} - -type CpuIncompatible81EDX struct { - CpuIncompatible - - Nx bool `xml:"nx"` - Ffxsr bool `xml:"ffxsr"` - Rdtscp bool `xml:"rdtscp"` - Lm bool `xml:"lm"` - Other bool `xml:"other"` - OtherOnly bool `xml:"otherOnly"` -} - -func init() { - t["CpuIncompatible81EDX"] = reflect.TypeOf((*CpuIncompatible81EDX)(nil)).Elem() -} - -type CpuIncompatible81EDXFault CpuIncompatible81EDX - -func init() { - t["CpuIncompatible81EDXFault"] = reflect.TypeOf((*CpuIncompatible81EDXFault)(nil)).Elem() -} - -type CpuIncompatibleFault BaseCpuIncompatible - -func init() { - t["CpuIncompatibleFault"] = reflect.TypeOf((*CpuIncompatibleFault)(nil)).Elem() -} - -type CreateAlarm CreateAlarmRequestType - -func init() { - t["CreateAlarm"] = reflect.TypeOf((*CreateAlarm)(nil)).Elem() -} - -type CreateAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Spec BaseAlarmSpec `xml:"spec,typeattr"` -} - -func init() { - t["CreateAlarmRequestType"] = reflect.TypeOf((*CreateAlarmRequestType)(nil)).Elem() -} - -type CreateAlarmResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateChildVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config VirtualMachineConfigSpec `xml:"config"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["CreateChildVMRequestType"] = reflect.TypeOf((*CreateChildVMRequestType)(nil)).Elem() -} - -type CreateChildVM_Task CreateChildVMRequestType - -func init() { - t["CreateChildVM_Task"] = reflect.TypeOf((*CreateChildVM_Task)(nil)).Elem() -} - -type CreateChildVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateCluster CreateClusterRequestType - -func init() { - t["CreateCluster"] = reflect.TypeOf((*CreateCluster)(nil)).Elem() -} - -type CreateClusterEx CreateClusterExRequestType - -func init() { - t["CreateClusterEx"] = reflect.TypeOf((*CreateClusterEx)(nil)).Elem() -} - -type CreateClusterExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Spec ClusterConfigSpecEx `xml:"spec"` -} - -func init() { - t["CreateClusterExRequestType"] = reflect.TypeOf((*CreateClusterExRequestType)(nil)).Elem() -} - -type CreateClusterExResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Spec ClusterConfigSpec `xml:"spec"` -} - -func init() { - t["CreateClusterRequestType"] = reflect.TypeOf((*CreateClusterRequestType)(nil)).Elem() -} - -type CreateClusterResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateCollectorForEvents CreateCollectorForEventsRequestType - -func init() { - t["CreateCollectorForEvents"] = reflect.TypeOf((*CreateCollectorForEvents)(nil)).Elem() -} - -type CreateCollectorForEventsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Filter EventFilterSpec `xml:"filter"` -} - -func init() { - t["CreateCollectorForEventsRequestType"] = reflect.TypeOf((*CreateCollectorForEventsRequestType)(nil)).Elem() -} - -type CreateCollectorForEventsResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateCollectorForTasks CreateCollectorForTasksRequestType - -func init() { - t["CreateCollectorForTasks"] = reflect.TypeOf((*CreateCollectorForTasks)(nil)).Elem() -} - -type CreateCollectorForTasksRequestType struct { - This ManagedObjectReference `xml:"_this"` - Filter TaskFilterSpec `xml:"filter"` -} - -func init() { - t["CreateCollectorForTasksRequestType"] = reflect.TypeOf((*CreateCollectorForTasksRequestType)(nil)).Elem() -} - -type CreateCollectorForTasksResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateContainerView CreateContainerViewRequestType - -func init() { - t["CreateContainerView"] = reflect.TypeOf((*CreateContainerView)(nil)).Elem() -} - -type CreateContainerViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - Container ManagedObjectReference `xml:"container"` - Type []string `xml:"type,omitempty"` - Recursive bool `xml:"recursive"` -} - -func init() { - t["CreateContainerViewRequestType"] = reflect.TypeOf((*CreateContainerViewRequestType)(nil)).Elem() -} - -type CreateContainerViewResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateCustomizationSpec CreateCustomizationSpecRequestType - -func init() { - t["CreateCustomizationSpec"] = reflect.TypeOf((*CreateCustomizationSpec)(nil)).Elem() -} - -type CreateCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Item CustomizationSpecItem `xml:"item"` -} - -func init() { - t["CreateCustomizationSpecRequestType"] = reflect.TypeOf((*CreateCustomizationSpecRequestType)(nil)).Elem() -} - -type CreateCustomizationSpecResponse struct { -} - -type CreateDVPortgroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec DVPortgroupConfigSpec `xml:"spec"` -} - -func init() { - t["CreateDVPortgroupRequestType"] = reflect.TypeOf((*CreateDVPortgroupRequestType)(nil)).Elem() -} - -type CreateDVPortgroup_Task CreateDVPortgroupRequestType - -func init() { - t["CreateDVPortgroup_Task"] = reflect.TypeOf((*CreateDVPortgroup_Task)(nil)).Elem() -} - -type CreateDVPortgroup_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateDVSRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec DVSCreateSpec `xml:"spec"` -} - -func init() { - t["CreateDVSRequestType"] = reflect.TypeOf((*CreateDVSRequestType)(nil)).Elem() -} - -type CreateDVS_Task CreateDVSRequestType - -func init() { - t["CreateDVS_Task"] = reflect.TypeOf((*CreateDVS_Task)(nil)).Elem() -} - -type CreateDVS_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateDatacenter CreateDatacenterRequestType - -func init() { - t["CreateDatacenter"] = reflect.TypeOf((*CreateDatacenter)(nil)).Elem() -} - -type CreateDatacenterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["CreateDatacenterRequestType"] = reflect.TypeOf((*CreateDatacenterRequestType)(nil)).Elem() -} - -type CreateDatacenterResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateDefaultProfile CreateDefaultProfileRequestType - -func init() { - t["CreateDefaultProfile"] = reflect.TypeOf((*CreateDefaultProfile)(nil)).Elem() -} - -type CreateDefaultProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProfileType string `xml:"profileType"` - ProfileTypeName string `xml:"profileTypeName,omitempty"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` -} - -func init() { - t["CreateDefaultProfileRequestType"] = reflect.TypeOf((*CreateDefaultProfileRequestType)(nil)).Elem() -} - -type CreateDefaultProfileResponse struct { - Returnval BaseApplyProfile `xml:"returnval,typeattr"` -} - -type CreateDescriptor CreateDescriptorRequestType - -func init() { - t["CreateDescriptor"] = reflect.TypeOf((*CreateDescriptor)(nil)).Elem() -} - -type CreateDescriptorRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj ManagedObjectReference `xml:"obj"` - Cdp OvfCreateDescriptorParams `xml:"cdp"` -} - -func init() { - t["CreateDescriptorRequestType"] = reflect.TypeOf((*CreateDescriptorRequestType)(nil)).Elem() -} - -type CreateDescriptorResponse struct { - Returnval OvfCreateDescriptorResult `xml:"returnval"` -} - -type CreateDiagnosticPartition CreateDiagnosticPartitionRequestType - -func init() { - t["CreateDiagnosticPartition"] = reflect.TypeOf((*CreateDiagnosticPartition)(nil)).Elem() -} - -type CreateDiagnosticPartitionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostDiagnosticPartitionCreateSpec `xml:"spec"` -} - -func init() { - t["CreateDiagnosticPartitionRequestType"] = reflect.TypeOf((*CreateDiagnosticPartitionRequestType)(nil)).Elem() -} - -type CreateDiagnosticPartitionResponse struct { -} - -type CreateDirectory CreateDirectoryRequestType - -func init() { - t["CreateDirectory"] = reflect.TypeOf((*CreateDirectory)(nil)).Elem() -} - -type CreateDirectoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - DisplayName string `xml:"displayName,omitempty"` - Policy string `xml:"policy,omitempty"` - Size int64 `xml:"size,omitempty"` -} - -func init() { - t["CreateDirectoryRequestType"] = reflect.TypeOf((*CreateDirectoryRequestType)(nil)).Elem() -} - -type CreateDirectoryResponse struct { - Returnval string `xml:"returnval"` -} - -type CreateDiskFromSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` - Name string `xml:"name"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` - Path string `xml:"path,omitempty"` -} - -func init() { - t["CreateDiskFromSnapshotRequestType"] = reflect.TypeOf((*CreateDiskFromSnapshotRequestType)(nil)).Elem() -} - -type CreateDiskFromSnapshot_Task CreateDiskFromSnapshotRequestType - -func init() { - t["CreateDiskFromSnapshot_Task"] = reflect.TypeOf((*CreateDiskFromSnapshot_Task)(nil)).Elem() -} - -type CreateDiskFromSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VslmCreateSpec `xml:"spec"` -} - -func init() { - t["CreateDiskRequestType"] = reflect.TypeOf((*CreateDiskRequestType)(nil)).Elem() -} - -type CreateDisk_Task CreateDiskRequestType - -func init() { - t["CreateDisk_Task"] = reflect.TypeOf((*CreateDisk_Task)(nil)).Elem() -} - -type CreateDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateFilter CreateFilterRequestType - -func init() { - t["CreateFilter"] = reflect.TypeOf((*CreateFilter)(nil)).Elem() -} - -type CreateFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec PropertyFilterSpec `xml:"spec"` - PartialUpdates bool `xml:"partialUpdates"` -} - -func init() { - t["CreateFilterRequestType"] = reflect.TypeOf((*CreateFilterRequestType)(nil)).Elem() -} - -type CreateFilterResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateFolder CreateFolderRequestType - -func init() { - t["CreateFolder"] = reflect.TypeOf((*CreateFolder)(nil)).Elem() -} - -type CreateFolderRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["CreateFolderRequestType"] = reflect.TypeOf((*CreateFolderRequestType)(nil)).Elem() -} - -type CreateFolderResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateGroup CreateGroupRequestType - -func init() { - t["CreateGroup"] = reflect.TypeOf((*CreateGroup)(nil)).Elem() -} - -type CreateGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - Group BaseHostAccountSpec `xml:"group,typeattr"` -} - -func init() { - t["CreateGroupRequestType"] = reflect.TypeOf((*CreateGroupRequestType)(nil)).Elem() -} - -type CreateGroupResponse struct { -} - -type CreateImportSpec CreateImportSpecRequestType - -func init() { - t["CreateImportSpec"] = reflect.TypeOf((*CreateImportSpec)(nil)).Elem() -} - -type CreateImportSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - OvfDescriptor string `xml:"ovfDescriptor"` - ResourcePool ManagedObjectReference `xml:"resourcePool"` - Datastore ManagedObjectReference `xml:"datastore"` - Cisp OvfCreateImportSpecParams `xml:"cisp"` -} - -func init() { - t["CreateImportSpecRequestType"] = reflect.TypeOf((*CreateImportSpecRequestType)(nil)).Elem() -} - -type CreateImportSpecResponse struct { - Returnval OvfCreateImportSpecResult `xml:"returnval"` -} - -type CreateInventoryView CreateInventoryViewRequestType - -func init() { - t["CreateInventoryView"] = reflect.TypeOf((*CreateInventoryView)(nil)).Elem() -} - -type CreateInventoryViewRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CreateInventoryViewRequestType"] = reflect.TypeOf((*CreateInventoryViewRequestType)(nil)).Elem() -} - -type CreateInventoryViewResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateIpPool CreateIpPoolRequestType - -func init() { - t["CreateIpPool"] = reflect.TypeOf((*CreateIpPool)(nil)).Elem() -} - -type CreateIpPoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - Pool IpPool `xml:"pool"` -} - -func init() { - t["CreateIpPoolRequestType"] = reflect.TypeOf((*CreateIpPoolRequestType)(nil)).Elem() -} - -type CreateIpPoolResponse struct { - Returnval int32 `xml:"returnval"` -} - -type CreateListView CreateListViewRequestType - -func init() { - t["CreateListView"] = reflect.TypeOf((*CreateListView)(nil)).Elem() -} - -type CreateListViewFromView CreateListViewFromViewRequestType - -func init() { - t["CreateListViewFromView"] = reflect.TypeOf((*CreateListViewFromView)(nil)).Elem() -} - -type CreateListViewFromViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - View ManagedObjectReference `xml:"view"` -} - -func init() { - t["CreateListViewFromViewRequestType"] = reflect.TypeOf((*CreateListViewFromViewRequestType)(nil)).Elem() -} - -type CreateListViewFromViewResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateListViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj []ManagedObjectReference `xml:"obj,omitempty"` -} - -func init() { - t["CreateListViewRequestType"] = reflect.TypeOf((*CreateListViewRequestType)(nil)).Elem() -} - -type CreateListViewResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateLocalDatastore CreateLocalDatastoreRequestType - -func init() { - t["CreateLocalDatastore"] = reflect.TypeOf((*CreateLocalDatastore)(nil)).Elem() -} - -type CreateLocalDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Path string `xml:"path"` -} - -func init() { - t["CreateLocalDatastoreRequestType"] = reflect.TypeOf((*CreateLocalDatastoreRequestType)(nil)).Elem() -} - -type CreateLocalDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateNasDatastore CreateNasDatastoreRequestType - -func init() { - t["CreateNasDatastore"] = reflect.TypeOf((*CreateNasDatastore)(nil)).Elem() -} - -type CreateNasDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostNasVolumeSpec `xml:"spec"` -} - -func init() { - t["CreateNasDatastoreRequestType"] = reflect.TypeOf((*CreateNasDatastoreRequestType)(nil)).Elem() -} - -type CreateNasDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateNvdimmNamespaceRequestType struct { - This ManagedObjectReference `xml:"_this"` - CreateSpec NvdimmNamespaceCreateSpec `xml:"createSpec"` -} - -func init() { - t["CreateNvdimmNamespaceRequestType"] = reflect.TypeOf((*CreateNvdimmNamespaceRequestType)(nil)).Elem() -} - -type CreateNvdimmNamespace_Task CreateNvdimmNamespaceRequestType - -func init() { - t["CreateNvdimmNamespace_Task"] = reflect.TypeOf((*CreateNvdimmNamespace_Task)(nil)).Elem() -} - -type CreateNvdimmNamespace_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateNvdimmPMemNamespaceRequestType struct { - This ManagedObjectReference `xml:"_this"` - CreateSpec NvdimmPMemNamespaceCreateSpec `xml:"createSpec"` -} - -func init() { - t["CreateNvdimmPMemNamespaceRequestType"] = reflect.TypeOf((*CreateNvdimmPMemNamespaceRequestType)(nil)).Elem() -} - -type CreateNvdimmPMemNamespace_Task CreateNvdimmPMemNamespaceRequestType - -func init() { - t["CreateNvdimmPMemNamespace_Task"] = reflect.TypeOf((*CreateNvdimmPMemNamespace_Task)(nil)).Elem() -} - -type CreateNvdimmPMemNamespace_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateNvmeOverRdmaAdapter CreateNvmeOverRdmaAdapterRequestType - -func init() { - t["CreateNvmeOverRdmaAdapter"] = reflect.TypeOf((*CreateNvmeOverRdmaAdapter)(nil)).Elem() -} - -type CreateNvmeOverRdmaAdapterRequestType struct { - This ManagedObjectReference `xml:"_this"` - RdmaDeviceName string `xml:"rdmaDeviceName"` -} - -func init() { - t["CreateNvmeOverRdmaAdapterRequestType"] = reflect.TypeOf((*CreateNvmeOverRdmaAdapterRequestType)(nil)).Elem() -} - -type CreateNvmeOverRdmaAdapterResponse struct { -} - -type CreateObjectScheduledTask CreateObjectScheduledTaskRequestType - -func init() { - t["CreateObjectScheduledTask"] = reflect.TypeOf((*CreateObjectScheduledTask)(nil)).Elem() -} - -type CreateObjectScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj ManagedObjectReference `xml:"obj"` - Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` -} - -func init() { - t["CreateObjectScheduledTaskRequestType"] = reflect.TypeOf((*CreateObjectScheduledTaskRequestType)(nil)).Elem() -} - -type CreateObjectScheduledTaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreatePerfInterval CreatePerfIntervalRequestType - -func init() { - t["CreatePerfInterval"] = reflect.TypeOf((*CreatePerfInterval)(nil)).Elem() -} - -type CreatePerfIntervalRequestType struct { - This ManagedObjectReference `xml:"_this"` - IntervalId PerfInterval `xml:"intervalId"` -} - -func init() { - t["CreatePerfIntervalRequestType"] = reflect.TypeOf((*CreatePerfIntervalRequestType)(nil)).Elem() -} - -type CreatePerfIntervalResponse struct { -} - -type CreateProfile CreateProfileRequestType - -func init() { - t["CreateProfile"] = reflect.TypeOf((*CreateProfile)(nil)).Elem() -} - -type CreateProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - CreateSpec BaseProfileCreateSpec `xml:"createSpec,typeattr"` -} - -func init() { - t["CreateProfileRequestType"] = reflect.TypeOf((*CreateProfileRequestType)(nil)).Elem() -} - -type CreateProfileResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreatePropertyCollector CreatePropertyCollectorRequestType - -func init() { - t["CreatePropertyCollector"] = reflect.TypeOf((*CreatePropertyCollector)(nil)).Elem() -} - -type CreatePropertyCollectorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CreatePropertyCollectorRequestType"] = reflect.TypeOf((*CreatePropertyCollectorRequestType)(nil)).Elem() -} - -type CreatePropertyCollectorResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateRegistryKeyInGuest CreateRegistryKeyInGuestRequestType - -func init() { - t["CreateRegistryKeyInGuest"] = reflect.TypeOf((*CreateRegistryKeyInGuest)(nil)).Elem() -} - -type CreateRegistryKeyInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - KeyName GuestRegKeyNameSpec `xml:"keyName"` - IsVolatile bool `xml:"isVolatile"` - ClassType string `xml:"classType,omitempty"` -} - -func init() { - t["CreateRegistryKeyInGuestRequestType"] = reflect.TypeOf((*CreateRegistryKeyInGuestRequestType)(nil)).Elem() -} - -type CreateRegistryKeyInGuestResponse struct { -} - -type CreateResourcePool CreateResourcePoolRequestType - -func init() { - t["CreateResourcePool"] = reflect.TypeOf((*CreateResourcePool)(nil)).Elem() -} - -type CreateResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Spec ResourceConfigSpec `xml:"spec"` -} - -func init() { - t["CreateResourcePoolRequestType"] = reflect.TypeOf((*CreateResourcePoolRequestType)(nil)).Elem() -} - -type CreateResourcePoolResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateScheduledTask CreateScheduledTaskRequestType - -func init() { - t["CreateScheduledTask"] = reflect.TypeOf((*CreateScheduledTask)(nil)).Elem() -} - -type CreateScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` -} - -func init() { - t["CreateScheduledTaskRequestType"] = reflect.TypeOf((*CreateScheduledTaskRequestType)(nil)).Elem() -} - -type CreateScheduledTaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateScreenshotRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CreateScreenshotRequestType"] = reflect.TypeOf((*CreateScreenshotRequestType)(nil)).Elem() -} - -type CreateScreenshot_Task CreateScreenshotRequestType - -func init() { - t["CreateScreenshot_Task"] = reflect.TypeOf((*CreateScreenshot_Task)(nil)).Elem() -} - -type CreateScreenshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateSecondaryVMExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Spec *FaultToleranceConfigSpec `xml:"spec,omitempty"` -} - -func init() { - t["CreateSecondaryVMExRequestType"] = reflect.TypeOf((*CreateSecondaryVMExRequestType)(nil)).Elem() -} - -type CreateSecondaryVMEx_Task CreateSecondaryVMExRequestType - -func init() { - t["CreateSecondaryVMEx_Task"] = reflect.TypeOf((*CreateSecondaryVMEx_Task)(nil)).Elem() -} - -type CreateSecondaryVMEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateSecondaryVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["CreateSecondaryVMRequestType"] = reflect.TypeOf((*CreateSecondaryVMRequestType)(nil)).Elem() -} - -type CreateSecondaryVM_Task CreateSecondaryVMRequestType - -func init() { - t["CreateSecondaryVM_Task"] = reflect.TypeOf((*CreateSecondaryVM_Task)(nil)).Elem() -} - -type CreateSecondaryVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateSnapshotExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Description string `xml:"description,omitempty"` - Memory bool `xml:"memory"` - QuiesceSpec BaseVirtualMachineGuestQuiesceSpec `xml:"quiesceSpec,omitempty,typeattr"` -} - -func init() { - t["CreateSnapshotExRequestType"] = reflect.TypeOf((*CreateSnapshotExRequestType)(nil)).Elem() -} - -type CreateSnapshotEx_Task CreateSnapshotExRequestType - -func init() { - t["CreateSnapshotEx_Task"] = reflect.TypeOf((*CreateSnapshotEx_Task)(nil)).Elem() -} - -type CreateSnapshotEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Description string `xml:"description,omitempty"` - Memory bool `xml:"memory"` - Quiesce bool `xml:"quiesce"` -} - -func init() { - t["CreateSnapshotRequestType"] = reflect.TypeOf((*CreateSnapshotRequestType)(nil)).Elem() -} - -type CreateSnapshot_Task CreateSnapshotRequestType - -func init() { - t["CreateSnapshot_Task"] = reflect.TypeOf((*CreateSnapshot_Task)(nil)).Elem() -} - -type CreateSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateSoftwareAdapter CreateSoftwareAdapterRequestType - -func init() { - t["CreateSoftwareAdapter"] = reflect.TypeOf((*CreateSoftwareAdapter)(nil)).Elem() -} - -type CreateSoftwareAdapterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseHostHbaCreateSpec `xml:"spec,typeattr"` -} - -func init() { - t["CreateSoftwareAdapterRequestType"] = reflect.TypeOf((*CreateSoftwareAdapterRequestType)(nil)).Elem() -} - -type CreateSoftwareAdapterResponse struct { -} - -type CreateStoragePod CreateStoragePodRequestType - -func init() { - t["CreateStoragePod"] = reflect.TypeOf((*CreateStoragePod)(nil)).Elem() -} - -type CreateStoragePodRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["CreateStoragePodRequestType"] = reflect.TypeOf((*CreateStoragePodRequestType)(nil)).Elem() -} - -type CreateStoragePodResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateTask CreateTaskRequestType - -func init() { - t["CreateTask"] = reflect.TypeOf((*CreateTask)(nil)).Elem() -} - -type CreateTaskAction struct { - Action - - TaskTypeId string `xml:"taskTypeId"` - Cancelable bool `xml:"cancelable"` -} - -func init() { - t["CreateTaskAction"] = reflect.TypeOf((*CreateTaskAction)(nil)).Elem() -} - -type CreateTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj ManagedObjectReference `xml:"obj"` - TaskTypeId string `xml:"taskTypeId"` - InitiatedBy string `xml:"initiatedBy,omitempty"` - Cancelable bool `xml:"cancelable"` - ParentTaskKey string `xml:"parentTaskKey,omitempty"` - ActivationId string `xml:"activationId,omitempty"` -} - -func init() { - t["CreateTaskRequestType"] = reflect.TypeOf((*CreateTaskRequestType)(nil)).Elem() -} - -type CreateTaskResponse struct { - Returnval TaskInfo `xml:"returnval"` -} - -type CreateTemporaryDirectoryInGuest CreateTemporaryDirectoryInGuestRequestType - -func init() { - t["CreateTemporaryDirectoryInGuest"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuest)(nil)).Elem() -} - -type CreateTemporaryDirectoryInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Prefix string `xml:"prefix"` - Suffix string `xml:"suffix"` - DirectoryPath string `xml:"directoryPath,omitempty"` -} - -func init() { - t["CreateTemporaryDirectoryInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryDirectoryInGuestRequestType)(nil)).Elem() -} - -type CreateTemporaryDirectoryInGuestResponse struct { - Returnval string `xml:"returnval"` -} - -type CreateTemporaryFileInGuest CreateTemporaryFileInGuestRequestType - -func init() { - t["CreateTemporaryFileInGuest"] = reflect.TypeOf((*CreateTemporaryFileInGuest)(nil)).Elem() -} - -type CreateTemporaryFileInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Prefix string `xml:"prefix"` - Suffix string `xml:"suffix"` - DirectoryPath string `xml:"directoryPath,omitempty"` -} - -func init() { - t["CreateTemporaryFileInGuestRequestType"] = reflect.TypeOf((*CreateTemporaryFileInGuestRequestType)(nil)).Elem() -} - -type CreateTemporaryFileInGuestResponse struct { - Returnval string `xml:"returnval"` -} - -type CreateUser CreateUserRequestType - -func init() { - t["CreateUser"] = reflect.TypeOf((*CreateUser)(nil)).Elem() -} - -type CreateUserRequestType struct { - This ManagedObjectReference `xml:"_this"` - User BaseHostAccountSpec `xml:"user,typeattr"` -} - -func init() { - t["CreateUserRequestType"] = reflect.TypeOf((*CreateUserRequestType)(nil)).Elem() -} - -type CreateUserResponse struct { -} - -type CreateVApp CreateVAppRequestType - -func init() { - t["CreateVApp"] = reflect.TypeOf((*CreateVApp)(nil)).Elem() -} - -type CreateVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - ResSpec ResourceConfigSpec `xml:"resSpec"` - ConfigSpec VAppConfigSpec `xml:"configSpec"` - VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` -} - -func init() { - t["CreateVAppRequestType"] = reflect.TypeOf((*CreateVAppRequestType)(nil)).Elem() -} - -type CreateVAppResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config VirtualMachineConfigSpec `xml:"config"` - Pool ManagedObjectReference `xml:"pool"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["CreateVMRequestType"] = reflect.TypeOf((*CreateVMRequestType)(nil)).Elem() -} - -type CreateVM_Task CreateVMRequestType - -func init() { - t["CreateVM_Task"] = reflect.TypeOf((*CreateVM_Task)(nil)).Elem() -} - -type CreateVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Spec BaseVirtualDiskSpec `xml:"spec,typeattr"` -} - -func init() { - t["CreateVirtualDiskRequestType"] = reflect.TypeOf((*CreateVirtualDiskRequestType)(nil)).Elem() -} - -type CreateVirtualDisk_Task CreateVirtualDiskRequestType - -func init() { - t["CreateVirtualDisk_Task"] = reflect.TypeOf((*CreateVirtualDisk_Task)(nil)).Elem() -} - -type CreateVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateVmfsDatastore CreateVmfsDatastoreRequestType - -func init() { - t["CreateVmfsDatastore"] = reflect.TypeOf((*CreateVmfsDatastore)(nil)).Elem() -} - -type CreateVmfsDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VmfsDatastoreCreateSpec `xml:"spec"` -} - -func init() { - t["CreateVmfsDatastoreRequestType"] = reflect.TypeOf((*CreateVmfsDatastoreRequestType)(nil)).Elem() -} - -type CreateVmfsDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateVvolDatastore CreateVvolDatastoreRequestType - -func init() { - t["CreateVvolDatastore"] = reflect.TypeOf((*CreateVvolDatastore)(nil)).Elem() -} - -type CreateVvolDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostDatastoreSystemVvolDatastoreSpec `xml:"spec"` -} - -func init() { - t["CreateVvolDatastoreRequestType"] = reflect.TypeOf((*CreateVvolDatastoreRequestType)(nil)).Elem() -} - -type CreateVvolDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CryptoKeyId struct { - DynamicData - - KeyId string `xml:"keyId"` - ProviderId *KeyProviderId `xml:"providerId,omitempty"` -} - -func init() { - t["CryptoKeyId"] = reflect.TypeOf((*CryptoKeyId)(nil)).Elem() -} - -type CryptoKeyPlain struct { - DynamicData - - KeyId CryptoKeyId `xml:"keyId"` - Algorithm string `xml:"algorithm"` - KeyData string `xml:"keyData"` -} - -func init() { - t["CryptoKeyPlain"] = reflect.TypeOf((*CryptoKeyPlain)(nil)).Elem() -} - -type CryptoKeyResult struct { - DynamicData - - KeyId CryptoKeyId `xml:"keyId"` - Success bool `xml:"success"` - Reason string `xml:"reason,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["CryptoKeyResult"] = reflect.TypeOf((*CryptoKeyResult)(nil)).Elem() -} - -type CryptoManagerHostDisable CryptoManagerHostDisableRequestType - -func init() { - t["CryptoManagerHostDisable"] = reflect.TypeOf((*CryptoManagerHostDisable)(nil)).Elem() -} - -type CryptoManagerHostDisableRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CryptoManagerHostDisableRequestType"] = reflect.TypeOf((*CryptoManagerHostDisableRequestType)(nil)).Elem() -} - -type CryptoManagerHostDisableResponse struct { -} - -type CryptoManagerHostEnable CryptoManagerHostEnableRequestType - -func init() { - t["CryptoManagerHostEnable"] = reflect.TypeOf((*CryptoManagerHostEnable)(nil)).Elem() -} - -type CryptoManagerHostEnableRequestType struct { - This ManagedObjectReference `xml:"_this"` - InitialKey CryptoKeyPlain `xml:"initialKey"` -} - -func init() { - t["CryptoManagerHostEnableRequestType"] = reflect.TypeOf((*CryptoManagerHostEnableRequestType)(nil)).Elem() -} - -type CryptoManagerHostEnableResponse struct { -} - -type CryptoManagerHostPrepare CryptoManagerHostPrepareRequestType - -func init() { - t["CryptoManagerHostPrepare"] = reflect.TypeOf((*CryptoManagerHostPrepare)(nil)).Elem() -} - -type CryptoManagerHostPrepareRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CryptoManagerHostPrepareRequestType"] = reflect.TypeOf((*CryptoManagerHostPrepareRequestType)(nil)).Elem() -} - -type CryptoManagerHostPrepareResponse struct { -} - -type CryptoManagerKmipCertificateInfo struct { - DynamicData - - Subject string `xml:"subject"` - Issuer string `xml:"issuer"` - SerialNumber string `xml:"serialNumber"` - NotBefore time.Time `xml:"notBefore"` - NotAfter time.Time `xml:"notAfter"` - Fingerprint string `xml:"fingerprint"` - CheckTime time.Time `xml:"checkTime"` - SecondsSinceValid int32 `xml:"secondsSinceValid,omitempty"` - SecondsBeforeExpire int32 `xml:"secondsBeforeExpire,omitempty"` -} - -func init() { - t["CryptoManagerKmipCertificateInfo"] = reflect.TypeOf((*CryptoManagerKmipCertificateInfo)(nil)).Elem() -} - -type CryptoManagerKmipClusterStatus struct { - DynamicData - - ClusterId KeyProviderId `xml:"clusterId"` - OverallStatus ManagedEntityStatus `xml:"overallStatus,omitempty"` - ManagementType string `xml:"managementType,omitempty"` - Servers []CryptoManagerKmipServerStatus `xml:"servers"` - ClientCertInfo *CryptoManagerKmipCertificateInfo `xml:"clientCertInfo,omitempty"` -} - -func init() { - t["CryptoManagerKmipClusterStatus"] = reflect.TypeOf((*CryptoManagerKmipClusterStatus)(nil)).Elem() -} - -type CryptoManagerKmipCryptoKeyStatus struct { - DynamicData - - KeyId CryptoKeyId `xml:"keyId"` - KeyAvailable *bool `xml:"keyAvailable"` - Reason string `xml:"reason,omitempty"` - EncryptedVMs []ManagedObjectReference `xml:"encryptedVMs,omitempty"` - AffectedHosts []ManagedObjectReference `xml:"affectedHosts,omitempty"` - ReferencedByTags []string `xml:"referencedByTags,omitempty"` -} - -func init() { - t["CryptoManagerKmipCryptoKeyStatus"] = reflect.TypeOf((*CryptoManagerKmipCryptoKeyStatus)(nil)).Elem() -} - -type CryptoManagerKmipServerCertInfo struct { - DynamicData - - Certificate string `xml:"certificate"` - CertInfo *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"` - ClientTrustServer *bool `xml:"clientTrustServer"` -} - -func init() { - t["CryptoManagerKmipServerCertInfo"] = reflect.TypeOf((*CryptoManagerKmipServerCertInfo)(nil)).Elem() -} - -type CryptoManagerKmipServerStatus struct { - DynamicData - - Name string `xml:"name"` - Status ManagedEntityStatus `xml:"status"` - ConnectionStatus string `xml:"connectionStatus"` - CertInfo *CryptoManagerKmipCertificateInfo `xml:"certInfo,omitempty"` - ClientTrustServer *bool `xml:"clientTrustServer"` - ServerTrustClient *bool `xml:"serverTrustClient"` -} - -func init() { - t["CryptoManagerKmipServerStatus"] = reflect.TypeOf((*CryptoManagerKmipServerStatus)(nil)).Elem() -} - -type CryptoSpec struct { - DynamicData -} - -func init() { - t["CryptoSpec"] = reflect.TypeOf((*CryptoSpec)(nil)).Elem() -} - -type CryptoSpecDecrypt struct { - CryptoSpec -} - -func init() { - t["CryptoSpecDecrypt"] = reflect.TypeOf((*CryptoSpecDecrypt)(nil)).Elem() -} - -type CryptoSpecDeepRecrypt struct { - CryptoSpec - - NewKeyId CryptoKeyId `xml:"newKeyId"` -} - -func init() { - t["CryptoSpecDeepRecrypt"] = reflect.TypeOf((*CryptoSpecDeepRecrypt)(nil)).Elem() -} - -type CryptoSpecEncrypt struct { - CryptoSpec - - CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"` -} - -func init() { - t["CryptoSpecEncrypt"] = reflect.TypeOf((*CryptoSpecEncrypt)(nil)).Elem() -} - -type CryptoSpecNoOp struct { - CryptoSpec -} - -func init() { - t["CryptoSpecNoOp"] = reflect.TypeOf((*CryptoSpecNoOp)(nil)).Elem() -} - -type CryptoSpecRegister struct { - CryptoSpecNoOp - - CryptoKeyId CryptoKeyId `xml:"cryptoKeyId"` -} - -func init() { - t["CryptoSpecRegister"] = reflect.TypeOf((*CryptoSpecRegister)(nil)).Elem() -} - -type CryptoSpecShallowRecrypt struct { - CryptoSpec - - NewKeyId CryptoKeyId `xml:"newKeyId"` -} - -func init() { - t["CryptoSpecShallowRecrypt"] = reflect.TypeOf((*CryptoSpecShallowRecrypt)(nil)).Elem() -} - -type CryptoUnlockRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CryptoUnlockRequestType"] = reflect.TypeOf((*CryptoUnlockRequestType)(nil)).Elem() -} - -type CryptoUnlock_Task CryptoUnlockRequestType - -func init() { - t["CryptoUnlock_Task"] = reflect.TypeOf((*CryptoUnlock_Task)(nil)).Elem() -} - -type CryptoUnlock_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CurrentTime CurrentTimeRequestType - -func init() { - t["CurrentTime"] = reflect.TypeOf((*CurrentTime)(nil)).Elem() -} - -type CurrentTimeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["CurrentTimeRequestType"] = reflect.TypeOf((*CurrentTimeRequestType)(nil)).Elem() -} - -type CurrentTimeResponse struct { - Returnval time.Time `xml:"returnval"` -} - -type CustomFieldDef struct { - DynamicData - - Key int32 `xml:"key"` - Name string `xml:"name"` - Type string `xml:"type"` - ManagedObjectType string `xml:"managedObjectType,omitempty"` - FieldDefPrivileges *PrivilegePolicyDef `xml:"fieldDefPrivileges,omitempty"` - FieldInstancePrivileges *PrivilegePolicyDef `xml:"fieldInstancePrivileges,omitempty"` -} - -func init() { - t["CustomFieldDef"] = reflect.TypeOf((*CustomFieldDef)(nil)).Elem() -} - -type CustomFieldDefAddedEvent struct { - CustomFieldDefEvent -} - -func init() { - t["CustomFieldDefAddedEvent"] = reflect.TypeOf((*CustomFieldDefAddedEvent)(nil)).Elem() -} - -type CustomFieldDefEvent struct { - CustomFieldEvent - - FieldKey int32 `xml:"fieldKey"` - Name string `xml:"name"` -} - -func init() { - t["CustomFieldDefEvent"] = reflect.TypeOf((*CustomFieldDefEvent)(nil)).Elem() -} - -type CustomFieldDefRemovedEvent struct { - CustomFieldDefEvent -} - -func init() { - t["CustomFieldDefRemovedEvent"] = reflect.TypeOf((*CustomFieldDefRemovedEvent)(nil)).Elem() -} - -type CustomFieldDefRenamedEvent struct { - CustomFieldDefEvent - - NewName string `xml:"newName"` -} - -func init() { - t["CustomFieldDefRenamedEvent"] = reflect.TypeOf((*CustomFieldDefRenamedEvent)(nil)).Elem() -} - -type CustomFieldEvent struct { - Event -} - -func init() { - t["CustomFieldEvent"] = reflect.TypeOf((*CustomFieldEvent)(nil)).Elem() -} - -type CustomFieldStringValue struct { - CustomFieldValue - - Value string `xml:"value"` -} - -func init() { - t["CustomFieldStringValue"] = reflect.TypeOf((*CustomFieldStringValue)(nil)).Elem() -} - -type CustomFieldValue struct { - DynamicData - - Key int32 `xml:"key"` -} - -func init() { - t["CustomFieldValue"] = reflect.TypeOf((*CustomFieldValue)(nil)).Elem() -} - -type CustomFieldValueChangedEvent struct { - CustomFieldEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - FieldKey int32 `xml:"fieldKey"` - Name string `xml:"name"` - Value string `xml:"value"` - PrevState string `xml:"prevState,omitempty"` -} - -func init() { - t["CustomFieldValueChangedEvent"] = reflect.TypeOf((*CustomFieldValueChangedEvent)(nil)).Elem() -} - -type CustomizationAdapterMapping struct { - DynamicData - - MacAddress string `xml:"macAddress,omitempty"` - Adapter CustomizationIPSettings `xml:"adapter"` -} - -func init() { - t["CustomizationAdapterMapping"] = reflect.TypeOf((*CustomizationAdapterMapping)(nil)).Elem() -} - -type CustomizationAutoIpV6Generator struct { - CustomizationIpV6Generator -} - -func init() { - t["CustomizationAutoIpV6Generator"] = reflect.TypeOf((*CustomizationAutoIpV6Generator)(nil)).Elem() -} - -type CustomizationCloudinitPrep struct { - CustomizationIdentitySettings - - Metadata string `xml:"metadata"` - Userdata string `xml:"userdata,omitempty"` -} - -func init() { - t["CustomizationCloudinitPrep"] = reflect.TypeOf((*CustomizationCloudinitPrep)(nil)).Elem() -} - -type CustomizationCustomIpGenerator struct { - CustomizationIpGenerator - - Argument string `xml:"argument,omitempty"` -} - -func init() { - t["CustomizationCustomIpGenerator"] = reflect.TypeOf((*CustomizationCustomIpGenerator)(nil)).Elem() -} - -type CustomizationCustomIpV6Generator struct { - CustomizationIpV6Generator - - Argument string `xml:"argument,omitempty"` -} - -func init() { - t["CustomizationCustomIpV6Generator"] = reflect.TypeOf((*CustomizationCustomIpV6Generator)(nil)).Elem() -} - -type CustomizationCustomName struct { - CustomizationName - - Argument string `xml:"argument,omitempty"` -} - -func init() { - t["CustomizationCustomName"] = reflect.TypeOf((*CustomizationCustomName)(nil)).Elem() -} - -type CustomizationDhcpIpGenerator struct { - CustomizationIpGenerator -} - -func init() { - t["CustomizationDhcpIpGenerator"] = reflect.TypeOf((*CustomizationDhcpIpGenerator)(nil)).Elem() -} - -type CustomizationDhcpIpV6Generator struct { - CustomizationIpV6Generator -} - -func init() { - t["CustomizationDhcpIpV6Generator"] = reflect.TypeOf((*CustomizationDhcpIpV6Generator)(nil)).Elem() -} - -type CustomizationEvent struct { - VmEvent - - LogLocation string `xml:"logLocation,omitempty"` -} - -func init() { - t["CustomizationEvent"] = reflect.TypeOf((*CustomizationEvent)(nil)).Elem() -} - -type CustomizationFailed struct { - CustomizationEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["CustomizationFailed"] = reflect.TypeOf((*CustomizationFailed)(nil)).Elem() -} - -type CustomizationFault struct { - VimFault -} - -func init() { - t["CustomizationFault"] = reflect.TypeOf((*CustomizationFault)(nil)).Elem() -} - -type CustomizationFaultFault BaseCustomizationFault - -func init() { - t["CustomizationFaultFault"] = reflect.TypeOf((*CustomizationFaultFault)(nil)).Elem() -} - -type CustomizationFixedIp struct { - CustomizationIpGenerator - - IpAddress string `xml:"ipAddress"` -} - -func init() { - t["CustomizationFixedIp"] = reflect.TypeOf((*CustomizationFixedIp)(nil)).Elem() -} - -type CustomizationFixedIpV6 struct { - CustomizationIpV6Generator - - IpAddress string `xml:"ipAddress"` - SubnetMask int32 `xml:"subnetMask"` -} - -func init() { - t["CustomizationFixedIpV6"] = reflect.TypeOf((*CustomizationFixedIpV6)(nil)).Elem() -} - -type CustomizationFixedName struct { - CustomizationName - - Name string `xml:"name"` -} - -func init() { - t["CustomizationFixedName"] = reflect.TypeOf((*CustomizationFixedName)(nil)).Elem() -} - -type CustomizationGlobalIPSettings struct { - DynamicData - - DnsSuffixList []string `xml:"dnsSuffixList,omitempty"` - DnsServerList []string `xml:"dnsServerList,omitempty"` -} - -func init() { - t["CustomizationGlobalIPSettings"] = reflect.TypeOf((*CustomizationGlobalIPSettings)(nil)).Elem() -} - -type CustomizationGuiRunOnce struct { - DynamicData - - CommandList []string `xml:"commandList"` -} - -func init() { - t["CustomizationGuiRunOnce"] = reflect.TypeOf((*CustomizationGuiRunOnce)(nil)).Elem() -} - -type CustomizationGuiUnattended struct { - DynamicData - - Password *CustomizationPassword `xml:"password,omitempty"` - TimeZone int32 `xml:"timeZone"` - AutoLogon bool `xml:"autoLogon"` - AutoLogonCount int32 `xml:"autoLogonCount"` -} - -func init() { - t["CustomizationGuiUnattended"] = reflect.TypeOf((*CustomizationGuiUnattended)(nil)).Elem() -} - -type CustomizationIPSettings struct { - DynamicData - - Ip BaseCustomizationIpGenerator `xml:"ip,typeattr"` - SubnetMask string `xml:"subnetMask,omitempty"` - Gateway []string `xml:"gateway,omitempty"` - IpV6Spec *CustomizationIPSettingsIpV6AddressSpec `xml:"ipV6Spec,omitempty"` - DnsServerList []string `xml:"dnsServerList,omitempty"` - DnsDomain string `xml:"dnsDomain,omitempty"` - PrimaryWINS string `xml:"primaryWINS,omitempty"` - SecondaryWINS string `xml:"secondaryWINS,omitempty"` - NetBIOS CustomizationNetBIOSMode `xml:"netBIOS,omitempty"` -} - -func init() { - t["CustomizationIPSettings"] = reflect.TypeOf((*CustomizationIPSettings)(nil)).Elem() -} - -type CustomizationIPSettingsIpV6AddressSpec struct { - DynamicData - - Ip []BaseCustomizationIpV6Generator `xml:"ip,typeattr"` - Gateway []string `xml:"gateway,omitempty"` -} - -func init() { - t["CustomizationIPSettingsIpV6AddressSpec"] = reflect.TypeOf((*CustomizationIPSettingsIpV6AddressSpec)(nil)).Elem() -} - -type CustomizationIdentification struct { - DynamicData - - JoinWorkgroup string `xml:"joinWorkgroup,omitempty"` - JoinDomain string `xml:"joinDomain,omitempty"` - DomainAdmin string `xml:"domainAdmin,omitempty"` - DomainAdminPassword *CustomizationPassword `xml:"domainAdminPassword,omitempty"` -} - -func init() { - t["CustomizationIdentification"] = reflect.TypeOf((*CustomizationIdentification)(nil)).Elem() -} - -type CustomizationIdentitySettings struct { - DynamicData -} - -func init() { - t["CustomizationIdentitySettings"] = reflect.TypeOf((*CustomizationIdentitySettings)(nil)).Elem() -} - -type CustomizationIpGenerator struct { - DynamicData -} - -func init() { - t["CustomizationIpGenerator"] = reflect.TypeOf((*CustomizationIpGenerator)(nil)).Elem() -} - -type CustomizationIpV6Generator struct { - DynamicData -} - -func init() { - t["CustomizationIpV6Generator"] = reflect.TypeOf((*CustomizationIpV6Generator)(nil)).Elem() -} - -type CustomizationLicenseFilePrintData struct { - DynamicData - - AutoMode CustomizationLicenseDataMode `xml:"autoMode"` - AutoUsers int32 `xml:"autoUsers,omitempty"` -} - -func init() { - t["CustomizationLicenseFilePrintData"] = reflect.TypeOf((*CustomizationLicenseFilePrintData)(nil)).Elem() -} - -type CustomizationLinuxIdentityFailed struct { - CustomizationFailed -} - -func init() { - t["CustomizationLinuxIdentityFailed"] = reflect.TypeOf((*CustomizationLinuxIdentityFailed)(nil)).Elem() -} - -type CustomizationLinuxOptions struct { - CustomizationOptions -} - -func init() { - t["CustomizationLinuxOptions"] = reflect.TypeOf((*CustomizationLinuxOptions)(nil)).Elem() -} - -type CustomizationLinuxPrep struct { - CustomizationIdentitySettings - - HostName BaseCustomizationName `xml:"hostName,typeattr"` - Domain string `xml:"domain"` - TimeZone string `xml:"timeZone,omitempty"` - HwClockUTC *bool `xml:"hwClockUTC"` - ScriptText string `xml:"scriptText,omitempty"` -} - -func init() { - t["CustomizationLinuxPrep"] = reflect.TypeOf((*CustomizationLinuxPrep)(nil)).Elem() -} - -type CustomizationName struct { - DynamicData -} - -func init() { - t["CustomizationName"] = reflect.TypeOf((*CustomizationName)(nil)).Elem() -} - -type CustomizationNetworkSetupFailed struct { - CustomizationFailed -} - -func init() { - t["CustomizationNetworkSetupFailed"] = reflect.TypeOf((*CustomizationNetworkSetupFailed)(nil)).Elem() -} - -type CustomizationOptions struct { - DynamicData -} - -func init() { - t["CustomizationOptions"] = reflect.TypeOf((*CustomizationOptions)(nil)).Elem() -} - -type CustomizationPassword struct { - DynamicData - - Value string `xml:"value"` - PlainText bool `xml:"plainText"` -} - -func init() { - t["CustomizationPassword"] = reflect.TypeOf((*CustomizationPassword)(nil)).Elem() -} - -type CustomizationPending struct { - CustomizationFault -} - -func init() { - t["CustomizationPending"] = reflect.TypeOf((*CustomizationPending)(nil)).Elem() -} - -type CustomizationPendingFault CustomizationPending - -func init() { - t["CustomizationPendingFault"] = reflect.TypeOf((*CustomizationPendingFault)(nil)).Elem() -} - -type CustomizationPrefixName struct { - CustomizationName - - Base string `xml:"base"` -} - -func init() { - t["CustomizationPrefixName"] = reflect.TypeOf((*CustomizationPrefixName)(nil)).Elem() -} - -type CustomizationSpec struct { - DynamicData - - Options BaseCustomizationOptions `xml:"options,omitempty,typeattr"` - Identity BaseCustomizationIdentitySettings `xml:"identity,typeattr"` - GlobalIPSettings CustomizationGlobalIPSettings `xml:"globalIPSettings"` - NicSettingMap []CustomizationAdapterMapping `xml:"nicSettingMap,omitempty"` - EncryptionKey []byte `xml:"encryptionKey,omitempty"` -} - -func init() { - t["CustomizationSpec"] = reflect.TypeOf((*CustomizationSpec)(nil)).Elem() -} - -type CustomizationSpecInfo struct { - DynamicData - - Name string `xml:"name"` - Description string `xml:"description"` - Type string `xml:"type"` - ChangeVersion string `xml:"changeVersion,omitempty"` - LastUpdateTime *time.Time `xml:"lastUpdateTime"` -} - -func init() { - t["CustomizationSpecInfo"] = reflect.TypeOf((*CustomizationSpecInfo)(nil)).Elem() -} - -type CustomizationSpecItem struct { - DynamicData - - Info CustomizationSpecInfo `xml:"info"` - Spec CustomizationSpec `xml:"spec"` -} - -func init() { - t["CustomizationSpecItem"] = reflect.TypeOf((*CustomizationSpecItem)(nil)).Elem() -} - -type CustomizationSpecItemToXml CustomizationSpecItemToXmlRequestType - -func init() { - t["CustomizationSpecItemToXml"] = reflect.TypeOf((*CustomizationSpecItemToXml)(nil)).Elem() -} - -type CustomizationSpecItemToXmlRequestType struct { - This ManagedObjectReference `xml:"_this"` - Item CustomizationSpecItem `xml:"item"` -} - -func init() { - t["CustomizationSpecItemToXmlRequestType"] = reflect.TypeOf((*CustomizationSpecItemToXmlRequestType)(nil)).Elem() -} - -type CustomizationSpecItemToXmlResponse struct { - Returnval string `xml:"returnval"` -} - -type CustomizationStartedEvent struct { - CustomizationEvent -} - -func init() { - t["CustomizationStartedEvent"] = reflect.TypeOf((*CustomizationStartedEvent)(nil)).Elem() -} - -type CustomizationStatelessIpV6Generator struct { - CustomizationIpV6Generator -} - -func init() { - t["CustomizationStatelessIpV6Generator"] = reflect.TypeOf((*CustomizationStatelessIpV6Generator)(nil)).Elem() -} - -type CustomizationSucceeded struct { - CustomizationEvent -} - -func init() { - t["CustomizationSucceeded"] = reflect.TypeOf((*CustomizationSucceeded)(nil)).Elem() -} - -type CustomizationSysprep struct { - CustomizationIdentitySettings - - GuiUnattended CustomizationGuiUnattended `xml:"guiUnattended"` - UserData CustomizationUserData `xml:"userData"` - GuiRunOnce *CustomizationGuiRunOnce `xml:"guiRunOnce,omitempty"` - Identification CustomizationIdentification `xml:"identification"` - LicenseFilePrintData *CustomizationLicenseFilePrintData `xml:"licenseFilePrintData,omitempty"` -} - -func init() { - t["CustomizationSysprep"] = reflect.TypeOf((*CustomizationSysprep)(nil)).Elem() -} - -type CustomizationSysprepFailed struct { - CustomizationFailed - - SysprepVersion string `xml:"sysprepVersion"` - SystemVersion string `xml:"systemVersion"` -} - -func init() { - t["CustomizationSysprepFailed"] = reflect.TypeOf((*CustomizationSysprepFailed)(nil)).Elem() -} - -type CustomizationSysprepText struct { - CustomizationIdentitySettings - - Value string `xml:"value"` -} - -func init() { - t["CustomizationSysprepText"] = reflect.TypeOf((*CustomizationSysprepText)(nil)).Elem() -} - -type CustomizationUnknownFailure struct { - CustomizationFailed -} - -func init() { - t["CustomizationUnknownFailure"] = reflect.TypeOf((*CustomizationUnknownFailure)(nil)).Elem() -} - -type CustomizationUnknownIpGenerator struct { - CustomizationIpGenerator -} - -func init() { - t["CustomizationUnknownIpGenerator"] = reflect.TypeOf((*CustomizationUnknownIpGenerator)(nil)).Elem() -} - -type CustomizationUnknownIpV6Generator struct { - CustomizationIpV6Generator -} - -func init() { - t["CustomizationUnknownIpV6Generator"] = reflect.TypeOf((*CustomizationUnknownIpV6Generator)(nil)).Elem() -} - -type CustomizationUnknownName struct { - CustomizationName -} - -func init() { - t["CustomizationUnknownName"] = reflect.TypeOf((*CustomizationUnknownName)(nil)).Elem() -} - -type CustomizationUserData struct { - DynamicData - - FullName string `xml:"fullName"` - OrgName string `xml:"orgName"` - ComputerName BaseCustomizationName `xml:"computerName,typeattr"` - ProductId string `xml:"productId"` -} - -func init() { - t["CustomizationUserData"] = reflect.TypeOf((*CustomizationUserData)(nil)).Elem() -} - -type CustomizationVirtualMachineName struct { - CustomizationName -} - -func init() { - t["CustomizationVirtualMachineName"] = reflect.TypeOf((*CustomizationVirtualMachineName)(nil)).Elem() -} - -type CustomizationWinOptions struct { - CustomizationOptions - - ChangeSID bool `xml:"changeSID"` - DeleteAccounts bool `xml:"deleteAccounts"` - Reboot CustomizationSysprepRebootOption `xml:"reboot,omitempty"` -} - -func init() { - t["CustomizationWinOptions"] = reflect.TypeOf((*CustomizationWinOptions)(nil)).Elem() -} - -type CustomizeGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Spec CustomizationSpec `xml:"spec"` - ConfigParams []BaseOptionValue `xml:"configParams,omitempty,typeattr"` -} - -func init() { - t["CustomizeGuestRequestType"] = reflect.TypeOf((*CustomizeGuestRequestType)(nil)).Elem() -} - -type CustomizeGuest_Task CustomizeGuestRequestType - -func init() { - t["CustomizeGuest_Task"] = reflect.TypeOf((*CustomizeGuest_Task)(nil)).Elem() -} - -type CustomizeGuest_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CustomizeVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec CustomizationSpec `xml:"spec"` -} - -func init() { - t["CustomizeVMRequestType"] = reflect.TypeOf((*CustomizeVMRequestType)(nil)).Elem() -} - -type CustomizeVM_Task CustomizeVMRequestType - -func init() { - t["CustomizeVM_Task"] = reflect.TypeOf((*CustomizeVM_Task)(nil)).Elem() -} - -type CustomizeVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DVPortConfigInfo struct { - DynamicData - - Name string `xml:"name,omitempty"` - Scope []ManagedObjectReference `xml:"scope,omitempty"` - Description string `xml:"description,omitempty"` - Setting BaseDVPortSetting `xml:"setting,omitempty,typeattr"` - ConfigVersion string `xml:"configVersion"` -} - -func init() { - t["DVPortConfigInfo"] = reflect.TypeOf((*DVPortConfigInfo)(nil)).Elem() -} - -type DVPortConfigSpec struct { - DynamicData - - Operation string `xml:"operation"` - Key string `xml:"key,omitempty"` - Name string `xml:"name,omitempty"` - Scope []ManagedObjectReference `xml:"scope,omitempty"` - Description string `xml:"description,omitempty"` - Setting BaseDVPortSetting `xml:"setting,omitempty,typeattr"` - ConfigVersion string `xml:"configVersion,omitempty"` -} - -func init() { - t["DVPortConfigSpec"] = reflect.TypeOf((*DVPortConfigSpec)(nil)).Elem() -} - -type DVPortNotSupported struct { - DeviceBackingNotSupported -} - -func init() { - t["DVPortNotSupported"] = reflect.TypeOf((*DVPortNotSupported)(nil)).Elem() -} - -type DVPortNotSupportedFault DVPortNotSupported - -func init() { - t["DVPortNotSupportedFault"] = reflect.TypeOf((*DVPortNotSupportedFault)(nil)).Elem() -} - -type DVPortSetting struct { - DynamicData - - Blocked *BoolPolicy `xml:"blocked,omitempty"` - VmDirectPathGen2Allowed *BoolPolicy `xml:"vmDirectPathGen2Allowed,omitempty"` - InShapingPolicy *DVSTrafficShapingPolicy `xml:"inShapingPolicy,omitempty"` - OutShapingPolicy *DVSTrafficShapingPolicy `xml:"outShapingPolicy,omitempty"` - VendorSpecificConfig *DVSVendorSpecificConfig `xml:"vendorSpecificConfig,omitempty"` - NetworkResourcePoolKey *StringPolicy `xml:"networkResourcePoolKey,omitempty"` - FilterPolicy *DvsFilterPolicy `xml:"filterPolicy,omitempty"` -} - -func init() { - t["DVPortSetting"] = reflect.TypeOf((*DVPortSetting)(nil)).Elem() -} - -type DVPortState struct { - DynamicData - - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` - Stats DistributedVirtualSwitchPortStatistics `xml:"stats"` - VendorSpecificState []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificState,omitempty"` -} - -func init() { - t["DVPortState"] = reflect.TypeOf((*DVPortState)(nil)).Elem() -} - -type DVPortStatus struct { - DynamicData - - LinkUp bool `xml:"linkUp"` - Blocked bool `xml:"blocked"` - VlanIds []NumericRange `xml:"vlanIds,omitempty"` - TrunkingMode *bool `xml:"trunkingMode"` - Mtu int32 `xml:"mtu,omitempty"` - LinkPeer string `xml:"linkPeer,omitempty"` - MacAddress string `xml:"macAddress,omitempty"` - StatusDetail string `xml:"statusDetail,omitempty"` - VmDirectPathGen2Active *bool `xml:"vmDirectPathGen2Active"` - VmDirectPathGen2InactiveReasonNetwork []string `xml:"vmDirectPathGen2InactiveReasonNetwork,omitempty"` - VmDirectPathGen2InactiveReasonOther []string `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"` - VmDirectPathGen2InactiveReasonExtended string `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"` -} - -func init() { - t["DVPortStatus"] = reflect.TypeOf((*DVPortStatus)(nil)).Elem() -} - -type DVPortgroupConfigInfo struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - NumPorts int32 `xml:"numPorts"` - DistributedVirtualSwitch *ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` - DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` - Description string `xml:"description,omitempty"` - Type string `xml:"type"` - BackingType string `xml:"backingType,omitempty"` - Policy BaseDVPortgroupPolicy `xml:"policy,typeattr"` - PortNameFormat string `xml:"portNameFormat,omitempty"` - Scope []ManagedObjectReference `xml:"scope,omitempty"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` - ConfigVersion string `xml:"configVersion,omitempty"` - AutoExpand *bool `xml:"autoExpand"` - VmVnicNetworkResourcePoolKey string `xml:"vmVnicNetworkResourcePoolKey,omitempty"` - Uplink *bool `xml:"uplink"` - TransportZoneUuid string `xml:"transportZoneUuid,omitempty"` - TransportZoneName string `xml:"transportZoneName,omitempty"` - LogicalSwitchUuid string `xml:"logicalSwitchUuid,omitempty"` - SegmentId string `xml:"segmentId,omitempty"` -} - -func init() { - t["DVPortgroupConfigInfo"] = reflect.TypeOf((*DVPortgroupConfigInfo)(nil)).Elem() -} - -type DVPortgroupConfigSpec struct { - DynamicData - - ConfigVersion string `xml:"configVersion,omitempty"` - Name string `xml:"name,omitempty"` - NumPorts int32 `xml:"numPorts,omitempty"` - PortNameFormat string `xml:"portNameFormat,omitempty"` - DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` - Description string `xml:"description,omitempty"` - Type string `xml:"type,omitempty"` - BackingType string `xml:"backingType,omitempty"` - Scope []ManagedObjectReference `xml:"scope,omitempty"` - Policy BaseDVPortgroupPolicy `xml:"policy,omitempty,typeattr"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` - AutoExpand *bool `xml:"autoExpand"` - VmVnicNetworkResourcePoolKey string `xml:"vmVnicNetworkResourcePoolKey,omitempty"` - TransportZoneUuid string `xml:"transportZoneUuid,omitempty"` - TransportZoneName string `xml:"transportZoneName,omitempty"` - LogicalSwitchUuid string `xml:"logicalSwitchUuid,omitempty"` - SegmentId string `xml:"segmentId,omitempty"` -} - -func init() { - t["DVPortgroupConfigSpec"] = reflect.TypeOf((*DVPortgroupConfigSpec)(nil)).Elem() -} - -type DVPortgroupCreatedEvent struct { - DVPortgroupEvent -} - -func init() { - t["DVPortgroupCreatedEvent"] = reflect.TypeOf((*DVPortgroupCreatedEvent)(nil)).Elem() -} - -type DVPortgroupDestroyedEvent struct { - DVPortgroupEvent -} - -func init() { - t["DVPortgroupDestroyedEvent"] = reflect.TypeOf((*DVPortgroupDestroyedEvent)(nil)).Elem() -} - -type DVPortgroupEvent struct { - Event -} - -func init() { - t["DVPortgroupEvent"] = reflect.TypeOf((*DVPortgroupEvent)(nil)).Elem() -} - -type DVPortgroupPolicy struct { - DynamicData - - BlockOverrideAllowed bool `xml:"blockOverrideAllowed"` - ShapingOverrideAllowed bool `xml:"shapingOverrideAllowed"` - VendorConfigOverrideAllowed bool `xml:"vendorConfigOverrideAllowed"` - LivePortMovingAllowed bool `xml:"livePortMovingAllowed"` - PortConfigResetAtDisconnect bool `xml:"portConfigResetAtDisconnect"` - NetworkResourcePoolOverrideAllowed *bool `xml:"networkResourcePoolOverrideAllowed"` - TrafficFilterOverrideAllowed *bool `xml:"trafficFilterOverrideAllowed"` -} - -func init() { - t["DVPortgroupPolicy"] = reflect.TypeOf((*DVPortgroupPolicy)(nil)).Elem() -} - -type DVPortgroupReconfiguredEvent struct { - DVPortgroupEvent - - ConfigSpec DVPortgroupConfigSpec `xml:"configSpec"` - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["DVPortgroupReconfiguredEvent"] = reflect.TypeOf((*DVPortgroupReconfiguredEvent)(nil)).Elem() -} - -type DVPortgroupRenamedEvent struct { - DVPortgroupEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["DVPortgroupRenamedEvent"] = reflect.TypeOf((*DVPortgroupRenamedEvent)(nil)).Elem() -} - -type DVPortgroupRollbackRequestType struct { - This ManagedObjectReference `xml:"_this"` - EntityBackup *EntityBackupConfig `xml:"entityBackup,omitempty"` -} - -func init() { - t["DVPortgroupRollbackRequestType"] = reflect.TypeOf((*DVPortgroupRollbackRequestType)(nil)).Elem() -} - -type DVPortgroupRollback_Task DVPortgroupRollbackRequestType - -func init() { - t["DVPortgroupRollback_Task"] = reflect.TypeOf((*DVPortgroupRollback_Task)(nil)).Elem() -} - -type DVPortgroupRollback_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DVPortgroupSelection struct { - SelectionSet - - DvsUuid string `xml:"dvsUuid"` - PortgroupKey []string `xml:"portgroupKey"` -} - -func init() { - t["DVPortgroupSelection"] = reflect.TypeOf((*DVPortgroupSelection)(nil)).Elem() -} - -type DVSBackupRestoreCapability struct { - DynamicData - - BackupRestoreSupported bool `xml:"backupRestoreSupported"` -} - -func init() { - t["DVSBackupRestoreCapability"] = reflect.TypeOf((*DVSBackupRestoreCapability)(nil)).Elem() -} - -type DVSCapability struct { - DynamicData - - DvsOperationSupported *bool `xml:"dvsOperationSupported"` - DvPortGroupOperationSupported *bool `xml:"dvPortGroupOperationSupported"` - DvPortOperationSupported *bool `xml:"dvPortOperationSupported"` - CompatibleHostComponentProductInfo []DistributedVirtualSwitchHostProductSpec `xml:"compatibleHostComponentProductInfo,omitempty"` - FeaturesSupported BaseDVSFeatureCapability `xml:"featuresSupported,omitempty,typeattr"` -} - -func init() { - t["DVSCapability"] = reflect.TypeOf((*DVSCapability)(nil)).Elem() -} - -type DVSConfigInfo struct { - DynamicData - - Uuid string `xml:"uuid"` - Name string `xml:"name"` - NumStandalonePorts int32 `xml:"numStandalonePorts"` - NumPorts int32 `xml:"numPorts"` - MaxPorts int32 `xml:"maxPorts"` - UplinkPortPolicy BaseDVSUplinkPortPolicy `xml:"uplinkPortPolicy,typeattr"` - UplinkPortgroup []ManagedObjectReference `xml:"uplinkPortgroup,omitempty"` - DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,typeattr"` - Host []DistributedVirtualSwitchHostMember `xml:"host,omitempty"` - ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` - TargetInfo *DistributedVirtualSwitchProductSpec `xml:"targetInfo,omitempty"` - ExtensionKey string `xml:"extensionKey,omitempty"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` - Policy *DVSPolicy `xml:"policy,omitempty"` - Description string `xml:"description,omitempty"` - ConfigVersion string `xml:"configVersion"` - Contact DVSContactInfo `xml:"contact"` - SwitchIpAddress string `xml:"switchIpAddress,omitempty"` - CreateTime time.Time `xml:"createTime"` - NetworkResourceManagementEnabled *bool `xml:"networkResourceManagementEnabled"` - DefaultProxySwitchMaxNumPorts int32 `xml:"defaultProxySwitchMaxNumPorts,omitempty"` - HealthCheckConfig []BaseDVSHealthCheckConfig `xml:"healthCheckConfig,omitempty,typeattr"` - InfrastructureTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"infrastructureTrafficResourceConfig,omitempty"` - NetResourcePoolTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"netResourcePoolTrafficResourceConfig,omitempty"` - NetworkResourceControlVersion string `xml:"networkResourceControlVersion,omitempty"` - VmVnicNetworkResourcePool []DVSVmVnicNetworkResourcePool `xml:"vmVnicNetworkResourcePool,omitempty"` - PnicCapacityRatioForReservation int32 `xml:"pnicCapacityRatioForReservation,omitempty"` -} - -func init() { - t["DVSConfigInfo"] = reflect.TypeOf((*DVSConfigInfo)(nil)).Elem() -} - -type DVSConfigSpec struct { - DynamicData - - ConfigVersion string `xml:"configVersion,omitempty"` - Name string `xml:"name,omitempty"` - NumStandalonePorts int32 `xml:"numStandalonePorts,omitempty"` - MaxPorts int32 `xml:"maxPorts,omitempty"` - UplinkPortPolicy BaseDVSUplinkPortPolicy `xml:"uplinkPortPolicy,omitempty,typeattr"` - UplinkPortgroup []ManagedObjectReference `xml:"uplinkPortgroup,omitempty"` - DefaultPortConfig BaseDVPortSetting `xml:"defaultPortConfig,omitempty,typeattr"` - Host []DistributedVirtualSwitchHostMemberConfigSpec `xml:"host,omitempty"` - ExtensionKey string `xml:"extensionKey,omitempty"` - Description string `xml:"description,omitempty"` - Policy *DVSPolicy `xml:"policy,omitempty"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` - Contact *DVSContactInfo `xml:"contact,omitempty"` - SwitchIpAddress string `xml:"switchIpAddress,omitempty"` - DefaultProxySwitchMaxNumPorts int32 `xml:"defaultProxySwitchMaxNumPorts,omitempty"` - InfrastructureTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"infrastructureTrafficResourceConfig,omitempty"` - NetResourcePoolTrafficResourceConfig []DvsHostInfrastructureTrafficResource `xml:"netResourcePoolTrafficResourceConfig,omitempty"` - NetworkResourceControlVersion string `xml:"networkResourceControlVersion,omitempty"` -} - -func init() { - t["DVSConfigSpec"] = reflect.TypeOf((*DVSConfigSpec)(nil)).Elem() -} - -type DVSContactInfo struct { - DynamicData - - Name string `xml:"name,omitempty"` - Contact string `xml:"contact,omitempty"` -} - -func init() { - t["DVSContactInfo"] = reflect.TypeOf((*DVSContactInfo)(nil)).Elem() -} - -type DVSCreateSpec struct { - DynamicData - - ConfigSpec BaseDVSConfigSpec `xml:"configSpec,typeattr"` - ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` - Capability *DVSCapability `xml:"capability,omitempty"` -} - -func init() { - t["DVSCreateSpec"] = reflect.TypeOf((*DVSCreateSpec)(nil)).Elem() -} - -type DVSFailureCriteria struct { - InheritablePolicy - - CheckSpeed *StringPolicy `xml:"checkSpeed,omitempty"` - Speed *IntPolicy `xml:"speed,omitempty"` - CheckDuplex *BoolPolicy `xml:"checkDuplex,omitempty"` - FullDuplex *BoolPolicy `xml:"fullDuplex,omitempty"` - CheckErrorPercent *BoolPolicy `xml:"checkErrorPercent,omitempty"` - Percentage *IntPolicy `xml:"percentage,omitempty"` - CheckBeacon *BoolPolicy `xml:"checkBeacon,omitempty"` -} - -func init() { - t["DVSFailureCriteria"] = reflect.TypeOf((*DVSFailureCriteria)(nil)).Elem() -} - -type DVSFeatureCapability struct { - DynamicData - - NetworkResourceManagementSupported bool `xml:"networkResourceManagementSupported"` - VmDirectPathGen2Supported bool `xml:"vmDirectPathGen2Supported"` - NicTeamingPolicy []string `xml:"nicTeamingPolicy,omitempty"` - NetworkResourcePoolHighShareValue int32 `xml:"networkResourcePoolHighShareValue,omitempty"` - NetworkResourceManagementCapability *DVSNetworkResourceManagementCapability `xml:"networkResourceManagementCapability,omitempty"` - HealthCheckCapability BaseDVSHealthCheckCapability `xml:"healthCheckCapability,omitempty,typeattr"` - RollbackCapability *DVSRollbackCapability `xml:"rollbackCapability,omitempty"` - BackupRestoreCapability *DVSBackupRestoreCapability `xml:"backupRestoreCapability,omitempty"` - NetworkFilterSupported *bool `xml:"networkFilterSupported"` - MacLearningSupported *bool `xml:"macLearningSupported"` -} - -func init() { - t["DVSFeatureCapability"] = reflect.TypeOf((*DVSFeatureCapability)(nil)).Elem() -} - -type DVSHealthCheckCapability struct { - DynamicData -} - -func init() { - t["DVSHealthCheckCapability"] = reflect.TypeOf((*DVSHealthCheckCapability)(nil)).Elem() -} - -type DVSHealthCheckConfig struct { - DynamicData - - Enable *bool `xml:"enable"` - Interval int32 `xml:"interval,omitempty"` -} - -func init() { - t["DVSHealthCheckConfig"] = reflect.TypeOf((*DVSHealthCheckConfig)(nil)).Elem() -} - -type DVSHostLocalPortInfo struct { - DynamicData - - SwitchUuid string `xml:"switchUuid"` - PortKey string `xml:"portKey"` - Setting BaseDVPortSetting `xml:"setting,typeattr"` - Vnic string `xml:"vnic"` -} - -func init() { - t["DVSHostLocalPortInfo"] = reflect.TypeOf((*DVSHostLocalPortInfo)(nil)).Elem() -} - -type DVSMacLearningPolicy struct { - InheritablePolicy - - Enabled bool `xml:"enabled"` - AllowUnicastFlooding *bool `xml:"allowUnicastFlooding"` - Limit *int32 `xml:"limit"` - LimitPolicy string `xml:"limitPolicy,omitempty"` -} - -func init() { - t["DVSMacLearningPolicy"] = reflect.TypeOf((*DVSMacLearningPolicy)(nil)).Elem() -} - -type DVSMacManagementPolicy struct { - InheritablePolicy - - AllowPromiscuous *bool `xml:"allowPromiscuous"` - MacChanges *bool `xml:"macChanges"` - ForgedTransmits *bool `xml:"forgedTransmits"` - MacLearningPolicy *DVSMacLearningPolicy `xml:"macLearningPolicy,omitempty"` -} - -func init() { - t["DVSMacManagementPolicy"] = reflect.TypeOf((*DVSMacManagementPolicy)(nil)).Elem() -} - -type DVSManagerDvsConfigTarget struct { - DynamicData - - DistributedVirtualPortgroup []DistributedVirtualPortgroupInfo `xml:"distributedVirtualPortgroup,omitempty"` - DistributedVirtualSwitch []DistributedVirtualSwitchInfo `xml:"distributedVirtualSwitch,omitempty"` -} - -func init() { - t["DVSManagerDvsConfigTarget"] = reflect.TypeOf((*DVSManagerDvsConfigTarget)(nil)).Elem() -} - -type DVSManagerExportEntityRequestType struct { - This ManagedObjectReference `xml:"_this"` - SelectionSet []BaseSelectionSet `xml:"selectionSet,typeattr"` -} - -func init() { - t["DVSManagerExportEntityRequestType"] = reflect.TypeOf((*DVSManagerExportEntityRequestType)(nil)).Elem() -} - -type DVSManagerExportEntity_Task DVSManagerExportEntityRequestType - -func init() { - t["DVSManagerExportEntity_Task"] = reflect.TypeOf((*DVSManagerExportEntity_Task)(nil)).Elem() -} - -type DVSManagerExportEntity_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DVSManagerImportEntityRequestType struct { - This ManagedObjectReference `xml:"_this"` - EntityBackup []EntityBackupConfig `xml:"entityBackup"` - ImportType string `xml:"importType"` -} - -func init() { - t["DVSManagerImportEntityRequestType"] = reflect.TypeOf((*DVSManagerImportEntityRequestType)(nil)).Elem() -} - -type DVSManagerImportEntity_Task DVSManagerImportEntityRequestType - -func init() { - t["DVSManagerImportEntity_Task"] = reflect.TypeOf((*DVSManagerImportEntity_Task)(nil)).Elem() -} - -type DVSManagerImportEntity_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DVSManagerLookupDvPortGroup DVSManagerLookupDvPortGroupRequestType - -func init() { - t["DVSManagerLookupDvPortGroup"] = reflect.TypeOf((*DVSManagerLookupDvPortGroup)(nil)).Elem() -} - -type DVSManagerLookupDvPortGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - SwitchUuid string `xml:"switchUuid"` - PortgroupKey string `xml:"portgroupKey"` -} - -func init() { - t["DVSManagerLookupDvPortGroupRequestType"] = reflect.TypeOf((*DVSManagerLookupDvPortGroupRequestType)(nil)).Elem() -} - -type DVSManagerLookupDvPortGroupResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type DVSManagerPhysicalNicsList struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - PhysicalNics []PhysicalNic `xml:"physicalNics,omitempty"` -} - -func init() { - t["DVSManagerPhysicalNicsList"] = reflect.TypeOf((*DVSManagerPhysicalNicsList)(nil)).Elem() -} - -type DVSNameArrayUplinkPortPolicy struct { - DVSUplinkPortPolicy - - UplinkPortName []string `xml:"uplinkPortName"` -} - -func init() { - t["DVSNameArrayUplinkPortPolicy"] = reflect.TypeOf((*DVSNameArrayUplinkPortPolicy)(nil)).Elem() -} - -type DVSNetworkResourceManagementCapability struct { - DynamicData - - NetworkResourceManagementSupported bool `xml:"networkResourceManagementSupported"` - NetworkResourcePoolHighShareValue int32 `xml:"networkResourcePoolHighShareValue"` - QosSupported bool `xml:"qosSupported"` - UserDefinedNetworkResourcePoolsSupported bool `xml:"userDefinedNetworkResourcePoolsSupported"` - NetworkResourceControlVersion3Supported *bool `xml:"networkResourceControlVersion3Supported"` - UserDefinedInfraTrafficPoolSupported *bool `xml:"userDefinedInfraTrafficPoolSupported"` -} - -func init() { - t["DVSNetworkResourceManagementCapability"] = reflect.TypeOf((*DVSNetworkResourceManagementCapability)(nil)).Elem() -} - -type DVSNetworkResourcePool struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` - ConfigVersion string `xml:"configVersion"` - AllocationInfo DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo"` -} - -func init() { - t["DVSNetworkResourcePool"] = reflect.TypeOf((*DVSNetworkResourcePool)(nil)).Elem() -} - -type DVSNetworkResourcePoolAllocationInfo struct { - DynamicData - - Limit *int64 `xml:"limit"` - Shares *SharesInfo `xml:"shares,omitempty"` - PriorityTag int32 `xml:"priorityTag,omitempty"` -} - -func init() { - t["DVSNetworkResourcePoolAllocationInfo"] = reflect.TypeOf((*DVSNetworkResourcePoolAllocationInfo)(nil)).Elem() -} - -type DVSNetworkResourcePoolConfigSpec struct { - DynamicData - - Key string `xml:"key"` - ConfigVersion string `xml:"configVersion,omitempty"` - AllocationInfo *DVSNetworkResourcePoolAllocationInfo `xml:"allocationInfo,omitempty"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["DVSNetworkResourcePoolConfigSpec"] = reflect.TypeOf((*DVSNetworkResourcePoolConfigSpec)(nil)).Elem() -} - -type DVSPolicy struct { - DynamicData - - AutoPreInstallAllowed *bool `xml:"autoPreInstallAllowed"` - AutoUpgradeAllowed *bool `xml:"autoUpgradeAllowed"` - PartialUpgradeAllowed *bool `xml:"partialUpgradeAllowed"` -} - -func init() { - t["DVSPolicy"] = reflect.TypeOf((*DVSPolicy)(nil)).Elem() -} - -type DVSRollbackCapability struct { - DynamicData - - RollbackSupported bool `xml:"rollbackSupported"` -} - -func init() { - t["DVSRollbackCapability"] = reflect.TypeOf((*DVSRollbackCapability)(nil)).Elem() -} - -type DVSRollbackRequestType struct { - This ManagedObjectReference `xml:"_this"` - EntityBackup *EntityBackupConfig `xml:"entityBackup,omitempty"` -} - -func init() { - t["DVSRollbackRequestType"] = reflect.TypeOf((*DVSRollbackRequestType)(nil)).Elem() -} - -type DVSRollback_Task DVSRollbackRequestType - -func init() { - t["DVSRollback_Task"] = reflect.TypeOf((*DVSRollback_Task)(nil)).Elem() -} - -type DVSRollback_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DVSRuntimeInfo struct { - DynamicData - - HostMemberRuntime []HostMemberRuntimeInfo `xml:"hostMemberRuntime,omitempty"` - ResourceRuntimeInfo *DvsResourceRuntimeInfo `xml:"resourceRuntimeInfo,omitempty"` -} - -func init() { - t["DVSRuntimeInfo"] = reflect.TypeOf((*DVSRuntimeInfo)(nil)).Elem() -} - -type DVSSecurityPolicy struct { - InheritablePolicy - - AllowPromiscuous *BoolPolicy `xml:"allowPromiscuous,omitempty"` - MacChanges *BoolPolicy `xml:"macChanges,omitempty"` - ForgedTransmits *BoolPolicy `xml:"forgedTransmits,omitempty"` -} - -func init() { - t["DVSSecurityPolicy"] = reflect.TypeOf((*DVSSecurityPolicy)(nil)).Elem() -} - -type DVSSelection struct { - SelectionSet - - DvsUuid string `xml:"dvsUuid"` -} - -func init() { - t["DVSSelection"] = reflect.TypeOf((*DVSSelection)(nil)).Elem() -} - -type DVSSummary struct { - DynamicData - - Name string `xml:"name"` - Uuid string `xml:"uuid"` - NumPorts int32 `xml:"numPorts"` - ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` - HostMember []ManagedObjectReference `xml:"hostMember,omitempty"` - Vm []ManagedObjectReference `xml:"vm,omitempty"` - Host []ManagedObjectReference `xml:"host,omitempty"` - PortgroupName []string `xml:"portgroupName,omitempty"` - Description string `xml:"description,omitempty"` - Contact *DVSContactInfo `xml:"contact,omitempty"` - NumHosts int32 `xml:"numHosts,omitempty"` -} - -func init() { - t["DVSSummary"] = reflect.TypeOf((*DVSSummary)(nil)).Elem() -} - -type DVSTrafficShapingPolicy struct { - InheritablePolicy - - Enabled *BoolPolicy `xml:"enabled,omitempty"` - AverageBandwidth *LongPolicy `xml:"averageBandwidth,omitempty"` - PeakBandwidth *LongPolicy `xml:"peakBandwidth,omitempty"` - BurstSize *LongPolicy `xml:"burstSize,omitempty"` -} - -func init() { - t["DVSTrafficShapingPolicy"] = reflect.TypeOf((*DVSTrafficShapingPolicy)(nil)).Elem() -} - -type DVSUplinkPortPolicy struct { - DynamicData -} - -func init() { - t["DVSUplinkPortPolicy"] = reflect.TypeOf((*DVSUplinkPortPolicy)(nil)).Elem() -} - -type DVSVendorSpecificConfig struct { - InheritablePolicy - - KeyValue []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"keyValue,omitempty"` -} - -func init() { - t["DVSVendorSpecificConfig"] = reflect.TypeOf((*DVSVendorSpecificConfig)(nil)).Elem() -} - -type DVSVmVnicNetworkResourcePool struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` - ConfigVersion string `xml:"configVersion"` - AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"` -} - -func init() { - t["DVSVmVnicNetworkResourcePool"] = reflect.TypeOf((*DVSVmVnicNetworkResourcePool)(nil)).Elem() -} - -type DailyTaskScheduler struct { - HourlyTaskScheduler - - Hour int32 `xml:"hour"` -} - -func init() { - t["DailyTaskScheduler"] = reflect.TypeOf((*DailyTaskScheduler)(nil)).Elem() -} - -type DasAdmissionControlDisabledEvent struct { - ClusterEvent -} - -func init() { - t["DasAdmissionControlDisabledEvent"] = reflect.TypeOf((*DasAdmissionControlDisabledEvent)(nil)).Elem() -} - -type DasAdmissionControlEnabledEvent struct { - ClusterEvent -} - -func init() { - t["DasAdmissionControlEnabledEvent"] = reflect.TypeOf((*DasAdmissionControlEnabledEvent)(nil)).Elem() -} - -type DasAgentFoundEvent struct { - ClusterEvent -} - -func init() { - t["DasAgentFoundEvent"] = reflect.TypeOf((*DasAgentFoundEvent)(nil)).Elem() -} - -type DasAgentUnavailableEvent struct { - ClusterEvent -} - -func init() { - t["DasAgentUnavailableEvent"] = reflect.TypeOf((*DasAgentUnavailableEvent)(nil)).Elem() -} - -type DasClusterIsolatedEvent struct { - ClusterEvent -} - -func init() { - t["DasClusterIsolatedEvent"] = reflect.TypeOf((*DasClusterIsolatedEvent)(nil)).Elem() -} - -type DasConfigFault struct { - VimFault - - Reason string `xml:"reason,omitempty"` - Output string `xml:"output,omitempty"` - Event []BaseEvent `xml:"event,omitempty,typeattr"` -} - -func init() { - t["DasConfigFault"] = reflect.TypeOf((*DasConfigFault)(nil)).Elem() -} - -type DasConfigFaultFault DasConfigFault - -func init() { - t["DasConfigFaultFault"] = reflect.TypeOf((*DasConfigFaultFault)(nil)).Elem() -} - -type DasDisabledEvent struct { - ClusterEvent -} - -func init() { - t["DasDisabledEvent"] = reflect.TypeOf((*DasDisabledEvent)(nil)).Elem() -} - -type DasEnabledEvent struct { - ClusterEvent -} - -func init() { - t["DasEnabledEvent"] = reflect.TypeOf((*DasEnabledEvent)(nil)).Elem() -} - -type DasHeartbeatDatastoreInfo struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["DasHeartbeatDatastoreInfo"] = reflect.TypeOf((*DasHeartbeatDatastoreInfo)(nil)).Elem() -} - -type DasHostFailedEvent struct { - ClusterEvent - - FailedHost HostEventArgument `xml:"failedHost"` -} - -func init() { - t["DasHostFailedEvent"] = reflect.TypeOf((*DasHostFailedEvent)(nil)).Elem() -} - -type DasHostIsolatedEvent struct { - ClusterEvent - - IsolatedHost HostEventArgument `xml:"isolatedHost"` -} - -func init() { - t["DasHostIsolatedEvent"] = reflect.TypeOf((*DasHostIsolatedEvent)(nil)).Elem() -} - -type DatabaseError struct { - RuntimeFault -} - -func init() { - t["DatabaseError"] = reflect.TypeOf((*DatabaseError)(nil)).Elem() -} - -type DatabaseErrorFault DatabaseError - -func init() { - t["DatabaseErrorFault"] = reflect.TypeOf((*DatabaseErrorFault)(nil)).Elem() -} - -type DatabaseSizeEstimate struct { - DynamicData - - Size int64 `xml:"size"` -} - -func init() { - t["DatabaseSizeEstimate"] = reflect.TypeOf((*DatabaseSizeEstimate)(nil)).Elem() -} - -type DatabaseSizeParam struct { - DynamicData - - InventoryDesc InventoryDescription `xml:"inventoryDesc"` - PerfStatsDesc *PerformanceStatisticsDescription `xml:"perfStatsDesc,omitempty"` -} - -func init() { - t["DatabaseSizeParam"] = reflect.TypeOf((*DatabaseSizeParam)(nil)).Elem() -} - -type DatacenterBasicConnectInfo struct { - DynamicData - - Hostname string `xml:"hostname,omitempty"` - Error *LocalizedMethodFault `xml:"error,omitempty"` - ServerIp string `xml:"serverIp,omitempty"` - NumVm int32 `xml:"numVm,omitempty"` - NumPoweredOnVm int32 `xml:"numPoweredOnVm,omitempty"` - HostProductInfo *AboutInfo `xml:"hostProductInfo,omitempty"` - HardwareVendor string `xml:"hardwareVendor,omitempty"` - HardwareModel string `xml:"hardwareModel,omitempty"` -} - -func init() { - t["DatacenterBasicConnectInfo"] = reflect.TypeOf((*DatacenterBasicConnectInfo)(nil)).Elem() -} - -type DatacenterConfigInfo struct { - DynamicData - - DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` - MaximumHardwareVersionKey string `xml:"maximumHardwareVersionKey,omitempty"` -} - -func init() { - t["DatacenterConfigInfo"] = reflect.TypeOf((*DatacenterConfigInfo)(nil)).Elem() -} - -type DatacenterConfigSpec struct { - DynamicData - - DefaultHardwareVersionKey string `xml:"defaultHardwareVersionKey,omitempty"` - MaximumHardwareVersionKey string `xml:"maximumHardwareVersionKey,omitempty"` -} - -func init() { - t["DatacenterConfigSpec"] = reflect.TypeOf((*DatacenterConfigSpec)(nil)).Elem() -} - -type DatacenterCreatedEvent struct { - DatacenterEvent - - Parent FolderEventArgument `xml:"parent"` -} - -func init() { - t["DatacenterCreatedEvent"] = reflect.TypeOf((*DatacenterCreatedEvent)(nil)).Elem() -} - -type DatacenterEvent struct { - Event -} - -func init() { - t["DatacenterEvent"] = reflect.TypeOf((*DatacenterEvent)(nil)).Elem() -} - -type DatacenterEventArgument struct { - EntityEventArgument - - Datacenter ManagedObjectReference `xml:"datacenter"` -} - -func init() { - t["DatacenterEventArgument"] = reflect.TypeOf((*DatacenterEventArgument)(nil)).Elem() -} - -type DatacenterMismatch struct { - MigrationFault - - InvalidArgument []DatacenterMismatchArgument `xml:"invalidArgument"` - ExpectedDatacenter ManagedObjectReference `xml:"expectedDatacenter"` -} - -func init() { - t["DatacenterMismatch"] = reflect.TypeOf((*DatacenterMismatch)(nil)).Elem() -} - -type DatacenterMismatchArgument struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - InputDatacenter *ManagedObjectReference `xml:"inputDatacenter,omitempty"` -} - -func init() { - t["DatacenterMismatchArgument"] = reflect.TypeOf((*DatacenterMismatchArgument)(nil)).Elem() -} - -type DatacenterMismatchFault DatacenterMismatch - -func init() { - t["DatacenterMismatchFault"] = reflect.TypeOf((*DatacenterMismatchFault)(nil)).Elem() -} - -type DatacenterRenamedEvent struct { - DatacenterEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["DatacenterRenamedEvent"] = reflect.TypeOf((*DatacenterRenamedEvent)(nil)).Elem() -} - -type DatastoreCapability struct { - DynamicData - - DirectoryHierarchySupported bool `xml:"directoryHierarchySupported"` - RawDiskMappingsSupported bool `xml:"rawDiskMappingsSupported"` - PerFileThinProvisioningSupported bool `xml:"perFileThinProvisioningSupported"` - StorageIORMSupported *bool `xml:"storageIORMSupported"` - NativeSnapshotSupported *bool `xml:"nativeSnapshotSupported"` - TopLevelDirectoryCreateSupported *bool `xml:"topLevelDirectoryCreateSupported"` - SeSparseSupported *bool `xml:"seSparseSupported"` - VmfsSparseSupported *bool `xml:"vmfsSparseSupported"` - VsanSparseSupported *bool `xml:"vsanSparseSupported"` - UpitSupported *bool `xml:"upitSupported"` - VmdkExpandSupported *bool `xml:"vmdkExpandSupported"` - ClusteredVmdkSupported *bool `xml:"clusteredVmdkSupported"` -} - -func init() { - t["DatastoreCapability"] = reflect.TypeOf((*DatastoreCapability)(nil)).Elem() -} - -type DatastoreCapacityIncreasedEvent struct { - DatastoreEvent - - OldCapacity int64 `xml:"oldCapacity"` - NewCapacity int64 `xml:"newCapacity"` -} - -func init() { - t["DatastoreCapacityIncreasedEvent"] = reflect.TypeOf((*DatastoreCapacityIncreasedEvent)(nil)).Elem() -} - -type DatastoreDestroyedEvent struct { - DatastoreEvent -} - -func init() { - t["DatastoreDestroyedEvent"] = reflect.TypeOf((*DatastoreDestroyedEvent)(nil)).Elem() -} - -type DatastoreDiscoveredEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` -} - -func init() { - t["DatastoreDiscoveredEvent"] = reflect.TypeOf((*DatastoreDiscoveredEvent)(nil)).Elem() -} - -type DatastoreDuplicatedEvent struct { - DatastoreEvent -} - -func init() { - t["DatastoreDuplicatedEvent"] = reflect.TypeOf((*DatastoreDuplicatedEvent)(nil)).Elem() -} - -type DatastoreEnterMaintenanceMode DatastoreEnterMaintenanceModeRequestType - -func init() { - t["DatastoreEnterMaintenanceMode"] = reflect.TypeOf((*DatastoreEnterMaintenanceMode)(nil)).Elem() -} - -type DatastoreEnterMaintenanceModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DatastoreEnterMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreEnterMaintenanceModeRequestType)(nil)).Elem() -} - -type DatastoreEnterMaintenanceModeResponse struct { - Returnval StoragePlacementResult `xml:"returnval"` -} - -type DatastoreEvent struct { - Event - - Datastore *DatastoreEventArgument `xml:"datastore,omitempty"` -} - -func init() { - t["DatastoreEvent"] = reflect.TypeOf((*DatastoreEvent)(nil)).Elem() -} - -type DatastoreEventArgument struct { - EntityEventArgument - - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["DatastoreEventArgument"] = reflect.TypeOf((*DatastoreEventArgument)(nil)).Elem() -} - -type DatastoreExitMaintenanceModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DatastoreExitMaintenanceModeRequestType"] = reflect.TypeOf((*DatastoreExitMaintenanceModeRequestType)(nil)).Elem() -} - -type DatastoreExitMaintenanceMode_Task DatastoreExitMaintenanceModeRequestType - -func init() { - t["DatastoreExitMaintenanceMode_Task"] = reflect.TypeOf((*DatastoreExitMaintenanceMode_Task)(nil)).Elem() -} - -type DatastoreExitMaintenanceMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DatastoreFileCopiedEvent struct { - DatastoreFileEvent - - SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"` - SourceFile string `xml:"sourceFile"` -} - -func init() { - t["DatastoreFileCopiedEvent"] = reflect.TypeOf((*DatastoreFileCopiedEvent)(nil)).Elem() -} - -type DatastoreFileDeletedEvent struct { - DatastoreFileEvent -} - -func init() { - t["DatastoreFileDeletedEvent"] = reflect.TypeOf((*DatastoreFileDeletedEvent)(nil)).Elem() -} - -type DatastoreFileEvent struct { - DatastoreEvent - - TargetFile string `xml:"targetFile"` - SourceOfOperation string `xml:"sourceOfOperation,omitempty"` - Succeeded *bool `xml:"succeeded"` -} - -func init() { - t["DatastoreFileEvent"] = reflect.TypeOf((*DatastoreFileEvent)(nil)).Elem() -} - -type DatastoreFileMovedEvent struct { - DatastoreFileEvent - - SourceDatastore DatastoreEventArgument `xml:"sourceDatastore"` - SourceFile string `xml:"sourceFile"` -} - -func init() { - t["DatastoreFileMovedEvent"] = reflect.TypeOf((*DatastoreFileMovedEvent)(nil)).Elem() -} - -type DatastoreHostMount struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - MountInfo HostMountInfo `xml:"mountInfo"` -} - -func init() { - t["DatastoreHostMount"] = reflect.TypeOf((*DatastoreHostMount)(nil)).Elem() -} - -type DatastoreIORMReconfiguredEvent struct { - DatastoreEvent -} - -func init() { - t["DatastoreIORMReconfiguredEvent"] = reflect.TypeOf((*DatastoreIORMReconfiguredEvent)(nil)).Elem() -} - -type DatastoreInfo struct { - DynamicData - - Name string `xml:"name"` - Url string `xml:"url"` - FreeSpace int64 `xml:"freeSpace"` - MaxFileSize int64 `xml:"maxFileSize"` - MaxVirtualDiskCapacity int64 `xml:"maxVirtualDiskCapacity,omitempty"` - MaxMemoryFileSize int64 `xml:"maxMemoryFileSize,omitempty"` - Timestamp *time.Time `xml:"timestamp"` - ContainerId string `xml:"containerId,omitempty"` - AliasOf string `xml:"aliasOf,omitempty"` -} - -func init() { - t["DatastoreInfo"] = reflect.TypeOf((*DatastoreInfo)(nil)).Elem() -} - -type DatastoreMountPathDatastorePair struct { - DynamicData - - OldMountPath string `xml:"oldMountPath"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["DatastoreMountPathDatastorePair"] = reflect.TypeOf((*DatastoreMountPathDatastorePair)(nil)).Elem() -} - -type DatastoreNotWritableOnHost struct { - InvalidDatastore - - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["DatastoreNotWritableOnHost"] = reflect.TypeOf((*DatastoreNotWritableOnHost)(nil)).Elem() -} - -type DatastoreNotWritableOnHostFault BaseDatastoreNotWritableOnHost - -func init() { - t["DatastoreNotWritableOnHostFault"] = reflect.TypeOf((*DatastoreNotWritableOnHostFault)(nil)).Elem() -} - -type DatastoreOption struct { - DynamicData - - UnsupportedVolumes []VirtualMachineDatastoreVolumeOption `xml:"unsupportedVolumes,omitempty"` -} - -func init() { - t["DatastoreOption"] = reflect.TypeOf((*DatastoreOption)(nil)).Elem() -} - -type DatastorePrincipalConfigured struct { - HostEvent - - DatastorePrincipal string `xml:"datastorePrincipal"` -} - -func init() { - t["DatastorePrincipalConfigured"] = reflect.TypeOf((*DatastorePrincipalConfigured)(nil)).Elem() -} - -type DatastoreRemovedOnHostEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` -} - -func init() { - t["DatastoreRemovedOnHostEvent"] = reflect.TypeOf((*DatastoreRemovedOnHostEvent)(nil)).Elem() -} - -type DatastoreRenamedEvent struct { - DatastoreEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["DatastoreRenamedEvent"] = reflect.TypeOf((*DatastoreRenamedEvent)(nil)).Elem() -} - -type DatastoreRenamedOnHostEvent struct { - HostEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["DatastoreRenamedOnHostEvent"] = reflect.TypeOf((*DatastoreRenamedOnHostEvent)(nil)).Elem() -} - -type DatastoreSummary struct { - DynamicData - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - Name string `xml:"name"` - Url string `xml:"url"` - Capacity int64 `xml:"capacity"` - FreeSpace int64 `xml:"freeSpace"` - Uncommitted int64 `xml:"uncommitted,omitempty"` - Accessible bool `xml:"accessible"` - MultipleHostAccess *bool `xml:"multipleHostAccess"` - Type string `xml:"type"` - MaintenanceMode string `xml:"maintenanceMode,omitempty"` -} - -func init() { - t["DatastoreSummary"] = reflect.TypeOf((*DatastoreSummary)(nil)).Elem() -} - -type DatastoreVVolContainerFailoverPair struct { - DynamicData - - SrcContainer string `xml:"srcContainer,omitempty"` - TgtContainer string `xml:"tgtContainer"` - VvolMapping []KeyValue `xml:"vvolMapping,omitempty"` -} - -func init() { - t["DatastoreVVolContainerFailoverPair"] = reflect.TypeOf((*DatastoreVVolContainerFailoverPair)(nil)).Elem() -} - -type DateTimeProfile struct { - ApplyProfile -} - -func init() { - t["DateTimeProfile"] = reflect.TypeOf((*DateTimeProfile)(nil)).Elem() -} - -type DecodeLicense DecodeLicenseRequestType - -func init() { - t["DecodeLicense"] = reflect.TypeOf((*DecodeLicense)(nil)).Elem() -} - -type DecodeLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` -} - -func init() { - t["DecodeLicenseRequestType"] = reflect.TypeOf((*DecodeLicenseRequestType)(nil)).Elem() -} - -type DecodeLicenseResponse struct { - Returnval LicenseManagerLicenseInfo `xml:"returnval"` -} - -type DefragmentAllDisks DefragmentAllDisksRequestType - -func init() { - t["DefragmentAllDisks"] = reflect.TypeOf((*DefragmentAllDisks)(nil)).Elem() -} - -type DefragmentAllDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DefragmentAllDisksRequestType"] = reflect.TypeOf((*DefragmentAllDisksRequestType)(nil)).Elem() -} - -type DefragmentAllDisksResponse struct { -} - -type DefragmentVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["DefragmentVirtualDiskRequestType"] = reflect.TypeOf((*DefragmentVirtualDiskRequestType)(nil)).Elem() -} - -type DefragmentVirtualDisk_Task DefragmentVirtualDiskRequestType - -func init() { - t["DefragmentVirtualDisk_Task"] = reflect.TypeOf((*DefragmentVirtualDisk_Task)(nil)).Elem() -} - -type DefragmentVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteCustomizationSpec DeleteCustomizationSpecRequestType - -func init() { - t["DeleteCustomizationSpec"] = reflect.TypeOf((*DeleteCustomizationSpec)(nil)).Elem() -} - -type DeleteCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["DeleteCustomizationSpecRequestType"] = reflect.TypeOf((*DeleteCustomizationSpecRequestType)(nil)).Elem() -} - -type DeleteCustomizationSpecResponse struct { -} - -type DeleteDatastoreFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["DeleteDatastoreFileRequestType"] = reflect.TypeOf((*DeleteDatastoreFileRequestType)(nil)).Elem() -} - -type DeleteDatastoreFile_Task DeleteDatastoreFileRequestType - -func init() { - t["DeleteDatastoreFile_Task"] = reflect.TypeOf((*DeleteDatastoreFile_Task)(nil)).Elem() -} - -type DeleteDatastoreFile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteDirectory DeleteDirectoryRequestType - -func init() { - t["DeleteDirectory"] = reflect.TypeOf((*DeleteDirectory)(nil)).Elem() -} - -type DeleteDirectoryInGuest DeleteDirectoryInGuestRequestType - -func init() { - t["DeleteDirectoryInGuest"] = reflect.TypeOf((*DeleteDirectoryInGuest)(nil)).Elem() -} - -type DeleteDirectoryInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - DirectoryPath string `xml:"directoryPath"` - Recursive bool `xml:"recursive"` -} - -func init() { - t["DeleteDirectoryInGuestRequestType"] = reflect.TypeOf((*DeleteDirectoryInGuestRequestType)(nil)).Elem() -} - -type DeleteDirectoryInGuestResponse struct { -} - -type DeleteDirectoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - DatastorePath string `xml:"datastorePath"` -} - -func init() { - t["DeleteDirectoryRequestType"] = reflect.TypeOf((*DeleteDirectoryRequestType)(nil)).Elem() -} - -type DeleteDirectoryResponse struct { -} - -type DeleteFile DeleteFileRequestType - -func init() { - t["DeleteFile"] = reflect.TypeOf((*DeleteFile)(nil)).Elem() -} - -type DeleteFileInGuest DeleteFileInGuestRequestType - -func init() { - t["DeleteFileInGuest"] = reflect.TypeOf((*DeleteFileInGuest)(nil)).Elem() -} - -type DeleteFileInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - FilePath string `xml:"filePath"` -} - -func init() { - t["DeleteFileInGuestRequestType"] = reflect.TypeOf((*DeleteFileInGuestRequestType)(nil)).Elem() -} - -type DeleteFileInGuestResponse struct { -} - -type DeleteFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - DatastorePath string `xml:"datastorePath"` -} - -func init() { - t["DeleteFileRequestType"] = reflect.TypeOf((*DeleteFileRequestType)(nil)).Elem() -} - -type DeleteFileResponse struct { -} - -type DeleteHostSpecification DeleteHostSpecificationRequestType - -func init() { - t["DeleteHostSpecification"] = reflect.TypeOf((*DeleteHostSpecification)(nil)).Elem() -} - -type DeleteHostSpecificationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["DeleteHostSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSpecificationRequestType)(nil)).Elem() -} - -type DeleteHostSpecificationResponse struct { -} - -type DeleteHostSubSpecification DeleteHostSubSpecificationRequestType - -func init() { - t["DeleteHostSubSpecification"] = reflect.TypeOf((*DeleteHostSubSpecification)(nil)).Elem() -} - -type DeleteHostSubSpecificationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - SubSpecName string `xml:"subSpecName"` -} - -func init() { - t["DeleteHostSubSpecificationRequestType"] = reflect.TypeOf((*DeleteHostSubSpecificationRequestType)(nil)).Elem() -} - -type DeleteHostSubSpecificationResponse struct { -} - -type DeleteNvdimmBlockNamespacesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DeleteNvdimmBlockNamespacesRequestType"] = reflect.TypeOf((*DeleteNvdimmBlockNamespacesRequestType)(nil)).Elem() -} - -type DeleteNvdimmBlockNamespaces_Task DeleteNvdimmBlockNamespacesRequestType - -func init() { - t["DeleteNvdimmBlockNamespaces_Task"] = reflect.TypeOf((*DeleteNvdimmBlockNamespaces_Task)(nil)).Elem() -} - -type DeleteNvdimmBlockNamespaces_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteNvdimmNamespaceRequestType struct { - This ManagedObjectReference `xml:"_this"` - DeleteSpec NvdimmNamespaceDeleteSpec `xml:"deleteSpec"` -} - -func init() { - t["DeleteNvdimmNamespaceRequestType"] = reflect.TypeOf((*DeleteNvdimmNamespaceRequestType)(nil)).Elem() -} - -type DeleteNvdimmNamespace_Task DeleteNvdimmNamespaceRequestType - -func init() { - t["DeleteNvdimmNamespace_Task"] = reflect.TypeOf((*DeleteNvdimmNamespace_Task)(nil)).Elem() -} - -type DeleteNvdimmNamespace_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteRegistryKeyInGuest DeleteRegistryKeyInGuestRequestType - -func init() { - t["DeleteRegistryKeyInGuest"] = reflect.TypeOf((*DeleteRegistryKeyInGuest)(nil)).Elem() -} - -type DeleteRegistryKeyInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - KeyName GuestRegKeyNameSpec `xml:"keyName"` - Recursive bool `xml:"recursive"` -} - -func init() { - t["DeleteRegistryKeyInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryKeyInGuestRequestType)(nil)).Elem() -} - -type DeleteRegistryKeyInGuestResponse struct { -} - -type DeleteRegistryValueInGuest DeleteRegistryValueInGuestRequestType - -func init() { - t["DeleteRegistryValueInGuest"] = reflect.TypeOf((*DeleteRegistryValueInGuest)(nil)).Elem() -} - -type DeleteRegistryValueInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - ValueName GuestRegValueNameSpec `xml:"valueName"` -} - -func init() { - t["DeleteRegistryValueInGuestRequestType"] = reflect.TypeOf((*DeleteRegistryValueInGuestRequestType)(nil)).Elem() -} - -type DeleteRegistryValueInGuestResponse struct { -} - -type DeleteScsiLunState DeleteScsiLunStateRequestType - -func init() { - t["DeleteScsiLunState"] = reflect.TypeOf((*DeleteScsiLunState)(nil)).Elem() -} - -type DeleteScsiLunStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunCanonicalName string `xml:"lunCanonicalName"` -} - -func init() { - t["DeleteScsiLunStateRequestType"] = reflect.TypeOf((*DeleteScsiLunStateRequestType)(nil)).Elem() -} - -type DeleteScsiLunStateResponse struct { -} - -type DeleteSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` -} - -func init() { - t["DeleteSnapshotRequestType"] = reflect.TypeOf((*DeleteSnapshotRequestType)(nil)).Elem() -} - -type DeleteSnapshot_Task DeleteSnapshotRequestType - -func init() { - t["DeleteSnapshot_Task"] = reflect.TypeOf((*DeleteSnapshot_Task)(nil)).Elem() -} - -type DeleteSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteVStorageObjectExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["DeleteVStorageObjectExRequestType"] = reflect.TypeOf((*DeleteVStorageObjectExRequestType)(nil)).Elem() -} - -type DeleteVStorageObjectEx_Task DeleteVStorageObjectExRequestType - -func init() { - t["DeleteVStorageObjectEx_Task"] = reflect.TypeOf((*DeleteVStorageObjectEx_Task)(nil)).Elem() -} - -type DeleteVStorageObjectEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["DeleteVStorageObjectRequestType"] = reflect.TypeOf((*DeleteVStorageObjectRequestType)(nil)).Elem() -} - -type DeleteVStorageObject_Task DeleteVStorageObjectRequestType - -func init() { - t["DeleteVStorageObject_Task"] = reflect.TypeOf((*DeleteVStorageObject_Task)(nil)).Elem() -} - -type DeleteVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteVffsVolumeState DeleteVffsVolumeStateRequestType - -func init() { - t["DeleteVffsVolumeState"] = reflect.TypeOf((*DeleteVffsVolumeState)(nil)).Elem() -} - -type DeleteVffsVolumeStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsUuid string `xml:"vffsUuid"` -} - -func init() { - t["DeleteVffsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVffsVolumeStateRequestType)(nil)).Elem() -} - -type DeleteVffsVolumeStateResponse struct { -} - -type DeleteVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["DeleteVirtualDiskRequestType"] = reflect.TypeOf((*DeleteVirtualDiskRequestType)(nil)).Elem() -} - -type DeleteVirtualDisk_Task DeleteVirtualDiskRequestType - -func init() { - t["DeleteVirtualDisk_Task"] = reflect.TypeOf((*DeleteVirtualDisk_Task)(nil)).Elem() -} - -type DeleteVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeleteVmfsVolumeState DeleteVmfsVolumeStateRequestType - -func init() { - t["DeleteVmfsVolumeState"] = reflect.TypeOf((*DeleteVmfsVolumeState)(nil)).Elem() -} - -type DeleteVmfsVolumeStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` -} - -func init() { - t["DeleteVmfsVolumeStateRequestType"] = reflect.TypeOf((*DeleteVmfsVolumeStateRequestType)(nil)).Elem() -} - -type DeleteVmfsVolumeStateResponse struct { -} - -type DeleteVsanObjects DeleteVsanObjectsRequestType - -func init() { - t["DeleteVsanObjects"] = reflect.TypeOf((*DeleteVsanObjects)(nil)).Elem() -} - -type DeleteVsanObjectsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids"` - Force *bool `xml:"force"` -} - -func init() { - t["DeleteVsanObjectsRequestType"] = reflect.TypeOf((*DeleteVsanObjectsRequestType)(nil)).Elem() -} - -type DeleteVsanObjectsResponse struct { - Returnval []HostVsanInternalSystemDeleteVsanObjectsResult `xml:"returnval"` -} - -type DeltaDiskFormatNotSupported struct { - VmConfigFault - - Datastore []ManagedObjectReference `xml:"datastore,omitempty"` - DeltaDiskFormat string `xml:"deltaDiskFormat"` -} - -func init() { - t["DeltaDiskFormatNotSupported"] = reflect.TypeOf((*DeltaDiskFormatNotSupported)(nil)).Elem() -} - -type DeltaDiskFormatNotSupportedFault DeltaDiskFormatNotSupported - -func init() { - t["DeltaDiskFormatNotSupportedFault"] = reflect.TypeOf((*DeltaDiskFormatNotSupportedFault)(nil)).Elem() -} - -type Description struct { - DynamicData - - Label string `xml:"label"` - Summary string `xml:"summary"` -} - -func init() { - t["Description"] = reflect.TypeOf((*Description)(nil)).Elem() -} - -type DeselectVnic DeselectVnicRequestType - -func init() { - t["DeselectVnic"] = reflect.TypeOf((*DeselectVnic)(nil)).Elem() -} - -type DeselectVnicForNicType DeselectVnicForNicTypeRequestType - -func init() { - t["DeselectVnicForNicType"] = reflect.TypeOf((*DeselectVnicForNicType)(nil)).Elem() -} - -type DeselectVnicForNicTypeRequestType struct { - This ManagedObjectReference `xml:"_this"` - NicType string `xml:"nicType"` - Device string `xml:"device"` -} - -func init() { - t["DeselectVnicForNicTypeRequestType"] = reflect.TypeOf((*DeselectVnicForNicTypeRequestType)(nil)).Elem() -} - -type DeselectVnicForNicTypeResponse struct { -} - -type DeselectVnicRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DeselectVnicRequestType"] = reflect.TypeOf((*DeselectVnicRequestType)(nil)).Elem() -} - -type DeselectVnicResponse struct { -} - -type DesiredSoftwareSpec struct { - DynamicData - - BaseImageSpec DesiredSoftwareSpecBaseImageSpec `xml:"baseImageSpec"` - VendorAddOnSpec *DesiredSoftwareSpecVendorAddOnSpec `xml:"vendorAddOnSpec,omitempty"` - Components []DesiredSoftwareSpecComponentSpec `xml:"components,omitempty"` -} - -func init() { - t["DesiredSoftwareSpec"] = reflect.TypeOf((*DesiredSoftwareSpec)(nil)).Elem() -} - -type DesiredSoftwareSpecBaseImageSpec struct { - DynamicData - - Version string `xml:"version"` -} - -func init() { - t["DesiredSoftwareSpecBaseImageSpec"] = reflect.TypeOf((*DesiredSoftwareSpecBaseImageSpec)(nil)).Elem() -} - -type DesiredSoftwareSpecComponentSpec struct { - DynamicData - - Name string `xml:"name"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["DesiredSoftwareSpecComponentSpec"] = reflect.TypeOf((*DesiredSoftwareSpecComponentSpec)(nil)).Elem() -} - -type DesiredSoftwareSpecVendorAddOnSpec struct { - DynamicData - - Name string `xml:"name"` - Version string `xml:"version"` -} - -func init() { - t["DesiredSoftwareSpecVendorAddOnSpec"] = reflect.TypeOf((*DesiredSoftwareSpecVendorAddOnSpec)(nil)).Elem() -} - -type DestinationSwitchFull struct { - CannotAccessNetwork -} - -func init() { - t["DestinationSwitchFull"] = reflect.TypeOf((*DestinationSwitchFull)(nil)).Elem() -} - -type DestinationSwitchFullFault DestinationSwitchFull - -func init() { - t["DestinationSwitchFullFault"] = reflect.TypeOf((*DestinationSwitchFullFault)(nil)).Elem() -} - -type DestinationVsanDisabled struct { - CannotMoveVsanEnabledHost - - DestinationCluster string `xml:"destinationCluster"` -} - -func init() { - t["DestinationVsanDisabled"] = reflect.TypeOf((*DestinationVsanDisabled)(nil)).Elem() -} - -type DestinationVsanDisabledFault DestinationVsanDisabled - -func init() { - t["DestinationVsanDisabledFault"] = reflect.TypeOf((*DestinationVsanDisabledFault)(nil)).Elem() -} - -type DestroyChildren DestroyChildrenRequestType - -func init() { - t["DestroyChildren"] = reflect.TypeOf((*DestroyChildren)(nil)).Elem() -} - -type DestroyChildrenRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyChildrenRequestType"] = reflect.TypeOf((*DestroyChildrenRequestType)(nil)).Elem() -} - -type DestroyChildrenResponse struct { -} - -type DestroyCollector DestroyCollectorRequestType - -func init() { - t["DestroyCollector"] = reflect.TypeOf((*DestroyCollector)(nil)).Elem() -} - -type DestroyCollectorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyCollectorRequestType"] = reflect.TypeOf((*DestroyCollectorRequestType)(nil)).Elem() -} - -type DestroyCollectorResponse struct { -} - -type DestroyDatastore DestroyDatastoreRequestType - -func init() { - t["DestroyDatastore"] = reflect.TypeOf((*DestroyDatastore)(nil)).Elem() -} - -type DestroyDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyDatastoreRequestType"] = reflect.TypeOf((*DestroyDatastoreRequestType)(nil)).Elem() -} - -type DestroyDatastoreResponse struct { -} - -type DestroyIpPool DestroyIpPoolRequestType - -func init() { - t["DestroyIpPool"] = reflect.TypeOf((*DestroyIpPool)(nil)).Elem() -} - -type DestroyIpPoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - Id int32 `xml:"id"` - Force bool `xml:"force"` -} - -func init() { - t["DestroyIpPoolRequestType"] = reflect.TypeOf((*DestroyIpPoolRequestType)(nil)).Elem() -} - -type DestroyIpPoolResponse struct { -} - -type DestroyNetwork DestroyNetworkRequestType - -func init() { - t["DestroyNetwork"] = reflect.TypeOf((*DestroyNetwork)(nil)).Elem() -} - -type DestroyNetworkRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyNetworkRequestType"] = reflect.TypeOf((*DestroyNetworkRequestType)(nil)).Elem() -} - -type DestroyNetworkResponse struct { -} - -type DestroyProfile DestroyProfileRequestType - -func init() { - t["DestroyProfile"] = reflect.TypeOf((*DestroyProfile)(nil)).Elem() -} - -type DestroyProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyProfileRequestType"] = reflect.TypeOf((*DestroyProfileRequestType)(nil)).Elem() -} - -type DestroyProfileResponse struct { -} - -type DestroyPropertyCollector DestroyPropertyCollectorRequestType - -func init() { - t["DestroyPropertyCollector"] = reflect.TypeOf((*DestroyPropertyCollector)(nil)).Elem() -} - -type DestroyPropertyCollectorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyPropertyCollectorRequestType"] = reflect.TypeOf((*DestroyPropertyCollectorRequestType)(nil)).Elem() -} - -type DestroyPropertyCollectorResponse struct { -} - -type DestroyPropertyFilter DestroyPropertyFilterRequestType - -func init() { - t["DestroyPropertyFilter"] = reflect.TypeOf((*DestroyPropertyFilter)(nil)).Elem() -} - -type DestroyPropertyFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyPropertyFilterRequestType"] = reflect.TypeOf((*DestroyPropertyFilterRequestType)(nil)).Elem() -} - -type DestroyPropertyFilterResponse struct { -} - -type DestroyRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyRequestType"] = reflect.TypeOf((*DestroyRequestType)(nil)).Elem() -} - -type DestroyVffs DestroyVffsRequestType - -func init() { - t["DestroyVffs"] = reflect.TypeOf((*DestroyVffs)(nil)).Elem() -} - -type DestroyVffsRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsPath string `xml:"vffsPath"` -} - -func init() { - t["DestroyVffsRequestType"] = reflect.TypeOf((*DestroyVffsRequestType)(nil)).Elem() -} - -type DestroyVffsResponse struct { -} - -type DestroyView DestroyViewRequestType - -func init() { - t["DestroyView"] = reflect.TypeOf((*DestroyView)(nil)).Elem() -} - -type DestroyViewRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DestroyViewRequestType"] = reflect.TypeOf((*DestroyViewRequestType)(nil)).Elem() -} - -type DestroyViewResponse struct { -} - -type Destroy_Task DestroyRequestType - -func init() { - t["Destroy_Task"] = reflect.TypeOf((*Destroy_Task)(nil)).Elem() -} - -type Destroy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DetachDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - DiskId ID `xml:"diskId"` -} - -func init() { - t["DetachDiskRequestType"] = reflect.TypeOf((*DetachDiskRequestType)(nil)).Elem() -} - -type DetachDisk_Task DetachDiskRequestType - -func init() { - t["DetachDisk_Task"] = reflect.TypeOf((*DetachDisk_Task)(nil)).Elem() -} - -type DetachDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DetachScsiLun DetachScsiLunRequestType - -func init() { - t["DetachScsiLun"] = reflect.TypeOf((*DetachScsiLun)(nil)).Elem() -} - -type DetachScsiLunExRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid []string `xml:"lunUuid"` -} - -func init() { - t["DetachScsiLunExRequestType"] = reflect.TypeOf((*DetachScsiLunExRequestType)(nil)).Elem() -} - -type DetachScsiLunEx_Task DetachScsiLunExRequestType - -func init() { - t["DetachScsiLunEx_Task"] = reflect.TypeOf((*DetachScsiLunEx_Task)(nil)).Elem() -} - -type DetachScsiLunEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DetachScsiLunRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid string `xml:"lunUuid"` -} - -func init() { - t["DetachScsiLunRequestType"] = reflect.TypeOf((*DetachScsiLunRequestType)(nil)).Elem() -} - -type DetachScsiLunResponse struct { -} - -type DetachTagFromVStorageObject DetachTagFromVStorageObjectRequestType - -func init() { - t["DetachTagFromVStorageObject"] = reflect.TypeOf((*DetachTagFromVStorageObject)(nil)).Elem() -} - -type DetachTagFromVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Category string `xml:"category"` - Tag string `xml:"tag"` -} - -func init() { - t["DetachTagFromVStorageObjectRequestType"] = reflect.TypeOf((*DetachTagFromVStorageObjectRequestType)(nil)).Elem() -} - -type DetachTagFromVStorageObjectResponse struct { -} - -type DeviceBackedVirtualDiskSpec struct { - VirtualDiskSpec - - Device string `xml:"device"` -} - -func init() { - t["DeviceBackedVirtualDiskSpec"] = reflect.TypeOf((*DeviceBackedVirtualDiskSpec)(nil)).Elem() -} - -type DeviceBackingNotSupported struct { - DeviceNotSupported - - Backing string `xml:"backing"` -} - -func init() { - t["DeviceBackingNotSupported"] = reflect.TypeOf((*DeviceBackingNotSupported)(nil)).Elem() -} - -type DeviceBackingNotSupportedFault BaseDeviceBackingNotSupported - -func init() { - t["DeviceBackingNotSupportedFault"] = reflect.TypeOf((*DeviceBackingNotSupportedFault)(nil)).Elem() -} - -type DeviceControllerNotSupported struct { - DeviceNotSupported - - Controller string `xml:"controller"` -} - -func init() { - t["DeviceControllerNotSupported"] = reflect.TypeOf((*DeviceControllerNotSupported)(nil)).Elem() -} - -type DeviceControllerNotSupportedFault DeviceControllerNotSupported - -func init() { - t["DeviceControllerNotSupportedFault"] = reflect.TypeOf((*DeviceControllerNotSupportedFault)(nil)).Elem() -} - -type DeviceGroupId struct { - DynamicData - - Id string `xml:"id"` -} - -func init() { - t["DeviceGroupId"] = reflect.TypeOf((*DeviceGroupId)(nil)).Elem() -} - -type DeviceHotPlugNotSupported struct { - InvalidDeviceSpec -} - -func init() { - t["DeviceHotPlugNotSupported"] = reflect.TypeOf((*DeviceHotPlugNotSupported)(nil)).Elem() -} - -type DeviceHotPlugNotSupportedFault DeviceHotPlugNotSupported - -func init() { - t["DeviceHotPlugNotSupportedFault"] = reflect.TypeOf((*DeviceHotPlugNotSupportedFault)(nil)).Elem() -} - -type DeviceNotFound struct { - InvalidDeviceSpec -} - -func init() { - t["DeviceNotFound"] = reflect.TypeOf((*DeviceNotFound)(nil)).Elem() -} - -type DeviceNotFoundFault DeviceNotFound - -func init() { - t["DeviceNotFoundFault"] = reflect.TypeOf((*DeviceNotFoundFault)(nil)).Elem() -} - -type DeviceNotSupported struct { - VirtualHardwareCompatibilityIssue - - Device string `xml:"device"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["DeviceNotSupported"] = reflect.TypeOf((*DeviceNotSupported)(nil)).Elem() -} - -type DeviceNotSupportedFault BaseDeviceNotSupported - -func init() { - t["DeviceNotSupportedFault"] = reflect.TypeOf((*DeviceNotSupportedFault)(nil)).Elem() -} - -type DeviceUnsupportedForVmPlatform struct { - InvalidDeviceSpec -} - -func init() { - t["DeviceUnsupportedForVmPlatform"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatform)(nil)).Elem() -} - -type DeviceUnsupportedForVmPlatformFault DeviceUnsupportedForVmPlatform - -func init() { - t["DeviceUnsupportedForVmPlatformFault"] = reflect.TypeOf((*DeviceUnsupportedForVmPlatformFault)(nil)).Elem() -} - -type DeviceUnsupportedForVmVersion struct { - InvalidDeviceSpec - - CurrentVersion string `xml:"currentVersion"` - ExpectedVersion string `xml:"expectedVersion"` -} - -func init() { - t["DeviceUnsupportedForVmVersion"] = reflect.TypeOf((*DeviceUnsupportedForVmVersion)(nil)).Elem() -} - -type DeviceUnsupportedForVmVersionFault DeviceUnsupportedForVmVersion - -func init() { - t["DeviceUnsupportedForVmVersionFault"] = reflect.TypeOf((*DeviceUnsupportedForVmVersionFault)(nil)).Elem() -} - -type DiagnosticManagerAuditRecordResult struct { - DynamicData - - Records []string `xml:"records,omitempty"` - NextToken string `xml:"nextToken"` -} - -func init() { - t["DiagnosticManagerAuditRecordResult"] = reflect.TypeOf((*DiagnosticManagerAuditRecordResult)(nil)).Elem() -} - -type DiagnosticManagerBundleInfo struct { - DynamicData - - System *ManagedObjectReference `xml:"system,omitempty"` - Url string `xml:"url"` -} - -func init() { - t["DiagnosticManagerBundleInfo"] = reflect.TypeOf((*DiagnosticManagerBundleInfo)(nil)).Elem() -} - -type DiagnosticManagerLogDescriptor struct { - DynamicData - - Key string `xml:"key"` - FileName string `xml:"fileName"` - Creator string `xml:"creator"` - Format string `xml:"format"` - MimeType string `xml:"mimeType"` - Info BaseDescription `xml:"info,typeattr"` -} - -func init() { - t["DiagnosticManagerLogDescriptor"] = reflect.TypeOf((*DiagnosticManagerLogDescriptor)(nil)).Elem() -} - -type DiagnosticManagerLogHeader struct { - DynamicData - - LineStart int32 `xml:"lineStart"` - LineEnd int32 `xml:"lineEnd"` - LineText []string `xml:"lineText,omitempty"` -} - -func init() { - t["DiagnosticManagerLogHeader"] = reflect.TypeOf((*DiagnosticManagerLogHeader)(nil)).Elem() -} - -type DigestNotSupported struct { - DeviceNotSupported -} - -func init() { - t["DigestNotSupported"] = reflect.TypeOf((*DigestNotSupported)(nil)).Elem() -} - -type DigestNotSupportedFault DigestNotSupported - -func init() { - t["DigestNotSupportedFault"] = reflect.TypeOf((*DigestNotSupportedFault)(nil)).Elem() -} - -type DirectoryNotEmpty struct { - FileFault -} - -func init() { - t["DirectoryNotEmpty"] = reflect.TypeOf((*DirectoryNotEmpty)(nil)).Elem() -} - -type DirectoryNotEmptyFault DirectoryNotEmpty - -func init() { - t["DirectoryNotEmptyFault"] = reflect.TypeOf((*DirectoryNotEmptyFault)(nil)).Elem() -} - -type DisableAdminNotSupported struct { - HostConfigFault -} - -func init() { - t["DisableAdminNotSupported"] = reflect.TypeOf((*DisableAdminNotSupported)(nil)).Elem() -} - -type DisableAdminNotSupportedFault DisableAdminNotSupported - -func init() { - t["DisableAdminNotSupportedFault"] = reflect.TypeOf((*DisableAdminNotSupportedFault)(nil)).Elem() -} - -type DisableAlarm DisableAlarmRequestType - -func init() { - t["DisableAlarm"] = reflect.TypeOf((*DisableAlarm)(nil)).Elem() -} - -type DisableAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Alarm ManagedObjectReference `xml:"alarm"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["DisableAlarmRequestType"] = reflect.TypeOf((*DisableAlarmRequestType)(nil)).Elem() -} - -type DisableAlarmResponse struct { -} - -type DisableClusteredVmdkSupport DisableClusteredVmdkSupportRequestType - -func init() { - t["DisableClusteredVmdkSupport"] = reflect.TypeOf((*DisableClusteredVmdkSupport)(nil)).Elem() -} - -type DisableClusteredVmdkSupportRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["DisableClusteredVmdkSupportRequestType"] = reflect.TypeOf((*DisableClusteredVmdkSupportRequestType)(nil)).Elem() -} - -type DisableClusteredVmdkSupportResponse struct { -} - -type DisableEvcModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DisableEvcModeRequestType"] = reflect.TypeOf((*DisableEvcModeRequestType)(nil)).Elem() -} - -type DisableEvcMode_Task DisableEvcModeRequestType - -func init() { - t["DisableEvcMode_Task"] = reflect.TypeOf((*DisableEvcMode_Task)(nil)).Elem() -} - -type DisableEvcMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DisableFeature DisableFeatureRequestType - -func init() { - t["DisableFeature"] = reflect.TypeOf((*DisableFeature)(nil)).Elem() -} - -type DisableFeatureRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - FeatureKey string `xml:"featureKey"` -} - -func init() { - t["DisableFeatureRequestType"] = reflect.TypeOf((*DisableFeatureRequestType)(nil)).Elem() -} - -type DisableFeatureResponse struct { - Returnval bool `xml:"returnval"` -} - -type DisableHyperThreading DisableHyperThreadingRequestType - -func init() { - t["DisableHyperThreading"] = reflect.TypeOf((*DisableHyperThreading)(nil)).Elem() -} - -type DisableHyperThreadingRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DisableHyperThreadingRequestType"] = reflect.TypeOf((*DisableHyperThreadingRequestType)(nil)).Elem() -} - -type DisableHyperThreadingResponse struct { -} - -type DisableMultipathPath DisableMultipathPathRequestType - -func init() { - t["DisableMultipathPath"] = reflect.TypeOf((*DisableMultipathPath)(nil)).Elem() -} - -type DisableMultipathPathRequestType struct { - This ManagedObjectReference `xml:"_this"` - PathName string `xml:"pathName"` -} - -func init() { - t["DisableMultipathPathRequestType"] = reflect.TypeOf((*DisableMultipathPathRequestType)(nil)).Elem() -} - -type DisableMultipathPathResponse struct { -} - -type DisableRuleset DisableRulesetRequestType - -func init() { - t["DisableRuleset"] = reflect.TypeOf((*DisableRuleset)(nil)).Elem() -} - -type DisableRulesetRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["DisableRulesetRequestType"] = reflect.TypeOf((*DisableRulesetRequestType)(nil)).Elem() -} - -type DisableRulesetResponse struct { -} - -type DisableSecondaryVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["DisableSecondaryVMRequestType"] = reflect.TypeOf((*DisableSecondaryVMRequestType)(nil)).Elem() -} - -type DisableSecondaryVM_Task DisableSecondaryVMRequestType - -func init() { - t["DisableSecondaryVM_Task"] = reflect.TypeOf((*DisableSecondaryVM_Task)(nil)).Elem() -} - -type DisableSecondaryVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DisableSmartCardAuthentication DisableSmartCardAuthenticationRequestType - -func init() { - t["DisableSmartCardAuthentication"] = reflect.TypeOf((*DisableSmartCardAuthentication)(nil)).Elem() -} - -type DisableSmartCardAuthenticationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DisableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*DisableSmartCardAuthenticationRequestType)(nil)).Elem() -} - -type DisableSmartCardAuthenticationResponse struct { -} - -type DisallowedChangeByService struct { - RuntimeFault - - ServiceName string `xml:"serviceName"` - DisallowedChange string `xml:"disallowedChange,omitempty"` -} - -func init() { - t["DisallowedChangeByService"] = reflect.TypeOf((*DisallowedChangeByService)(nil)).Elem() -} - -type DisallowedChangeByServiceFault DisallowedChangeByService - -func init() { - t["DisallowedChangeByServiceFault"] = reflect.TypeOf((*DisallowedChangeByServiceFault)(nil)).Elem() -} - -type DisallowedDiskModeChange struct { - InvalidDeviceSpec -} - -func init() { - t["DisallowedDiskModeChange"] = reflect.TypeOf((*DisallowedDiskModeChange)(nil)).Elem() -} - -type DisallowedDiskModeChangeFault DisallowedDiskModeChange - -func init() { - t["DisallowedDiskModeChangeFault"] = reflect.TypeOf((*DisallowedDiskModeChangeFault)(nil)).Elem() -} - -type DisallowedMigrationDeviceAttached struct { - MigrationFault - - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["DisallowedMigrationDeviceAttached"] = reflect.TypeOf((*DisallowedMigrationDeviceAttached)(nil)).Elem() -} - -type DisallowedMigrationDeviceAttachedFault DisallowedMigrationDeviceAttached - -func init() { - t["DisallowedMigrationDeviceAttachedFault"] = reflect.TypeOf((*DisallowedMigrationDeviceAttachedFault)(nil)).Elem() -} - -type DisallowedOperationOnFailoverHost struct { - RuntimeFault - - Host ManagedObjectReference `xml:"host"` - Hostname string `xml:"hostname"` -} - -func init() { - t["DisallowedOperationOnFailoverHost"] = reflect.TypeOf((*DisallowedOperationOnFailoverHost)(nil)).Elem() -} - -type DisallowedOperationOnFailoverHostFault DisallowedOperationOnFailoverHost - -func init() { - t["DisallowedOperationOnFailoverHostFault"] = reflect.TypeOf((*DisallowedOperationOnFailoverHostFault)(nil)).Elem() -} - -type DisconnectHostRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DisconnectHostRequestType"] = reflect.TypeOf((*DisconnectHostRequestType)(nil)).Elem() -} - -type DisconnectHost_Task DisconnectHostRequestType - -func init() { - t["DisconnectHost_Task"] = reflect.TypeOf((*DisconnectHost_Task)(nil)).Elem() -} - -type DisconnectHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DisconnectNvmeController DisconnectNvmeControllerRequestType - -func init() { - t["DisconnectNvmeController"] = reflect.TypeOf((*DisconnectNvmeController)(nil)).Elem() -} - -type DisconnectNvmeControllerExRequestType struct { - This ManagedObjectReference `xml:"_this"` - DisconnectSpec []HostNvmeDisconnectSpec `xml:"disconnectSpec,omitempty"` -} - -func init() { - t["DisconnectNvmeControllerExRequestType"] = reflect.TypeOf((*DisconnectNvmeControllerExRequestType)(nil)).Elem() -} - -type DisconnectNvmeControllerEx_Task DisconnectNvmeControllerExRequestType - -func init() { - t["DisconnectNvmeControllerEx_Task"] = reflect.TypeOf((*DisconnectNvmeControllerEx_Task)(nil)).Elem() -} - -type DisconnectNvmeControllerEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DisconnectNvmeControllerRequestType struct { - This ManagedObjectReference `xml:"_this"` - DisconnectSpec HostNvmeDisconnectSpec `xml:"disconnectSpec"` -} - -func init() { - t["DisconnectNvmeControllerRequestType"] = reflect.TypeOf((*DisconnectNvmeControllerRequestType)(nil)).Elem() -} - -type DisconnectNvmeControllerResponse struct { -} - -type DisconnectedHostsBlockingEVC struct { - EVCConfigFault -} - -func init() { - t["DisconnectedHostsBlockingEVC"] = reflect.TypeOf((*DisconnectedHostsBlockingEVC)(nil)).Elem() -} - -type DisconnectedHostsBlockingEVCFault DisconnectedHostsBlockingEVC - -func init() { - t["DisconnectedHostsBlockingEVCFault"] = reflect.TypeOf((*DisconnectedHostsBlockingEVCFault)(nil)).Elem() -} - -type DiscoverFcoeHbas DiscoverFcoeHbasRequestType - -func init() { - t["DiscoverFcoeHbas"] = reflect.TypeOf((*DiscoverFcoeHbas)(nil)).Elem() -} - -type DiscoverFcoeHbasRequestType struct { - This ManagedObjectReference `xml:"_this"` - FcoeSpec FcoeConfigFcoeSpecification `xml:"fcoeSpec"` -} - -func init() { - t["DiscoverFcoeHbasRequestType"] = reflect.TypeOf((*DiscoverFcoeHbasRequestType)(nil)).Elem() -} - -type DiscoverFcoeHbasResponse struct { -} - -type DiscoverNvmeControllers DiscoverNvmeControllersRequestType - -func init() { - t["DiscoverNvmeControllers"] = reflect.TypeOf((*DiscoverNvmeControllers)(nil)).Elem() -} - -type DiscoverNvmeControllersRequestType struct { - This ManagedObjectReference `xml:"_this"` - DiscoverSpec HostNvmeDiscoverSpec `xml:"discoverSpec"` -} - -func init() { - t["DiscoverNvmeControllersRequestType"] = reflect.TypeOf((*DiscoverNvmeControllersRequestType)(nil)).Elem() -} - -type DiscoverNvmeControllersResponse struct { - Returnval HostNvmeDiscoveryLog `xml:"returnval"` -} - -type DiskChangeExtent struct { - DynamicData - - Start int64 `xml:"start"` - Length int64 `xml:"length"` -} - -func init() { - t["DiskChangeExtent"] = reflect.TypeOf((*DiskChangeExtent)(nil)).Elem() -} - -type DiskChangeInfo struct { - DynamicData - - StartOffset int64 `xml:"startOffset"` - Length int64 `xml:"length"` - ChangedArea []DiskChangeExtent `xml:"changedArea,omitempty"` -} - -func init() { - t["DiskChangeInfo"] = reflect.TypeOf((*DiskChangeInfo)(nil)).Elem() -} - -type DiskCryptoSpec struct { - DynamicData - - Parent *DiskCryptoSpec `xml:"parent,omitempty"` - Crypto BaseCryptoSpec `xml:"crypto,typeattr"` -} - -func init() { - t["DiskCryptoSpec"] = reflect.TypeOf((*DiskCryptoSpec)(nil)).Elem() -} - -type DiskHasPartitions struct { - VsanDiskFault -} - -func init() { - t["DiskHasPartitions"] = reflect.TypeOf((*DiskHasPartitions)(nil)).Elem() -} - -type DiskHasPartitionsFault DiskHasPartitions - -func init() { - t["DiskHasPartitionsFault"] = reflect.TypeOf((*DiskHasPartitionsFault)(nil)).Elem() -} - -type DiskIsLastRemainingNonSSD struct { - VsanDiskFault -} - -func init() { - t["DiskIsLastRemainingNonSSD"] = reflect.TypeOf((*DiskIsLastRemainingNonSSD)(nil)).Elem() -} - -type DiskIsLastRemainingNonSSDFault DiskIsLastRemainingNonSSD - -func init() { - t["DiskIsLastRemainingNonSSDFault"] = reflect.TypeOf((*DiskIsLastRemainingNonSSDFault)(nil)).Elem() -} - -type DiskIsNonLocal struct { - VsanDiskFault -} - -func init() { - t["DiskIsNonLocal"] = reflect.TypeOf((*DiskIsNonLocal)(nil)).Elem() -} - -type DiskIsNonLocalFault DiskIsNonLocal - -func init() { - t["DiskIsNonLocalFault"] = reflect.TypeOf((*DiskIsNonLocalFault)(nil)).Elem() -} - -type DiskIsUSB struct { - VsanDiskFault -} - -func init() { - t["DiskIsUSB"] = reflect.TypeOf((*DiskIsUSB)(nil)).Elem() -} - -type DiskIsUSBFault DiskIsUSB - -func init() { - t["DiskIsUSBFault"] = reflect.TypeOf((*DiskIsUSBFault)(nil)).Elem() -} - -type DiskMoveTypeNotSupported struct { - MigrationFault -} - -func init() { - t["DiskMoveTypeNotSupported"] = reflect.TypeOf((*DiskMoveTypeNotSupported)(nil)).Elem() -} - -type DiskMoveTypeNotSupportedFault DiskMoveTypeNotSupported - -func init() { - t["DiskMoveTypeNotSupportedFault"] = reflect.TypeOf((*DiskMoveTypeNotSupportedFault)(nil)).Elem() -} - -type DiskNotSupported struct { - VirtualHardwareCompatibilityIssue - - Disk int32 `xml:"disk"` -} - -func init() { - t["DiskNotSupported"] = reflect.TypeOf((*DiskNotSupported)(nil)).Elem() -} - -type DiskNotSupportedFault BaseDiskNotSupported - -func init() { - t["DiskNotSupportedFault"] = reflect.TypeOf((*DiskNotSupportedFault)(nil)).Elem() -} - -type DiskTooSmall struct { - VsanDiskFault -} - -func init() { - t["DiskTooSmall"] = reflect.TypeOf((*DiskTooSmall)(nil)).Elem() -} - -type DiskTooSmallFault DiskTooSmall - -func init() { - t["DiskTooSmallFault"] = reflect.TypeOf((*DiskTooSmallFault)(nil)).Elem() -} - -type DissociateProfile DissociateProfileRequestType - -func init() { - t["DissociateProfile"] = reflect.TypeOf((*DissociateProfile)(nil)).Elem() -} - -type DissociateProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["DissociateProfileRequestType"] = reflect.TypeOf((*DissociateProfileRequestType)(nil)).Elem() -} - -type DissociateProfileResponse struct { -} - -type DistributedVirtualPort struct { - DynamicData - - Key string `xml:"key"` - Config DVPortConfigInfo `xml:"config"` - DvsUuid string `xml:"dvsUuid"` - PortgroupKey string `xml:"portgroupKey,omitempty"` - ProxyHost *ManagedObjectReference `xml:"proxyHost,omitempty"` - Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` - Conflict bool `xml:"conflict"` - ConflictPortKey string `xml:"conflictPortKey,omitempty"` - State *DVPortState `xml:"state,omitempty"` - ConnectionCookie int32 `xml:"connectionCookie,omitempty"` - LastStatusChange time.Time `xml:"lastStatusChange"` - HostLocalPort *bool `xml:"hostLocalPort"` - ExternalId string `xml:"externalId,omitempty"` - SegmentPortId string `xml:"segmentPortId,omitempty"` -} - -func init() { - t["DistributedVirtualPort"] = reflect.TypeOf((*DistributedVirtualPort)(nil)).Elem() -} - -type DistributedVirtualPortgroupInfo struct { - DynamicData - - SwitchName string `xml:"switchName"` - SwitchUuid string `xml:"switchUuid"` - PortgroupName string `xml:"portgroupName"` - PortgroupKey string `xml:"portgroupKey"` - PortgroupType string `xml:"portgroupType"` - UplinkPortgroup bool `xml:"uplinkPortgroup"` - Portgroup ManagedObjectReference `xml:"portgroup"` - NetworkReservationSupported *bool `xml:"networkReservationSupported"` - BackingType string `xml:"backingType,omitempty"` - LogicalSwitchUuid string `xml:"logicalSwitchUuid,omitempty"` - SegmentId string `xml:"segmentId,omitempty"` -} - -func init() { - t["DistributedVirtualPortgroupInfo"] = reflect.TypeOf((*DistributedVirtualPortgroupInfo)(nil)).Elem() -} - -type DistributedVirtualPortgroupNsxPortgroupOperationResult struct { - DynamicData - - Portgroups []ManagedObjectReference `xml:"portgroups,omitempty"` - Problems []DistributedVirtualPortgroupProblem `xml:"problems,omitempty"` -} - -func init() { - t["DistributedVirtualPortgroupNsxPortgroupOperationResult"] = reflect.TypeOf((*DistributedVirtualPortgroupNsxPortgroupOperationResult)(nil)).Elem() -} - -type DistributedVirtualPortgroupProblem struct { - DynamicData - - LogicalSwitchUuid string `xml:"logicalSwitchUuid"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["DistributedVirtualPortgroupProblem"] = reflect.TypeOf((*DistributedVirtualPortgroupProblem)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMember struct { - DynamicData - - RuntimeState *DistributedVirtualSwitchHostMemberRuntimeState `xml:"runtimeState,omitempty"` - Config DistributedVirtualSwitchHostMemberConfigInfo `xml:"config"` - ProductInfo *DistributedVirtualSwitchProductSpec `xml:"productInfo,omitempty"` - UplinkPortKey []string `xml:"uplinkPortKey,omitempty"` - Status string `xml:"status"` - StatusDetail string `xml:"statusDetail,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchHostMember"] = reflect.TypeOf((*DistributedVirtualSwitchHostMember)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberBacking struct { - DynamicData -} - -func init() { - t["DistributedVirtualSwitchHostMemberBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberBacking)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberConfigInfo struct { - DynamicData - - Host *ManagedObjectReference `xml:"host,omitempty"` - MaxProxySwitchPorts int32 `xml:"maxProxySwitchPorts"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` - Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,typeattr"` - NsxSwitch *bool `xml:"nsxSwitch"` - EnsEnabled *bool `xml:"ensEnabled"` - EnsInterruptEnabled *bool `xml:"ensInterruptEnabled"` - TransportZones []DistributedVirtualSwitchHostMemberTransportZoneInfo `xml:"transportZones,omitempty"` - NsxtUsedUplinkNames []string `xml:"nsxtUsedUplinkNames,omitempty"` - NetworkOffloadingEnabled *bool `xml:"networkOffloadingEnabled"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberConfigInfo"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigInfo)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberConfigSpec struct { - DynamicData - - Operation string `xml:"operation"` - Host ManagedObjectReference `xml:"host"` - Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"` - MaxProxySwitchPorts int32 `xml:"maxProxySwitchPorts,omitempty"` - VendorSpecificConfig []DistributedVirtualSwitchKeyedOpaqueBlob `xml:"vendorSpecificConfig,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberConfigSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberConfigSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberPnicBacking struct { - DistributedVirtualSwitchHostMemberBacking - - PnicSpec []DistributedVirtualSwitchHostMemberPnicSpec `xml:"pnicSpec,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberPnicBacking"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicBacking)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberPnicSpec struct { - DynamicData - - PnicDevice string `xml:"pnicDevice"` - UplinkPortKey string `xml:"uplinkPortKey,omitempty"` - UplinkPortgroupKey string `xml:"uplinkPortgroupKey,omitempty"` - ConnectionCookie int32 `xml:"connectionCookie,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberPnicSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberPnicSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberRuntimeState struct { - DynamicData - - CurrentMaxProxySwitchPorts int32 `xml:"currentMaxProxySwitchPorts"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberRuntimeState"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberRuntimeState)(nil)).Elem() -} - -type DistributedVirtualSwitchHostMemberTransportZoneInfo struct { - DynamicData - - Uuid string `xml:"uuid"` - Type string `xml:"type"` -} - -func init() { - t["DistributedVirtualSwitchHostMemberTransportZoneInfo"] = reflect.TypeOf((*DistributedVirtualSwitchHostMemberTransportZoneInfo)(nil)).Elem() -} - -type DistributedVirtualSwitchHostProductSpec struct { - DynamicData - - ProductLineId string `xml:"productLineId,omitempty"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchHostProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchHostProductSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchInfo struct { - DynamicData - - SwitchName string `xml:"switchName"` - SwitchUuid string `xml:"switchUuid"` - DistributedVirtualSwitch ManagedObjectReference `xml:"distributedVirtualSwitch"` - NetworkReservationSupported *bool `xml:"networkReservationSupported"` -} - -func init() { - t["DistributedVirtualSwitchInfo"] = reflect.TypeOf((*DistributedVirtualSwitchInfo)(nil)).Elem() -} - -type DistributedVirtualSwitchKeyedOpaqueBlob struct { - DynamicData - - Key string `xml:"key"` - OpaqueData string `xml:"opaqueData"` -} - -func init() { - t["DistributedVirtualSwitchKeyedOpaqueBlob"] = reflect.TypeOf((*DistributedVirtualSwitchKeyedOpaqueBlob)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerCompatibilityResult struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Error []LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchManagerCompatibilityResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerCompatibilityResult)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerDvsProductSpec struct { - DynamicData - - NewSwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"newSwitchProductSpec,omitempty"` - DistributedVirtualSwitch *ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchManagerDvsProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerDvsProductSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerHostArrayFilter struct { - DistributedVirtualSwitchManagerHostDvsFilterSpec - - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["DistributedVirtualSwitchManagerHostArrayFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostArrayFilter)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerHostContainer struct { - DynamicData - - Container ManagedObjectReference `xml:"container"` - Recursive bool `xml:"recursive"` -} - -func init() { - t["DistributedVirtualSwitchManagerHostContainer"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainer)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerHostContainerFilter struct { - DistributedVirtualSwitchManagerHostDvsFilterSpec - - HostContainer DistributedVirtualSwitchManagerHostContainer `xml:"hostContainer"` -} - -func init() { - t["DistributedVirtualSwitchManagerHostContainerFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostContainerFilter)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerHostDvsFilterSpec struct { - DynamicData - - Inclusive bool `xml:"inclusive"` -} - -func init() { - t["DistributedVirtualSwitchManagerHostDvsFilterSpec"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsFilterSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerHostDvsMembershipFilter struct { - DistributedVirtualSwitchManagerHostDvsFilterSpec - - DistributedVirtualSwitch ManagedObjectReference `xml:"distributedVirtualSwitch"` -} - -func init() { - t["DistributedVirtualSwitchManagerHostDvsMembershipFilter"] = reflect.TypeOf((*DistributedVirtualSwitchManagerHostDvsMembershipFilter)(nil)).Elem() -} - -type DistributedVirtualSwitchManagerImportResult struct { - DynamicData - - DistributedVirtualSwitch []ManagedObjectReference `xml:"distributedVirtualSwitch,omitempty"` - DistributedVirtualPortgroup []ManagedObjectReference `xml:"distributedVirtualPortgroup,omitempty"` - ImportFault []ImportOperationBulkFaultFaultOnImport `xml:"importFault,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchManagerImportResult"] = reflect.TypeOf((*DistributedVirtualSwitchManagerImportResult)(nil)).Elem() -} - -type DistributedVirtualSwitchNetworkOffloadSpec struct { - DynamicData - - Id string `xml:"id"` - Name string `xml:"name,omitempty"` - Types []string `xml:"types,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchNetworkOffloadSpec"] = reflect.TypeOf((*DistributedVirtualSwitchNetworkOffloadSpec)(nil)).Elem() -} - -type DistributedVirtualSwitchPortConnectee struct { - DynamicData - - ConnectedEntity *ManagedObjectReference `xml:"connectedEntity,omitempty"` - NicKey string `xml:"nicKey,omitempty"` - Type string `xml:"type,omitempty"` - AddressHint string `xml:"addressHint,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchPortConnectee"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnectee)(nil)).Elem() -} - -type DistributedVirtualSwitchPortConnection struct { - DynamicData - - SwitchUuid string `xml:"switchUuid"` - PortgroupKey string `xml:"portgroupKey,omitempty"` - PortKey string `xml:"portKey,omitempty"` - ConnectionCookie int32 `xml:"connectionCookie,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchPortConnection"] = reflect.TypeOf((*DistributedVirtualSwitchPortConnection)(nil)).Elem() -} - -type DistributedVirtualSwitchPortCriteria struct { - DynamicData - - Connected *bool `xml:"connected"` - Active *bool `xml:"active"` - UplinkPort *bool `xml:"uplinkPort"` - NsxPort *bool `xml:"nsxPort"` - Scope *ManagedObjectReference `xml:"scope,omitempty"` - PortgroupKey []string `xml:"portgroupKey,omitempty"` - Inside *bool `xml:"inside"` - PortKey []string `xml:"portKey,omitempty"` - Host []ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchPortCriteria"] = reflect.TypeOf((*DistributedVirtualSwitchPortCriteria)(nil)).Elem() -} - -type DistributedVirtualSwitchPortStatistics struct { - DynamicData - - PacketsInMulticast int64 `xml:"packetsInMulticast"` - PacketsOutMulticast int64 `xml:"packetsOutMulticast"` - BytesInMulticast int64 `xml:"bytesInMulticast"` - BytesOutMulticast int64 `xml:"bytesOutMulticast"` - PacketsInUnicast int64 `xml:"packetsInUnicast"` - PacketsOutUnicast int64 `xml:"packetsOutUnicast"` - BytesInUnicast int64 `xml:"bytesInUnicast"` - BytesOutUnicast int64 `xml:"bytesOutUnicast"` - PacketsInBroadcast int64 `xml:"packetsInBroadcast"` - PacketsOutBroadcast int64 `xml:"packetsOutBroadcast"` - BytesInBroadcast int64 `xml:"bytesInBroadcast"` - BytesOutBroadcast int64 `xml:"bytesOutBroadcast"` - PacketsInDropped int64 `xml:"packetsInDropped"` - PacketsOutDropped int64 `xml:"packetsOutDropped"` - PacketsInException int64 `xml:"packetsInException"` - PacketsOutException int64 `xml:"packetsOutException"` - BytesInFromPnic int64 `xml:"bytesInFromPnic,omitempty"` - BytesOutToPnic int64 `xml:"bytesOutToPnic,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchPortStatistics"] = reflect.TypeOf((*DistributedVirtualSwitchPortStatistics)(nil)).Elem() -} - -type DistributedVirtualSwitchProductSpec struct { - DynamicData - - Name string `xml:"name,omitempty"` - Vendor string `xml:"vendor,omitempty"` - Version string `xml:"version,omitempty"` - Build string `xml:"build,omitempty"` - ForwardingClass string `xml:"forwardingClass,omitempty"` - BundleId string `xml:"bundleId,omitempty"` - BundleUrl string `xml:"bundleUrl,omitempty"` -} - -func init() { - t["DistributedVirtualSwitchProductSpec"] = reflect.TypeOf((*DistributedVirtualSwitchProductSpec)(nil)).Elem() -} - -type DoesCustomizationSpecExist DoesCustomizationSpecExistRequestType - -func init() { - t["DoesCustomizationSpecExist"] = reflect.TypeOf((*DoesCustomizationSpecExist)(nil)).Elem() -} - -type DoesCustomizationSpecExistRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["DoesCustomizationSpecExistRequestType"] = reflect.TypeOf((*DoesCustomizationSpecExistRequestType)(nil)).Elem() -} - -type DoesCustomizationSpecExistResponse struct { - Returnval bool `xml:"returnval"` -} - -type DomainNotFound struct { - ActiveDirectoryFault - - DomainName string `xml:"domainName"` -} - -func init() { - t["DomainNotFound"] = reflect.TypeOf((*DomainNotFound)(nil)).Elem() -} - -type DomainNotFoundFault DomainNotFound - -func init() { - t["DomainNotFoundFault"] = reflect.TypeOf((*DomainNotFoundFault)(nil)).Elem() -} - -type DownloadDescriptionTree DownloadDescriptionTreeRequestType - -func init() { - t["DownloadDescriptionTree"] = reflect.TypeOf((*DownloadDescriptionTree)(nil)).Elem() -} - -type DownloadDescriptionTreeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["DownloadDescriptionTreeRequestType"] = reflect.TypeOf((*DownloadDescriptionTreeRequestType)(nil)).Elem() -} - -type DownloadDescriptionTreeResponse struct { - Returnval []byte `xml:"returnval"` -} - -type DpuStatusInfo struct { - HostHardwareElementInfo - - DpuId string `xml:"dpuId"` - Fru *HostFru `xml:"fru,omitempty"` - Sensors []DpuStatusInfoOperationalInfo `xml:"sensors,omitempty"` -} - -func init() { - t["DpuStatusInfo"] = reflect.TypeOf((*DpuStatusInfo)(nil)).Elem() -} - -type DpuStatusInfoOperationalInfo struct { - DynamicData - - SensorId string `xml:"sensorId"` - HealthState BaseElementDescription `xml:"healthState,omitempty,typeattr"` - Reading string `xml:"reading"` - Units string `xml:"units,omitempty"` - TimeStamp *time.Time `xml:"timeStamp"` -} - -func init() { - t["DpuStatusInfoOperationalInfo"] = reflect.TypeOf((*DpuStatusInfoOperationalInfo)(nil)).Elem() -} - -type DropConnections DropConnectionsRequestType - -func init() { - t["DropConnections"] = reflect.TypeOf((*DropConnections)(nil)).Elem() -} - -type DropConnectionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - ListOfConnections []BaseVirtualMachineConnection `xml:"listOfConnections,omitempty,typeattr"` -} - -func init() { - t["DropConnectionsRequestType"] = reflect.TypeOf((*DropConnectionsRequestType)(nil)).Elem() -} - -type DropConnectionsResponse struct { - Returnval bool `xml:"returnval"` -} - -type DrsDisabledEvent struct { - ClusterEvent -} - -func init() { - t["DrsDisabledEvent"] = reflect.TypeOf((*DrsDisabledEvent)(nil)).Elem() -} - -type DrsDisabledOnVm struct { - VimFault -} - -func init() { - t["DrsDisabledOnVm"] = reflect.TypeOf((*DrsDisabledOnVm)(nil)).Elem() -} - -type DrsDisabledOnVmFault DrsDisabledOnVm - -func init() { - t["DrsDisabledOnVmFault"] = reflect.TypeOf((*DrsDisabledOnVmFault)(nil)).Elem() -} - -type DrsEnabledEvent struct { - ClusterEvent - - Behavior string `xml:"behavior"` -} - -func init() { - t["DrsEnabledEvent"] = reflect.TypeOf((*DrsEnabledEvent)(nil)).Elem() -} - -type DrsEnteredStandbyModeEvent struct { - EnteredStandbyModeEvent -} - -func init() { - t["DrsEnteredStandbyModeEvent"] = reflect.TypeOf((*DrsEnteredStandbyModeEvent)(nil)).Elem() -} - -type DrsEnteringStandbyModeEvent struct { - EnteringStandbyModeEvent -} - -func init() { - t["DrsEnteringStandbyModeEvent"] = reflect.TypeOf((*DrsEnteringStandbyModeEvent)(nil)).Elem() -} - -type DrsExitStandbyModeFailedEvent struct { - ExitStandbyModeFailedEvent -} - -func init() { - t["DrsExitStandbyModeFailedEvent"] = reflect.TypeOf((*DrsExitStandbyModeFailedEvent)(nil)).Elem() -} - -type DrsExitedStandbyModeEvent struct { - ExitedStandbyModeEvent -} - -func init() { - t["DrsExitedStandbyModeEvent"] = reflect.TypeOf((*DrsExitedStandbyModeEvent)(nil)).Elem() -} - -type DrsExitingStandbyModeEvent struct { - ExitingStandbyModeEvent -} - -func init() { - t["DrsExitingStandbyModeEvent"] = reflect.TypeOf((*DrsExitingStandbyModeEvent)(nil)).Elem() -} - -type DrsInvocationFailedEvent struct { - ClusterEvent -} - -func init() { - t["DrsInvocationFailedEvent"] = reflect.TypeOf((*DrsInvocationFailedEvent)(nil)).Elem() -} - -type DrsRecoveredFromFailureEvent struct { - ClusterEvent -} - -func init() { - t["DrsRecoveredFromFailureEvent"] = reflect.TypeOf((*DrsRecoveredFromFailureEvent)(nil)).Elem() -} - -type DrsResourceConfigureFailedEvent struct { - HostEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["DrsResourceConfigureFailedEvent"] = reflect.TypeOf((*DrsResourceConfigureFailedEvent)(nil)).Elem() -} - -type DrsResourceConfigureSyncedEvent struct { - HostEvent -} - -func init() { - t["DrsResourceConfigureSyncedEvent"] = reflect.TypeOf((*DrsResourceConfigureSyncedEvent)(nil)).Elem() -} - -type DrsRuleComplianceEvent struct { - VmEvent -} - -func init() { - t["DrsRuleComplianceEvent"] = reflect.TypeOf((*DrsRuleComplianceEvent)(nil)).Elem() -} - -type DrsRuleViolationEvent struct { - VmEvent -} - -func init() { - t["DrsRuleViolationEvent"] = reflect.TypeOf((*DrsRuleViolationEvent)(nil)).Elem() -} - -type DrsSoftRuleViolationEvent struct { - VmEvent -} - -func init() { - t["DrsSoftRuleViolationEvent"] = reflect.TypeOf((*DrsSoftRuleViolationEvent)(nil)).Elem() -} - -type DrsVmMigratedEvent struct { - VmMigratedEvent -} - -func init() { - t["DrsVmMigratedEvent"] = reflect.TypeOf((*DrsVmMigratedEvent)(nil)).Elem() -} - -type DrsVmPoweredOnEvent struct { - VmPoweredOnEvent -} - -func init() { - t["DrsVmPoweredOnEvent"] = reflect.TypeOf((*DrsVmPoweredOnEvent)(nil)).Elem() -} - -type DrsVmotionIncompatibleFault struct { - VirtualHardwareCompatibilityIssue - - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["DrsVmotionIncompatibleFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFault)(nil)).Elem() -} - -type DrsVmotionIncompatibleFaultFault DrsVmotionIncompatibleFault - -func init() { - t["DrsVmotionIncompatibleFaultFault"] = reflect.TypeOf((*DrsVmotionIncompatibleFaultFault)(nil)).Elem() -} - -type DuplicateCustomizationSpec DuplicateCustomizationSpecRequestType - -func init() { - t["DuplicateCustomizationSpec"] = reflect.TypeOf((*DuplicateCustomizationSpec)(nil)).Elem() -} - -type DuplicateCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - NewName string `xml:"newName"` -} - -func init() { - t["DuplicateCustomizationSpecRequestType"] = reflect.TypeOf((*DuplicateCustomizationSpecRequestType)(nil)).Elem() -} - -type DuplicateCustomizationSpecResponse struct { -} - -type DuplicateDisks struct { - VsanDiskFault -} - -func init() { - t["DuplicateDisks"] = reflect.TypeOf((*DuplicateDisks)(nil)).Elem() -} - -type DuplicateDisksFault DuplicateDisks - -func init() { - t["DuplicateDisksFault"] = reflect.TypeOf((*DuplicateDisksFault)(nil)).Elem() -} - -type DuplicateIpDetectedEvent struct { - HostEvent - - DuplicateIP string `xml:"duplicateIP"` - MacAddress string `xml:"macAddress"` -} - -func init() { - t["DuplicateIpDetectedEvent"] = reflect.TypeOf((*DuplicateIpDetectedEvent)(nil)).Elem() -} - -type DuplicateName struct { - VimFault - - Name string `xml:"name"` - Object ManagedObjectReference `xml:"object"` -} - -func init() { - t["DuplicateName"] = reflect.TypeOf((*DuplicateName)(nil)).Elem() -} - -type DuplicateNameFault DuplicateName - -func init() { - t["DuplicateNameFault"] = reflect.TypeOf((*DuplicateNameFault)(nil)).Elem() -} - -type DuplicateVsanNetworkInterface struct { - VsanFault - - Device string `xml:"device"` -} - -func init() { - t["DuplicateVsanNetworkInterface"] = reflect.TypeOf((*DuplicateVsanNetworkInterface)(nil)).Elem() -} - -type DuplicateVsanNetworkInterfaceFault DuplicateVsanNetworkInterface - -func init() { - t["DuplicateVsanNetworkInterfaceFault"] = reflect.TypeOf((*DuplicateVsanNetworkInterfaceFault)(nil)).Elem() -} - -type DvpgImportEvent struct { - DVPortgroupEvent - - ImportType string `xml:"importType"` -} - -func init() { - t["DvpgImportEvent"] = reflect.TypeOf((*DvpgImportEvent)(nil)).Elem() -} - -type DvpgRestoreEvent struct { - DVPortgroupEvent -} - -func init() { - t["DvpgRestoreEvent"] = reflect.TypeOf((*DvpgRestoreEvent)(nil)).Elem() -} - -type DvsAcceptNetworkRuleAction struct { - DvsNetworkRuleAction -} - -func init() { - t["DvsAcceptNetworkRuleAction"] = reflect.TypeOf((*DvsAcceptNetworkRuleAction)(nil)).Elem() -} - -type DvsApplyOperationFault struct { - DvsFault - - ObjectFault []DvsApplyOperationFaultFaultOnObject `xml:"objectFault"` -} - -func init() { - t["DvsApplyOperationFault"] = reflect.TypeOf((*DvsApplyOperationFault)(nil)).Elem() -} - -type DvsApplyOperationFaultFault DvsApplyOperationFault - -func init() { - t["DvsApplyOperationFaultFault"] = reflect.TypeOf((*DvsApplyOperationFaultFault)(nil)).Elem() -} - -type DvsApplyOperationFaultFaultOnObject struct { - DynamicData - - ObjectId string `xml:"objectId"` - Type string `xml:"type"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["DvsApplyOperationFaultFaultOnObject"] = reflect.TypeOf((*DvsApplyOperationFaultFaultOnObject)(nil)).Elem() -} - -type DvsCopyNetworkRuleAction struct { - DvsNetworkRuleAction -} - -func init() { - t["DvsCopyNetworkRuleAction"] = reflect.TypeOf((*DvsCopyNetworkRuleAction)(nil)).Elem() -} - -type DvsCreatedEvent struct { - DvsEvent - - Parent FolderEventArgument `xml:"parent"` -} - -func init() { - t["DvsCreatedEvent"] = reflect.TypeOf((*DvsCreatedEvent)(nil)).Elem() -} - -type DvsDestroyedEvent struct { - DvsEvent -} - -func init() { - t["DvsDestroyedEvent"] = reflect.TypeOf((*DvsDestroyedEvent)(nil)).Elem() -} - -type DvsDropNetworkRuleAction struct { - DvsNetworkRuleAction -} - -func init() { - t["DvsDropNetworkRuleAction"] = reflect.TypeOf((*DvsDropNetworkRuleAction)(nil)).Elem() -} - -type DvsEvent struct { - Event -} - -func init() { - t["DvsEvent"] = reflect.TypeOf((*DvsEvent)(nil)).Elem() -} - -type DvsEventArgument struct { - EntityEventArgument - - Dvs ManagedObjectReference `xml:"dvs"` -} - -func init() { - t["DvsEventArgument"] = reflect.TypeOf((*DvsEventArgument)(nil)).Elem() -} - -type DvsFault struct { - VimFault -} - -func init() { - t["DvsFault"] = reflect.TypeOf((*DvsFault)(nil)).Elem() -} - -type DvsFaultFault BaseDvsFault - -func init() { - t["DvsFaultFault"] = reflect.TypeOf((*DvsFaultFault)(nil)).Elem() -} - -type DvsFilterConfig struct { - InheritablePolicy - - Key string `xml:"key,omitempty"` - AgentName string `xml:"agentName,omitempty"` - SlotNumber string `xml:"slotNumber,omitempty"` - Parameters *DvsFilterParameter `xml:"parameters,omitempty"` - OnFailure string `xml:"onFailure,omitempty"` -} - -func init() { - t["DvsFilterConfig"] = reflect.TypeOf((*DvsFilterConfig)(nil)).Elem() -} - -type DvsFilterConfigSpec struct { - DvsFilterConfig - - Operation string `xml:"operation"` -} - -func init() { - t["DvsFilterConfigSpec"] = reflect.TypeOf((*DvsFilterConfigSpec)(nil)).Elem() -} - -type DvsFilterParameter struct { - DynamicData - - Parameters []string `xml:"parameters,omitempty"` -} - -func init() { - t["DvsFilterParameter"] = reflect.TypeOf((*DvsFilterParameter)(nil)).Elem() -} - -type DvsFilterPolicy struct { - InheritablePolicy - - FilterConfig []BaseDvsFilterConfig `xml:"filterConfig,omitempty,typeattr"` -} - -func init() { - t["DvsFilterPolicy"] = reflect.TypeOf((*DvsFilterPolicy)(nil)).Elem() -} - -type DvsGreEncapNetworkRuleAction struct { - DvsNetworkRuleAction - - EncapsulationIp SingleIp `xml:"encapsulationIp"` -} - -func init() { - t["DvsGreEncapNetworkRuleAction"] = reflect.TypeOf((*DvsGreEncapNetworkRuleAction)(nil)).Elem() -} - -type DvsHealthStatusChangeEvent struct { - HostEvent - - SwitchUuid string `xml:"switchUuid"` - HealthResult BaseHostMemberHealthCheckResult `xml:"healthResult,omitempty,typeattr"` -} - -func init() { - t["DvsHealthStatusChangeEvent"] = reflect.TypeOf((*DvsHealthStatusChangeEvent)(nil)).Elem() -} - -type DvsHostBackInSyncEvent struct { - DvsEvent - - HostBackInSync HostEventArgument `xml:"hostBackInSync"` -} - -func init() { - t["DvsHostBackInSyncEvent"] = reflect.TypeOf((*DvsHostBackInSyncEvent)(nil)).Elem() -} - -type DvsHostInfrastructureTrafficResource struct { - DynamicData - - Key string `xml:"key"` - Description string `xml:"description,omitempty"` - AllocationInfo DvsHostInfrastructureTrafficResourceAllocation `xml:"allocationInfo"` -} - -func init() { - t["DvsHostInfrastructureTrafficResource"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResource)(nil)).Elem() -} - -type DvsHostInfrastructureTrafficResourceAllocation struct { - DynamicData - - Limit *int64 `xml:"limit"` - Shares *SharesInfo `xml:"shares,omitempty"` - Reservation *int64 `xml:"reservation"` -} - -func init() { - t["DvsHostInfrastructureTrafficResourceAllocation"] = reflect.TypeOf((*DvsHostInfrastructureTrafficResourceAllocation)(nil)).Elem() -} - -type DvsHostJoinedEvent struct { - DvsEvent - - HostJoined HostEventArgument `xml:"hostJoined"` -} - -func init() { - t["DvsHostJoinedEvent"] = reflect.TypeOf((*DvsHostJoinedEvent)(nil)).Elem() -} - -type DvsHostLeftEvent struct { - DvsEvent - - HostLeft HostEventArgument `xml:"hostLeft"` -} - -func init() { - t["DvsHostLeftEvent"] = reflect.TypeOf((*DvsHostLeftEvent)(nil)).Elem() -} - -type DvsHostStatusUpdated struct { - DvsEvent - - HostMember HostEventArgument `xml:"hostMember"` - OldStatus string `xml:"oldStatus,omitempty"` - NewStatus string `xml:"newStatus,omitempty"` - OldStatusDetail string `xml:"oldStatusDetail,omitempty"` - NewStatusDetail string `xml:"newStatusDetail,omitempty"` -} - -func init() { - t["DvsHostStatusUpdated"] = reflect.TypeOf((*DvsHostStatusUpdated)(nil)).Elem() -} - -type DvsHostVNicProfile struct { - DvsVNicProfile -} - -func init() { - t["DvsHostVNicProfile"] = reflect.TypeOf((*DvsHostVNicProfile)(nil)).Elem() -} - -type DvsHostWentOutOfSyncEvent struct { - DvsEvent - - HostOutOfSync DvsOutOfSyncHostArgument `xml:"hostOutOfSync"` -} - -func init() { - t["DvsHostWentOutOfSyncEvent"] = reflect.TypeOf((*DvsHostWentOutOfSyncEvent)(nil)).Elem() -} - -type DvsImportEvent struct { - DvsEvent - - ImportType string `xml:"importType"` -} - -func init() { - t["DvsImportEvent"] = reflect.TypeOf((*DvsImportEvent)(nil)).Elem() -} - -type DvsIpNetworkRuleQualifier struct { - DvsNetworkRuleQualifier - - SourceAddress BaseIpAddress `xml:"sourceAddress,omitempty,typeattr"` - DestinationAddress BaseIpAddress `xml:"destinationAddress,omitempty,typeattr"` - Protocol *IntExpression `xml:"protocol,omitempty"` - SourceIpPort BaseDvsIpPort `xml:"sourceIpPort,omitempty,typeattr"` - DestinationIpPort BaseDvsIpPort `xml:"destinationIpPort,omitempty,typeattr"` - TcpFlags *IntExpression `xml:"tcpFlags,omitempty"` -} - -func init() { - t["DvsIpNetworkRuleQualifier"] = reflect.TypeOf((*DvsIpNetworkRuleQualifier)(nil)).Elem() -} - -type DvsIpPort struct { - NegatableExpression -} - -func init() { - t["DvsIpPort"] = reflect.TypeOf((*DvsIpPort)(nil)).Elem() -} - -type DvsIpPortRange struct { - DvsIpPort - - StartPortNumber int32 `xml:"startPortNumber"` - EndPortNumber int32 `xml:"endPortNumber"` -} - -func init() { - t["DvsIpPortRange"] = reflect.TypeOf((*DvsIpPortRange)(nil)).Elem() -} - -type DvsLogNetworkRuleAction struct { - DvsNetworkRuleAction -} - -func init() { - t["DvsLogNetworkRuleAction"] = reflect.TypeOf((*DvsLogNetworkRuleAction)(nil)).Elem() -} - -type DvsMacNetworkRuleQualifier struct { - DvsNetworkRuleQualifier - - SourceAddress BaseMacAddress `xml:"sourceAddress,omitempty,typeattr"` - DestinationAddress BaseMacAddress `xml:"destinationAddress,omitempty,typeattr"` - Protocol *IntExpression `xml:"protocol,omitempty"` - VlanId *IntExpression `xml:"vlanId,omitempty"` -} - -func init() { - t["DvsMacNetworkRuleQualifier"] = reflect.TypeOf((*DvsMacNetworkRuleQualifier)(nil)).Elem() -} - -type DvsMacRewriteNetworkRuleAction struct { - DvsNetworkRuleAction - - RewriteMac string `xml:"rewriteMac"` -} - -func init() { - t["DvsMacRewriteNetworkRuleAction"] = reflect.TypeOf((*DvsMacRewriteNetworkRuleAction)(nil)).Elem() -} - -type DvsMergedEvent struct { - DvsEvent - - SourceDvs DvsEventArgument `xml:"sourceDvs"` - DestinationDvs DvsEventArgument `xml:"destinationDvs"` -} - -func init() { - t["DvsMergedEvent"] = reflect.TypeOf((*DvsMergedEvent)(nil)).Elem() -} - -type DvsNetworkRuleAction struct { - DynamicData -} - -func init() { - t["DvsNetworkRuleAction"] = reflect.TypeOf((*DvsNetworkRuleAction)(nil)).Elem() -} - -type DvsNetworkRuleQualifier struct { - DynamicData - - Key string `xml:"key,omitempty"` -} - -func init() { - t["DvsNetworkRuleQualifier"] = reflect.TypeOf((*DvsNetworkRuleQualifier)(nil)).Elem() -} - -type DvsNotAuthorized struct { - DvsFault - - SessionExtensionKey string `xml:"sessionExtensionKey,omitempty"` - DvsExtensionKey string `xml:"dvsExtensionKey,omitempty"` -} - -func init() { - t["DvsNotAuthorized"] = reflect.TypeOf((*DvsNotAuthorized)(nil)).Elem() -} - -type DvsNotAuthorizedFault DvsNotAuthorized - -func init() { - t["DvsNotAuthorizedFault"] = reflect.TypeOf((*DvsNotAuthorizedFault)(nil)).Elem() -} - -type DvsOperationBulkFault struct { - DvsFault - - HostFault []DvsOperationBulkFaultFaultOnHost `xml:"hostFault"` -} - -func init() { - t["DvsOperationBulkFault"] = reflect.TypeOf((*DvsOperationBulkFault)(nil)).Elem() -} - -type DvsOperationBulkFaultFault DvsOperationBulkFault - -func init() { - t["DvsOperationBulkFaultFault"] = reflect.TypeOf((*DvsOperationBulkFaultFault)(nil)).Elem() -} - -type DvsOperationBulkFaultFaultOnHost struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["DvsOperationBulkFaultFaultOnHost"] = reflect.TypeOf((*DvsOperationBulkFaultFaultOnHost)(nil)).Elem() -} - -type DvsOutOfSyncHostArgument struct { - DynamicData - - OutOfSyncHost HostEventArgument `xml:"outOfSyncHost"` - ConfigParamters []string `xml:"configParamters"` -} - -func init() { - t["DvsOutOfSyncHostArgument"] = reflect.TypeOf((*DvsOutOfSyncHostArgument)(nil)).Elem() -} - -type DvsPortBlockedEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - StatusDetail string `xml:"statusDetail,omitempty"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` - PrevBlockState string `xml:"prevBlockState,omitempty"` -} - -func init() { - t["DvsPortBlockedEvent"] = reflect.TypeOf((*DvsPortBlockedEvent)(nil)).Elem() -} - -type DvsPortConnectedEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` -} - -func init() { - t["DvsPortConnectedEvent"] = reflect.TypeOf((*DvsPortConnectedEvent)(nil)).Elem() -} - -type DvsPortCreatedEvent struct { - DvsEvent - - PortKey []string `xml:"portKey"` -} - -func init() { - t["DvsPortCreatedEvent"] = reflect.TypeOf((*DvsPortCreatedEvent)(nil)).Elem() -} - -type DvsPortDeletedEvent struct { - DvsEvent - - PortKey []string `xml:"portKey"` -} - -func init() { - t["DvsPortDeletedEvent"] = reflect.TypeOf((*DvsPortDeletedEvent)(nil)).Elem() -} - -type DvsPortDisconnectedEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - Connectee *DistributedVirtualSwitchPortConnectee `xml:"connectee,omitempty"` -} - -func init() { - t["DvsPortDisconnectedEvent"] = reflect.TypeOf((*DvsPortDisconnectedEvent)(nil)).Elem() -} - -type DvsPortEnteredPassthruEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` -} - -func init() { - t["DvsPortEnteredPassthruEvent"] = reflect.TypeOf((*DvsPortEnteredPassthruEvent)(nil)).Elem() -} - -type DvsPortExitedPassthruEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` -} - -func init() { - t["DvsPortExitedPassthruEvent"] = reflect.TypeOf((*DvsPortExitedPassthruEvent)(nil)).Elem() -} - -type DvsPortJoinPortgroupEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - PortgroupKey string `xml:"portgroupKey"` - PortgroupName string `xml:"portgroupName"` -} - -func init() { - t["DvsPortJoinPortgroupEvent"] = reflect.TypeOf((*DvsPortJoinPortgroupEvent)(nil)).Elem() -} - -type DvsPortLeavePortgroupEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - PortgroupKey string `xml:"portgroupKey"` - PortgroupName string `xml:"portgroupName"` -} - -func init() { - t["DvsPortLeavePortgroupEvent"] = reflect.TypeOf((*DvsPortLeavePortgroupEvent)(nil)).Elem() -} - -type DvsPortLinkDownEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` -} - -func init() { - t["DvsPortLinkDownEvent"] = reflect.TypeOf((*DvsPortLinkDownEvent)(nil)).Elem() -} - -type DvsPortLinkUpEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` -} - -func init() { - t["DvsPortLinkUpEvent"] = reflect.TypeOf((*DvsPortLinkUpEvent)(nil)).Elem() -} - -type DvsPortReconfiguredEvent struct { - DvsEvent - - PortKey []string `xml:"portKey"` - ConfigChanges []ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["DvsPortReconfiguredEvent"] = reflect.TypeOf((*DvsPortReconfiguredEvent)(nil)).Elem() -} - -type DvsPortRuntimeChangeEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo DVPortStatus `xml:"runtimeInfo"` -} - -func init() { - t["DvsPortRuntimeChangeEvent"] = reflect.TypeOf((*DvsPortRuntimeChangeEvent)(nil)).Elem() -} - -type DvsPortUnblockedEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` - RuntimeInfo *DVPortStatus `xml:"runtimeInfo,omitempty"` - PrevBlockState string `xml:"prevBlockState,omitempty"` -} - -func init() { - t["DvsPortUnblockedEvent"] = reflect.TypeOf((*DvsPortUnblockedEvent)(nil)).Elem() -} - -type DvsPortVendorSpecificStateChangeEvent struct { - DvsEvent - - PortKey string `xml:"portKey"` -} - -func init() { - t["DvsPortVendorSpecificStateChangeEvent"] = reflect.TypeOf((*DvsPortVendorSpecificStateChangeEvent)(nil)).Elem() -} - -type DvsProfile struct { - ApplyProfile - - Key string `xml:"key"` - Name string `xml:"name"` - Uplink []PnicUplinkProfile `xml:"uplink,omitempty"` -} - -func init() { - t["DvsProfile"] = reflect.TypeOf((*DvsProfile)(nil)).Elem() -} - -type DvsPuntNetworkRuleAction struct { - DvsNetworkRuleAction -} - -func init() { - t["DvsPuntNetworkRuleAction"] = reflect.TypeOf((*DvsPuntNetworkRuleAction)(nil)).Elem() -} - -type DvsRateLimitNetworkRuleAction struct { - DvsNetworkRuleAction - - PacketsPerSecond int32 `xml:"packetsPerSecond"` -} - -func init() { - t["DvsRateLimitNetworkRuleAction"] = reflect.TypeOf((*DvsRateLimitNetworkRuleAction)(nil)).Elem() -} - -type DvsReconfigureVmVnicNetworkResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec []DvsVmVnicResourcePoolConfigSpec `xml:"configSpec"` -} - -func init() { - t["DvsReconfigureVmVnicNetworkResourcePoolRequestType"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePoolRequestType)(nil)).Elem() -} - -type DvsReconfigureVmVnicNetworkResourcePool_Task DvsReconfigureVmVnicNetworkResourcePoolRequestType - -func init() { - t["DvsReconfigureVmVnicNetworkResourcePool_Task"] = reflect.TypeOf((*DvsReconfigureVmVnicNetworkResourcePool_Task)(nil)).Elem() -} - -type DvsReconfigureVmVnicNetworkResourcePool_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DvsReconfiguredEvent struct { - DvsEvent - - ConfigSpec BaseDVSConfigSpec `xml:"configSpec,typeattr"` - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["DvsReconfiguredEvent"] = reflect.TypeOf((*DvsReconfiguredEvent)(nil)).Elem() -} - -type DvsRenamedEvent struct { - DvsEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["DvsRenamedEvent"] = reflect.TypeOf((*DvsRenamedEvent)(nil)).Elem() -} - -type DvsResourceRuntimeInfo struct { - DynamicData - - Capacity int32 `xml:"capacity,omitempty"` - Usage int32 `xml:"usage,omitempty"` - Available int32 `xml:"available,omitempty"` - AllocatedResource []DvsVnicAllocatedResource `xml:"allocatedResource,omitempty"` - VmVnicNetworkResourcePoolRuntime []DvsVmVnicNetworkResourcePoolRuntimeInfo `xml:"vmVnicNetworkResourcePoolRuntime,omitempty"` -} - -func init() { - t["DvsResourceRuntimeInfo"] = reflect.TypeOf((*DvsResourceRuntimeInfo)(nil)).Elem() -} - -type DvsRestoreEvent struct { - DvsEvent -} - -func init() { - t["DvsRestoreEvent"] = reflect.TypeOf((*DvsRestoreEvent)(nil)).Elem() -} - -type DvsScopeViolated struct { - DvsFault - - Scope []ManagedObjectReference `xml:"scope"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["DvsScopeViolated"] = reflect.TypeOf((*DvsScopeViolated)(nil)).Elem() -} - -type DvsScopeViolatedFault DvsScopeViolated - -func init() { - t["DvsScopeViolatedFault"] = reflect.TypeOf((*DvsScopeViolatedFault)(nil)).Elem() -} - -type DvsServiceConsoleVNicProfile struct { - DvsVNicProfile -} - -func init() { - t["DvsServiceConsoleVNicProfile"] = reflect.TypeOf((*DvsServiceConsoleVNicProfile)(nil)).Elem() -} - -type DvsSingleIpPort struct { - DvsIpPort - - PortNumber int32 `xml:"portNumber"` -} - -func init() { - t["DvsSingleIpPort"] = reflect.TypeOf((*DvsSingleIpPort)(nil)).Elem() -} - -type DvsSystemTrafficNetworkRuleQualifier struct { - DvsNetworkRuleQualifier - - TypeOfSystemTraffic *StringExpression `xml:"typeOfSystemTraffic,omitempty"` -} - -func init() { - t["DvsSystemTrafficNetworkRuleQualifier"] = reflect.TypeOf((*DvsSystemTrafficNetworkRuleQualifier)(nil)).Elem() -} - -type DvsTrafficFilterConfig struct { - DvsFilterConfig - - TrafficRuleset *DvsTrafficRuleset `xml:"trafficRuleset,omitempty"` -} - -func init() { - t["DvsTrafficFilterConfig"] = reflect.TypeOf((*DvsTrafficFilterConfig)(nil)).Elem() -} - -type DvsTrafficFilterConfigSpec struct { - DvsTrafficFilterConfig - - Operation string `xml:"operation"` -} - -func init() { - t["DvsTrafficFilterConfigSpec"] = reflect.TypeOf((*DvsTrafficFilterConfigSpec)(nil)).Elem() -} - -type DvsTrafficRule struct { - DynamicData - - Key string `xml:"key,omitempty"` - Description string `xml:"description,omitempty"` - Sequence int32 `xml:"sequence,omitempty"` - Qualifier []BaseDvsNetworkRuleQualifier `xml:"qualifier,omitempty,typeattr"` - Action BaseDvsNetworkRuleAction `xml:"action,omitempty,typeattr"` - Direction string `xml:"direction,omitempty"` -} - -func init() { - t["DvsTrafficRule"] = reflect.TypeOf((*DvsTrafficRule)(nil)).Elem() -} - -type DvsTrafficRuleset struct { - DynamicData - - Key string `xml:"key,omitempty"` - Enabled *bool `xml:"enabled"` - Precedence int32 `xml:"precedence,omitempty"` - Rules []DvsTrafficRule `xml:"rules,omitempty"` -} - -func init() { - t["DvsTrafficRuleset"] = reflect.TypeOf((*DvsTrafficRuleset)(nil)).Elem() -} - -type DvsUpdateTagNetworkRuleAction struct { - DvsNetworkRuleAction - - QosTag int32 `xml:"qosTag,omitempty"` - DscpTag int32 `xml:"dscpTag,omitempty"` -} - -func init() { - t["DvsUpdateTagNetworkRuleAction"] = reflect.TypeOf((*DvsUpdateTagNetworkRuleAction)(nil)).Elem() -} - -type DvsUpgradeAvailableEvent struct { - DvsEvent - - ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` -} - -func init() { - t["DvsUpgradeAvailableEvent"] = reflect.TypeOf((*DvsUpgradeAvailableEvent)(nil)).Elem() -} - -type DvsUpgradeInProgressEvent struct { - DvsEvent - - ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` -} - -func init() { - t["DvsUpgradeInProgressEvent"] = reflect.TypeOf((*DvsUpgradeInProgressEvent)(nil)).Elem() -} - -type DvsUpgradeRejectedEvent struct { - DvsEvent - - ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` -} - -func init() { - t["DvsUpgradeRejectedEvent"] = reflect.TypeOf((*DvsUpgradeRejectedEvent)(nil)).Elem() -} - -type DvsUpgradedEvent struct { - DvsEvent - - ProductInfo DistributedVirtualSwitchProductSpec `xml:"productInfo"` -} - -func init() { - t["DvsUpgradedEvent"] = reflect.TypeOf((*DvsUpgradedEvent)(nil)).Elem() -} - -type DvsVNicProfile struct { - ApplyProfile - - Key string `xml:"key"` - IpConfig IpAddressProfile `xml:"ipConfig"` -} - -func init() { - t["DvsVNicProfile"] = reflect.TypeOf((*DvsVNicProfile)(nil)).Elem() -} - -type DvsVmVnicNetworkResourcePoolRuntimeInfo struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name,omitempty"` - Capacity int32 `xml:"capacity,omitempty"` - Usage int32 `xml:"usage,omitempty"` - Available int32 `xml:"available,omitempty"` - Status string `xml:"status"` - AllocatedResource []DvsVnicAllocatedResource `xml:"allocatedResource,omitempty"` -} - -func init() { - t["DvsVmVnicNetworkResourcePoolRuntimeInfo"] = reflect.TypeOf((*DvsVmVnicNetworkResourcePoolRuntimeInfo)(nil)).Elem() -} - -type DvsVmVnicResourceAllocation struct { - DynamicData - - ReservationQuota int64 `xml:"reservationQuota,omitempty"` -} - -func init() { - t["DvsVmVnicResourceAllocation"] = reflect.TypeOf((*DvsVmVnicResourceAllocation)(nil)).Elem() -} - -type DvsVmVnicResourcePoolConfigSpec struct { - DynamicData - - Operation string `xml:"operation"` - Key string `xml:"key,omitempty"` - ConfigVersion string `xml:"configVersion,omitempty"` - AllocationInfo *DvsVmVnicResourceAllocation `xml:"allocationInfo,omitempty"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["DvsVmVnicResourcePoolConfigSpec"] = reflect.TypeOf((*DvsVmVnicResourcePoolConfigSpec)(nil)).Elem() -} - -type DvsVnicAllocatedResource struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - VnicKey string `xml:"vnicKey"` - Reservation *int64 `xml:"reservation"` -} - -func init() { - t["DvsVnicAllocatedResource"] = reflect.TypeOf((*DvsVnicAllocatedResource)(nil)).Elem() -} - -type DynamicArray struct { - Val []AnyType `xml:"val,typeattr"` -} - -func init() { - t["DynamicArray"] = reflect.TypeOf((*DynamicArray)(nil)).Elem() -} - -type DynamicData struct { -} - -func init() { - t["DynamicData"] = reflect.TypeOf((*DynamicData)(nil)).Elem() -} - -type DynamicProperty struct { - Name string `xml:"name"` - Val AnyType `xml:"val,typeattr"` -} - -func init() { - t["DynamicProperty"] = reflect.TypeOf((*DynamicProperty)(nil)).Elem() -} - -type EVCAdmissionFailed struct { - NotSupportedHostInCluster - - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["EVCAdmissionFailed"] = reflect.TypeOf((*EVCAdmissionFailed)(nil)).Elem() -} - -type EVCAdmissionFailedCPUFeaturesForMode struct { - EVCAdmissionFailed - - CurrentEVCModeKey string `xml:"currentEVCModeKey"` -} - -func init() { - t["EVCAdmissionFailedCPUFeaturesForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForMode)(nil)).Elem() -} - -type EVCAdmissionFailedCPUFeaturesForModeFault EVCAdmissionFailedCPUFeaturesForMode - -func init() { - t["EVCAdmissionFailedCPUFeaturesForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUFeaturesForModeFault)(nil)).Elem() -} - -type EVCAdmissionFailedCPUModel struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedCPUModel"] = reflect.TypeOf((*EVCAdmissionFailedCPUModel)(nil)).Elem() -} - -type EVCAdmissionFailedCPUModelFault EVCAdmissionFailedCPUModel - -func init() { - t["EVCAdmissionFailedCPUModelFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelFault)(nil)).Elem() -} - -type EVCAdmissionFailedCPUModelForMode struct { - EVCAdmissionFailed - - CurrentEVCModeKey string `xml:"currentEVCModeKey"` -} - -func init() { - t["EVCAdmissionFailedCPUModelForMode"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForMode)(nil)).Elem() -} - -type EVCAdmissionFailedCPUModelForModeFault EVCAdmissionFailedCPUModelForMode - -func init() { - t["EVCAdmissionFailedCPUModelForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUModelForModeFault)(nil)).Elem() -} - -type EVCAdmissionFailedCPUVendor struct { - EVCAdmissionFailed - - ClusterCPUVendor string `xml:"clusterCPUVendor"` - HostCPUVendor string `xml:"hostCPUVendor"` -} - -func init() { - t["EVCAdmissionFailedCPUVendor"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendor)(nil)).Elem() -} - -type EVCAdmissionFailedCPUVendorFault EVCAdmissionFailedCPUVendor - -func init() { - t["EVCAdmissionFailedCPUVendorFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorFault)(nil)).Elem() -} - -type EVCAdmissionFailedCPUVendorUnknown struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedCPUVendorUnknown"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknown)(nil)).Elem() -} - -type EVCAdmissionFailedCPUVendorUnknownFault EVCAdmissionFailedCPUVendorUnknown - -func init() { - t["EVCAdmissionFailedCPUVendorUnknownFault"] = reflect.TypeOf((*EVCAdmissionFailedCPUVendorUnknownFault)(nil)).Elem() -} - -type EVCAdmissionFailedFault BaseEVCAdmissionFailed - -func init() { - t["EVCAdmissionFailedFault"] = reflect.TypeOf((*EVCAdmissionFailedFault)(nil)).Elem() -} - -type EVCAdmissionFailedHostDisconnected struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedHostDisconnected"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnected)(nil)).Elem() -} - -type EVCAdmissionFailedHostDisconnectedFault EVCAdmissionFailedHostDisconnected - -func init() { - t["EVCAdmissionFailedHostDisconnectedFault"] = reflect.TypeOf((*EVCAdmissionFailedHostDisconnectedFault)(nil)).Elem() -} - -type EVCAdmissionFailedHostSoftware struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedHostSoftware"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftware)(nil)).Elem() -} - -type EVCAdmissionFailedHostSoftwareFault EVCAdmissionFailedHostSoftware - -func init() { - t["EVCAdmissionFailedHostSoftwareFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareFault)(nil)).Elem() -} - -type EVCAdmissionFailedHostSoftwareForMode struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedHostSoftwareForMode"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForMode)(nil)).Elem() -} - -type EVCAdmissionFailedHostSoftwareForModeFault EVCAdmissionFailedHostSoftwareForMode - -func init() { - t["EVCAdmissionFailedHostSoftwareForModeFault"] = reflect.TypeOf((*EVCAdmissionFailedHostSoftwareForModeFault)(nil)).Elem() -} - -type EVCAdmissionFailedVmActive struct { - EVCAdmissionFailed -} - -func init() { - t["EVCAdmissionFailedVmActive"] = reflect.TypeOf((*EVCAdmissionFailedVmActive)(nil)).Elem() -} - -type EVCAdmissionFailedVmActiveFault EVCAdmissionFailedVmActive - -func init() { - t["EVCAdmissionFailedVmActiveFault"] = reflect.TypeOf((*EVCAdmissionFailedVmActiveFault)(nil)).Elem() -} - -type EVCConfigFault struct { - VimFault - - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["EVCConfigFault"] = reflect.TypeOf((*EVCConfigFault)(nil)).Elem() -} - -type EVCConfigFaultFault BaseEVCConfigFault - -func init() { - t["EVCConfigFaultFault"] = reflect.TypeOf((*EVCConfigFaultFault)(nil)).Elem() -} - -type EVCMode struct { - ElementDescription - - GuaranteedCPUFeatures []HostCpuIdInfo `xml:"guaranteedCPUFeatures,omitempty"` - FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` - FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` - FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` - Vendor string `xml:"vendor"` - Track []string `xml:"track,omitempty"` - VendorTier int32 `xml:"vendorTier"` -} - -func init() { - t["EVCMode"] = reflect.TypeOf((*EVCMode)(nil)).Elem() -} - -type EVCModeIllegalByVendor struct { - EVCConfigFault - - ClusterCPUVendor string `xml:"clusterCPUVendor"` - ModeCPUVendor string `xml:"modeCPUVendor"` -} - -func init() { - t["EVCModeIllegalByVendor"] = reflect.TypeOf((*EVCModeIllegalByVendor)(nil)).Elem() -} - -type EVCModeIllegalByVendorFault EVCModeIllegalByVendor - -func init() { - t["EVCModeIllegalByVendorFault"] = reflect.TypeOf((*EVCModeIllegalByVendorFault)(nil)).Elem() -} - -type EVCModeUnsupportedByHosts struct { - EVCConfigFault - - EvcMode string `xml:"evcMode,omitempty"` - Host []ManagedObjectReference `xml:"host,omitempty"` - HostName []string `xml:"hostName,omitempty"` -} - -func init() { - t["EVCModeUnsupportedByHosts"] = reflect.TypeOf((*EVCModeUnsupportedByHosts)(nil)).Elem() -} - -type EVCModeUnsupportedByHostsFault EVCModeUnsupportedByHosts - -func init() { - t["EVCModeUnsupportedByHostsFault"] = reflect.TypeOf((*EVCModeUnsupportedByHostsFault)(nil)).Elem() -} - -type EVCUnsupportedByHostHardware struct { - EVCConfigFault - - Host []ManagedObjectReference `xml:"host"` - HostName []string `xml:"hostName"` -} - -func init() { - t["EVCUnsupportedByHostHardware"] = reflect.TypeOf((*EVCUnsupportedByHostHardware)(nil)).Elem() -} - -type EVCUnsupportedByHostHardwareFault EVCUnsupportedByHostHardware - -func init() { - t["EVCUnsupportedByHostHardwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostHardwareFault)(nil)).Elem() -} - -type EVCUnsupportedByHostSoftware struct { - EVCConfigFault - - Host []ManagedObjectReference `xml:"host"` - HostName []string `xml:"hostName"` -} - -func init() { - t["EVCUnsupportedByHostSoftware"] = reflect.TypeOf((*EVCUnsupportedByHostSoftware)(nil)).Elem() -} - -type EVCUnsupportedByHostSoftwareFault EVCUnsupportedByHostSoftware - -func init() { - t["EVCUnsupportedByHostSoftwareFault"] = reflect.TypeOf((*EVCUnsupportedByHostSoftwareFault)(nil)).Elem() -} - -type EagerZeroVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["EagerZeroVirtualDiskRequestType"] = reflect.TypeOf((*EagerZeroVirtualDiskRequestType)(nil)).Elem() -} - -type EagerZeroVirtualDisk_Task EagerZeroVirtualDiskRequestType - -func init() { - t["EagerZeroVirtualDisk_Task"] = reflect.TypeOf((*EagerZeroVirtualDisk_Task)(nil)).Elem() -} - -type EagerZeroVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type EightHostLimitViolated struct { - VmConfigFault -} - -func init() { - t["EightHostLimitViolated"] = reflect.TypeOf((*EightHostLimitViolated)(nil)).Elem() -} - -type EightHostLimitViolatedFault EightHostLimitViolated - -func init() { - t["EightHostLimitViolatedFault"] = reflect.TypeOf((*EightHostLimitViolatedFault)(nil)).Elem() -} - -type ElementDescription struct { - Description - - Key string `xml:"key"` -} - -func init() { - t["ElementDescription"] = reflect.TypeOf((*ElementDescription)(nil)).Elem() -} - -type EnableAlarm EnableAlarmRequestType - -func init() { - t["EnableAlarm"] = reflect.TypeOf((*EnableAlarm)(nil)).Elem() -} - -type EnableAlarmActions EnableAlarmActionsRequestType - -func init() { - t["EnableAlarmActions"] = reflect.TypeOf((*EnableAlarmActions)(nil)).Elem() -} - -type EnableAlarmActionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Enabled bool `xml:"enabled"` -} - -func init() { - t["EnableAlarmActionsRequestType"] = reflect.TypeOf((*EnableAlarmActionsRequestType)(nil)).Elem() -} - -type EnableAlarmActionsResponse struct { -} - -type EnableAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Alarm ManagedObjectReference `xml:"alarm"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["EnableAlarmRequestType"] = reflect.TypeOf((*EnableAlarmRequestType)(nil)).Elem() -} - -type EnableAlarmResponse struct { -} - -type EnableClusteredVmdkSupport EnableClusteredVmdkSupportRequestType - -func init() { - t["EnableClusteredVmdkSupport"] = reflect.TypeOf((*EnableClusteredVmdkSupport)(nil)).Elem() -} - -type EnableClusteredVmdkSupportRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["EnableClusteredVmdkSupportRequestType"] = reflect.TypeOf((*EnableClusteredVmdkSupportRequestType)(nil)).Elem() -} - -type EnableClusteredVmdkSupportResponse struct { -} - -type EnableCrypto EnableCryptoRequestType - -func init() { - t["EnableCrypto"] = reflect.TypeOf((*EnableCrypto)(nil)).Elem() -} - -type EnableCryptoRequestType struct { - This ManagedObjectReference `xml:"_this"` - KeyPlain CryptoKeyPlain `xml:"keyPlain"` -} - -func init() { - t["EnableCryptoRequestType"] = reflect.TypeOf((*EnableCryptoRequestType)(nil)).Elem() -} - -type EnableCryptoResponse struct { -} - -type EnableFeature EnableFeatureRequestType - -func init() { - t["EnableFeature"] = reflect.TypeOf((*EnableFeature)(nil)).Elem() -} - -type EnableFeatureRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - FeatureKey string `xml:"featureKey"` -} - -func init() { - t["EnableFeatureRequestType"] = reflect.TypeOf((*EnableFeatureRequestType)(nil)).Elem() -} - -type EnableFeatureResponse struct { - Returnval bool `xml:"returnval"` -} - -type EnableHyperThreading EnableHyperThreadingRequestType - -func init() { - t["EnableHyperThreading"] = reflect.TypeOf((*EnableHyperThreading)(nil)).Elem() -} - -type EnableHyperThreadingRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["EnableHyperThreadingRequestType"] = reflect.TypeOf((*EnableHyperThreadingRequestType)(nil)).Elem() -} - -type EnableHyperThreadingResponse struct { -} - -type EnableMultipathPath EnableMultipathPathRequestType - -func init() { - t["EnableMultipathPath"] = reflect.TypeOf((*EnableMultipathPath)(nil)).Elem() -} - -type EnableMultipathPathRequestType struct { - This ManagedObjectReference `xml:"_this"` - PathName string `xml:"pathName"` -} - -func init() { - t["EnableMultipathPathRequestType"] = reflect.TypeOf((*EnableMultipathPathRequestType)(nil)).Elem() -} - -type EnableMultipathPathResponse struct { -} - -type EnableNetworkResourceManagement EnableNetworkResourceManagementRequestType - -func init() { - t["EnableNetworkResourceManagement"] = reflect.TypeOf((*EnableNetworkResourceManagement)(nil)).Elem() -} - -type EnableNetworkResourceManagementRequestType struct { - This ManagedObjectReference `xml:"_this"` - Enable bool `xml:"enable"` -} - -func init() { - t["EnableNetworkResourceManagementRequestType"] = reflect.TypeOf((*EnableNetworkResourceManagementRequestType)(nil)).Elem() -} - -type EnableNetworkResourceManagementResponse struct { -} - -type EnableRuleset EnableRulesetRequestType - -func init() { - t["EnableRuleset"] = reflect.TypeOf((*EnableRuleset)(nil)).Elem() -} - -type EnableRulesetRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["EnableRulesetRequestType"] = reflect.TypeOf((*EnableRulesetRequestType)(nil)).Elem() -} - -type EnableRulesetResponse struct { -} - -type EnableSecondaryVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["EnableSecondaryVMRequestType"] = reflect.TypeOf((*EnableSecondaryVMRequestType)(nil)).Elem() -} - -type EnableSecondaryVM_Task EnableSecondaryVMRequestType - -func init() { - t["EnableSecondaryVM_Task"] = reflect.TypeOf((*EnableSecondaryVM_Task)(nil)).Elem() -} - -type EnableSecondaryVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type EnableSmartCardAuthentication EnableSmartCardAuthenticationRequestType - -func init() { - t["EnableSmartCardAuthentication"] = reflect.TypeOf((*EnableSmartCardAuthentication)(nil)).Elem() -} - -type EnableSmartCardAuthenticationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["EnableSmartCardAuthenticationRequestType"] = reflect.TypeOf((*EnableSmartCardAuthenticationRequestType)(nil)).Elem() -} - -type EnableSmartCardAuthenticationResponse struct { -} - -type EncryptionKeyRequired struct { - InvalidState - - RequiredKey []CryptoKeyId `xml:"requiredKey,omitempty"` -} - -func init() { - t["EncryptionKeyRequired"] = reflect.TypeOf((*EncryptionKeyRequired)(nil)).Elem() -} - -type EncryptionKeyRequiredFault EncryptionKeyRequired - -func init() { - t["EncryptionKeyRequiredFault"] = reflect.TypeOf((*EncryptionKeyRequiredFault)(nil)).Elem() -} - -type EnterLockdownMode EnterLockdownModeRequestType - -func init() { - t["EnterLockdownMode"] = reflect.TypeOf((*EnterLockdownMode)(nil)).Elem() -} - -type EnterLockdownModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["EnterLockdownModeRequestType"] = reflect.TypeOf((*EnterLockdownModeRequestType)(nil)).Elem() -} - -type EnterLockdownModeResponse struct { -} - -type EnterMaintenanceModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Timeout int32 `xml:"timeout"` - EvacuatePoweredOffVms *bool `xml:"evacuatePoweredOffVms"` - MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` -} - -func init() { - t["EnterMaintenanceModeRequestType"] = reflect.TypeOf((*EnterMaintenanceModeRequestType)(nil)).Elem() -} - -type EnterMaintenanceMode_Task EnterMaintenanceModeRequestType - -func init() { - t["EnterMaintenanceMode_Task"] = reflect.TypeOf((*EnterMaintenanceMode_Task)(nil)).Elem() -} - -type EnterMaintenanceMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type EnteredMaintenanceModeEvent struct { - HostEvent -} - -func init() { - t["EnteredMaintenanceModeEvent"] = reflect.TypeOf((*EnteredMaintenanceModeEvent)(nil)).Elem() -} - -type EnteredStandbyModeEvent struct { - HostEvent -} - -func init() { - t["EnteredStandbyModeEvent"] = reflect.TypeOf((*EnteredStandbyModeEvent)(nil)).Elem() -} - -type EnteringMaintenanceModeEvent struct { - HostEvent -} - -func init() { - t["EnteringMaintenanceModeEvent"] = reflect.TypeOf((*EnteringMaintenanceModeEvent)(nil)).Elem() -} - -type EnteringStandbyModeEvent struct { - HostEvent -} - -func init() { - t["EnteringStandbyModeEvent"] = reflect.TypeOf((*EnteringStandbyModeEvent)(nil)).Elem() -} - -type EntityBackup struct { - DynamicData -} - -func init() { - t["EntityBackup"] = reflect.TypeOf((*EntityBackup)(nil)).Elem() -} - -type EntityBackupConfig struct { - DynamicData - - EntityType string `xml:"entityType"` - ConfigBlob []byte `xml:"configBlob"` - Key string `xml:"key,omitempty"` - Name string `xml:"name,omitempty"` - Container *ManagedObjectReference `xml:"container,omitempty"` - ConfigVersion string `xml:"configVersion,omitempty"` -} - -func init() { - t["EntityBackupConfig"] = reflect.TypeOf((*EntityBackupConfig)(nil)).Elem() -} - -type EntityEventArgument struct { - EventArgument - - Name string `xml:"name"` -} - -func init() { - t["EntityEventArgument"] = reflect.TypeOf((*EntityEventArgument)(nil)).Elem() -} - -type EntityPrivilege struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - PrivAvailability []PrivilegeAvailability `xml:"privAvailability"` -} - -func init() { - t["EntityPrivilege"] = reflect.TypeOf((*EntityPrivilege)(nil)).Elem() -} - -type EnumDescription struct { - DynamicData - - Key string `xml:"key"` - Tags []BaseElementDescription `xml:"tags,typeattr"` -} - -func init() { - t["EnumDescription"] = reflect.TypeOf((*EnumDescription)(nil)).Elem() -} - -type EnvironmentBrowserConfigOptionQuerySpec struct { - DynamicData - - Key string `xml:"key,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - GuestId []string `xml:"guestId,omitempty"` -} - -func init() { - t["EnvironmentBrowserConfigOptionQuerySpec"] = reflect.TypeOf((*EnvironmentBrowserConfigOptionQuerySpec)(nil)).Elem() -} - -type ErrorUpgradeEvent struct { - UpgradeEvent -} - -func init() { - t["ErrorUpgradeEvent"] = reflect.TypeOf((*ErrorUpgradeEvent)(nil)).Elem() -} - -type EstimateDatabaseSize EstimateDatabaseSizeRequestType - -func init() { - t["EstimateDatabaseSize"] = reflect.TypeOf((*EstimateDatabaseSize)(nil)).Elem() -} - -type EstimateDatabaseSizeRequestType struct { - This ManagedObjectReference `xml:"_this"` - DbSizeParam DatabaseSizeParam `xml:"dbSizeParam"` -} - -func init() { - t["EstimateDatabaseSizeRequestType"] = reflect.TypeOf((*EstimateDatabaseSizeRequestType)(nil)).Elem() -} - -type EstimateDatabaseSizeResponse struct { - Returnval DatabaseSizeEstimate `xml:"returnval"` -} - -type EstimateStorageForConsolidateSnapshotsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["EstimateStorageForConsolidateSnapshotsRequestType"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshotsRequestType)(nil)).Elem() -} - -type EstimateStorageForConsolidateSnapshots_Task EstimateStorageForConsolidateSnapshotsRequestType - -func init() { - t["EstimateStorageForConsolidateSnapshots_Task"] = reflect.TypeOf((*EstimateStorageForConsolidateSnapshots_Task)(nil)).Elem() -} - -type EstimateStorageForConsolidateSnapshots_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type EsxAgentHostManagerUpdateConfig EsxAgentHostManagerUpdateConfigRequestType - -func init() { - t["EsxAgentHostManagerUpdateConfig"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfig)(nil)).Elem() -} - -type EsxAgentHostManagerUpdateConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigInfo HostEsxAgentHostManagerConfigInfo `xml:"configInfo"` -} - -func init() { - t["EsxAgentHostManagerUpdateConfigRequestType"] = reflect.TypeOf((*EsxAgentHostManagerUpdateConfigRequestType)(nil)).Elem() -} - -type EsxAgentHostManagerUpdateConfigResponse struct { -} - -type EvacuateVsanNodeRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaintenanceSpec HostMaintenanceSpec `xml:"maintenanceSpec"` - Timeout int32 `xml:"timeout"` -} - -func init() { - t["EvacuateVsanNodeRequestType"] = reflect.TypeOf((*EvacuateVsanNodeRequestType)(nil)).Elem() -} - -type EvacuateVsanNode_Task EvacuateVsanNodeRequestType - -func init() { - t["EvacuateVsanNode_Task"] = reflect.TypeOf((*EvacuateVsanNode_Task)(nil)).Elem() -} - -type EvacuateVsanNode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type EvaluationLicenseSource struct { - LicenseSource - - RemainingHours int64 `xml:"remainingHours,omitempty"` -} - -func init() { - t["EvaluationLicenseSource"] = reflect.TypeOf((*EvaluationLicenseSource)(nil)).Elem() -} - -type EvcManager EvcManagerRequestType - -func init() { - t["EvcManager"] = reflect.TypeOf((*EvcManager)(nil)).Elem() -} - -type EvcManagerRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["EvcManagerRequestType"] = reflect.TypeOf((*EvcManagerRequestType)(nil)).Elem() -} - -type EvcManagerResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type Event struct { - DynamicData - - Key int32 `xml:"key"` - ChainId int32 `xml:"chainId"` - CreatedTime time.Time `xml:"createdTime"` - UserName string `xml:"userName"` - Datacenter *DatacenterEventArgument `xml:"datacenter,omitempty"` - ComputeResource *ComputeResourceEventArgument `xml:"computeResource,omitempty"` - Host *HostEventArgument `xml:"host,omitempty"` - Vm *VmEventArgument `xml:"vm,omitempty"` - Ds *DatastoreEventArgument `xml:"ds,omitempty"` - Net *NetworkEventArgument `xml:"net,omitempty"` - Dvs *DvsEventArgument `xml:"dvs,omitempty"` - FullFormattedMessage string `xml:"fullFormattedMessage,omitempty"` - ChangeTag string `xml:"changeTag,omitempty"` -} - -func init() { - t["Event"] = reflect.TypeOf((*Event)(nil)).Elem() -} - -type EventAlarmExpression struct { - AlarmExpression - - Comparisons []EventAlarmExpressionComparison `xml:"comparisons,omitempty"` - EventType string `xml:"eventType"` - EventTypeId string `xml:"eventTypeId,omitempty"` - ObjectType string `xml:"objectType,omitempty"` - Status ManagedEntityStatus `xml:"status,omitempty"` -} - -func init() { - t["EventAlarmExpression"] = reflect.TypeOf((*EventAlarmExpression)(nil)).Elem() -} - -type EventAlarmExpressionComparison struct { - DynamicData - - AttributeName string `xml:"attributeName"` - Operator string `xml:"operator"` - Value string `xml:"value"` -} - -func init() { - t["EventAlarmExpressionComparison"] = reflect.TypeOf((*EventAlarmExpressionComparison)(nil)).Elem() -} - -type EventArgDesc struct { - DynamicData - - Name string `xml:"name"` - Type string `xml:"type"` - Description BaseElementDescription `xml:"description,omitempty,typeattr"` -} - -func init() { - t["EventArgDesc"] = reflect.TypeOf((*EventArgDesc)(nil)).Elem() -} - -type EventArgument struct { - DynamicData -} - -func init() { - t["EventArgument"] = reflect.TypeOf((*EventArgument)(nil)).Elem() -} - -type EventDescription struct { - DynamicData - - Category []BaseElementDescription `xml:"category,typeattr"` - EventInfo []EventDescriptionEventDetail `xml:"eventInfo"` - EnumeratedTypes []EnumDescription `xml:"enumeratedTypes,omitempty"` -} - -func init() { - t["EventDescription"] = reflect.TypeOf((*EventDescription)(nil)).Elem() -} - -type EventDescriptionEventDetail struct { - DynamicData - - Key string `xml:"key"` - Description string `xml:"description,omitempty"` - Category string `xml:"category"` - FormatOnDatacenter string `xml:"formatOnDatacenter"` - FormatOnComputeResource string `xml:"formatOnComputeResource"` - FormatOnHost string `xml:"formatOnHost"` - FormatOnVm string `xml:"formatOnVm"` - FullFormat string `xml:"fullFormat"` - LongDescription string `xml:"longDescription,omitempty"` -} - -func init() { - t["EventDescriptionEventDetail"] = reflect.TypeOf((*EventDescriptionEventDetail)(nil)).Elem() -} - -type EventEx struct { - Event - - EventTypeId string `xml:"eventTypeId"` - Severity string `xml:"severity,omitempty"` - Message string `xml:"message,omitempty"` - Arguments []KeyAnyValue `xml:"arguments,omitempty"` - ObjectId string `xml:"objectId,omitempty"` - ObjectType string `xml:"objectType,omitempty"` - ObjectName string `xml:"objectName,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["EventEx"] = reflect.TypeOf((*EventEx)(nil)).Elem() -} - -type EventFilterSpec struct { - DynamicData - - Entity *EventFilterSpecByEntity `xml:"entity,omitempty"` - Time *EventFilterSpecByTime `xml:"time,omitempty"` - UserName *EventFilterSpecByUsername `xml:"userName,omitempty"` - EventChainId int32 `xml:"eventChainId,omitempty"` - Alarm *ManagedObjectReference `xml:"alarm,omitempty"` - ScheduledTask *ManagedObjectReference `xml:"scheduledTask,omitempty"` - DisableFullMessage *bool `xml:"disableFullMessage"` - Category []string `xml:"category,omitempty"` - Type []string `xml:"type,omitempty"` - Tag []string `xml:"tag,omitempty"` - EventTypeId []string `xml:"eventTypeId,omitempty"` - MaxCount int32 `xml:"maxCount,omitempty"` -} - -func init() { - t["EventFilterSpec"] = reflect.TypeOf((*EventFilterSpec)(nil)).Elem() -} - -type EventFilterSpecByEntity struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - Recursion EventFilterSpecRecursionOption `xml:"recursion"` -} - -func init() { - t["EventFilterSpecByEntity"] = reflect.TypeOf((*EventFilterSpecByEntity)(nil)).Elem() -} - -type EventFilterSpecByTime struct { - DynamicData - - BeginTime *time.Time `xml:"beginTime"` - EndTime *time.Time `xml:"endTime"` -} - -func init() { - t["EventFilterSpecByTime"] = reflect.TypeOf((*EventFilterSpecByTime)(nil)).Elem() -} - -type EventFilterSpecByUsername struct { - DynamicData - - SystemUser bool `xml:"systemUser"` - UserList []string `xml:"userList,omitempty"` -} - -func init() { - t["EventFilterSpecByUsername"] = reflect.TypeOf((*EventFilterSpecByUsername)(nil)).Elem() -} - -type ExecuteHostProfile ExecuteHostProfileRequestType - -func init() { - t["ExecuteHostProfile"] = reflect.TypeOf((*ExecuteHostProfile)(nil)).Elem() -} - -type ExecuteHostProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - DeferredParam []ProfileDeferredPolicyOptionParameter `xml:"deferredParam,omitempty"` -} - -func init() { - t["ExecuteHostProfileRequestType"] = reflect.TypeOf((*ExecuteHostProfileRequestType)(nil)).Elem() -} - -type ExecuteHostProfileResponse struct { - Returnval BaseProfileExecuteResult `xml:"returnval,typeattr"` -} - -type ExecuteSimpleCommand ExecuteSimpleCommandRequestType - -func init() { - t["ExecuteSimpleCommand"] = reflect.TypeOf((*ExecuteSimpleCommand)(nil)).Elem() -} - -type ExecuteSimpleCommandRequestType struct { - This ManagedObjectReference `xml:"_this"` - Arguments []string `xml:"arguments,omitempty"` -} - -func init() { - t["ExecuteSimpleCommandRequestType"] = reflect.TypeOf((*ExecuteSimpleCommandRequestType)(nil)).Elem() -} - -type ExecuteSimpleCommandResponse struct { - Returnval string `xml:"returnval"` -} - -type ExitLockdownMode ExitLockdownModeRequestType - -func init() { - t["ExitLockdownMode"] = reflect.TypeOf((*ExitLockdownMode)(nil)).Elem() -} - -type ExitLockdownModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExitLockdownModeRequestType"] = reflect.TypeOf((*ExitLockdownModeRequestType)(nil)).Elem() -} - -type ExitLockdownModeResponse struct { -} - -type ExitMaintenanceModeEvent struct { - HostEvent -} - -func init() { - t["ExitMaintenanceModeEvent"] = reflect.TypeOf((*ExitMaintenanceModeEvent)(nil)).Elem() -} - -type ExitMaintenanceModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Timeout int32 `xml:"timeout"` -} - -func init() { - t["ExitMaintenanceModeRequestType"] = reflect.TypeOf((*ExitMaintenanceModeRequestType)(nil)).Elem() -} - -type ExitMaintenanceMode_Task ExitMaintenanceModeRequestType - -func init() { - t["ExitMaintenanceMode_Task"] = reflect.TypeOf((*ExitMaintenanceMode_Task)(nil)).Elem() -} - -type ExitMaintenanceMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExitStandbyModeFailedEvent struct { - HostEvent -} - -func init() { - t["ExitStandbyModeFailedEvent"] = reflect.TypeOf((*ExitStandbyModeFailedEvent)(nil)).Elem() -} - -type ExitedStandbyModeEvent struct { - HostEvent -} - -func init() { - t["ExitedStandbyModeEvent"] = reflect.TypeOf((*ExitedStandbyModeEvent)(nil)).Elem() -} - -type ExitingStandbyModeEvent struct { - HostEvent -} - -func init() { - t["ExitingStandbyModeEvent"] = reflect.TypeOf((*ExitingStandbyModeEvent)(nil)).Elem() -} - -type ExpandVmfsDatastore ExpandVmfsDatastoreRequestType - -func init() { - t["ExpandVmfsDatastore"] = reflect.TypeOf((*ExpandVmfsDatastore)(nil)).Elem() -} - -type ExpandVmfsDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VmfsDatastoreExpandSpec `xml:"spec"` -} - -func init() { - t["ExpandVmfsDatastoreRequestType"] = reflect.TypeOf((*ExpandVmfsDatastoreRequestType)(nil)).Elem() -} - -type ExpandVmfsDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExpandVmfsExtent ExpandVmfsExtentRequestType - -func init() { - t["ExpandVmfsExtent"] = reflect.TypeOf((*ExpandVmfsExtent)(nil)).Elem() -} - -type ExpandVmfsExtentRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsPath string `xml:"vmfsPath"` - Extent HostScsiDiskPartition `xml:"extent"` -} - -func init() { - t["ExpandVmfsExtentRequestType"] = reflect.TypeOf((*ExpandVmfsExtentRequestType)(nil)).Elem() -} - -type ExpandVmfsExtentResponse struct { -} - -type ExpiredAddonLicense struct { - ExpiredFeatureLicense -} - -func init() { - t["ExpiredAddonLicense"] = reflect.TypeOf((*ExpiredAddonLicense)(nil)).Elem() -} - -type ExpiredAddonLicenseFault ExpiredAddonLicense - -func init() { - t["ExpiredAddonLicenseFault"] = reflect.TypeOf((*ExpiredAddonLicenseFault)(nil)).Elem() -} - -type ExpiredEditionLicense struct { - ExpiredFeatureLicense -} - -func init() { - t["ExpiredEditionLicense"] = reflect.TypeOf((*ExpiredEditionLicense)(nil)).Elem() -} - -type ExpiredEditionLicenseFault ExpiredEditionLicense - -func init() { - t["ExpiredEditionLicenseFault"] = reflect.TypeOf((*ExpiredEditionLicenseFault)(nil)).Elem() -} - -type ExpiredFeatureLicense struct { - NotEnoughLicenses - - Feature string `xml:"feature"` - Count int32 `xml:"count"` - ExpirationDate time.Time `xml:"expirationDate"` -} - -func init() { - t["ExpiredFeatureLicense"] = reflect.TypeOf((*ExpiredFeatureLicense)(nil)).Elem() -} - -type ExpiredFeatureLicenseFault BaseExpiredFeatureLicense - -func init() { - t["ExpiredFeatureLicenseFault"] = reflect.TypeOf((*ExpiredFeatureLicenseFault)(nil)).Elem() -} - -type ExportAnswerFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["ExportAnswerFileRequestType"] = reflect.TypeOf((*ExportAnswerFileRequestType)(nil)).Elem() -} - -type ExportAnswerFile_Task ExportAnswerFileRequestType - -func init() { - t["ExportAnswerFile_Task"] = reflect.TypeOf((*ExportAnswerFile_Task)(nil)).Elem() -} - -type ExportAnswerFile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExportProfile ExportProfileRequestType - -func init() { - t["ExportProfile"] = reflect.TypeOf((*ExportProfile)(nil)).Elem() -} - -type ExportProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExportProfileRequestType"] = reflect.TypeOf((*ExportProfileRequestType)(nil)).Elem() -} - -type ExportProfileResponse struct { - Returnval string `xml:"returnval"` -} - -type ExportSnapshot ExportSnapshotRequestType - -func init() { - t["ExportSnapshot"] = reflect.TypeOf((*ExportSnapshot)(nil)).Elem() -} - -type ExportSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExportSnapshotRequestType"] = reflect.TypeOf((*ExportSnapshotRequestType)(nil)).Elem() -} - -type ExportSnapshotResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExportVApp ExportVAppRequestType - -func init() { - t["ExportVApp"] = reflect.TypeOf((*ExportVApp)(nil)).Elem() -} - -type ExportVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExportVAppRequestType"] = reflect.TypeOf((*ExportVAppRequestType)(nil)).Elem() -} - -type ExportVAppResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExportVm ExportVmRequestType - -func init() { - t["ExportVm"] = reflect.TypeOf((*ExportVm)(nil)).Elem() -} - -type ExportVmRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExportVmRequestType"] = reflect.TypeOf((*ExportVmRequestType)(nil)).Elem() -} - -type ExportVmResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExtExtendedProductInfo struct { - DynamicData - - CompanyUrl string `xml:"companyUrl,omitempty"` - ProductUrl string `xml:"productUrl,omitempty"` - ManagementUrl string `xml:"managementUrl,omitempty"` - Self *ManagedObjectReference `xml:"self,omitempty"` -} - -func init() { - t["ExtExtendedProductInfo"] = reflect.TypeOf((*ExtExtendedProductInfo)(nil)).Elem() -} - -type ExtManagedEntityInfo struct { - DynamicData - - Type string `xml:"type"` - SmallIconUrl string `xml:"smallIconUrl,omitempty"` - IconUrl string `xml:"iconUrl,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["ExtManagedEntityInfo"] = reflect.TypeOf((*ExtManagedEntityInfo)(nil)).Elem() -} - -type ExtSolutionManagerInfo struct { - DynamicData - - Tab []ExtSolutionManagerInfoTabInfo `xml:"tab,omitempty"` - SmallIconUrl string `xml:"smallIconUrl,omitempty"` -} - -func init() { - t["ExtSolutionManagerInfo"] = reflect.TypeOf((*ExtSolutionManagerInfo)(nil)).Elem() -} - -type ExtSolutionManagerInfoTabInfo struct { - DynamicData - - Label string `xml:"label"` - Url string `xml:"url"` -} - -func init() { - t["ExtSolutionManagerInfoTabInfo"] = reflect.TypeOf((*ExtSolutionManagerInfoTabInfo)(nil)).Elem() -} - -type ExtendDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - NewCapacityInMB int64 `xml:"newCapacityInMB"` -} - -func init() { - t["ExtendDiskRequestType"] = reflect.TypeOf((*ExtendDiskRequestType)(nil)).Elem() -} - -type ExtendDisk_Task ExtendDiskRequestType - -func init() { - t["ExtendDisk_Task"] = reflect.TypeOf((*ExtendDisk_Task)(nil)).Elem() -} - -type ExtendDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExtendHCIRequestType struct { - This ManagedObjectReference `xml:"_this"` - HostInputs []ClusterComputeResourceHostConfigurationInput `xml:"hostInputs,omitempty"` - VSanConfigSpec *SDDCBase `xml:"vSanConfigSpec,omitempty"` -} - -func init() { - t["ExtendHCIRequestType"] = reflect.TypeOf((*ExtendHCIRequestType)(nil)).Elem() -} - -type ExtendHCI_Task ExtendHCIRequestType - -func init() { - t["ExtendHCI_Task"] = reflect.TypeOf((*ExtendHCI_Task)(nil)).Elem() -} - -type ExtendHCI_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExtendVffs ExtendVffsRequestType - -func init() { - t["ExtendVffs"] = reflect.TypeOf((*ExtendVffs)(nil)).Elem() -} - -type ExtendVffsRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsPath string `xml:"vffsPath"` - DevicePath string `xml:"devicePath"` - Spec *HostDiskPartitionSpec `xml:"spec,omitempty"` -} - -func init() { - t["ExtendVffsRequestType"] = reflect.TypeOf((*ExtendVffsRequestType)(nil)).Elem() -} - -type ExtendVffsResponse struct { -} - -type ExtendVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - NewCapacityKb int64 `xml:"newCapacityKb"` - EagerZero *bool `xml:"eagerZero"` -} - -func init() { - t["ExtendVirtualDiskRequestType"] = reflect.TypeOf((*ExtendVirtualDiskRequestType)(nil)).Elem() -} - -type ExtendVirtualDisk_Task ExtendVirtualDiskRequestType - -func init() { - t["ExtendVirtualDisk_Task"] = reflect.TypeOf((*ExtendVirtualDisk_Task)(nil)).Elem() -} - -type ExtendVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExtendVmfsDatastore ExtendVmfsDatastoreRequestType - -func init() { - t["ExtendVmfsDatastore"] = reflect.TypeOf((*ExtendVmfsDatastore)(nil)).Elem() -} - -type ExtendVmfsDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VmfsDatastoreExtendSpec `xml:"spec"` -} - -func init() { - t["ExtendVmfsDatastoreRequestType"] = reflect.TypeOf((*ExtendVmfsDatastoreRequestType)(nil)).Elem() -} - -type ExtendVmfsDatastoreResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ExtendedDescription struct { - Description - - MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` - MessageArg []KeyAnyValue `xml:"messageArg,omitempty"` -} - -func init() { - t["ExtendedDescription"] = reflect.TypeOf((*ExtendedDescription)(nil)).Elem() -} - -type ExtendedElementDescription struct { - ElementDescription - - MessageCatalogKeyPrefix string `xml:"messageCatalogKeyPrefix"` - MessageArg []KeyAnyValue `xml:"messageArg,omitempty"` -} - -func init() { - t["ExtendedElementDescription"] = reflect.TypeOf((*ExtendedElementDescription)(nil)).Elem() -} - -type ExtendedEvent struct { - GeneralEvent - - EventTypeId string `xml:"eventTypeId"` - ManagedObject ManagedObjectReference `xml:"managedObject"` - Data []ExtendedEventPair `xml:"data,omitempty"` -} - -func init() { - t["ExtendedEvent"] = reflect.TypeOf((*ExtendedEvent)(nil)).Elem() -} - -type ExtendedEventPair struct { - DynamicData - - Key string `xml:"key"` - Value string `xml:"value"` -} - -func init() { - t["ExtendedEventPair"] = reflect.TypeOf((*ExtendedEventPair)(nil)).Elem() -} - -type ExtendedFault struct { - VimFault - - FaultTypeId string `xml:"faultTypeId"` - Data []KeyValue `xml:"data,omitempty"` -} - -func init() { - t["ExtendedFault"] = reflect.TypeOf((*ExtendedFault)(nil)).Elem() -} - -type ExtendedFaultFault ExtendedFault - -func init() { - t["ExtendedFaultFault"] = reflect.TypeOf((*ExtendedFaultFault)(nil)).Elem() -} - -type Extension struct { - DynamicData - - Description BaseDescription `xml:"description,typeattr"` - Key string `xml:"key"` - Company string `xml:"company,omitempty"` - Type string `xml:"type,omitempty"` - Version string `xml:"version"` - SubjectName string `xml:"subjectName,omitempty"` - Server []ExtensionServerInfo `xml:"server,omitempty"` - Client []ExtensionClientInfo `xml:"client,omitempty"` - TaskList []ExtensionTaskTypeInfo `xml:"taskList,omitempty"` - EventList []ExtensionEventTypeInfo `xml:"eventList,omitempty"` - FaultList []ExtensionFaultTypeInfo `xml:"faultList,omitempty"` - PrivilegeList []ExtensionPrivilegeInfo `xml:"privilegeList,omitempty"` - ResourceList []ExtensionResourceInfo `xml:"resourceList,omitempty"` - LastHeartbeatTime time.Time `xml:"lastHeartbeatTime"` - HealthInfo *ExtensionHealthInfo `xml:"healthInfo,omitempty"` - OvfConsumerInfo *ExtensionOvfConsumerInfo `xml:"ovfConsumerInfo,omitempty"` - ExtendedProductInfo *ExtExtendedProductInfo `xml:"extendedProductInfo,omitempty"` - ManagedEntityInfo []ExtManagedEntityInfo `xml:"managedEntityInfo,omitempty"` - ShownInSolutionManager *bool `xml:"shownInSolutionManager"` - SolutionManagerInfo *ExtSolutionManagerInfo `xml:"solutionManagerInfo,omitempty"` -} - -func init() { - t["Extension"] = reflect.TypeOf((*Extension)(nil)).Elem() -} - -type ExtensionClientInfo struct { - DynamicData - - Version string `xml:"version"` - Description BaseDescription `xml:"description,typeattr"` - Company string `xml:"company"` - Type string `xml:"type"` - Url string `xml:"url"` -} - -func init() { - t["ExtensionClientInfo"] = reflect.TypeOf((*ExtensionClientInfo)(nil)).Elem() -} - -type ExtensionEventTypeInfo struct { - DynamicData - - EventID string `xml:"eventID"` - EventTypeSchema string `xml:"eventTypeSchema,omitempty"` -} - -func init() { - t["ExtensionEventTypeInfo"] = reflect.TypeOf((*ExtensionEventTypeInfo)(nil)).Elem() -} - -type ExtensionFaultTypeInfo struct { - DynamicData - - FaultID string `xml:"faultID"` -} - -func init() { - t["ExtensionFaultTypeInfo"] = reflect.TypeOf((*ExtensionFaultTypeInfo)(nil)).Elem() -} - -type ExtensionHealthInfo struct { - DynamicData - - Url string `xml:"url"` -} - -func init() { - t["ExtensionHealthInfo"] = reflect.TypeOf((*ExtensionHealthInfo)(nil)).Elem() -} - -type ExtensionManagerIpAllocationUsage struct { - DynamicData - - ExtensionKey string `xml:"extensionKey"` - NumAddresses int32 `xml:"numAddresses"` -} - -func init() { - t["ExtensionManagerIpAllocationUsage"] = reflect.TypeOf((*ExtensionManagerIpAllocationUsage)(nil)).Elem() -} - -type ExtensionOvfConsumerInfo struct { - DynamicData - - CallbackUrl string `xml:"callbackUrl"` - SectionType []string `xml:"sectionType"` -} - -func init() { - t["ExtensionOvfConsumerInfo"] = reflect.TypeOf((*ExtensionOvfConsumerInfo)(nil)).Elem() -} - -type ExtensionPrivilegeInfo struct { - DynamicData - - PrivID string `xml:"privID"` - PrivGroupName string `xml:"privGroupName"` -} - -func init() { - t["ExtensionPrivilegeInfo"] = reflect.TypeOf((*ExtensionPrivilegeInfo)(nil)).Elem() -} - -type ExtensionResourceInfo struct { - DynamicData - - Locale string `xml:"locale"` - Module string `xml:"module"` - Data []KeyValue `xml:"data"` -} - -func init() { - t["ExtensionResourceInfo"] = reflect.TypeOf((*ExtensionResourceInfo)(nil)).Elem() -} - -type ExtensionServerInfo struct { - DynamicData - - Url string `xml:"url"` - Description BaseDescription `xml:"description,typeattr"` - Company string `xml:"company"` - Type string `xml:"type"` - AdminEmail []string `xml:"adminEmail"` - ServerThumbprint string `xml:"serverThumbprint,omitempty"` -} - -func init() { - t["ExtensionServerInfo"] = reflect.TypeOf((*ExtensionServerInfo)(nil)).Elem() -} - -type ExtensionTaskTypeInfo struct { - DynamicData - - TaskID string `xml:"taskID"` -} - -func init() { - t["ExtensionTaskTypeInfo"] = reflect.TypeOf((*ExtensionTaskTypeInfo)(nil)).Elem() -} - -type ExtractOvfEnvironment ExtractOvfEnvironmentRequestType - -func init() { - t["ExtractOvfEnvironment"] = reflect.TypeOf((*ExtractOvfEnvironment)(nil)).Elem() -} - -type ExtractOvfEnvironmentRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ExtractOvfEnvironmentRequestType"] = reflect.TypeOf((*ExtractOvfEnvironmentRequestType)(nil)).Elem() -} - -type ExtractOvfEnvironmentResponse struct { - Returnval string `xml:"returnval"` -} - -type FailToEnableSPBM struct { - NotEnoughLicenses - - Cs ManagedObjectReference `xml:"cs"` - CsName string `xml:"csName"` - HostLicenseStates []ComputeResourceHostSPBMLicenseInfo `xml:"hostLicenseStates"` -} - -func init() { - t["FailToEnableSPBM"] = reflect.TypeOf((*FailToEnableSPBM)(nil)).Elem() -} - -type FailToEnableSPBMFault FailToEnableSPBM - -func init() { - t["FailToEnableSPBMFault"] = reflect.TypeOf((*FailToEnableSPBMFault)(nil)).Elem() -} - -type FailToLockFaultToleranceVMs struct { - RuntimeFault - - VmName string `xml:"vmName"` - Vm ManagedObjectReference `xml:"vm"` - AlreadyLockedVm ManagedObjectReference `xml:"alreadyLockedVm"` -} - -func init() { - t["FailToLockFaultToleranceVMs"] = reflect.TypeOf((*FailToLockFaultToleranceVMs)(nil)).Elem() -} - -type FailToLockFaultToleranceVMsFault FailToLockFaultToleranceVMs - -func init() { - t["FailToLockFaultToleranceVMsFault"] = reflect.TypeOf((*FailToLockFaultToleranceVMsFault)(nil)).Elem() -} - -type FailoverLevelRestored struct { - ClusterEvent -} - -func init() { - t["FailoverLevelRestored"] = reflect.TypeOf((*FailoverLevelRestored)(nil)).Elem() -} - -type FailoverNodeInfo struct { - DynamicData - - ClusterIpSettings CustomizationIPSettings `xml:"clusterIpSettings"` - FailoverIp *CustomizationIPSettings `xml:"failoverIp,omitempty"` - BiosUuid string `xml:"biosUuid,omitempty"` -} - -func init() { - t["FailoverNodeInfo"] = reflect.TypeOf((*FailoverNodeInfo)(nil)).Elem() -} - -type FaultDomainId struct { - DynamicData - - Id string `xml:"id"` -} - -func init() { - t["FaultDomainId"] = reflect.TypeOf((*FaultDomainId)(nil)).Elem() -} - -type FaultToleranceAntiAffinityViolated struct { - MigrationFault - - HostName string `xml:"hostName"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["FaultToleranceAntiAffinityViolated"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolated)(nil)).Elem() -} - -type FaultToleranceAntiAffinityViolatedFault FaultToleranceAntiAffinityViolated - -func init() { - t["FaultToleranceAntiAffinityViolatedFault"] = reflect.TypeOf((*FaultToleranceAntiAffinityViolatedFault)(nil)).Elem() -} - -type FaultToleranceCannotEditMem struct { - VmConfigFault - - VmName string `xml:"vmName"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["FaultToleranceCannotEditMem"] = reflect.TypeOf((*FaultToleranceCannotEditMem)(nil)).Elem() -} - -type FaultToleranceCannotEditMemFault FaultToleranceCannotEditMem - -func init() { - t["FaultToleranceCannotEditMemFault"] = reflect.TypeOf((*FaultToleranceCannotEditMemFault)(nil)).Elem() -} - -type FaultToleranceConfigInfo struct { - DynamicData - - Role int32 `xml:"role"` - InstanceUuids []string `xml:"instanceUuids"` - ConfigPaths []string `xml:"configPaths"` - Orphaned *bool `xml:"orphaned"` -} - -func init() { - t["FaultToleranceConfigInfo"] = reflect.TypeOf((*FaultToleranceConfigInfo)(nil)).Elem() -} - -type FaultToleranceConfigSpec struct { - DynamicData - - MetaDataPath *FaultToleranceMetaSpec `xml:"metaDataPath,omitempty"` - SecondaryVmSpec *FaultToleranceVMConfigSpec `xml:"secondaryVmSpec,omitempty"` -} - -func init() { - t["FaultToleranceConfigSpec"] = reflect.TypeOf((*FaultToleranceConfigSpec)(nil)).Elem() -} - -type FaultToleranceCpuIncompatible struct { - CpuIncompatible - - Model bool `xml:"model"` - Family bool `xml:"family"` - Stepping bool `xml:"stepping"` -} - -func init() { - t["FaultToleranceCpuIncompatible"] = reflect.TypeOf((*FaultToleranceCpuIncompatible)(nil)).Elem() -} - -type FaultToleranceCpuIncompatibleFault FaultToleranceCpuIncompatible - -func init() { - t["FaultToleranceCpuIncompatibleFault"] = reflect.TypeOf((*FaultToleranceCpuIncompatibleFault)(nil)).Elem() -} - -type FaultToleranceDiskSpec struct { - DynamicData - - Disk BaseVirtualDevice `xml:"disk,typeattr"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["FaultToleranceDiskSpec"] = reflect.TypeOf((*FaultToleranceDiskSpec)(nil)).Elem() -} - -type FaultToleranceMetaSpec struct { - DynamicData - - MetaDataDatastore ManagedObjectReference `xml:"metaDataDatastore"` -} - -func init() { - t["FaultToleranceMetaSpec"] = reflect.TypeOf((*FaultToleranceMetaSpec)(nil)).Elem() -} - -type FaultToleranceNeedsThickDisk struct { - MigrationFault - - VmName string `xml:"vmName"` -} - -func init() { - t["FaultToleranceNeedsThickDisk"] = reflect.TypeOf((*FaultToleranceNeedsThickDisk)(nil)).Elem() -} - -type FaultToleranceNeedsThickDiskFault FaultToleranceNeedsThickDisk - -func init() { - t["FaultToleranceNeedsThickDiskFault"] = reflect.TypeOf((*FaultToleranceNeedsThickDiskFault)(nil)).Elem() -} - -type FaultToleranceNotLicensed struct { - VmFaultToleranceIssue - - HostName string `xml:"hostName,omitempty"` -} - -func init() { - t["FaultToleranceNotLicensed"] = reflect.TypeOf((*FaultToleranceNotLicensed)(nil)).Elem() -} - -type FaultToleranceNotLicensedFault FaultToleranceNotLicensed - -func init() { - t["FaultToleranceNotLicensedFault"] = reflect.TypeOf((*FaultToleranceNotLicensedFault)(nil)).Elem() -} - -type FaultToleranceNotSameBuild struct { - MigrationFault - - Build string `xml:"build"` -} - -func init() { - t["FaultToleranceNotSameBuild"] = reflect.TypeOf((*FaultToleranceNotSameBuild)(nil)).Elem() -} - -type FaultToleranceNotSameBuildFault FaultToleranceNotSameBuild - -func init() { - t["FaultToleranceNotSameBuildFault"] = reflect.TypeOf((*FaultToleranceNotSameBuildFault)(nil)).Elem() -} - -type FaultTolerancePrimaryConfigInfo struct { - FaultToleranceConfigInfo - - Secondaries []ManagedObjectReference `xml:"secondaries"` -} - -func init() { - t["FaultTolerancePrimaryConfigInfo"] = reflect.TypeOf((*FaultTolerancePrimaryConfigInfo)(nil)).Elem() -} - -type FaultTolerancePrimaryPowerOnNotAttempted struct { - VmFaultToleranceIssue - - SecondaryVm ManagedObjectReference `xml:"secondaryVm"` - PrimaryVm ManagedObjectReference `xml:"primaryVm"` -} - -func init() { - t["FaultTolerancePrimaryPowerOnNotAttempted"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttempted)(nil)).Elem() -} - -type FaultTolerancePrimaryPowerOnNotAttemptedFault FaultTolerancePrimaryPowerOnNotAttempted - -func init() { - t["FaultTolerancePrimaryPowerOnNotAttemptedFault"] = reflect.TypeOf((*FaultTolerancePrimaryPowerOnNotAttemptedFault)(nil)).Elem() -} - -type FaultToleranceSecondaryConfigInfo struct { - FaultToleranceConfigInfo - - PrimaryVM ManagedObjectReference `xml:"primaryVM"` -} - -func init() { - t["FaultToleranceSecondaryConfigInfo"] = reflect.TypeOf((*FaultToleranceSecondaryConfigInfo)(nil)).Elem() -} - -type FaultToleranceSecondaryOpResult struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - PowerOnAttempted bool `xml:"powerOnAttempted"` - PowerOnResult *ClusterPowerOnVmResult `xml:"powerOnResult,omitempty"` -} - -func init() { - t["FaultToleranceSecondaryOpResult"] = reflect.TypeOf((*FaultToleranceSecondaryOpResult)(nil)).Elem() -} - -type FaultToleranceVMConfigSpec struct { - DynamicData - - VmConfig *ManagedObjectReference `xml:"vmConfig,omitempty"` - Disks []FaultToleranceDiskSpec `xml:"disks,omitempty"` -} - -func init() { - t["FaultToleranceVMConfigSpec"] = reflect.TypeOf((*FaultToleranceVMConfigSpec)(nil)).Elem() -} - -type FaultToleranceVmNotDasProtected struct { - VimFault - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["FaultToleranceVmNotDasProtected"] = reflect.TypeOf((*FaultToleranceVmNotDasProtected)(nil)).Elem() -} - -type FaultToleranceVmNotDasProtectedFault FaultToleranceVmNotDasProtected - -func init() { - t["FaultToleranceVmNotDasProtectedFault"] = reflect.TypeOf((*FaultToleranceVmNotDasProtectedFault)(nil)).Elem() -} - -type FaultsByHost struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["FaultsByHost"] = reflect.TypeOf((*FaultsByHost)(nil)).Elem() -} - -type FaultsByVM struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["FaultsByVM"] = reflect.TypeOf((*FaultsByVM)(nil)).Elem() -} - -type FcoeConfig struct { - DynamicData - - PriorityClass int32 `xml:"priorityClass"` - SourceMac string `xml:"sourceMac"` - VlanRange []FcoeConfigVlanRange `xml:"vlanRange"` - Capabilities FcoeConfigFcoeCapabilities `xml:"capabilities"` - FcoeActive bool `xml:"fcoeActive"` -} - -func init() { - t["FcoeConfig"] = reflect.TypeOf((*FcoeConfig)(nil)).Elem() -} - -type FcoeConfigFcoeCapabilities struct { - DynamicData - - PriorityClass bool `xml:"priorityClass"` - SourceMacAddress bool `xml:"sourceMacAddress"` - VlanRange bool `xml:"vlanRange"` -} - -func init() { - t["FcoeConfigFcoeCapabilities"] = reflect.TypeOf((*FcoeConfigFcoeCapabilities)(nil)).Elem() -} - -type FcoeConfigFcoeSpecification struct { - DynamicData - - UnderlyingPnic string `xml:"underlyingPnic"` - PriorityClass int32 `xml:"priorityClass,omitempty"` - SourceMac string `xml:"sourceMac,omitempty"` - VlanRange []FcoeConfigVlanRange `xml:"vlanRange,omitempty"` -} - -func init() { - t["FcoeConfigFcoeSpecification"] = reflect.TypeOf((*FcoeConfigFcoeSpecification)(nil)).Elem() -} - -type FcoeConfigVlanRange struct { - DynamicData - - VlanLow int32 `xml:"vlanLow"` - VlanHigh int32 `xml:"vlanHigh"` -} - -func init() { - t["FcoeConfigVlanRange"] = reflect.TypeOf((*FcoeConfigVlanRange)(nil)).Elem() -} - -type FcoeFault struct { - VimFault -} - -func init() { - t["FcoeFault"] = reflect.TypeOf((*FcoeFault)(nil)).Elem() -} - -type FcoeFaultFault BaseFcoeFault - -func init() { - t["FcoeFaultFault"] = reflect.TypeOf((*FcoeFaultFault)(nil)).Elem() -} - -type FcoeFaultPnicHasNoPortSet struct { - FcoeFault - - NicDevice string `xml:"nicDevice"` -} - -func init() { - t["FcoeFaultPnicHasNoPortSet"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSet)(nil)).Elem() -} - -type FcoeFaultPnicHasNoPortSetFault FcoeFaultPnicHasNoPortSet - -func init() { - t["FcoeFaultPnicHasNoPortSetFault"] = reflect.TypeOf((*FcoeFaultPnicHasNoPortSetFault)(nil)).Elem() -} - -type FeatureEVCMode struct { - ElementDescription - - Mask []HostFeatureMask `xml:"mask,omitempty"` - Capability []HostFeatureCapability `xml:"capability,omitempty"` - Requirement []VirtualMachineFeatureRequirement `xml:"requirement,omitempty"` -} - -func init() { - t["FeatureEVCMode"] = reflect.TypeOf((*FeatureEVCMode)(nil)).Elem() -} - -type FeatureRequirementsNotMet struct { - VirtualHardwareCompatibilityIssue - - FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["FeatureRequirementsNotMet"] = reflect.TypeOf((*FeatureRequirementsNotMet)(nil)).Elem() -} - -type FeatureRequirementsNotMetFault FeatureRequirementsNotMet - -func init() { - t["FeatureRequirementsNotMetFault"] = reflect.TypeOf((*FeatureRequirementsNotMetFault)(nil)).Elem() -} - -type FetchAuditRecords FetchAuditRecordsRequestType - -func init() { - t["FetchAuditRecords"] = reflect.TypeOf((*FetchAuditRecords)(nil)).Elem() -} - -type FetchAuditRecordsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Token string `xml:"token,omitempty"` -} - -func init() { - t["FetchAuditRecordsRequestType"] = reflect.TypeOf((*FetchAuditRecordsRequestType)(nil)).Elem() -} - -type FetchAuditRecordsResponse struct { - Returnval DiagnosticManagerAuditRecordResult `xml:"returnval"` -} - -type FetchDVPortKeys FetchDVPortKeysRequestType - -func init() { - t["FetchDVPortKeys"] = reflect.TypeOf((*FetchDVPortKeys)(nil)).Elem() -} - -type FetchDVPortKeysRequestType struct { - This ManagedObjectReference `xml:"_this"` - Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"` -} - -func init() { - t["FetchDVPortKeysRequestType"] = reflect.TypeOf((*FetchDVPortKeysRequestType)(nil)).Elem() -} - -type FetchDVPortKeysResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type FetchDVPorts FetchDVPortsRequestType - -func init() { - t["FetchDVPorts"] = reflect.TypeOf((*FetchDVPorts)(nil)).Elem() -} - -type FetchDVPortsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Criteria *DistributedVirtualSwitchPortCriteria `xml:"criteria,omitempty"` -} - -func init() { - t["FetchDVPortsRequestType"] = reflect.TypeOf((*FetchDVPortsRequestType)(nil)).Elem() -} - -type FetchDVPortsResponse struct { - Returnval []DistributedVirtualPort `xml:"returnval,omitempty"` -} - -type FetchSystemEventLog FetchSystemEventLogRequestType - -func init() { - t["FetchSystemEventLog"] = reflect.TypeOf((*FetchSystemEventLog)(nil)).Elem() -} - -type FetchSystemEventLogRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["FetchSystemEventLogRequestType"] = reflect.TypeOf((*FetchSystemEventLogRequestType)(nil)).Elem() -} - -type FetchSystemEventLogResponse struct { - Returnval []SystemEventInfo `xml:"returnval,omitempty"` -} - -type FetchUserPrivilegeOnEntities FetchUserPrivilegeOnEntitiesRequestType - -func init() { - t["FetchUserPrivilegeOnEntities"] = reflect.TypeOf((*FetchUserPrivilegeOnEntities)(nil)).Elem() -} - -type FetchUserPrivilegeOnEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entities []ManagedObjectReference `xml:"entities"` - UserName string `xml:"userName"` -} - -func init() { - t["FetchUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*FetchUserPrivilegeOnEntitiesRequestType)(nil)).Elem() -} - -type FetchUserPrivilegeOnEntitiesResponse struct { - Returnval []UserPrivilegeResult `xml:"returnval,omitempty"` -} - -type FileAlreadyExists struct { - FileFault -} - -func init() { - t["FileAlreadyExists"] = reflect.TypeOf((*FileAlreadyExists)(nil)).Elem() -} - -type FileAlreadyExistsFault FileAlreadyExists - -func init() { - t["FileAlreadyExistsFault"] = reflect.TypeOf((*FileAlreadyExistsFault)(nil)).Elem() -} - -type FileBackedPortNotSupported struct { - DeviceNotSupported -} - -func init() { - t["FileBackedPortNotSupported"] = reflect.TypeOf((*FileBackedPortNotSupported)(nil)).Elem() -} - -type FileBackedPortNotSupportedFault FileBackedPortNotSupported - -func init() { - t["FileBackedPortNotSupportedFault"] = reflect.TypeOf((*FileBackedPortNotSupportedFault)(nil)).Elem() -} - -type FileBackedVirtualDiskSpec struct { - VirtualDiskSpec - - CapacityKb int64 `xml:"capacityKb"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` -} - -func init() { - t["FileBackedVirtualDiskSpec"] = reflect.TypeOf((*FileBackedVirtualDiskSpec)(nil)).Elem() -} - -type FileFault struct { - VimFault - - File string `xml:"file"` -} - -func init() { - t["FileFault"] = reflect.TypeOf((*FileFault)(nil)).Elem() -} - -type FileFaultFault BaseFileFault - -func init() { - t["FileFaultFault"] = reflect.TypeOf((*FileFaultFault)(nil)).Elem() -} - -type FileInfo struct { - DynamicData - - Path string `xml:"path"` - FriendlyName string `xml:"friendlyName,omitempty"` - FileSize int64 `xml:"fileSize,omitempty"` - Modification *time.Time `xml:"modification"` - Owner string `xml:"owner,omitempty"` -} - -func init() { - t["FileInfo"] = reflect.TypeOf((*FileInfo)(nil)).Elem() -} - -type FileLocked struct { - FileFault -} - -func init() { - t["FileLocked"] = reflect.TypeOf((*FileLocked)(nil)).Elem() -} - -type FileLockedFault FileLocked - -func init() { - t["FileLockedFault"] = reflect.TypeOf((*FileLockedFault)(nil)).Elem() -} - -type FileNameTooLong struct { - FileFault -} - -func init() { - t["FileNameTooLong"] = reflect.TypeOf((*FileNameTooLong)(nil)).Elem() -} - -type FileNameTooLongFault FileNameTooLong - -func init() { - t["FileNameTooLongFault"] = reflect.TypeOf((*FileNameTooLongFault)(nil)).Elem() -} - -type FileNotFound struct { - FileFault -} - -func init() { - t["FileNotFound"] = reflect.TypeOf((*FileNotFound)(nil)).Elem() -} - -type FileNotFoundFault FileNotFound - -func init() { - t["FileNotFoundFault"] = reflect.TypeOf((*FileNotFoundFault)(nil)).Elem() -} - -type FileNotWritable struct { - FileFault -} - -func init() { - t["FileNotWritable"] = reflect.TypeOf((*FileNotWritable)(nil)).Elem() -} - -type FileNotWritableFault FileNotWritable - -func init() { - t["FileNotWritableFault"] = reflect.TypeOf((*FileNotWritableFault)(nil)).Elem() -} - -type FileQuery struct { - DynamicData -} - -func init() { - t["FileQuery"] = reflect.TypeOf((*FileQuery)(nil)).Elem() -} - -type FileQueryFlags struct { - DynamicData - - FileType bool `xml:"fileType"` - FileSize bool `xml:"fileSize"` - Modification bool `xml:"modification"` - FileOwner *bool `xml:"fileOwner"` -} - -func init() { - t["FileQueryFlags"] = reflect.TypeOf((*FileQueryFlags)(nil)).Elem() -} - -type FileTooLarge struct { - FileFault - - Datastore string `xml:"datastore"` - FileSize int64 `xml:"fileSize"` - MaxFileSize int64 `xml:"maxFileSize,omitempty"` -} - -func init() { - t["FileTooLarge"] = reflect.TypeOf((*FileTooLarge)(nil)).Elem() -} - -type FileTooLargeFault FileTooLarge - -func init() { - t["FileTooLargeFault"] = reflect.TypeOf((*FileTooLargeFault)(nil)).Elem() -} - -type FileTransferInformation struct { - DynamicData - - Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"` - Size int64 `xml:"size"` - Url string `xml:"url"` -} - -func init() { - t["FileTransferInformation"] = reflect.TypeOf((*FileTransferInformation)(nil)).Elem() -} - -type FilesystemQuiesceFault struct { - SnapshotFault -} - -func init() { - t["FilesystemQuiesceFault"] = reflect.TypeOf((*FilesystemQuiesceFault)(nil)).Elem() -} - -type FilesystemQuiesceFaultFault FilesystemQuiesceFault - -func init() { - t["FilesystemQuiesceFaultFault"] = reflect.TypeOf((*FilesystemQuiesceFaultFault)(nil)).Elem() -} - -type FilterInUse struct { - ResourceInUse - - Disk []VirtualDiskId `xml:"disk,omitempty"` -} - -func init() { - t["FilterInUse"] = reflect.TypeOf((*FilterInUse)(nil)).Elem() -} - -type FilterInUseFault FilterInUse - -func init() { - t["FilterInUseFault"] = reflect.TypeOf((*FilterInUseFault)(nil)).Elem() -} - -type FindAllByDnsName FindAllByDnsNameRequestType - -func init() { - t["FindAllByDnsName"] = reflect.TypeOf((*FindAllByDnsName)(nil)).Elem() -} - -type FindAllByDnsNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - DnsName string `xml:"dnsName"` - VmSearch bool `xml:"vmSearch"` -} - -func init() { - t["FindAllByDnsNameRequestType"] = reflect.TypeOf((*FindAllByDnsNameRequestType)(nil)).Elem() -} - -type FindAllByDnsNameResponse struct { - Returnval []ManagedObjectReference `xml:"returnval"` -} - -type FindAllByIp FindAllByIpRequestType - -func init() { - t["FindAllByIp"] = reflect.TypeOf((*FindAllByIp)(nil)).Elem() -} - -type FindAllByIpRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Ip string `xml:"ip"` - VmSearch bool `xml:"vmSearch"` -} - -func init() { - t["FindAllByIpRequestType"] = reflect.TypeOf((*FindAllByIpRequestType)(nil)).Elem() -} - -type FindAllByIpResponse struct { - Returnval []ManagedObjectReference `xml:"returnval"` -} - -type FindAllByUuid FindAllByUuidRequestType - -func init() { - t["FindAllByUuid"] = reflect.TypeOf((*FindAllByUuid)(nil)).Elem() -} - -type FindAllByUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Uuid string `xml:"uuid"` - VmSearch bool `xml:"vmSearch"` - InstanceUuid *bool `xml:"instanceUuid"` -} - -func init() { - t["FindAllByUuidRequestType"] = reflect.TypeOf((*FindAllByUuidRequestType)(nil)).Elem() -} - -type FindAllByUuidResponse struct { - Returnval []ManagedObjectReference `xml:"returnval"` -} - -type FindAssociatedProfile FindAssociatedProfileRequestType - -func init() { - t["FindAssociatedProfile"] = reflect.TypeOf((*FindAssociatedProfile)(nil)).Elem() -} - -type FindAssociatedProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["FindAssociatedProfileRequestType"] = reflect.TypeOf((*FindAssociatedProfileRequestType)(nil)).Elem() -} - -type FindAssociatedProfileResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindByDatastorePath FindByDatastorePathRequestType - -func init() { - t["FindByDatastorePath"] = reflect.TypeOf((*FindByDatastorePath)(nil)).Elem() -} - -type FindByDatastorePathRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter ManagedObjectReference `xml:"datacenter"` - Path string `xml:"path"` -} - -func init() { - t["FindByDatastorePathRequestType"] = reflect.TypeOf((*FindByDatastorePathRequestType)(nil)).Elem() -} - -type FindByDatastorePathResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindByDnsName FindByDnsNameRequestType - -func init() { - t["FindByDnsName"] = reflect.TypeOf((*FindByDnsName)(nil)).Elem() -} - -type FindByDnsNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - DnsName string `xml:"dnsName"` - VmSearch bool `xml:"vmSearch"` -} - -func init() { - t["FindByDnsNameRequestType"] = reflect.TypeOf((*FindByDnsNameRequestType)(nil)).Elem() -} - -type FindByDnsNameResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindByInventoryPath FindByInventoryPathRequestType - -func init() { - t["FindByInventoryPath"] = reflect.TypeOf((*FindByInventoryPath)(nil)).Elem() -} - -type FindByInventoryPathRequestType struct { - This ManagedObjectReference `xml:"_this"` - InventoryPath string `xml:"inventoryPath"` -} - -func init() { - t["FindByInventoryPathRequestType"] = reflect.TypeOf((*FindByInventoryPathRequestType)(nil)).Elem() -} - -type FindByInventoryPathResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindByIp FindByIpRequestType - -func init() { - t["FindByIp"] = reflect.TypeOf((*FindByIp)(nil)).Elem() -} - -type FindByIpRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Ip string `xml:"ip"` - VmSearch bool `xml:"vmSearch"` -} - -func init() { - t["FindByIpRequestType"] = reflect.TypeOf((*FindByIpRequestType)(nil)).Elem() -} - -type FindByIpResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindByUuid FindByUuidRequestType - -func init() { - t["FindByUuid"] = reflect.TypeOf((*FindByUuid)(nil)).Elem() -} - -type FindByUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Uuid string `xml:"uuid"` - VmSearch bool `xml:"vmSearch"` - InstanceUuid *bool `xml:"instanceUuid"` -} - -func init() { - t["FindByUuidRequestType"] = reflect.TypeOf((*FindByUuidRequestType)(nil)).Elem() -} - -type FindByUuidResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindChild FindChildRequestType - -func init() { - t["FindChild"] = reflect.TypeOf((*FindChild)(nil)).Elem() -} - -type FindChildRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Name string `xml:"name"` -} - -func init() { - t["FindChildRequestType"] = reflect.TypeOf((*FindChildRequestType)(nil)).Elem() -} - -type FindChildResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type FindExtension FindExtensionRequestType - -func init() { - t["FindExtension"] = reflect.TypeOf((*FindExtension)(nil)).Elem() -} - -type FindExtensionRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` -} - -func init() { - t["FindExtensionRequestType"] = reflect.TypeOf((*FindExtensionRequestType)(nil)).Elem() -} - -type FindExtensionResponse struct { - Returnval *Extension `xml:"returnval,omitempty"` -} - -type FindRulesForVm FindRulesForVmRequestType - -func init() { - t["FindRulesForVm"] = reflect.TypeOf((*FindRulesForVm)(nil)).Elem() -} - -type FindRulesForVmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["FindRulesForVmRequestType"] = reflect.TypeOf((*FindRulesForVmRequestType)(nil)).Elem() -} - -type FindRulesForVmResponse struct { - Returnval []BaseClusterRuleInfo `xml:"returnval,omitempty,typeattr"` -} - -type FirewallProfile struct { - ApplyProfile - - Ruleset []FirewallProfileRulesetProfile `xml:"ruleset,omitempty"` -} - -func init() { - t["FirewallProfile"] = reflect.TypeOf((*FirewallProfile)(nil)).Elem() -} - -type FirewallProfileRulesetProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["FirewallProfileRulesetProfile"] = reflect.TypeOf((*FirewallProfileRulesetProfile)(nil)).Elem() -} - -type FloatOption struct { - OptionType - - Min float32 `xml:"min"` - Max float32 `xml:"max"` - DefaultValue float32 `xml:"defaultValue"` -} - -func init() { - t["FloatOption"] = reflect.TypeOf((*FloatOption)(nil)).Elem() -} - -type FloppyImageFileInfo struct { - FileInfo -} - -func init() { - t["FloppyImageFileInfo"] = reflect.TypeOf((*FloppyImageFileInfo)(nil)).Elem() -} - -type FloppyImageFileQuery struct { - FileQuery -} - -func init() { - t["FloppyImageFileQuery"] = reflect.TypeOf((*FloppyImageFileQuery)(nil)).Elem() -} - -type FolderBatchAddHostsToClusterResult struct { - DynamicData - - HostsAddedToCluster []ManagedObjectReference `xml:"hostsAddedToCluster,omitempty"` - HostsFailedInventoryAdd []FolderFailedHostResult `xml:"hostsFailedInventoryAdd,omitempty"` - HostsFailedMoveToCluster []FolderFailedHostResult `xml:"hostsFailedMoveToCluster,omitempty"` -} - -func init() { - t["FolderBatchAddHostsToClusterResult"] = reflect.TypeOf((*FolderBatchAddHostsToClusterResult)(nil)).Elem() -} - -type FolderBatchAddStandaloneHostsResult struct { - DynamicData - - AddedHosts []ManagedObjectReference `xml:"addedHosts,omitempty"` - HostsFailedInventoryAdd []FolderFailedHostResult `xml:"hostsFailedInventoryAdd,omitempty"` -} - -func init() { - t["FolderBatchAddStandaloneHostsResult"] = reflect.TypeOf((*FolderBatchAddStandaloneHostsResult)(nil)).Elem() -} - -type FolderEventArgument struct { - EntityEventArgument - - Folder ManagedObjectReference `xml:"folder"` -} - -func init() { - t["FolderEventArgument"] = reflect.TypeOf((*FolderEventArgument)(nil)).Elem() -} - -type FolderFailedHostResult struct { - DynamicData - - HostName string `xml:"hostName,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Context LocalizableMessage `xml:"context"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["FolderFailedHostResult"] = reflect.TypeOf((*FolderFailedHostResult)(nil)).Elem() -} - -type FolderFileInfo struct { - FileInfo -} - -func init() { - t["FolderFileInfo"] = reflect.TypeOf((*FolderFileInfo)(nil)).Elem() -} - -type FolderFileQuery struct { - FileQuery -} - -func init() { - t["FolderFileQuery"] = reflect.TypeOf((*FolderFileQuery)(nil)).Elem() -} - -type FolderNewHostSpec struct { - DynamicData - - HostCnxSpec HostConnectSpec `xml:"hostCnxSpec"` - EsxLicense string `xml:"esxLicense,omitempty"` -} - -func init() { - t["FolderNewHostSpec"] = reflect.TypeOf((*FolderNewHostSpec)(nil)).Elem() -} - -type FormatVffs FormatVffsRequestType - -func init() { - t["FormatVffs"] = reflect.TypeOf((*FormatVffs)(nil)).Elem() -} - -type FormatVffsRequestType struct { - This ManagedObjectReference `xml:"_this"` - CreateSpec HostVffsSpec `xml:"createSpec"` -} - -func init() { - t["FormatVffsRequestType"] = reflect.TypeOf((*FormatVffsRequestType)(nil)).Elem() -} - -type FormatVffsResponse struct { - Returnval HostVffsVolume `xml:"returnval"` -} - -type FormatVmfs FormatVmfsRequestType - -func init() { - t["FormatVmfs"] = reflect.TypeOf((*FormatVmfs)(nil)).Elem() -} - -type FormatVmfsRequestType struct { - This ManagedObjectReference `xml:"_this"` - CreateSpec HostVmfsSpec `xml:"createSpec"` -} - -func init() { - t["FormatVmfsRequestType"] = reflect.TypeOf((*FormatVmfsRequestType)(nil)).Elem() -} - -type FormatVmfsResponse struct { - Returnval HostVmfsVolume `xml:"returnval"` -} - -type FtIssuesOnHost struct { - VmFaultToleranceIssue - - Host ManagedObjectReference `xml:"host"` - HostName string `xml:"hostName"` - Errors []LocalizedMethodFault `xml:"errors,omitempty"` -} - -func init() { - t["FtIssuesOnHost"] = reflect.TypeOf((*FtIssuesOnHost)(nil)).Elem() -} - -type FtIssuesOnHostFault FtIssuesOnHost - -func init() { - t["FtIssuesOnHostFault"] = reflect.TypeOf((*FtIssuesOnHostFault)(nil)).Elem() -} - -type FullStorageVMotionNotSupported struct { - MigrationFeatureNotSupported -} - -func init() { - t["FullStorageVMotionNotSupported"] = reflect.TypeOf((*FullStorageVMotionNotSupported)(nil)).Elem() -} - -type FullStorageVMotionNotSupportedFault FullStorageVMotionNotSupported - -func init() { - t["FullStorageVMotionNotSupportedFault"] = reflect.TypeOf((*FullStorageVMotionNotSupportedFault)(nil)).Elem() -} - -type GatewayConnectFault struct { - HostConnectFault - - GatewayType string `xml:"gatewayType"` - GatewayId string `xml:"gatewayId"` - GatewayInfo string `xml:"gatewayInfo"` - Details *LocalizableMessage `xml:"details,omitempty"` -} - -func init() { - t["GatewayConnectFault"] = reflect.TypeOf((*GatewayConnectFault)(nil)).Elem() -} - -type GatewayConnectFaultFault BaseGatewayConnectFault - -func init() { - t["GatewayConnectFaultFault"] = reflect.TypeOf((*GatewayConnectFaultFault)(nil)).Elem() -} - -type GatewayHostNotReachable struct { - GatewayToHostConnectFault -} - -func init() { - t["GatewayHostNotReachable"] = reflect.TypeOf((*GatewayHostNotReachable)(nil)).Elem() -} - -type GatewayHostNotReachableFault GatewayHostNotReachable - -func init() { - t["GatewayHostNotReachableFault"] = reflect.TypeOf((*GatewayHostNotReachableFault)(nil)).Elem() -} - -type GatewayNotFound struct { - GatewayConnectFault -} - -func init() { - t["GatewayNotFound"] = reflect.TypeOf((*GatewayNotFound)(nil)).Elem() -} - -type GatewayNotFoundFault GatewayNotFound - -func init() { - t["GatewayNotFoundFault"] = reflect.TypeOf((*GatewayNotFoundFault)(nil)).Elem() -} - -type GatewayNotReachable struct { - GatewayConnectFault -} - -func init() { - t["GatewayNotReachable"] = reflect.TypeOf((*GatewayNotReachable)(nil)).Elem() -} - -type GatewayNotReachableFault GatewayNotReachable - -func init() { - t["GatewayNotReachableFault"] = reflect.TypeOf((*GatewayNotReachableFault)(nil)).Elem() -} - -type GatewayOperationRefused struct { - GatewayConnectFault -} - -func init() { - t["GatewayOperationRefused"] = reflect.TypeOf((*GatewayOperationRefused)(nil)).Elem() -} - -type GatewayOperationRefusedFault GatewayOperationRefused - -func init() { - t["GatewayOperationRefusedFault"] = reflect.TypeOf((*GatewayOperationRefusedFault)(nil)).Elem() -} - -type GatewayToHostAuthFault struct { - GatewayToHostConnectFault - - InvalidProperties []string `xml:"invalidProperties"` - MissingProperties []string `xml:"missingProperties"` -} - -func init() { - t["GatewayToHostAuthFault"] = reflect.TypeOf((*GatewayToHostAuthFault)(nil)).Elem() -} - -type GatewayToHostAuthFaultFault GatewayToHostAuthFault - -func init() { - t["GatewayToHostAuthFaultFault"] = reflect.TypeOf((*GatewayToHostAuthFaultFault)(nil)).Elem() -} - -type GatewayToHostConnectFault struct { - GatewayConnectFault - - Hostname string `xml:"hostname"` - Port int32 `xml:"port,omitempty"` -} - -func init() { - t["GatewayToHostConnectFault"] = reflect.TypeOf((*GatewayToHostConnectFault)(nil)).Elem() -} - -type GatewayToHostConnectFaultFault BaseGatewayToHostConnectFault - -func init() { - t["GatewayToHostConnectFaultFault"] = reflect.TypeOf((*GatewayToHostConnectFaultFault)(nil)).Elem() -} - -type GatewayToHostTrustVerifyFault struct { - GatewayToHostConnectFault - - VerificationToken string `xml:"verificationToken"` - PropertiesToVerify []KeyValue `xml:"propertiesToVerify"` -} - -func init() { - t["GatewayToHostTrustVerifyFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFault)(nil)).Elem() -} - -type GatewayToHostTrustVerifyFaultFault GatewayToHostTrustVerifyFault - -func init() { - t["GatewayToHostTrustVerifyFaultFault"] = reflect.TypeOf((*GatewayToHostTrustVerifyFaultFault)(nil)).Elem() -} - -type GeneralEvent struct { - Event - - Message string `xml:"message"` -} - -func init() { - t["GeneralEvent"] = reflect.TypeOf((*GeneralEvent)(nil)).Elem() -} - -type GeneralHostErrorEvent struct { - GeneralEvent -} - -func init() { - t["GeneralHostErrorEvent"] = reflect.TypeOf((*GeneralHostErrorEvent)(nil)).Elem() -} - -type GeneralHostInfoEvent struct { - GeneralEvent -} - -func init() { - t["GeneralHostInfoEvent"] = reflect.TypeOf((*GeneralHostInfoEvent)(nil)).Elem() -} - -type GeneralHostWarningEvent struct { - GeneralEvent -} - -func init() { - t["GeneralHostWarningEvent"] = reflect.TypeOf((*GeneralHostWarningEvent)(nil)).Elem() -} - -type GeneralUserEvent struct { - GeneralEvent - - Entity *ManagedEntityEventArgument `xml:"entity,omitempty"` -} - -func init() { - t["GeneralUserEvent"] = reflect.TypeOf((*GeneralUserEvent)(nil)).Elem() -} - -type GeneralVmErrorEvent struct { - GeneralEvent -} - -func init() { - t["GeneralVmErrorEvent"] = reflect.TypeOf((*GeneralVmErrorEvent)(nil)).Elem() -} - -type GeneralVmInfoEvent struct { - GeneralEvent -} - -func init() { - t["GeneralVmInfoEvent"] = reflect.TypeOf((*GeneralVmInfoEvent)(nil)).Elem() -} - -type GeneralVmWarningEvent struct { - GeneralEvent -} - -func init() { - t["GeneralVmWarningEvent"] = reflect.TypeOf((*GeneralVmWarningEvent)(nil)).Elem() -} - -type GenerateCertificateSigningRequest GenerateCertificateSigningRequestRequestType - -func init() { - t["GenerateCertificateSigningRequest"] = reflect.TypeOf((*GenerateCertificateSigningRequest)(nil)).Elem() -} - -type GenerateCertificateSigningRequestByDn GenerateCertificateSigningRequestByDnRequestType - -func init() { - t["GenerateCertificateSigningRequestByDn"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDn)(nil)).Elem() -} - -type GenerateCertificateSigningRequestByDnRequestType struct { - This ManagedObjectReference `xml:"_this"` - DistinguishedName string `xml:"distinguishedName"` -} - -func init() { - t["GenerateCertificateSigningRequestByDnRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestByDnRequestType)(nil)).Elem() -} - -type GenerateCertificateSigningRequestByDnResponse struct { - Returnval string `xml:"returnval"` -} - -type GenerateCertificateSigningRequestRequestType struct { - This ManagedObjectReference `xml:"_this"` - UseIpAddressAsCommonName bool `xml:"useIpAddressAsCommonName"` -} - -func init() { - t["GenerateCertificateSigningRequestRequestType"] = reflect.TypeOf((*GenerateCertificateSigningRequestRequestType)(nil)).Elem() -} - -type GenerateCertificateSigningRequestResponse struct { - Returnval string `xml:"returnval"` -} - -type GenerateClientCsr GenerateClientCsrRequestType - -func init() { - t["GenerateClientCsr"] = reflect.TypeOf((*GenerateClientCsr)(nil)).Elem() -} - -type GenerateClientCsrRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` -} - -func init() { - t["GenerateClientCsrRequestType"] = reflect.TypeOf((*GenerateClientCsrRequestType)(nil)).Elem() -} - -type GenerateClientCsrResponse struct { - Returnval string `xml:"returnval"` -} - -type GenerateConfigTaskList GenerateConfigTaskListRequestType - -func init() { - t["GenerateConfigTaskList"] = reflect.TypeOf((*GenerateConfigTaskList)(nil)).Elem() -} - -type GenerateConfigTaskListRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec HostConfigSpec `xml:"configSpec"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["GenerateConfigTaskListRequestType"] = reflect.TypeOf((*GenerateConfigTaskListRequestType)(nil)).Elem() -} - -type GenerateConfigTaskListResponse struct { - Returnval HostProfileManagerConfigTaskList `xml:"returnval"` -} - -type GenerateHostConfigTaskSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - HostsInfo []StructuredCustomizations `xml:"hostsInfo,omitempty"` -} - -func init() { - t["GenerateHostConfigTaskSpecRequestType"] = reflect.TypeOf((*GenerateHostConfigTaskSpecRequestType)(nil)).Elem() -} - -type GenerateHostConfigTaskSpec_Task GenerateHostConfigTaskSpecRequestType - -func init() { - t["GenerateHostConfigTaskSpec_Task"] = reflect.TypeOf((*GenerateHostConfigTaskSpec_Task)(nil)).Elem() -} - -type GenerateHostConfigTaskSpec_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type GenerateHostProfileTaskListRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec HostConfigSpec `xml:"configSpec"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["GenerateHostProfileTaskListRequestType"] = reflect.TypeOf((*GenerateHostProfileTaskListRequestType)(nil)).Elem() -} - -type GenerateHostProfileTaskList_Task GenerateHostProfileTaskListRequestType - -func init() { - t["GenerateHostProfileTaskList_Task"] = reflect.TypeOf((*GenerateHostProfileTaskList_Task)(nil)).Elem() -} - -type GenerateHostProfileTaskList_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type GenerateKey GenerateKeyRequestType - -func init() { - t["GenerateKey"] = reflect.TypeOf((*GenerateKey)(nil)).Elem() -} - -type GenerateKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - KeyProvider *KeyProviderId `xml:"keyProvider,omitempty"` -} - -func init() { - t["GenerateKeyRequestType"] = reflect.TypeOf((*GenerateKeyRequestType)(nil)).Elem() -} - -type GenerateKeyResponse struct { - Returnval CryptoKeyResult `xml:"returnval"` -} - -type GenerateLogBundlesRequestType struct { - This ManagedObjectReference `xml:"_this"` - IncludeDefault bool `xml:"includeDefault"` - Host []ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["GenerateLogBundlesRequestType"] = reflect.TypeOf((*GenerateLogBundlesRequestType)(nil)).Elem() -} - -type GenerateLogBundles_Task GenerateLogBundlesRequestType - -func init() { - t["GenerateLogBundles_Task"] = reflect.TypeOf((*GenerateLogBundles_Task)(nil)).Elem() -} - -type GenerateLogBundles_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type GenerateSelfSignedClientCert GenerateSelfSignedClientCertRequestType - -func init() { - t["GenerateSelfSignedClientCert"] = reflect.TypeOf((*GenerateSelfSignedClientCert)(nil)).Elem() -} - -type GenerateSelfSignedClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` -} - -func init() { - t["GenerateSelfSignedClientCertRequestType"] = reflect.TypeOf((*GenerateSelfSignedClientCertRequestType)(nil)).Elem() -} - -type GenerateSelfSignedClientCertResponse struct { - Returnval string `xml:"returnval"` -} - -type GenericDrsFault struct { - VimFault - - HostFaults []LocalizedMethodFault `xml:"hostFaults,omitempty"` -} - -func init() { - t["GenericDrsFault"] = reflect.TypeOf((*GenericDrsFault)(nil)).Elem() -} - -type GenericDrsFaultFault GenericDrsFault - -func init() { - t["GenericDrsFaultFault"] = reflect.TypeOf((*GenericDrsFaultFault)(nil)).Elem() -} - -type GenericVmConfigFault struct { - VmConfigFault - - Reason string `xml:"reason"` -} - -func init() { - t["GenericVmConfigFault"] = reflect.TypeOf((*GenericVmConfigFault)(nil)).Elem() -} - -type GenericVmConfigFaultFault GenericVmConfigFault - -func init() { - t["GenericVmConfigFaultFault"] = reflect.TypeOf((*GenericVmConfigFaultFault)(nil)).Elem() -} - -type GetAlarm GetAlarmRequestType - -func init() { - t["GetAlarm"] = reflect.TypeOf((*GetAlarm)(nil)).Elem() -} - -type GetAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["GetAlarmRequestType"] = reflect.TypeOf((*GetAlarmRequestType)(nil)).Elem() -} - -type GetAlarmResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type GetAlarmState GetAlarmStateRequestType - -func init() { - t["GetAlarmState"] = reflect.TypeOf((*GetAlarmState)(nil)).Elem() -} - -type GetAlarmStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["GetAlarmStateRequestType"] = reflect.TypeOf((*GetAlarmStateRequestType)(nil)).Elem() -} - -type GetAlarmStateResponse struct { - Returnval []AlarmState `xml:"returnval,omitempty"` -} - -type GetCustomizationSpec GetCustomizationSpecRequestType - -func init() { - t["GetCustomizationSpec"] = reflect.TypeOf((*GetCustomizationSpec)(nil)).Elem() -} - -type GetCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["GetCustomizationSpecRequestType"] = reflect.TypeOf((*GetCustomizationSpecRequestType)(nil)).Elem() -} - -type GetCustomizationSpecResponse struct { - Returnval CustomizationSpecItem `xml:"returnval"` -} - -type GetDefaultKmsCluster GetDefaultKmsClusterRequestType - -func init() { - t["GetDefaultKmsCluster"] = reflect.TypeOf((*GetDefaultKmsCluster)(nil)).Elem() -} - -type GetDefaultKmsClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` - DefaultsToParent *bool `xml:"defaultsToParent"` -} - -func init() { - t["GetDefaultKmsClusterRequestType"] = reflect.TypeOf((*GetDefaultKmsClusterRequestType)(nil)).Elem() -} - -type GetDefaultKmsClusterResponse struct { - Returnval *KeyProviderId `xml:"returnval,omitempty"` -} - -type GetPublicKey GetPublicKeyRequestType - -func init() { - t["GetPublicKey"] = reflect.TypeOf((*GetPublicKey)(nil)).Elem() -} - -type GetPublicKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["GetPublicKeyRequestType"] = reflect.TypeOf((*GetPublicKeyRequestType)(nil)).Elem() -} - -type GetPublicKeyResponse struct { - Returnval string `xml:"returnval"` -} - -type GetResourceUsage GetResourceUsageRequestType - -func init() { - t["GetResourceUsage"] = reflect.TypeOf((*GetResourceUsage)(nil)).Elem() -} - -type GetResourceUsageRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["GetResourceUsageRequestType"] = reflect.TypeOf((*GetResourceUsageRequestType)(nil)).Elem() -} - -type GetResourceUsageResponse struct { - Returnval ClusterResourceUsageSummary `xml:"returnval"` -} - -type GetSiteInfo GetSiteInfoRequestType - -func init() { - t["GetSiteInfo"] = reflect.TypeOf((*GetSiteInfo)(nil)).Elem() -} - -type GetSiteInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["GetSiteInfoRequestType"] = reflect.TypeOf((*GetSiteInfoRequestType)(nil)).Elem() -} - -type GetSiteInfoResponse struct { - Returnval SiteInfo `xml:"returnval"` -} - -type GetSystemVMsRestrictedDatastores GetSystemVMsRestrictedDatastoresRequestType - -func init() { - t["GetSystemVMsRestrictedDatastores"] = reflect.TypeOf((*GetSystemVMsRestrictedDatastores)(nil)).Elem() -} - -type GetSystemVMsRestrictedDatastoresRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["GetSystemVMsRestrictedDatastoresRequestType"] = reflect.TypeOf((*GetSystemVMsRestrictedDatastoresRequestType)(nil)).Elem() -} - -type GetSystemVMsRestrictedDatastoresResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type GetVchaClusterHealth GetVchaClusterHealthRequestType - -func init() { - t["GetVchaClusterHealth"] = reflect.TypeOf((*GetVchaClusterHealth)(nil)).Elem() -} - -type GetVchaClusterHealthRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["GetVchaClusterHealthRequestType"] = reflect.TypeOf((*GetVchaClusterHealthRequestType)(nil)).Elem() -} - -type GetVchaClusterHealthResponse struct { - Returnval VchaClusterHealth `xml:"returnval"` -} - -type GetVsanObjExtAttrs GetVsanObjExtAttrsRequestType - -func init() { - t["GetVsanObjExtAttrs"] = reflect.TypeOf((*GetVsanObjExtAttrs)(nil)).Elem() -} - -type GetVsanObjExtAttrsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids"` -} - -func init() { - t["GetVsanObjExtAttrsRequestType"] = reflect.TypeOf((*GetVsanObjExtAttrsRequestType)(nil)).Elem() -} - -type GetVsanObjExtAttrsResponse struct { - Returnval string `xml:"returnval"` -} - -type GhostDvsProxySwitchDetectedEvent struct { - HostEvent - - SwitchUuid []string `xml:"switchUuid"` -} - -func init() { - t["GhostDvsProxySwitchDetectedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchDetectedEvent)(nil)).Elem() -} - -type GhostDvsProxySwitchRemovedEvent struct { - HostEvent - - SwitchUuid []string `xml:"switchUuid"` -} - -func init() { - t["GhostDvsProxySwitchRemovedEvent"] = reflect.TypeOf((*GhostDvsProxySwitchRemovedEvent)(nil)).Elem() -} - -type GlobalMessageChangedEvent struct { - SessionEvent - - Message string `xml:"message"` - PrevMessage string `xml:"prevMessage,omitempty"` -} - -func init() { - t["GlobalMessageChangedEvent"] = reflect.TypeOf((*GlobalMessageChangedEvent)(nil)).Elem() -} - -type GroupAlarmAction struct { - AlarmAction - - Action []BaseAlarmAction `xml:"action,typeattr"` -} - -func init() { - t["GroupAlarmAction"] = reflect.TypeOf((*GroupAlarmAction)(nil)).Elem() -} - -type GuestAliases struct { - DynamicData - - Base64Cert string `xml:"base64Cert"` - Aliases []GuestAuthAliasInfo `xml:"aliases"` -} - -func init() { - t["GuestAliases"] = reflect.TypeOf((*GuestAliases)(nil)).Elem() -} - -type GuestAuthAliasInfo struct { - DynamicData - - Subject BaseGuestAuthSubject `xml:"subject,typeattr"` - Comment string `xml:"comment"` -} - -func init() { - t["GuestAuthAliasInfo"] = reflect.TypeOf((*GuestAuthAliasInfo)(nil)).Elem() -} - -type GuestAuthAnySubject struct { - GuestAuthSubject -} - -func init() { - t["GuestAuthAnySubject"] = reflect.TypeOf((*GuestAuthAnySubject)(nil)).Elem() -} - -type GuestAuthNamedSubject struct { - GuestAuthSubject - - Name string `xml:"name"` -} - -func init() { - t["GuestAuthNamedSubject"] = reflect.TypeOf((*GuestAuthNamedSubject)(nil)).Elem() -} - -type GuestAuthSubject struct { - DynamicData -} - -func init() { - t["GuestAuthSubject"] = reflect.TypeOf((*GuestAuthSubject)(nil)).Elem() -} - -type GuestAuthentication struct { - DynamicData - - InteractiveSession bool `xml:"interactiveSession"` -} - -func init() { - t["GuestAuthentication"] = reflect.TypeOf((*GuestAuthentication)(nil)).Elem() -} - -type GuestAuthenticationChallenge struct { - GuestOperationsFault - - ServerChallenge BaseGuestAuthentication `xml:"serverChallenge,typeattr"` - SessionID int64 `xml:"sessionID"` -} - -func init() { - t["GuestAuthenticationChallenge"] = reflect.TypeOf((*GuestAuthenticationChallenge)(nil)).Elem() -} - -type GuestAuthenticationChallengeFault GuestAuthenticationChallenge - -func init() { - t["GuestAuthenticationChallengeFault"] = reflect.TypeOf((*GuestAuthenticationChallengeFault)(nil)).Elem() -} - -type GuestComponentsOutOfDate struct { - GuestOperationsFault -} - -func init() { - t["GuestComponentsOutOfDate"] = reflect.TypeOf((*GuestComponentsOutOfDate)(nil)).Elem() -} - -type GuestComponentsOutOfDateFault GuestComponentsOutOfDate - -func init() { - t["GuestComponentsOutOfDateFault"] = reflect.TypeOf((*GuestComponentsOutOfDateFault)(nil)).Elem() -} - -type GuestDiskInfo struct { - DynamicData - - DiskPath string `xml:"diskPath,omitempty"` - Capacity int64 `xml:"capacity,omitempty"` - FreeSpace int64 `xml:"freeSpace,omitempty"` - FilesystemType string `xml:"filesystemType,omitempty"` - Mappings []GuestInfoVirtualDiskMapping `xml:"mappings,omitempty"` -} - -func init() { - t["GuestDiskInfo"] = reflect.TypeOf((*GuestDiskInfo)(nil)).Elem() -} - -type GuestFileAttributes struct { - DynamicData - - ModificationTime *time.Time `xml:"modificationTime"` - AccessTime *time.Time `xml:"accessTime"` - SymlinkTarget string `xml:"symlinkTarget,omitempty"` -} - -func init() { - t["GuestFileAttributes"] = reflect.TypeOf((*GuestFileAttributes)(nil)).Elem() -} - -type GuestFileInfo struct { - DynamicData - - Path string `xml:"path"` - Type string `xml:"type"` - Size int64 `xml:"size"` - Attributes BaseGuestFileAttributes `xml:"attributes,typeattr"` -} - -func init() { - t["GuestFileInfo"] = reflect.TypeOf((*GuestFileInfo)(nil)).Elem() -} - -type GuestInfo struct { - DynamicData - - ToolsStatus VirtualMachineToolsStatus `xml:"toolsStatus,omitempty"` - ToolsVersionStatus string `xml:"toolsVersionStatus,omitempty"` - ToolsVersionStatus2 string `xml:"toolsVersionStatus2,omitempty"` - ToolsRunningStatus string `xml:"toolsRunningStatus,omitempty"` - ToolsVersion string `xml:"toolsVersion,omitempty"` - ToolsInstallType string `xml:"toolsInstallType,omitempty"` - GuestId string `xml:"guestId,omitempty"` - GuestFamily string `xml:"guestFamily,omitempty"` - GuestFullName string `xml:"guestFullName,omitempty"` - HostName string `xml:"hostName,omitempty"` - IpAddress string `xml:"ipAddress,omitempty"` - Net []GuestNicInfo `xml:"net,omitempty"` - IpStack []GuestStackInfo `xml:"ipStack,omitempty"` - Disk []GuestDiskInfo `xml:"disk,omitempty"` - Screen *GuestScreenInfo `xml:"screen,omitempty"` - GuestState string `xml:"guestState"` - AppHeartbeatStatus string `xml:"appHeartbeatStatus,omitempty"` - GuestKernelCrashed *bool `xml:"guestKernelCrashed"` - AppState string `xml:"appState,omitempty"` - GuestOperationsReady *bool `xml:"guestOperationsReady"` - InteractiveGuestOperationsReady *bool `xml:"interactiveGuestOperationsReady"` - GuestStateChangeSupported *bool `xml:"guestStateChangeSupported"` - GenerationInfo []GuestInfoNamespaceGenerationInfo `xml:"generationInfo,omitempty"` - HwVersion string `xml:"hwVersion,omitempty"` - CustomizationInfo *GuestInfoCustomizationInfo `xml:"customizationInfo,omitempty"` -} - -func init() { - t["GuestInfo"] = reflect.TypeOf((*GuestInfo)(nil)).Elem() -} - -type GuestInfoCustomizationInfo struct { - DynamicData - - CustomizationStatus string `xml:"customizationStatus"` - StartTime *time.Time `xml:"startTime"` - EndTime *time.Time `xml:"endTime"` - ErrorMsg string `xml:"errorMsg,omitempty"` -} - -func init() { - t["GuestInfoCustomizationInfo"] = reflect.TypeOf((*GuestInfoCustomizationInfo)(nil)).Elem() -} - -type GuestInfoNamespaceGenerationInfo struct { - DynamicData - - Key string `xml:"key"` - GenerationNo int32 `xml:"generationNo"` -} - -func init() { - t["GuestInfoNamespaceGenerationInfo"] = reflect.TypeOf((*GuestInfoNamespaceGenerationInfo)(nil)).Elem() -} - -type GuestInfoVirtualDiskMapping struct { - DynamicData - - Key int32 `xml:"key"` -} - -func init() { - t["GuestInfoVirtualDiskMapping"] = reflect.TypeOf((*GuestInfoVirtualDiskMapping)(nil)).Elem() -} - -type GuestListFileInfo struct { - DynamicData - - Files []GuestFileInfo `xml:"files,omitempty"` - Remaining int32 `xml:"remaining"` -} - -func init() { - t["GuestListFileInfo"] = reflect.TypeOf((*GuestListFileInfo)(nil)).Elem() -} - -type GuestMappedAliases struct { - DynamicData - - Base64Cert string `xml:"base64Cert"` - Username string `xml:"username"` - Subjects []BaseGuestAuthSubject `xml:"subjects,typeattr"` -} - -func init() { - t["GuestMappedAliases"] = reflect.TypeOf((*GuestMappedAliases)(nil)).Elem() -} - -type GuestMultipleMappings struct { - GuestOperationsFault -} - -func init() { - t["GuestMultipleMappings"] = reflect.TypeOf((*GuestMultipleMappings)(nil)).Elem() -} - -type GuestMultipleMappingsFault GuestMultipleMappings - -func init() { - t["GuestMultipleMappingsFault"] = reflect.TypeOf((*GuestMultipleMappingsFault)(nil)).Elem() -} - -type GuestNicInfo struct { - DynamicData - - Network string `xml:"network,omitempty"` - IpAddress []string `xml:"ipAddress,omitempty"` - MacAddress string `xml:"macAddress,omitempty"` - Connected bool `xml:"connected"` - DeviceConfigId int32 `xml:"deviceConfigId"` - DnsConfig *NetDnsConfigInfo `xml:"dnsConfig,omitempty"` - IpConfig *NetIpConfigInfo `xml:"ipConfig,omitempty"` - NetBIOSConfig BaseNetBIOSConfigInfo `xml:"netBIOSConfig,omitempty,typeattr"` -} - -func init() { - t["GuestNicInfo"] = reflect.TypeOf((*GuestNicInfo)(nil)).Elem() -} - -type GuestOperationsFault struct { - VimFault -} - -func init() { - t["GuestOperationsFault"] = reflect.TypeOf((*GuestOperationsFault)(nil)).Elem() -} - -type GuestOperationsFaultFault BaseGuestOperationsFault - -func init() { - t["GuestOperationsFaultFault"] = reflect.TypeOf((*GuestOperationsFaultFault)(nil)).Elem() -} - -type GuestOperationsUnavailable struct { - GuestOperationsFault -} - -func init() { - t["GuestOperationsUnavailable"] = reflect.TypeOf((*GuestOperationsUnavailable)(nil)).Elem() -} - -type GuestOperationsUnavailableFault GuestOperationsUnavailable - -func init() { - t["GuestOperationsUnavailableFault"] = reflect.TypeOf((*GuestOperationsUnavailableFault)(nil)).Elem() -} - -type GuestOsDescriptor struct { - DynamicData - - Id string `xml:"id"` - Family string `xml:"family"` - FullName string `xml:"fullName"` - SupportedMaxCPUs int32 `xml:"supportedMaxCPUs"` - NumSupportedPhysicalSockets int32 `xml:"numSupportedPhysicalSockets,omitempty"` - NumSupportedCoresPerSocket int32 `xml:"numSupportedCoresPerSocket,omitempty"` - SupportedMinMemMB int32 `xml:"supportedMinMemMB"` - SupportedMaxMemMB int32 `xml:"supportedMaxMemMB"` - RecommendedMemMB int32 `xml:"recommendedMemMB"` - RecommendedColorDepth int32 `xml:"recommendedColorDepth"` - SupportedDiskControllerList []string `xml:"supportedDiskControllerList"` - RecommendedSCSIController string `xml:"recommendedSCSIController,omitempty"` - RecommendedDiskController string `xml:"recommendedDiskController"` - SupportedNumDisks int32 `xml:"supportedNumDisks"` - RecommendedDiskSizeMB int32 `xml:"recommendedDiskSizeMB"` - RecommendedCdromController string `xml:"recommendedCdromController,omitempty"` - SupportedEthernetCard []string `xml:"supportedEthernetCard"` - RecommendedEthernetCard string `xml:"recommendedEthernetCard,omitempty"` - SupportsSlaveDisk *bool `xml:"supportsSlaveDisk"` - CpuFeatureMask []HostCpuIdInfo `xml:"cpuFeatureMask,omitempty"` - SmcRequired *bool `xml:"smcRequired"` - SupportsWakeOnLan bool `xml:"supportsWakeOnLan"` - SupportsVMI *bool `xml:"supportsVMI"` - SupportsMemoryHotAdd *bool `xml:"supportsMemoryHotAdd"` - SupportsCpuHotAdd *bool `xml:"supportsCpuHotAdd"` - SupportsCpuHotRemove *bool `xml:"supportsCpuHotRemove"` - SupportedFirmware []string `xml:"supportedFirmware,omitempty"` - RecommendedFirmware string `xml:"recommendedFirmware,omitempty"` - SupportedUSBControllerList []string `xml:"supportedUSBControllerList,omitempty"` - RecommendedUSBController string `xml:"recommendedUSBController,omitempty"` - Supports3D *bool `xml:"supports3D"` - Recommended3D *bool `xml:"recommended3D"` - SmcRecommended *bool `xml:"smcRecommended"` - Ich7mRecommended *bool `xml:"ich7mRecommended"` - UsbRecommended *bool `xml:"usbRecommended"` - SupportLevel string `xml:"supportLevel,omitempty"` - SupportedForCreate *bool `xml:"supportedForCreate"` - VRAMSizeInKB *IntOption `xml:"vRAMSizeInKB,omitempty"` - NumSupportedFloppyDevices int32 `xml:"numSupportedFloppyDevices,omitempty"` - WakeOnLanEthernetCard []string `xml:"wakeOnLanEthernetCard,omitempty"` - SupportsPvscsiControllerForBoot *bool `xml:"supportsPvscsiControllerForBoot"` - DiskUuidEnabled *bool `xml:"diskUuidEnabled"` - SupportsHotPlugPCI *bool `xml:"supportsHotPlugPCI"` - SupportsSecureBoot *bool `xml:"supportsSecureBoot"` - DefaultSecureBoot *bool `xml:"defaultSecureBoot"` - PersistentMemorySupported *bool `xml:"persistentMemorySupported"` - SupportedMinPersistentMemoryMB int64 `xml:"supportedMinPersistentMemoryMB,omitempty"` - SupportedMaxPersistentMemoryMB int64 `xml:"supportedMaxPersistentMemoryMB,omitempty"` - RecommendedPersistentMemoryMB int64 `xml:"recommendedPersistentMemoryMB,omitempty"` - PersistentMemoryHotAddSupported *bool `xml:"persistentMemoryHotAddSupported"` - PersistentMemoryHotRemoveSupported *bool `xml:"persistentMemoryHotRemoveSupported"` - PersistentMemoryColdGrowthSupported *bool `xml:"persistentMemoryColdGrowthSupported"` - PersistentMemoryColdGrowthGranularityMB int64 `xml:"persistentMemoryColdGrowthGranularityMB,omitempty"` - PersistentMemoryHotGrowthSupported *bool `xml:"persistentMemoryHotGrowthSupported"` - PersistentMemoryHotGrowthGranularityMB int64 `xml:"persistentMemoryHotGrowthGranularityMB,omitempty"` - NumRecommendedPhysicalSockets int32 `xml:"numRecommendedPhysicalSockets,omitempty"` - NumRecommendedCoresPerSocket int32 `xml:"numRecommendedCoresPerSocket,omitempty"` - VvtdSupported *BoolOption `xml:"vvtdSupported,omitempty"` - VbsSupported *BoolOption `xml:"vbsSupported,omitempty"` - VsgxSupported *BoolOption `xml:"vsgxSupported,omitempty"` - VsgxRemoteAttestationSupported *bool `xml:"vsgxRemoteAttestationSupported"` - SupportsTPM20 *bool `xml:"supportsTPM20"` - RecommendedTPM20 *bool `xml:"recommendedTPM20"` - VwdtSupported *bool `xml:"vwdtSupported"` -} - -func init() { - t["GuestOsDescriptor"] = reflect.TypeOf((*GuestOsDescriptor)(nil)).Elem() -} - -type GuestPermissionDenied struct { - GuestOperationsFault -} - -func init() { - t["GuestPermissionDenied"] = reflect.TypeOf((*GuestPermissionDenied)(nil)).Elem() -} - -type GuestPermissionDeniedFault GuestPermissionDenied - -func init() { - t["GuestPermissionDeniedFault"] = reflect.TypeOf((*GuestPermissionDeniedFault)(nil)).Elem() -} - -type GuestPosixFileAttributes struct { - GuestFileAttributes - - OwnerId *int32 `xml:"ownerId"` - GroupId *int32 `xml:"groupId"` - Permissions int64 `xml:"permissions,omitempty"` -} - -func init() { - t["GuestPosixFileAttributes"] = reflect.TypeOf((*GuestPosixFileAttributes)(nil)).Elem() -} - -type GuestProcessInfo struct { - DynamicData - - Name string `xml:"name"` - Pid int64 `xml:"pid"` - Owner string `xml:"owner"` - CmdLine string `xml:"cmdLine"` - StartTime time.Time `xml:"startTime"` - EndTime *time.Time `xml:"endTime"` - ExitCode int32 `xml:"exitCode,omitempty"` -} - -func init() { - t["GuestProcessInfo"] = reflect.TypeOf((*GuestProcessInfo)(nil)).Elem() -} - -type GuestProcessNotFound struct { - GuestOperationsFault - - Pid int64 `xml:"pid"` -} - -func init() { - t["GuestProcessNotFound"] = reflect.TypeOf((*GuestProcessNotFound)(nil)).Elem() -} - -type GuestProcessNotFoundFault GuestProcessNotFound - -func init() { - t["GuestProcessNotFoundFault"] = reflect.TypeOf((*GuestProcessNotFoundFault)(nil)).Elem() -} - -type GuestProgramSpec struct { - DynamicData - - ProgramPath string `xml:"programPath"` - Arguments string `xml:"arguments"` - WorkingDirectory string `xml:"workingDirectory,omitempty"` - EnvVariables []string `xml:"envVariables,omitempty"` -} - -func init() { - t["GuestProgramSpec"] = reflect.TypeOf((*GuestProgramSpec)(nil)).Elem() -} - -type GuestRegKeyNameSpec struct { - DynamicData - - RegistryPath string `xml:"registryPath"` - WowBitness string `xml:"wowBitness"` -} - -func init() { - t["GuestRegKeyNameSpec"] = reflect.TypeOf((*GuestRegKeyNameSpec)(nil)).Elem() -} - -type GuestRegKeyRecordSpec struct { - DynamicData - - Key GuestRegKeySpec `xml:"key"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["GuestRegKeyRecordSpec"] = reflect.TypeOf((*GuestRegKeyRecordSpec)(nil)).Elem() -} - -type GuestRegKeySpec struct { - DynamicData - - KeyName GuestRegKeyNameSpec `xml:"keyName"` - ClassType string `xml:"classType"` - LastWritten time.Time `xml:"lastWritten"` -} - -func init() { - t["GuestRegKeySpec"] = reflect.TypeOf((*GuestRegKeySpec)(nil)).Elem() -} - -type GuestRegValueBinarySpec struct { - GuestRegValueDataSpec - - Value []byte `xml:"value,omitempty"` -} - -func init() { - t["GuestRegValueBinarySpec"] = reflect.TypeOf((*GuestRegValueBinarySpec)(nil)).Elem() -} - -type GuestRegValueDataSpec struct { - DynamicData -} - -func init() { - t["GuestRegValueDataSpec"] = reflect.TypeOf((*GuestRegValueDataSpec)(nil)).Elem() -} - -type GuestRegValueDwordSpec struct { - GuestRegValueDataSpec - - Value int32 `xml:"value"` -} - -func init() { - t["GuestRegValueDwordSpec"] = reflect.TypeOf((*GuestRegValueDwordSpec)(nil)).Elem() -} - -type GuestRegValueExpandStringSpec struct { - GuestRegValueDataSpec - - Value string `xml:"value,omitempty"` -} - -func init() { - t["GuestRegValueExpandStringSpec"] = reflect.TypeOf((*GuestRegValueExpandStringSpec)(nil)).Elem() -} - -type GuestRegValueMultiStringSpec struct { - GuestRegValueDataSpec - - Value []string `xml:"value,omitempty"` -} - -func init() { - t["GuestRegValueMultiStringSpec"] = reflect.TypeOf((*GuestRegValueMultiStringSpec)(nil)).Elem() -} - -type GuestRegValueNameSpec struct { - DynamicData - - KeyName GuestRegKeyNameSpec `xml:"keyName"` - Name string `xml:"name"` -} - -func init() { - t["GuestRegValueNameSpec"] = reflect.TypeOf((*GuestRegValueNameSpec)(nil)).Elem() -} - -type GuestRegValueQwordSpec struct { - GuestRegValueDataSpec - - Value int64 `xml:"value"` -} - -func init() { - t["GuestRegValueQwordSpec"] = reflect.TypeOf((*GuestRegValueQwordSpec)(nil)).Elem() -} - -type GuestRegValueSpec struct { - DynamicData - - Name GuestRegValueNameSpec `xml:"name"` - Data BaseGuestRegValueDataSpec `xml:"data,typeattr"` -} - -func init() { - t["GuestRegValueSpec"] = reflect.TypeOf((*GuestRegValueSpec)(nil)).Elem() -} - -type GuestRegValueStringSpec struct { - GuestRegValueDataSpec - - Value string `xml:"value,omitempty"` -} - -func init() { - t["GuestRegValueStringSpec"] = reflect.TypeOf((*GuestRegValueStringSpec)(nil)).Elem() -} - -type GuestRegistryFault struct { - GuestOperationsFault - - WindowsSystemErrorCode int64 `xml:"windowsSystemErrorCode"` -} - -func init() { - t["GuestRegistryFault"] = reflect.TypeOf((*GuestRegistryFault)(nil)).Elem() -} - -type GuestRegistryFaultFault BaseGuestRegistryFault - -func init() { - t["GuestRegistryFaultFault"] = reflect.TypeOf((*GuestRegistryFaultFault)(nil)).Elem() -} - -type GuestRegistryKeyAlreadyExists struct { - GuestRegistryKeyFault -} - -func init() { - t["GuestRegistryKeyAlreadyExists"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExists)(nil)).Elem() -} - -type GuestRegistryKeyAlreadyExistsFault GuestRegistryKeyAlreadyExists - -func init() { - t["GuestRegistryKeyAlreadyExistsFault"] = reflect.TypeOf((*GuestRegistryKeyAlreadyExistsFault)(nil)).Elem() -} - -type GuestRegistryKeyFault struct { - GuestRegistryFault - - KeyName string `xml:"keyName"` -} - -func init() { - t["GuestRegistryKeyFault"] = reflect.TypeOf((*GuestRegistryKeyFault)(nil)).Elem() -} - -type GuestRegistryKeyFaultFault BaseGuestRegistryKeyFault - -func init() { - t["GuestRegistryKeyFaultFault"] = reflect.TypeOf((*GuestRegistryKeyFaultFault)(nil)).Elem() -} - -type GuestRegistryKeyHasSubkeys struct { - GuestRegistryKeyFault -} - -func init() { - t["GuestRegistryKeyHasSubkeys"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeys)(nil)).Elem() -} - -type GuestRegistryKeyHasSubkeysFault GuestRegistryKeyHasSubkeys - -func init() { - t["GuestRegistryKeyHasSubkeysFault"] = reflect.TypeOf((*GuestRegistryKeyHasSubkeysFault)(nil)).Elem() -} - -type GuestRegistryKeyInvalid struct { - GuestRegistryKeyFault -} - -func init() { - t["GuestRegistryKeyInvalid"] = reflect.TypeOf((*GuestRegistryKeyInvalid)(nil)).Elem() -} - -type GuestRegistryKeyInvalidFault GuestRegistryKeyInvalid - -func init() { - t["GuestRegistryKeyInvalidFault"] = reflect.TypeOf((*GuestRegistryKeyInvalidFault)(nil)).Elem() -} - -type GuestRegistryKeyParentVolatile struct { - GuestRegistryKeyFault -} - -func init() { - t["GuestRegistryKeyParentVolatile"] = reflect.TypeOf((*GuestRegistryKeyParentVolatile)(nil)).Elem() -} - -type GuestRegistryKeyParentVolatileFault GuestRegistryKeyParentVolatile - -func init() { - t["GuestRegistryKeyParentVolatileFault"] = reflect.TypeOf((*GuestRegistryKeyParentVolatileFault)(nil)).Elem() -} - -type GuestRegistryValueFault struct { - GuestRegistryFault - - KeyName string `xml:"keyName"` - ValueName string `xml:"valueName"` -} - -func init() { - t["GuestRegistryValueFault"] = reflect.TypeOf((*GuestRegistryValueFault)(nil)).Elem() -} - -type GuestRegistryValueFaultFault BaseGuestRegistryValueFault - -func init() { - t["GuestRegistryValueFaultFault"] = reflect.TypeOf((*GuestRegistryValueFaultFault)(nil)).Elem() -} - -type GuestRegistryValueNotFound struct { - GuestRegistryValueFault -} - -func init() { - t["GuestRegistryValueNotFound"] = reflect.TypeOf((*GuestRegistryValueNotFound)(nil)).Elem() -} - -type GuestRegistryValueNotFoundFault GuestRegistryValueNotFound - -func init() { - t["GuestRegistryValueNotFoundFault"] = reflect.TypeOf((*GuestRegistryValueNotFoundFault)(nil)).Elem() -} - -type GuestScreenInfo struct { - DynamicData - - Width int32 `xml:"width"` - Height int32 `xml:"height"` -} - -func init() { - t["GuestScreenInfo"] = reflect.TypeOf((*GuestScreenInfo)(nil)).Elem() -} - -type GuestStackInfo struct { - DynamicData - - DnsConfig *NetDnsConfigInfo `xml:"dnsConfig,omitempty"` - IpRouteConfig *NetIpRouteConfigInfo `xml:"ipRouteConfig,omitempty"` - IpStackConfig []KeyValue `xml:"ipStackConfig,omitempty"` - DhcpConfig *NetDhcpConfigInfo `xml:"dhcpConfig,omitempty"` -} - -func init() { - t["GuestStackInfo"] = reflect.TypeOf((*GuestStackInfo)(nil)).Elem() -} - -type GuestWindowsFileAttributes struct { - GuestFileAttributes - - Hidden *bool `xml:"hidden"` - ReadOnly *bool `xml:"readOnly"` - CreateTime *time.Time `xml:"createTime"` -} - -func init() { - t["GuestWindowsFileAttributes"] = reflect.TypeOf((*GuestWindowsFileAttributes)(nil)).Elem() -} - -type GuestWindowsProgramSpec struct { - GuestProgramSpec - - StartMinimized bool `xml:"startMinimized"` -} - -func init() { - t["GuestWindowsProgramSpec"] = reflect.TypeOf((*GuestWindowsProgramSpec)(nil)).Elem() -} - -type HAErrorsAtDest struct { - MigrationFault -} - -func init() { - t["HAErrorsAtDest"] = reflect.TypeOf((*HAErrorsAtDest)(nil)).Elem() -} - -type HAErrorsAtDestFault HAErrorsAtDest - -func init() { - t["HAErrorsAtDestFault"] = reflect.TypeOf((*HAErrorsAtDestFault)(nil)).Elem() -} - -type HasMonitoredEntity HasMonitoredEntityRequestType - -func init() { - t["HasMonitoredEntity"] = reflect.TypeOf((*HasMonitoredEntity)(nil)).Elem() -} - -type HasMonitoredEntityRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["HasMonitoredEntityRequestType"] = reflect.TypeOf((*HasMonitoredEntityRequestType)(nil)).Elem() -} - -type HasMonitoredEntityResponse struct { - Returnval bool `xml:"returnval"` -} - -type HasPrivilegeOnEntities HasPrivilegeOnEntitiesRequestType - -func init() { - t["HasPrivilegeOnEntities"] = reflect.TypeOf((*HasPrivilegeOnEntities)(nil)).Elem() -} - -type HasPrivilegeOnEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity"` - SessionId string `xml:"sessionId"` - PrivId []string `xml:"privId,omitempty"` -} - -func init() { - t["HasPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntitiesRequestType)(nil)).Elem() -} - -type HasPrivilegeOnEntitiesResponse struct { - Returnval []EntityPrivilege `xml:"returnval,omitempty"` -} - -type HasPrivilegeOnEntity HasPrivilegeOnEntityRequestType - -func init() { - t["HasPrivilegeOnEntity"] = reflect.TypeOf((*HasPrivilegeOnEntity)(nil)).Elem() -} - -type HasPrivilegeOnEntityRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - SessionId string `xml:"sessionId"` - PrivId []string `xml:"privId,omitempty"` -} - -func init() { - t["HasPrivilegeOnEntityRequestType"] = reflect.TypeOf((*HasPrivilegeOnEntityRequestType)(nil)).Elem() -} - -type HasPrivilegeOnEntityResponse struct { - Returnval []bool `xml:"returnval,omitempty"` -} - -type HasProvider HasProviderRequestType - -func init() { - t["HasProvider"] = reflect.TypeOf((*HasProvider)(nil)).Elem() -} - -type HasProviderRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["HasProviderRequestType"] = reflect.TypeOf((*HasProviderRequestType)(nil)).Elem() -} - -type HasProviderResponse struct { - Returnval bool `xml:"returnval"` -} - -type HasUserPrivilegeOnEntities HasUserPrivilegeOnEntitiesRequestType - -func init() { - t["HasUserPrivilegeOnEntities"] = reflect.TypeOf((*HasUserPrivilegeOnEntities)(nil)).Elem() -} - -type HasUserPrivilegeOnEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entities []ManagedObjectReference `xml:"entities"` - UserName string `xml:"userName"` - PrivId []string `xml:"privId,omitempty"` -} - -func init() { - t["HasUserPrivilegeOnEntitiesRequestType"] = reflect.TypeOf((*HasUserPrivilegeOnEntitiesRequestType)(nil)).Elem() -} - -type HasUserPrivilegeOnEntitiesResponse struct { - Returnval []EntityPrivilege `xml:"returnval,omitempty"` -} - -type HbrDiskMigrationAction struct { - ClusterAction - - CollectionId string `xml:"collectionId"` - CollectionName string `xml:"collectionName"` - DiskIds []string `xml:"diskIds"` - Source ManagedObjectReference `xml:"source"` - Destination ManagedObjectReference `xml:"destination"` - SizeTransferred int64 `xml:"sizeTransferred"` - SpaceUtilSrcBefore float32 `xml:"spaceUtilSrcBefore,omitempty"` - SpaceUtilDstBefore float32 `xml:"spaceUtilDstBefore,omitempty"` - SpaceUtilSrcAfter float32 `xml:"spaceUtilSrcAfter,omitempty"` - SpaceUtilDstAfter float32 `xml:"spaceUtilDstAfter,omitempty"` - IoLatencySrcBefore float32 `xml:"ioLatencySrcBefore,omitempty"` - IoLatencyDstBefore float32 `xml:"ioLatencyDstBefore,omitempty"` -} - -func init() { - t["HbrDiskMigrationAction"] = reflect.TypeOf((*HbrDiskMigrationAction)(nil)).Elem() -} - -type HbrManagerReplicationVmInfo struct { - DynamicData - - State string `xml:"state"` - ProgressInfo *ReplicationVmProgressInfo `xml:"progressInfo,omitempty"` - ImageId string `xml:"imageId,omitempty"` - LastError *LocalizedMethodFault `xml:"lastError,omitempty"` -} - -func init() { - t["HbrManagerReplicationVmInfo"] = reflect.TypeOf((*HbrManagerReplicationVmInfo)(nil)).Elem() -} - -type HbrManagerVmReplicationCapability struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - SupportedQuiesceMode string `xml:"supportedQuiesceMode"` - CompressionSupported bool `xml:"compressionSupported"` - MaxSupportedSourceDiskCapacity int64 `xml:"maxSupportedSourceDiskCapacity"` - MinRpo int64 `xml:"minRpo,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HbrManagerVmReplicationCapability"] = reflect.TypeOf((*HbrManagerVmReplicationCapability)(nil)).Elem() -} - -type HealthStatusChangedEvent struct { - Event - - ComponentId string `xml:"componentId"` - OldStatus string `xml:"oldStatus"` - NewStatus string `xml:"newStatus"` - ComponentName string `xml:"componentName"` - ServiceId string `xml:"serviceId,omitempty"` -} - -func init() { - t["HealthStatusChangedEvent"] = reflect.TypeOf((*HealthStatusChangedEvent)(nil)).Elem() -} - -type HealthSystemRuntime struct { - DynamicData - - SystemHealthInfo *HostSystemHealthInfo `xml:"systemHealthInfo,omitempty"` - HardwareStatusInfo *HostHardwareStatusInfo `xml:"hardwareStatusInfo,omitempty"` -} - -func init() { - t["HealthSystemRuntime"] = reflect.TypeOf((*HealthSystemRuntime)(nil)).Elem() -} - -type HealthUpdate struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - HealthUpdateInfoId string `xml:"healthUpdateInfoId"` - Id string `xml:"id"` - Status ManagedEntityStatus `xml:"status"` - Remediation string `xml:"remediation"` -} - -func init() { - t["HealthUpdate"] = reflect.TypeOf((*HealthUpdate)(nil)).Elem() -} - -type HealthUpdateInfo struct { - DynamicData - - Id string `xml:"id"` - ComponentType string `xml:"componentType"` - Description string `xml:"description"` -} - -func init() { - t["HealthUpdateInfo"] = reflect.TypeOf((*HealthUpdateInfo)(nil)).Elem() -} - -type HeterogenousHostsBlockingEVC struct { - EVCConfigFault -} - -func init() { - t["HeterogenousHostsBlockingEVC"] = reflect.TypeOf((*HeterogenousHostsBlockingEVC)(nil)).Elem() -} - -type HeterogenousHostsBlockingEVCFault HeterogenousHostsBlockingEVC - -func init() { - t["HeterogenousHostsBlockingEVCFault"] = reflect.TypeOf((*HeterogenousHostsBlockingEVCFault)(nil)).Elem() -} - -type HostAccessControlEntry struct { - DynamicData - - Principal string `xml:"principal"` - Group bool `xml:"group"` - AccessMode HostAccessMode `xml:"accessMode"` -} - -func init() { - t["HostAccessControlEntry"] = reflect.TypeOf((*HostAccessControlEntry)(nil)).Elem() -} - -type HostAccessRestrictedToManagementServer struct { - NotSupported - - ManagementServer string `xml:"managementServer"` -} - -func init() { - t["HostAccessRestrictedToManagementServer"] = reflect.TypeOf((*HostAccessRestrictedToManagementServer)(nil)).Elem() -} - -type HostAccessRestrictedToManagementServerFault HostAccessRestrictedToManagementServer - -func init() { - t["HostAccessRestrictedToManagementServerFault"] = reflect.TypeOf((*HostAccessRestrictedToManagementServerFault)(nil)).Elem() -} - -type HostAccountSpec struct { - DynamicData - - Id string `xml:"id"` - Password string `xml:"password,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["HostAccountSpec"] = reflect.TypeOf((*HostAccountSpec)(nil)).Elem() -} - -type HostActiveDirectory struct { - DynamicData - - ChangeOperation string `xml:"changeOperation"` - Spec *HostActiveDirectorySpec `xml:"spec,omitempty"` -} - -func init() { - t["HostActiveDirectory"] = reflect.TypeOf((*HostActiveDirectory)(nil)).Elem() -} - -type HostActiveDirectoryInfo struct { - HostDirectoryStoreInfo - - JoinedDomain string `xml:"joinedDomain,omitempty"` - TrustedDomain []string `xml:"trustedDomain,omitempty"` - DomainMembershipStatus string `xml:"domainMembershipStatus,omitempty"` - SmartCardAuthenticationEnabled *bool `xml:"smartCardAuthenticationEnabled"` -} - -func init() { - t["HostActiveDirectoryInfo"] = reflect.TypeOf((*HostActiveDirectoryInfo)(nil)).Elem() -} - -type HostActiveDirectorySpec struct { - DynamicData - - DomainName string `xml:"domainName,omitempty"` - UserName string `xml:"userName,omitempty"` - Password string `xml:"password,omitempty"` - CamServer string `xml:"camServer,omitempty"` - Thumbprint string `xml:"thumbprint,omitempty"` - SmartCardAuthenticationEnabled *bool `xml:"smartCardAuthenticationEnabled"` - SmartCardTrustAnchors []string `xml:"smartCardTrustAnchors,omitempty"` -} - -func init() { - t["HostActiveDirectorySpec"] = reflect.TypeOf((*HostActiveDirectorySpec)(nil)).Elem() -} - -type HostAddFailedEvent struct { - HostEvent - - Hostname string `xml:"hostname"` -} - -func init() { - t["HostAddFailedEvent"] = reflect.TypeOf((*HostAddFailedEvent)(nil)).Elem() -} - -type HostAddedEvent struct { - HostEvent -} - -func init() { - t["HostAddedEvent"] = reflect.TypeOf((*HostAddedEvent)(nil)).Elem() -} - -type HostAdminDisableEvent struct { - HostEvent -} - -func init() { - t["HostAdminDisableEvent"] = reflect.TypeOf((*HostAdminDisableEvent)(nil)).Elem() -} - -type HostAdminEnableEvent struct { - HostEvent -} - -func init() { - t["HostAdminEnableEvent"] = reflect.TypeOf((*HostAdminEnableEvent)(nil)).Elem() -} - -type HostApplyProfile struct { - ApplyProfile - - Memory *HostMemoryProfile `xml:"memory,omitempty"` - Storage *StorageProfile `xml:"storage,omitempty"` - Network *NetworkProfile `xml:"network,omitempty"` - Datetime *DateTimeProfile `xml:"datetime,omitempty"` - Firewall *FirewallProfile `xml:"firewall,omitempty"` - Security *SecurityProfile `xml:"security,omitempty"` - Service []ServiceProfile `xml:"service,omitempty"` - Option []OptionProfile `xml:"option,omitempty"` - UserAccount []UserProfile `xml:"userAccount,omitempty"` - UsergroupAccount []UserGroupProfile `xml:"usergroupAccount,omitempty"` - Authentication *AuthenticationProfile `xml:"authentication,omitempty"` -} - -func init() { - t["HostApplyProfile"] = reflect.TypeOf((*HostApplyProfile)(nil)).Elem() -} - -type HostAssignableHardwareBinding struct { - DynamicData - - InstanceId string `xml:"instanceId"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["HostAssignableHardwareBinding"] = reflect.TypeOf((*HostAssignableHardwareBinding)(nil)).Elem() -} - -type HostAssignableHardwareConfig struct { - DynamicData - - AttributeOverride []HostAssignableHardwareConfigAttributeOverride `xml:"attributeOverride,omitempty"` -} - -func init() { - t["HostAssignableHardwareConfig"] = reflect.TypeOf((*HostAssignableHardwareConfig)(nil)).Elem() -} - -type HostAssignableHardwareConfigAttributeOverride struct { - DynamicData - - InstanceId string `xml:"instanceId"` - Name string `xml:"name"` - Value AnyType `xml:"value,typeattr"` -} - -func init() { - t["HostAssignableHardwareConfigAttributeOverride"] = reflect.TypeOf((*HostAssignableHardwareConfigAttributeOverride)(nil)).Elem() -} - -type HostAuthenticationManagerInfo struct { - DynamicData - - AuthConfig []BaseHostAuthenticationStoreInfo `xml:"authConfig,typeattr"` -} - -func init() { - t["HostAuthenticationManagerInfo"] = reflect.TypeOf((*HostAuthenticationManagerInfo)(nil)).Elem() -} - -type HostAuthenticationStoreInfo struct { - DynamicData - - Enabled bool `xml:"enabled"` -} - -func init() { - t["HostAuthenticationStoreInfo"] = reflect.TypeOf((*HostAuthenticationStoreInfo)(nil)).Elem() -} - -type HostAutoStartManagerConfig struct { - DynamicData - - Defaults *AutoStartDefaults `xml:"defaults,omitempty"` - PowerInfo []AutoStartPowerInfo `xml:"powerInfo,omitempty"` -} - -func init() { - t["HostAutoStartManagerConfig"] = reflect.TypeOf((*HostAutoStartManagerConfig)(nil)).Elem() -} - -type HostBIOSInfo struct { - DynamicData - - BiosVersion string `xml:"biosVersion,omitempty"` - ReleaseDate *time.Time `xml:"releaseDate"` - Vendor string `xml:"vendor,omitempty"` - MajorRelease int32 `xml:"majorRelease,omitempty"` - MinorRelease int32 `xml:"minorRelease,omitempty"` - FirmwareMajorRelease int32 `xml:"firmwareMajorRelease,omitempty"` - FirmwareMinorRelease int32 `xml:"firmwareMinorRelease,omitempty"` -} - -func init() { - t["HostBIOSInfo"] = reflect.TypeOf((*HostBIOSInfo)(nil)).Elem() -} - -type HostBlockAdapterTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostBlockAdapterTargetTransport"] = reflect.TypeOf((*HostBlockAdapterTargetTransport)(nil)).Elem() -} - -type HostBlockHba struct { - HostHostBusAdapter -} - -func init() { - t["HostBlockHba"] = reflect.TypeOf((*HostBlockHba)(nil)).Elem() -} - -type HostBootDevice struct { - DynamicData - - Key string `xml:"key"` - Description string `xml:"description"` -} - -func init() { - t["HostBootDevice"] = reflect.TypeOf((*HostBootDevice)(nil)).Elem() -} - -type HostBootDeviceInfo struct { - DynamicData - - BootDevices []HostBootDevice `xml:"bootDevices,omitempty"` - CurrentBootDeviceKey string `xml:"currentBootDeviceKey,omitempty"` -} - -func init() { - t["HostBootDeviceInfo"] = reflect.TypeOf((*HostBootDeviceInfo)(nil)).Elem() -} - -type HostCacheConfigurationInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - SwapSize int64 `xml:"swapSize"` -} - -func init() { - t["HostCacheConfigurationInfo"] = reflect.TypeOf((*HostCacheConfigurationInfo)(nil)).Elem() -} - -type HostCacheConfigurationSpec struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - SwapSize int64 `xml:"swapSize"` -} - -func init() { - t["HostCacheConfigurationSpec"] = reflect.TypeOf((*HostCacheConfigurationSpec)(nil)).Elem() -} - -type HostCapability struct { - DynamicData - - RecursiveResourcePoolsSupported bool `xml:"recursiveResourcePoolsSupported"` - CpuMemoryResourceConfigurationSupported bool `xml:"cpuMemoryResourceConfigurationSupported"` - RebootSupported bool `xml:"rebootSupported"` - ShutdownSupported bool `xml:"shutdownSupported"` - VmotionSupported bool `xml:"vmotionSupported"` - StandbySupported bool `xml:"standbySupported"` - IpmiSupported *bool `xml:"ipmiSupported"` - MaxSupportedVMs int32 `xml:"maxSupportedVMs,omitempty"` - MaxRunningVMs int32 `xml:"maxRunningVMs,omitempty"` - MaxSupportedVcpus int32 `xml:"maxSupportedVcpus,omitempty"` - MaxRegisteredVMs int32 `xml:"maxRegisteredVMs,omitempty"` - DatastorePrincipalSupported bool `xml:"datastorePrincipalSupported"` - SanSupported bool `xml:"sanSupported"` - NfsSupported bool `xml:"nfsSupported"` - IscsiSupported bool `xml:"iscsiSupported"` - VlanTaggingSupported bool `xml:"vlanTaggingSupported"` - NicTeamingSupported bool `xml:"nicTeamingSupported"` - HighGuestMemSupported bool `xml:"highGuestMemSupported"` - MaintenanceModeSupported bool `xml:"maintenanceModeSupported"` - SuspendedRelocateSupported bool `xml:"suspendedRelocateSupported"` - RestrictedSnapshotRelocateSupported bool `xml:"restrictedSnapshotRelocateSupported"` - PerVmSwapFiles bool `xml:"perVmSwapFiles"` - LocalSwapDatastoreSupported bool `xml:"localSwapDatastoreSupported"` - UnsharedSwapVMotionSupported bool `xml:"unsharedSwapVMotionSupported"` - BackgroundSnapshotsSupported bool `xml:"backgroundSnapshotsSupported"` - PreAssignedPCIUnitNumbersSupported bool `xml:"preAssignedPCIUnitNumbersSupported"` - ScreenshotSupported bool `xml:"screenshotSupported"` - ScaledScreenshotSupported bool `xml:"scaledScreenshotSupported"` - StorageVMotionSupported *bool `xml:"storageVMotionSupported"` - VmotionWithStorageVMotionSupported *bool `xml:"vmotionWithStorageVMotionSupported"` - VmotionAcrossNetworkSupported *bool `xml:"vmotionAcrossNetworkSupported"` - MaxNumDisksSVMotion int32 `xml:"maxNumDisksSVMotion,omitempty"` - HbrNicSelectionSupported *bool `xml:"hbrNicSelectionSupported"` - VrNfcNicSelectionSupported *bool `xml:"vrNfcNicSelectionSupported"` - RecordReplaySupported *bool `xml:"recordReplaySupported"` - FtSupported *bool `xml:"ftSupported"` - ReplayUnsupportedReason string `xml:"replayUnsupportedReason,omitempty"` - ReplayCompatibilityIssues []string `xml:"replayCompatibilityIssues,omitempty"` - SmpFtSupported *bool `xml:"smpFtSupported"` - FtCompatibilityIssues []string `xml:"ftCompatibilityIssues,omitempty"` - SmpFtCompatibilityIssues []string `xml:"smpFtCompatibilityIssues,omitempty"` - MaxVcpusPerFtVm int32 `xml:"maxVcpusPerFtVm,omitempty"` - LoginBySSLThumbprintSupported *bool `xml:"loginBySSLThumbprintSupported"` - CloneFromSnapshotSupported *bool `xml:"cloneFromSnapshotSupported"` - DeltaDiskBackingsSupported *bool `xml:"deltaDiskBackingsSupported"` - PerVMNetworkTrafficShapingSupported *bool `xml:"perVMNetworkTrafficShapingSupported"` - TpmSupported *bool `xml:"tpmSupported"` - TpmVersion string `xml:"tpmVersion,omitempty"` - TxtEnabled *bool `xml:"txtEnabled"` - SupportedCpuFeature []HostCpuIdInfo `xml:"supportedCpuFeature,omitempty"` - VirtualExecUsageSupported *bool `xml:"virtualExecUsageSupported"` - StorageIORMSupported *bool `xml:"storageIORMSupported"` - VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` - VmDirectPathGen2UnsupportedReason []string `xml:"vmDirectPathGen2UnsupportedReason,omitempty"` - VmDirectPathGen2UnsupportedReasonExtended string `xml:"vmDirectPathGen2UnsupportedReasonExtended,omitempty"` - SupportedVmfsMajorVersion []int32 `xml:"supportedVmfsMajorVersion,omitempty"` - VStorageCapable *bool `xml:"vStorageCapable"` - SnapshotRelayoutSupported *bool `xml:"snapshotRelayoutSupported"` - FirewallIpRulesSupported *bool `xml:"firewallIpRulesSupported"` - ServicePackageInfoSupported *bool `xml:"servicePackageInfoSupported"` - MaxHostRunningVms int32 `xml:"maxHostRunningVms,omitempty"` - MaxHostSupportedVcpus int32 `xml:"maxHostSupportedVcpus,omitempty"` - VmfsDatastoreMountCapable *bool `xml:"vmfsDatastoreMountCapable"` - EightPlusHostVmfsSharedAccessSupported *bool `xml:"eightPlusHostVmfsSharedAccessSupported"` - NestedHVSupported *bool `xml:"nestedHVSupported"` - VPMCSupported *bool `xml:"vPMCSupported"` - InterVMCommunicationThroughVMCISupported *bool `xml:"interVMCommunicationThroughVMCISupported"` - ScheduledHardwareUpgradeSupported *bool `xml:"scheduledHardwareUpgradeSupported"` - FeatureCapabilitiesSupported *bool `xml:"featureCapabilitiesSupported"` - LatencySensitivitySupported *bool `xml:"latencySensitivitySupported"` - StoragePolicySupported *bool `xml:"storagePolicySupported"` - Accel3dSupported *bool `xml:"accel3dSupported"` - ReliableMemoryAware *bool `xml:"reliableMemoryAware"` - MultipleNetworkStackInstanceSupported *bool `xml:"multipleNetworkStackInstanceSupported"` - MessageBusProxySupported *bool `xml:"messageBusProxySupported"` - VsanSupported *bool `xml:"vsanSupported"` - VFlashSupported *bool `xml:"vFlashSupported"` - HostAccessManagerSupported *bool `xml:"hostAccessManagerSupported"` - ProvisioningNicSelectionSupported *bool `xml:"provisioningNicSelectionSupported"` - Nfs41Supported *bool `xml:"nfs41Supported"` - Nfs41Krb5iSupported *bool `xml:"nfs41Krb5iSupported"` - TurnDiskLocatorLedSupported *bool `xml:"turnDiskLocatorLedSupported"` - VirtualVolumeDatastoreSupported *bool `xml:"virtualVolumeDatastoreSupported"` - MarkAsSsdSupported *bool `xml:"markAsSsdSupported"` - MarkAsLocalSupported *bool `xml:"markAsLocalSupported"` - SmartCardAuthenticationSupported *bool `xml:"smartCardAuthenticationSupported"` - PMemSupported *bool `xml:"pMemSupported"` - PMemSnapshotSupported *bool `xml:"pMemSnapshotSupported"` - CryptoSupported *bool `xml:"cryptoSupported"` - OneKVolumeAPIsSupported *bool `xml:"oneKVolumeAPIsSupported"` - GatewayOnNicSupported *bool `xml:"gatewayOnNicSupported"` - UpitSupported *bool `xml:"upitSupported"` - CpuHwMmuSupported *bool `xml:"cpuHwMmuSupported"` - EncryptedVMotionSupported *bool `xml:"encryptedVMotionSupported"` - EncryptionChangeOnAddRemoveSupported *bool `xml:"encryptionChangeOnAddRemoveSupported"` - EncryptionHotOperationSupported *bool `xml:"encryptionHotOperationSupported"` - EncryptionWithSnapshotsSupported *bool `xml:"encryptionWithSnapshotsSupported"` - EncryptionFaultToleranceSupported *bool `xml:"encryptionFaultToleranceSupported"` - EncryptionMemorySaveSupported *bool `xml:"encryptionMemorySaveSupported"` - EncryptionRDMSupported *bool `xml:"encryptionRDMSupported"` - EncryptionVFlashSupported *bool `xml:"encryptionVFlashSupported"` - EncryptionCBRCSupported *bool `xml:"encryptionCBRCSupported"` - EncryptionHBRSupported *bool `xml:"encryptionHBRSupported"` - FtEfiSupported *bool `xml:"ftEfiSupported"` - UnmapMethodSupported string `xml:"unmapMethodSupported,omitempty"` - MaxMemMBPerFtVm int32 `xml:"maxMemMBPerFtVm,omitempty"` - VirtualMmuUsageIgnored *bool `xml:"virtualMmuUsageIgnored"` - VirtualExecUsageIgnored *bool `xml:"virtualExecUsageIgnored"` - VmCreateDateSupported *bool `xml:"vmCreateDateSupported"` - Vmfs3EOLSupported *bool `xml:"vmfs3EOLSupported"` - FtVmcpSupported *bool `xml:"ftVmcpSupported"` - QuickBootSupported *bool `xml:"quickBootSupported"` - EncryptedFtSupported *bool `xml:"encryptedFtSupported"` - AssignableHardwareSupported *bool `xml:"assignableHardwareSupported"` - SuspendToMemorySupported *bool `xml:"suspendToMemorySupported"` - UseFeatureReqsForOldHWv *bool `xml:"useFeatureReqsForOldHWv"` - MarkPerenniallyReservedSupported *bool `xml:"markPerenniallyReservedSupported"` - HppPspSupported *bool `xml:"hppPspSupported"` - DeviceRebindWithoutRebootSupported *bool `xml:"deviceRebindWithoutRebootSupported"` - StoragePolicyChangeSupported *bool `xml:"storagePolicyChangeSupported"` - PrecisionTimeProtocolSupported *bool `xml:"precisionTimeProtocolSupported"` - RemoteDeviceVMotionSupported *bool `xml:"remoteDeviceVMotionSupported"` - MaxSupportedVmMemory int32 `xml:"maxSupportedVmMemory,omitempty"` - AhDeviceHintsSupported *bool `xml:"ahDeviceHintsSupported"` - NvmeOverTcpSupported *bool `xml:"nvmeOverTcpSupported"` - NvmeStorageFabricServicesSupported *bool `xml:"nvmeStorageFabricServicesSupported"` - AssignHwPciConfigSupported *bool `xml:"assignHwPciConfigSupported"` - TimeConfigSupported *bool `xml:"timeConfigSupported"` - NvmeBatchOperationsSupported *bool `xml:"nvmeBatchOperationsSupported"` - PMemFailoverSupported *bool `xml:"pMemFailoverSupported"` - HostConfigEncryptionSupported *bool `xml:"hostConfigEncryptionSupported"` - MaxSupportedSimultaneousThreads int32 `xml:"maxSupportedSimultaneousThreads,omitempty"` - PtpConfigSupported *bool `xml:"ptpConfigSupported"` - MaxSupportedPtpPorts int32 `xml:"maxSupportedPtpPorts,omitempty"` - SgxRegistrationSupported *bool `xml:"sgxRegistrationSupported"` - PMemIndependentSnapshotSupported *bool `xml:"pMemIndependentSnapshotSupported"` - IommuSLDirtyCapable *bool `xml:"iommuSLDirtyCapable"` - UltralowFixedUnmapSupported *bool `xml:"ultralowFixedUnmapSupported"` - NvmeVvolSupported *bool `xml:"nvmeVvolSupported"` -} - -func init() { - t["HostCapability"] = reflect.TypeOf((*HostCapability)(nil)).Elem() -} - -type HostCertificateManagerCertificateInfo struct { - DynamicData - - Issuer string `xml:"issuer,omitempty"` - NotBefore *time.Time `xml:"notBefore"` - NotAfter *time.Time `xml:"notAfter"` - Subject string `xml:"subject,omitempty"` - Status string `xml:"status"` -} - -func init() { - t["HostCertificateManagerCertificateInfo"] = reflect.TypeOf((*HostCertificateManagerCertificateInfo)(nil)).Elem() -} - -type HostClearVStorageObjectControlFlags HostClearVStorageObjectControlFlagsRequestType - -func init() { - t["HostClearVStorageObjectControlFlags"] = reflect.TypeOf((*HostClearVStorageObjectControlFlags)(nil)).Elem() -} - -type HostClearVStorageObjectControlFlagsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - ControlFlags []string `xml:"controlFlags,omitempty"` -} - -func init() { - t["HostClearVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*HostClearVStorageObjectControlFlagsRequestType)(nil)).Elem() -} - -type HostClearVStorageObjectControlFlagsResponse struct { -} - -type HostCloneVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VslmCloneSpec `xml:"spec"` -} - -func init() { - t["HostCloneVStorageObjectRequestType"] = reflect.TypeOf((*HostCloneVStorageObjectRequestType)(nil)).Elem() -} - -type HostCloneVStorageObject_Task HostCloneVStorageObjectRequestType - -func init() { - t["HostCloneVStorageObject_Task"] = reflect.TypeOf((*HostCloneVStorageObject_Task)(nil)).Elem() -} - -type HostCloneVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostCnxFailedAccountFailedEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedAccountFailedEvent"] = reflect.TypeOf((*HostCnxFailedAccountFailedEvent)(nil)).Elem() -} - -type HostCnxFailedAlreadyManagedEvent struct { - HostEvent - - ServerName string `xml:"serverName"` -} - -func init() { - t["HostCnxFailedAlreadyManagedEvent"] = reflect.TypeOf((*HostCnxFailedAlreadyManagedEvent)(nil)).Elem() -} - -type HostCnxFailedBadCcagentEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedBadCcagentEvent"] = reflect.TypeOf((*HostCnxFailedBadCcagentEvent)(nil)).Elem() -} - -type HostCnxFailedBadUsernameEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedBadUsernameEvent"] = reflect.TypeOf((*HostCnxFailedBadUsernameEvent)(nil)).Elem() -} - -type HostCnxFailedBadVersionEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedBadVersionEvent"] = reflect.TypeOf((*HostCnxFailedBadVersionEvent)(nil)).Elem() -} - -type HostCnxFailedCcagentUpgradeEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedCcagentUpgradeEvent"] = reflect.TypeOf((*HostCnxFailedCcagentUpgradeEvent)(nil)).Elem() -} - -type HostCnxFailedEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedEvent"] = reflect.TypeOf((*HostCnxFailedEvent)(nil)).Elem() -} - -type HostCnxFailedNetworkErrorEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedNetworkErrorEvent"] = reflect.TypeOf((*HostCnxFailedNetworkErrorEvent)(nil)).Elem() -} - -type HostCnxFailedNoAccessEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedNoAccessEvent"] = reflect.TypeOf((*HostCnxFailedNoAccessEvent)(nil)).Elem() -} - -type HostCnxFailedNoConnectionEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedNoConnectionEvent"] = reflect.TypeOf((*HostCnxFailedNoConnectionEvent)(nil)).Elem() -} - -type HostCnxFailedNoLicenseEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedNoLicenseEvent"] = reflect.TypeOf((*HostCnxFailedNoLicenseEvent)(nil)).Elem() -} - -type HostCnxFailedNotFoundEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedNotFoundEvent"] = reflect.TypeOf((*HostCnxFailedNotFoundEvent)(nil)).Elem() -} - -type HostCnxFailedTimeoutEvent struct { - HostEvent -} - -func init() { - t["HostCnxFailedTimeoutEvent"] = reflect.TypeOf((*HostCnxFailedTimeoutEvent)(nil)).Elem() -} - -type HostCommunication struct { - RuntimeFault -} - -func init() { - t["HostCommunication"] = reflect.TypeOf((*HostCommunication)(nil)).Elem() -} - -type HostCommunicationFault BaseHostCommunication - -func init() { - t["HostCommunicationFault"] = reflect.TypeOf((*HostCommunicationFault)(nil)).Elem() -} - -type HostComplianceCheckedEvent struct { - HostEvent - - Profile ProfileEventArgument `xml:"profile"` -} - -func init() { - t["HostComplianceCheckedEvent"] = reflect.TypeOf((*HostComplianceCheckedEvent)(nil)).Elem() -} - -type HostCompliantEvent struct { - HostEvent -} - -func init() { - t["HostCompliantEvent"] = reflect.TypeOf((*HostCompliantEvent)(nil)).Elem() -} - -type HostConfigAppliedEvent struct { - HostEvent -} - -func init() { - t["HostConfigAppliedEvent"] = reflect.TypeOf((*HostConfigAppliedEvent)(nil)).Elem() -} - -type HostConfigChange struct { - DynamicData -} - -func init() { - t["HostConfigChange"] = reflect.TypeOf((*HostConfigChange)(nil)).Elem() -} - -type HostConfigFailed struct { - HostConfigFault - - Failure []LocalizedMethodFault `xml:"failure"` -} - -func init() { - t["HostConfigFailed"] = reflect.TypeOf((*HostConfigFailed)(nil)).Elem() -} - -type HostConfigFailedFault HostConfigFailed - -func init() { - t["HostConfigFailedFault"] = reflect.TypeOf((*HostConfigFailedFault)(nil)).Elem() -} - -type HostConfigFault struct { - VimFault -} - -func init() { - t["HostConfigFault"] = reflect.TypeOf((*HostConfigFault)(nil)).Elem() -} - -type HostConfigFaultFault BaseHostConfigFault - -func init() { - t["HostConfigFaultFault"] = reflect.TypeOf((*HostConfigFaultFault)(nil)).Elem() -} - -type HostConfigInfo struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Product AboutInfo `xml:"product"` - DeploymentInfo *HostDeploymentInfo `xml:"deploymentInfo,omitempty"` - HyperThread *HostHyperThreadScheduleInfo `xml:"hyperThread,omitempty"` - ConsoleReservation *ServiceConsoleReservationInfo `xml:"consoleReservation,omitempty"` - VirtualMachineReservation *VirtualMachineMemoryReservationInfo `xml:"virtualMachineReservation,omitempty"` - StorageDevice *HostStorageDeviceInfo `xml:"storageDevice,omitempty"` - MultipathState *HostMultipathStateInfo `xml:"multipathState,omitempty"` - FileSystemVolume *HostFileSystemVolumeInfo `xml:"fileSystemVolume,omitempty"` - SystemFile []string `xml:"systemFile,omitempty"` - Network *HostNetworkInfo `xml:"network,omitempty"` - Vmotion *HostVMotionInfo `xml:"vmotion,omitempty"` - VirtualNicManagerInfo *HostVirtualNicManagerInfo `xml:"virtualNicManagerInfo,omitempty"` - Capabilities *HostNetCapabilities `xml:"capabilities,omitempty"` - DatastoreCapabilities *HostDatastoreSystemCapabilities `xml:"datastoreCapabilities,omitempty"` - OffloadCapabilities *HostNetOffloadCapabilities `xml:"offloadCapabilities,omitempty"` - Service *HostServiceInfo `xml:"service,omitempty"` - Firewall *HostFirewallInfo `xml:"firewall,omitempty"` - AutoStart *HostAutoStartManagerConfig `xml:"autoStart,omitempty"` - ActiveDiagnosticPartition *HostDiagnosticPartition `xml:"activeDiagnosticPartition,omitempty"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` - OptionDef []OptionDef `xml:"optionDef,omitempty"` - DatastorePrincipal string `xml:"datastorePrincipal,omitempty"` - LocalSwapDatastore *ManagedObjectReference `xml:"localSwapDatastore,omitempty"` - SystemSwapConfiguration *HostSystemSwapConfiguration `xml:"systemSwapConfiguration,omitempty"` - SystemResources *HostSystemResourceInfo `xml:"systemResources,omitempty"` - DateTimeInfo *HostDateTimeInfo `xml:"dateTimeInfo,omitempty"` - Flags *HostFlagInfo `xml:"flags,omitempty"` - AdminDisabled *bool `xml:"adminDisabled"` - LockdownMode HostLockdownMode `xml:"lockdownMode,omitempty"` - Ipmi *HostIpmiInfo `xml:"ipmi,omitempty"` - SslThumbprintInfo *HostSslThumbprintInfo `xml:"sslThumbprintInfo,omitempty"` - SslThumbprintData []HostSslThumbprintInfo `xml:"sslThumbprintData,omitempty"` - Certificate []byte `xml:"certificate,omitempty"` - PciPassthruInfo []BaseHostPciPassthruInfo `xml:"pciPassthruInfo,omitempty,typeattr"` - AuthenticationManagerInfo *HostAuthenticationManagerInfo `xml:"authenticationManagerInfo,omitempty"` - FeatureVersion []HostFeatureVersionInfo `xml:"featureVersion,omitempty"` - PowerSystemCapability *PowerSystemCapability `xml:"powerSystemCapability,omitempty"` - PowerSystemInfo *PowerSystemInfo `xml:"powerSystemInfo,omitempty"` - CacheConfigurationInfo []HostCacheConfigurationInfo `xml:"cacheConfigurationInfo,omitempty"` - WakeOnLanCapable *bool `xml:"wakeOnLanCapable"` - FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` - MaskedFeatureCapability []HostFeatureCapability `xml:"maskedFeatureCapability,omitempty"` - VFlashConfigInfo *HostVFlashManagerVFlashConfigInfo `xml:"vFlashConfigInfo,omitempty"` - VsanHostConfig *VsanHostConfigInfo `xml:"vsanHostConfig,omitempty"` - DomainList []string `xml:"domainList,omitempty"` - ScriptCheckSum []byte `xml:"scriptCheckSum,omitempty"` - HostConfigCheckSum []byte `xml:"hostConfigCheckSum,omitempty"` - DescriptionTreeCheckSum []byte `xml:"descriptionTreeCheckSum,omitempty"` - GraphicsInfo []HostGraphicsInfo `xml:"graphicsInfo,omitempty"` - SharedPassthruGpuTypes []string `xml:"sharedPassthruGpuTypes,omitempty"` - GraphicsConfig *HostGraphicsConfig `xml:"graphicsConfig,omitempty"` - SharedGpuCapabilities []HostSharedGpuCapabilities `xml:"sharedGpuCapabilities,omitempty"` - IoFilterInfo []HostIoFilterInfo `xml:"ioFilterInfo,omitempty"` - SriovDevicePool []BaseHostSriovDevicePoolInfo `xml:"sriovDevicePool,omitempty,typeattr"` - AssignableHardwareBinding []HostAssignableHardwareBinding `xml:"assignableHardwareBinding,omitempty"` - AssignableHardwareConfig *HostAssignableHardwareConfig `xml:"assignableHardwareConfig,omitempty"` -} - -func init() { - t["HostConfigInfo"] = reflect.TypeOf((*HostConfigInfo)(nil)).Elem() -} - -type HostConfigManager struct { - DynamicData - - CpuScheduler *ManagedObjectReference `xml:"cpuScheduler,omitempty"` - DatastoreSystem *ManagedObjectReference `xml:"datastoreSystem,omitempty"` - MemoryManager *ManagedObjectReference `xml:"memoryManager,omitempty"` - StorageSystem *ManagedObjectReference `xml:"storageSystem,omitempty"` - NetworkSystem *ManagedObjectReference `xml:"networkSystem,omitempty"` - VmotionSystem *ManagedObjectReference `xml:"vmotionSystem,omitempty"` - VirtualNicManager *ManagedObjectReference `xml:"virtualNicManager,omitempty"` - ServiceSystem *ManagedObjectReference `xml:"serviceSystem,omitempty"` - FirewallSystem *ManagedObjectReference `xml:"firewallSystem,omitempty"` - AdvancedOption *ManagedObjectReference `xml:"advancedOption,omitempty"` - DiagnosticSystem *ManagedObjectReference `xml:"diagnosticSystem,omitempty"` - AutoStartManager *ManagedObjectReference `xml:"autoStartManager,omitempty"` - SnmpSystem *ManagedObjectReference `xml:"snmpSystem,omitempty"` - DateTimeSystem *ManagedObjectReference `xml:"dateTimeSystem,omitempty"` - PatchManager *ManagedObjectReference `xml:"patchManager,omitempty"` - ImageConfigManager *ManagedObjectReference `xml:"imageConfigManager,omitempty"` - BootDeviceSystem *ManagedObjectReference `xml:"bootDeviceSystem,omitempty"` - FirmwareSystem *ManagedObjectReference `xml:"firmwareSystem,omitempty"` - HealthStatusSystem *ManagedObjectReference `xml:"healthStatusSystem,omitempty"` - PciPassthruSystem *ManagedObjectReference `xml:"pciPassthruSystem,omitempty"` - LicenseManager *ManagedObjectReference `xml:"licenseManager,omitempty"` - KernelModuleSystem *ManagedObjectReference `xml:"kernelModuleSystem,omitempty"` - AuthenticationManager *ManagedObjectReference `xml:"authenticationManager,omitempty"` - PowerSystem *ManagedObjectReference `xml:"powerSystem,omitempty"` - CacheConfigurationManager *ManagedObjectReference `xml:"cacheConfigurationManager,omitempty"` - EsxAgentHostManager *ManagedObjectReference `xml:"esxAgentHostManager,omitempty"` - IscsiManager *ManagedObjectReference `xml:"iscsiManager,omitempty"` - VFlashManager *ManagedObjectReference `xml:"vFlashManager,omitempty"` - VsanSystem *ManagedObjectReference `xml:"vsanSystem,omitempty"` - MessageBusProxy *ManagedObjectReference `xml:"messageBusProxy,omitempty"` - UserDirectory *ManagedObjectReference `xml:"userDirectory,omitempty"` - AccountManager *ManagedObjectReference `xml:"accountManager,omitempty"` - HostAccessManager *ManagedObjectReference `xml:"hostAccessManager,omitempty"` - GraphicsManager *ManagedObjectReference `xml:"graphicsManager,omitempty"` - VsanInternalSystem *ManagedObjectReference `xml:"vsanInternalSystem,omitempty"` - CertificateManager *ManagedObjectReference `xml:"certificateManager,omitempty"` - CryptoManager *ManagedObjectReference `xml:"cryptoManager,omitempty"` - NvdimmSystem *ManagedObjectReference `xml:"nvdimmSystem,omitempty"` - AssignableHardwareManager *ManagedObjectReference `xml:"assignableHardwareManager,omitempty"` -} - -func init() { - t["HostConfigManager"] = reflect.TypeOf((*HostConfigManager)(nil)).Elem() -} - -type HostConfigSpec struct { - DynamicData - - NasDatastore []HostNasVolumeConfig `xml:"nasDatastore,omitempty"` - Network *HostNetworkConfig `xml:"network,omitempty"` - NicTypeSelection []HostVirtualNicManagerNicTypeSelection `xml:"nicTypeSelection,omitempty"` - Service []HostServiceConfig `xml:"service,omitempty"` - Firewall *HostFirewallConfig `xml:"firewall,omitempty"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` - DatastorePrincipal string `xml:"datastorePrincipal,omitempty"` - DatastorePrincipalPasswd string `xml:"datastorePrincipalPasswd,omitempty"` - Datetime *HostDateTimeConfig `xml:"datetime,omitempty"` - StorageDevice *HostStorageDeviceInfo `xml:"storageDevice,omitempty"` - License *HostLicenseSpec `xml:"license,omitempty"` - Security *HostSecuritySpec `xml:"security,omitempty"` - UserAccount []BaseHostAccountSpec `xml:"userAccount,omitempty,typeattr"` - UsergroupAccount []BaseHostAccountSpec `xml:"usergroupAccount,omitempty,typeattr"` - Memory *HostMemorySpec `xml:"memory,omitempty"` - ActiveDirectory []HostActiveDirectory `xml:"activeDirectory,omitempty"` - GenericConfig []KeyAnyValue `xml:"genericConfig,omitempty"` - GraphicsConfig *HostGraphicsConfig `xml:"graphicsConfig,omitempty"` - AssignableHardwareConfig *HostAssignableHardwareConfig `xml:"assignableHardwareConfig,omitempty"` -} - -func init() { - t["HostConfigSpec"] = reflect.TypeOf((*HostConfigSpec)(nil)).Elem() -} - -type HostConfigSummary struct { - DynamicData - - Name string `xml:"name"` - Port int32 `xml:"port"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - Product *AboutInfo `xml:"product,omitempty"` - VmotionEnabled bool `xml:"vmotionEnabled"` - FaultToleranceEnabled *bool `xml:"faultToleranceEnabled"` - FeatureVersion []HostFeatureVersionInfo `xml:"featureVersion,omitempty"` - AgentVmDatastore *ManagedObjectReference `xml:"agentVmDatastore,omitempty"` - AgentVmNetwork *ManagedObjectReference `xml:"agentVmNetwork,omitempty"` -} - -func init() { - t["HostConfigSummary"] = reflect.TypeOf((*HostConfigSummary)(nil)).Elem() -} - -type HostConfigVFlashCache HostConfigVFlashCacheRequestType - -func init() { - t["HostConfigVFlashCache"] = reflect.TypeOf((*HostConfigVFlashCache)(nil)).Elem() -} - -type HostConfigVFlashCacheRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostVFlashManagerVFlashCacheConfigSpec `xml:"spec"` -} - -func init() { - t["HostConfigVFlashCacheRequestType"] = reflect.TypeOf((*HostConfigVFlashCacheRequestType)(nil)).Elem() -} - -type HostConfigVFlashCacheResponse struct { -} - -type HostConfigureVFlashResource HostConfigureVFlashResourceRequestType - -func init() { - t["HostConfigureVFlashResource"] = reflect.TypeOf((*HostConfigureVFlashResource)(nil)).Elem() -} - -type HostConfigureVFlashResourceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostVFlashManagerVFlashResourceConfigSpec `xml:"spec"` -} - -func init() { - t["HostConfigureVFlashResourceRequestType"] = reflect.TypeOf((*HostConfigureVFlashResourceRequestType)(nil)).Elem() -} - -type HostConfigureVFlashResourceResponse struct { -} - -type HostConnectFault struct { - VimFault -} - -func init() { - t["HostConnectFault"] = reflect.TypeOf((*HostConnectFault)(nil)).Elem() -} - -type HostConnectFaultFault BaseHostConnectFault - -func init() { - t["HostConnectFaultFault"] = reflect.TypeOf((*HostConnectFaultFault)(nil)).Elem() -} - -type HostConnectInfo struct { - DynamicData - - ServerIp string `xml:"serverIp,omitempty"` - InDasCluster *bool `xml:"inDasCluster"` - Host HostListSummary `xml:"host"` - Vm []VirtualMachineSummary `xml:"vm,omitempty"` - VimAccountNameRequired *bool `xml:"vimAccountNameRequired"` - ClusterSupported *bool `xml:"clusterSupported"` - Network []BaseHostConnectInfoNetworkInfo `xml:"network,omitempty,typeattr"` - Datastore []BaseHostDatastoreConnectInfo `xml:"datastore,omitempty,typeattr"` - License *HostLicenseConnectInfo `xml:"license,omitempty"` - Capability *HostCapability `xml:"capability,omitempty"` -} - -func init() { - t["HostConnectInfo"] = reflect.TypeOf((*HostConnectInfo)(nil)).Elem() -} - -type HostConnectInfoNetworkInfo struct { - DynamicData - - Summary BaseNetworkSummary `xml:"summary,typeattr"` -} - -func init() { - t["HostConnectInfoNetworkInfo"] = reflect.TypeOf((*HostConnectInfoNetworkInfo)(nil)).Elem() -} - -type HostConnectSpec struct { - DynamicData - - HostName string `xml:"hostName,omitempty"` - Port int32 `xml:"port,omitempty"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - UserName string `xml:"userName,omitempty"` - Password string `xml:"password,omitempty"` - VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` - Force bool `xml:"force"` - VimAccountName string `xml:"vimAccountName,omitempty"` - VimAccountPassword string `xml:"vimAccountPassword,omitempty"` - ManagementIp string `xml:"managementIp,omitempty"` - LockdownMode HostLockdownMode `xml:"lockdownMode,omitempty"` - HostGateway *HostGatewaySpec `xml:"hostGateway,omitempty"` -} - -func init() { - t["HostConnectSpec"] = reflect.TypeOf((*HostConnectSpec)(nil)).Elem() -} - -type HostConnectedEvent struct { - HostEvent -} - -func init() { - t["HostConnectedEvent"] = reflect.TypeOf((*HostConnectedEvent)(nil)).Elem() -} - -type HostConnectionLostEvent struct { - HostEvent -} - -func init() { - t["HostConnectionLostEvent"] = reflect.TypeOf((*HostConnectionLostEvent)(nil)).Elem() -} - -type HostCpuIdInfo struct { - DynamicData - - Level int32 `xml:"level"` - Vendor string `xml:"vendor,omitempty"` - Eax string `xml:"eax,omitempty"` - Ebx string `xml:"ebx,omitempty"` - Ecx string `xml:"ecx,omitempty"` - Edx string `xml:"edx,omitempty"` -} - -func init() { - t["HostCpuIdInfo"] = reflect.TypeOf((*HostCpuIdInfo)(nil)).Elem() -} - -type HostCpuInfo struct { - DynamicData - - NumCpuPackages int16 `xml:"numCpuPackages"` - NumCpuCores int16 `xml:"numCpuCores"` - NumCpuThreads int16 `xml:"numCpuThreads"` - Hz int64 `xml:"hz"` -} - -func init() { - t["HostCpuInfo"] = reflect.TypeOf((*HostCpuInfo)(nil)).Elem() -} - -type HostCpuPackage struct { - DynamicData - - Index int16 `xml:"index"` - Vendor string `xml:"vendor"` - Hz int64 `xml:"hz"` - BusHz int64 `xml:"busHz"` - Description string `xml:"description"` - ThreadId []int16 `xml:"threadId"` - CpuFeature []HostCpuIdInfo `xml:"cpuFeature,omitempty"` -} - -func init() { - t["HostCpuPackage"] = reflect.TypeOf((*HostCpuPackage)(nil)).Elem() -} - -type HostCpuPowerManagementInfo struct { - DynamicData - - CurrentPolicy string `xml:"currentPolicy,omitempty"` - HardwareSupport string `xml:"hardwareSupport,omitempty"` -} - -func init() { - t["HostCpuPowerManagementInfo"] = reflect.TypeOf((*HostCpuPowerManagementInfo)(nil)).Elem() -} - -type HostCreateDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VslmCreateSpec `xml:"spec"` -} - -func init() { - t["HostCreateDiskRequestType"] = reflect.TypeOf((*HostCreateDiskRequestType)(nil)).Elem() -} - -type HostCreateDisk_Task HostCreateDiskRequestType - -func init() { - t["HostCreateDisk_Task"] = reflect.TypeOf((*HostCreateDisk_Task)(nil)).Elem() -} - -type HostCreateDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostDasDisabledEvent struct { - HostEvent -} - -func init() { - t["HostDasDisabledEvent"] = reflect.TypeOf((*HostDasDisabledEvent)(nil)).Elem() -} - -type HostDasDisablingEvent struct { - HostEvent -} - -func init() { - t["HostDasDisablingEvent"] = reflect.TypeOf((*HostDasDisablingEvent)(nil)).Elem() -} - -type HostDasEnabledEvent struct { - HostEvent -} - -func init() { - t["HostDasEnabledEvent"] = reflect.TypeOf((*HostDasEnabledEvent)(nil)).Elem() -} - -type HostDasEnablingEvent struct { - HostEvent -} - -func init() { - t["HostDasEnablingEvent"] = reflect.TypeOf((*HostDasEnablingEvent)(nil)).Elem() -} - -type HostDasErrorEvent struct { - HostEvent - - Message string `xml:"message,omitempty"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["HostDasErrorEvent"] = reflect.TypeOf((*HostDasErrorEvent)(nil)).Elem() -} - -type HostDasEvent struct { - HostEvent -} - -func init() { - t["HostDasEvent"] = reflect.TypeOf((*HostDasEvent)(nil)).Elem() -} - -type HostDasOkEvent struct { - HostEvent -} - -func init() { - t["HostDasOkEvent"] = reflect.TypeOf((*HostDasOkEvent)(nil)).Elem() -} - -type HostDataTransportConnectionInfo struct { - DynamicData - - StaticMemoryConsumed int64 `xml:"staticMemoryConsumed"` -} - -func init() { - t["HostDataTransportConnectionInfo"] = reflect.TypeOf((*HostDataTransportConnectionInfo)(nil)).Elem() -} - -type HostDatastoreBrowserSearchResults struct { - DynamicData - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - FolderPath string `xml:"folderPath,omitempty"` - File []BaseFileInfo `xml:"file,omitempty,typeattr"` -} - -func init() { - t["HostDatastoreBrowserSearchResults"] = reflect.TypeOf((*HostDatastoreBrowserSearchResults)(nil)).Elem() -} - -type HostDatastoreBrowserSearchSpec struct { - DynamicData - - Query []BaseFileQuery `xml:"query,omitempty,typeattr"` - Details *FileQueryFlags `xml:"details,omitempty"` - SearchCaseInsensitive *bool `xml:"searchCaseInsensitive"` - MatchPattern []string `xml:"matchPattern,omitempty"` - SortFoldersFirst *bool `xml:"sortFoldersFirst"` -} - -func init() { - t["HostDatastoreBrowserSearchSpec"] = reflect.TypeOf((*HostDatastoreBrowserSearchSpec)(nil)).Elem() -} - -type HostDatastoreConnectInfo struct { - DynamicData - - Summary DatastoreSummary `xml:"summary"` -} - -func init() { - t["HostDatastoreConnectInfo"] = reflect.TypeOf((*HostDatastoreConnectInfo)(nil)).Elem() -} - -type HostDatastoreExistsConnectInfo struct { - HostDatastoreConnectInfo - - NewDatastoreName string `xml:"newDatastoreName"` -} - -func init() { - t["HostDatastoreExistsConnectInfo"] = reflect.TypeOf((*HostDatastoreExistsConnectInfo)(nil)).Elem() -} - -type HostDatastoreNameConflictConnectInfo struct { - HostDatastoreConnectInfo - - NewDatastoreName string `xml:"newDatastoreName"` -} - -func init() { - t["HostDatastoreNameConflictConnectInfo"] = reflect.TypeOf((*HostDatastoreNameConflictConnectInfo)(nil)).Elem() -} - -type HostDatastoreSystemCapabilities struct { - DynamicData - - NfsMountCreationRequired bool `xml:"nfsMountCreationRequired"` - NfsMountCreationSupported bool `xml:"nfsMountCreationSupported"` - LocalDatastoreSupported bool `xml:"localDatastoreSupported"` - VmfsExtentExpansionSupported *bool `xml:"vmfsExtentExpansionSupported"` -} - -func init() { - t["HostDatastoreSystemCapabilities"] = reflect.TypeOf((*HostDatastoreSystemCapabilities)(nil)).Elem() -} - -type HostDatastoreSystemDatastoreResult struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostDatastoreSystemDatastoreResult"] = reflect.TypeOf((*HostDatastoreSystemDatastoreResult)(nil)).Elem() -} - -type HostDatastoreSystemVvolDatastoreSpec struct { - DynamicData - - Name string `xml:"name"` - ScId string `xml:"scId"` -} - -func init() { - t["HostDatastoreSystemVvolDatastoreSpec"] = reflect.TypeOf((*HostDatastoreSystemVvolDatastoreSpec)(nil)).Elem() -} - -type HostDateTimeConfig struct { - DynamicData - - TimeZone string `xml:"timeZone,omitempty"` - NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` - PtpConfig *HostPtpConfig `xml:"ptpConfig,omitempty"` - Protocol string `xml:"protocol,omitempty"` - Enabled *bool `xml:"enabled"` - DisableEvents *bool `xml:"disableEvents"` - DisableFallback *bool `xml:"disableFallback"` - ResetToFactoryDefaults *bool `xml:"resetToFactoryDefaults"` -} - -func init() { - t["HostDateTimeConfig"] = reflect.TypeOf((*HostDateTimeConfig)(nil)).Elem() -} - -type HostDateTimeInfo struct { - DynamicData - - TimeZone HostDateTimeSystemTimeZone `xml:"timeZone"` - SystemClockProtocol string `xml:"systemClockProtocol,omitempty"` - NtpConfig *HostNtpConfig `xml:"ntpConfig,omitempty"` - PtpConfig *HostPtpConfig `xml:"ptpConfig,omitempty"` - Enabled *bool `xml:"enabled"` - DisableEvents *bool `xml:"disableEvents"` - DisableFallback *bool `xml:"disableFallback"` - InFallbackState *bool `xml:"inFallbackState"` - ServiceSync *bool `xml:"serviceSync"` - LastSyncTime *time.Time `xml:"lastSyncTime"` - RemoteNtpServer string `xml:"remoteNtpServer,omitempty"` - NtpRunTime int64 `xml:"ntpRunTime,omitempty"` - PtpRunTime int64 `xml:"ptpRunTime,omitempty"` - NtpDuration string `xml:"ntpDuration,omitempty"` - PtpDuration string `xml:"ptpDuration,omitempty"` -} - -func init() { - t["HostDateTimeInfo"] = reflect.TypeOf((*HostDateTimeInfo)(nil)).Elem() -} - -type HostDateTimeSystemServiceTestResult struct { - DynamicData - - WorkingNormally bool `xml:"workingNormally"` - Report []string `xml:"report,omitempty"` -} - -func init() { - t["HostDateTimeSystemServiceTestResult"] = reflect.TypeOf((*HostDateTimeSystemServiceTestResult)(nil)).Elem() -} - -type HostDateTimeSystemTimeZone struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - Description string `xml:"description"` - GmtOffset int32 `xml:"gmtOffset"` -} - -func init() { - t["HostDateTimeSystemTimeZone"] = reflect.TypeOf((*HostDateTimeSystemTimeZone)(nil)).Elem() -} - -type HostDeleteVStorageObjectExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostDeleteVStorageObjectExRequestType"] = reflect.TypeOf((*HostDeleteVStorageObjectExRequestType)(nil)).Elem() -} - -type HostDeleteVStorageObjectEx_Task HostDeleteVStorageObjectExRequestType - -func init() { - t["HostDeleteVStorageObjectEx_Task"] = reflect.TypeOf((*HostDeleteVStorageObjectEx_Task)(nil)).Elem() -} - -type HostDeleteVStorageObjectEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostDeleteVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostDeleteVStorageObjectRequestType"] = reflect.TypeOf((*HostDeleteVStorageObjectRequestType)(nil)).Elem() -} - -type HostDeleteVStorageObject_Task HostDeleteVStorageObjectRequestType - -func init() { - t["HostDeleteVStorageObject_Task"] = reflect.TypeOf((*HostDeleteVStorageObject_Task)(nil)).Elem() -} - -type HostDeleteVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostDeploymentInfo struct { - DynamicData - - BootedFromStatelessCache *bool `xml:"bootedFromStatelessCache"` -} - -func init() { - t["HostDeploymentInfo"] = reflect.TypeOf((*HostDeploymentInfo)(nil)).Elem() -} - -type HostDevice struct { - DynamicData - - DeviceName string `xml:"deviceName"` - DeviceType string `xml:"deviceType"` -} - -func init() { - t["HostDevice"] = reflect.TypeOf((*HostDevice)(nil)).Elem() -} - -type HostDhcpService struct { - DynamicData - - Key string `xml:"key"` - Spec HostDhcpServiceSpec `xml:"spec"` -} - -func init() { - t["HostDhcpService"] = reflect.TypeOf((*HostDhcpService)(nil)).Elem() -} - -type HostDhcpServiceConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Key string `xml:"key"` - Spec HostDhcpServiceSpec `xml:"spec"` -} - -func init() { - t["HostDhcpServiceConfig"] = reflect.TypeOf((*HostDhcpServiceConfig)(nil)).Elem() -} - -type HostDhcpServiceSpec struct { - DynamicData - - VirtualSwitch string `xml:"virtualSwitch"` - DefaultLeaseDuration int32 `xml:"defaultLeaseDuration"` - LeaseBeginIp string `xml:"leaseBeginIp"` - LeaseEndIp string `xml:"leaseEndIp"` - MaxLeaseDuration int32 `xml:"maxLeaseDuration"` - UnlimitedLease bool `xml:"unlimitedLease"` - IpSubnetAddr string `xml:"ipSubnetAddr"` - IpSubnetMask string `xml:"ipSubnetMask"` -} - -func init() { - t["HostDhcpServiceSpec"] = reflect.TypeOf((*HostDhcpServiceSpec)(nil)).Elem() -} - -type HostDiagnosticPartition struct { - DynamicData - - StorageType string `xml:"storageType"` - DiagnosticType string `xml:"diagnosticType"` - Slots int32 `xml:"slots"` - Id HostScsiDiskPartition `xml:"id"` -} - -func init() { - t["HostDiagnosticPartition"] = reflect.TypeOf((*HostDiagnosticPartition)(nil)).Elem() -} - -type HostDiagnosticPartitionCreateDescription struct { - DynamicData - - Layout HostDiskPartitionLayout `xml:"layout"` - DiskUuid string `xml:"diskUuid"` - Spec HostDiagnosticPartitionCreateSpec `xml:"spec"` -} - -func init() { - t["HostDiagnosticPartitionCreateDescription"] = reflect.TypeOf((*HostDiagnosticPartitionCreateDescription)(nil)).Elem() -} - -type HostDiagnosticPartitionCreateOption struct { - DynamicData - - StorageType string `xml:"storageType"` - DiagnosticType string `xml:"diagnosticType"` - Disk HostScsiDisk `xml:"disk"` -} - -func init() { - t["HostDiagnosticPartitionCreateOption"] = reflect.TypeOf((*HostDiagnosticPartitionCreateOption)(nil)).Elem() -} - -type HostDiagnosticPartitionCreateSpec struct { - DynamicData - - StorageType string `xml:"storageType"` - DiagnosticType string `xml:"diagnosticType"` - Id HostScsiDiskPartition `xml:"id"` - Partition HostDiskPartitionSpec `xml:"partition"` - Active *bool `xml:"active"` -} - -func init() { - t["HostDiagnosticPartitionCreateSpec"] = reflect.TypeOf((*HostDiagnosticPartitionCreateSpec)(nil)).Elem() -} - -type HostDigestInfo struct { - DynamicData - - DigestMethod string `xml:"digestMethod"` - DigestValue []byte `xml:"digestValue"` - ObjectName string `xml:"objectName,omitempty"` -} - -func init() { - t["HostDigestInfo"] = reflect.TypeOf((*HostDigestInfo)(nil)).Elem() -} - -type HostDirectoryStoreInfo struct { - HostAuthenticationStoreInfo -} - -func init() { - t["HostDirectoryStoreInfo"] = reflect.TypeOf((*HostDirectoryStoreInfo)(nil)).Elem() -} - -type HostDisconnectedEvent struct { - HostEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["HostDisconnectedEvent"] = reflect.TypeOf((*HostDisconnectedEvent)(nil)).Elem() -} - -type HostDiskConfigurationResult struct { - DynamicData - - DevicePath string `xml:"devicePath,omitempty"` - Success *bool `xml:"success"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostDiskConfigurationResult"] = reflect.TypeOf((*HostDiskConfigurationResult)(nil)).Elem() -} - -type HostDiskDimensions struct { - DynamicData -} - -func init() { - t["HostDiskDimensions"] = reflect.TypeOf((*HostDiskDimensions)(nil)).Elem() -} - -type HostDiskDimensionsChs struct { - DynamicData - - Cylinder int64 `xml:"cylinder"` - Head int32 `xml:"head"` - Sector int32 `xml:"sector"` -} - -func init() { - t["HostDiskDimensionsChs"] = reflect.TypeOf((*HostDiskDimensionsChs)(nil)).Elem() -} - -type HostDiskDimensionsLba struct { - DynamicData - - BlockSize int32 `xml:"blockSize"` - Block int64 `xml:"block"` -} - -func init() { - t["HostDiskDimensionsLba"] = reflect.TypeOf((*HostDiskDimensionsLba)(nil)).Elem() -} - -type HostDiskMappingInfo struct { - DynamicData - - PhysicalPartition *HostDiskMappingPartitionInfo `xml:"physicalPartition,omitempty"` - Name string `xml:"name"` - Exclusive *bool `xml:"exclusive"` -} - -func init() { - t["HostDiskMappingInfo"] = reflect.TypeOf((*HostDiskMappingInfo)(nil)).Elem() -} - -type HostDiskMappingOption struct { - DynamicData - - PhysicalPartition []HostDiskMappingPartitionOption `xml:"physicalPartition,omitempty"` - Name string `xml:"name"` -} - -func init() { - t["HostDiskMappingOption"] = reflect.TypeOf((*HostDiskMappingOption)(nil)).Elem() -} - -type HostDiskMappingPartitionInfo struct { - DynamicData - - Name string `xml:"name"` - FileSystem string `xml:"fileSystem"` - CapacityInKb int64 `xml:"capacityInKb"` -} - -func init() { - t["HostDiskMappingPartitionInfo"] = reflect.TypeOf((*HostDiskMappingPartitionInfo)(nil)).Elem() -} - -type HostDiskMappingPartitionOption struct { - DynamicData - - Name string `xml:"name"` - FileSystem string `xml:"fileSystem"` - CapacityInKb int64 `xml:"capacityInKb"` -} - -func init() { - t["HostDiskMappingPartitionOption"] = reflect.TypeOf((*HostDiskMappingPartitionOption)(nil)).Elem() -} - -type HostDiskPartitionAttributes struct { - DynamicData - - Partition int32 `xml:"partition"` - StartSector int64 `xml:"startSector"` - EndSector int64 `xml:"endSector"` - Type string `xml:"type"` - Guid string `xml:"guid,omitempty"` - Logical bool `xml:"logical"` - Attributes byte `xml:"attributes"` - PartitionAlignment int64 `xml:"partitionAlignment,omitempty"` -} - -func init() { - t["HostDiskPartitionAttributes"] = reflect.TypeOf((*HostDiskPartitionAttributes)(nil)).Elem() -} - -type HostDiskPartitionBlockRange struct { - DynamicData - - Partition int32 `xml:"partition,omitempty"` - Type string `xml:"type"` - Start HostDiskDimensionsLba `xml:"start"` - End HostDiskDimensionsLba `xml:"end"` -} - -func init() { - t["HostDiskPartitionBlockRange"] = reflect.TypeOf((*HostDiskPartitionBlockRange)(nil)).Elem() -} - -type HostDiskPartitionInfo struct { - DynamicData - - DeviceName string `xml:"deviceName"` - Spec HostDiskPartitionSpec `xml:"spec"` - Layout HostDiskPartitionLayout `xml:"layout"` -} - -func init() { - t["HostDiskPartitionInfo"] = reflect.TypeOf((*HostDiskPartitionInfo)(nil)).Elem() -} - -type HostDiskPartitionLayout struct { - DynamicData - - Total *HostDiskDimensionsLba `xml:"total,omitempty"` - Partition []HostDiskPartitionBlockRange `xml:"partition"` -} - -func init() { - t["HostDiskPartitionLayout"] = reflect.TypeOf((*HostDiskPartitionLayout)(nil)).Elem() -} - -type HostDiskPartitionSpec struct { - DynamicData - - PartitionFormat string `xml:"partitionFormat,omitempty"` - Chs *HostDiskDimensionsChs `xml:"chs,omitempty"` - TotalSectors int64 `xml:"totalSectors,omitempty"` - Partition []HostDiskPartitionAttributes `xml:"partition,omitempty"` -} - -func init() { - t["HostDiskPartitionSpec"] = reflect.TypeOf((*HostDiskPartitionSpec)(nil)).Elem() -} - -type HostDnsConfig struct { - DynamicData - - Dhcp bool `xml:"dhcp"` - VirtualNicDevice string `xml:"virtualNicDevice,omitempty"` - Ipv6VirtualNicDevice string `xml:"ipv6VirtualNicDevice,omitempty"` - HostName string `xml:"hostName"` - DomainName string `xml:"domainName"` - Address []string `xml:"address,omitempty"` - SearchDomain []string `xml:"searchDomain,omitempty"` -} - -func init() { - t["HostDnsConfig"] = reflect.TypeOf((*HostDnsConfig)(nil)).Elem() -} - -type HostDnsConfigSpec struct { - HostDnsConfig - - VirtualNicConnection *HostVirtualNicConnection `xml:"virtualNicConnection,omitempty"` - VirtualNicConnectionV6 *HostVirtualNicConnection `xml:"virtualNicConnectionV6,omitempty"` -} - -func init() { - t["HostDnsConfigSpec"] = reflect.TypeOf((*HostDnsConfigSpec)(nil)).Elem() -} - -type HostDvxClass struct { - DynamicData - - DeviceClass string `xml:"deviceClass"` - CheckpointSupported bool `xml:"checkpointSupported"` - SwDMATracingSupported bool `xml:"swDMATracingSupported"` - SriovNic bool `xml:"sriovNic"` -} - -func init() { - t["HostDvxClass"] = reflect.TypeOf((*HostDvxClass)(nil)).Elem() -} - -type HostEnableAdminFailedEvent struct { - HostEvent - - Permissions []Permission `xml:"permissions"` -} - -func init() { - t["HostEnableAdminFailedEvent"] = reflect.TypeOf((*HostEnableAdminFailedEvent)(nil)).Elem() -} - -type HostEnterMaintenanceResult struct { - DynamicData - - VmFaults []FaultsByVM `xml:"vmFaults,omitempty"` - HostFaults []FaultsByHost `xml:"hostFaults,omitempty"` -} - -func init() { - t["HostEnterMaintenanceResult"] = reflect.TypeOf((*HostEnterMaintenanceResult)(nil)).Elem() -} - -type HostEsxAgentHostManagerConfigInfo struct { - DynamicData - - AgentVmDatastore *ManagedObjectReference `xml:"agentVmDatastore,omitempty"` - AgentVmNetwork *ManagedObjectReference `xml:"agentVmNetwork,omitempty"` -} - -func init() { - t["HostEsxAgentHostManagerConfigInfo"] = reflect.TypeOf((*HostEsxAgentHostManagerConfigInfo)(nil)).Elem() -} - -type HostEvent struct { - Event -} - -func init() { - t["HostEvent"] = reflect.TypeOf((*HostEvent)(nil)).Elem() -} - -type HostEventArgument struct { - EntityEventArgument - - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["HostEventArgument"] = reflect.TypeOf((*HostEventArgument)(nil)).Elem() -} - -type HostExtendDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - NewCapacityInMB int64 `xml:"newCapacityInMB"` -} - -func init() { - t["HostExtendDiskRequestType"] = reflect.TypeOf((*HostExtendDiskRequestType)(nil)).Elem() -} - -type HostExtendDisk_Task HostExtendDiskRequestType - -func init() { - t["HostExtendDisk_Task"] = reflect.TypeOf((*HostExtendDisk_Task)(nil)).Elem() -} - -type HostExtendDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostExtraNetworksEvent struct { - HostDasEvent - - Ips string `xml:"ips,omitempty"` -} - -func init() { - t["HostExtraNetworksEvent"] = reflect.TypeOf((*HostExtraNetworksEvent)(nil)).Elem() -} - -type HostFaultToleranceManagerComponentHealthInfo struct { - DynamicData - - IsStorageHealthy bool `xml:"isStorageHealthy"` - IsNetworkHealthy bool `xml:"isNetworkHealthy"` -} - -func init() { - t["HostFaultToleranceManagerComponentHealthInfo"] = reflect.TypeOf((*HostFaultToleranceManagerComponentHealthInfo)(nil)).Elem() -} - -type HostFeatureCapability struct { - DynamicData - - Key string `xml:"key"` - FeatureName string `xml:"featureName"` - Value string `xml:"value"` -} - -func init() { - t["HostFeatureCapability"] = reflect.TypeOf((*HostFeatureCapability)(nil)).Elem() -} - -type HostFeatureMask struct { - DynamicData - - Key string `xml:"key"` - FeatureName string `xml:"featureName"` - Value string `xml:"value"` -} - -func init() { - t["HostFeatureMask"] = reflect.TypeOf((*HostFeatureMask)(nil)).Elem() -} - -type HostFeatureVersionInfo struct { - DynamicData - - Key string `xml:"key"` - Value string `xml:"value"` -} - -func init() { - t["HostFeatureVersionInfo"] = reflect.TypeOf((*HostFeatureVersionInfo)(nil)).Elem() -} - -type HostFibreChannelHba struct { - HostHostBusAdapter - - PortWorldWideName int64 `xml:"portWorldWideName"` - NodeWorldWideName int64 `xml:"nodeWorldWideName"` - PortType FibreChannelPortType `xml:"portType"` - Speed int64 `xml:"speed"` -} - -func init() { - t["HostFibreChannelHba"] = reflect.TypeOf((*HostFibreChannelHba)(nil)).Elem() -} - -type HostFibreChannelOverEthernetHba struct { - HostFibreChannelHba - - UnderlyingNic string `xml:"underlyingNic"` - LinkInfo HostFibreChannelOverEthernetHbaLinkInfo `xml:"linkInfo"` - IsSoftwareFcoe bool `xml:"isSoftwareFcoe"` - MarkedForRemoval *bool `xml:"markedForRemoval"` -} - -func init() { - t["HostFibreChannelOverEthernetHba"] = reflect.TypeOf((*HostFibreChannelOverEthernetHba)(nil)).Elem() -} - -type HostFibreChannelOverEthernetHbaLinkInfo struct { - DynamicData - - VnportMac string `xml:"vnportMac"` - FcfMac string `xml:"fcfMac"` - VlanId int32 `xml:"vlanId"` -} - -func init() { - t["HostFibreChannelOverEthernetHbaLinkInfo"] = reflect.TypeOf((*HostFibreChannelOverEthernetHbaLinkInfo)(nil)).Elem() -} - -type HostFibreChannelOverEthernetTargetTransport struct { - HostFibreChannelTargetTransport - - VnportMac string `xml:"vnportMac"` - FcfMac string `xml:"fcfMac"` - VlanId int32 `xml:"vlanId"` -} - -func init() { - t["HostFibreChannelOverEthernetTargetTransport"] = reflect.TypeOf((*HostFibreChannelOverEthernetTargetTransport)(nil)).Elem() -} - -type HostFibreChannelTargetTransport struct { - HostTargetTransport - - PortWorldWideName int64 `xml:"portWorldWideName"` - NodeWorldWideName int64 `xml:"nodeWorldWideName"` -} - -func init() { - t["HostFibreChannelTargetTransport"] = reflect.TypeOf((*HostFibreChannelTargetTransport)(nil)).Elem() -} - -type HostFileAccess struct { - DynamicData - - Who string `xml:"who"` - What string `xml:"what"` -} - -func init() { - t["HostFileAccess"] = reflect.TypeOf((*HostFileAccess)(nil)).Elem() -} - -type HostFileSystemMountInfo struct { - DynamicData - - MountInfo HostMountInfo `xml:"mountInfo"` - Volume BaseHostFileSystemVolume `xml:"volume,typeattr"` - VStorageSupport string `xml:"vStorageSupport,omitempty"` -} - -func init() { - t["HostFileSystemMountInfo"] = reflect.TypeOf((*HostFileSystemMountInfo)(nil)).Elem() -} - -type HostFileSystemVolume struct { - DynamicData - - Type string `xml:"type"` - Name string `xml:"name"` - Capacity int64 `xml:"capacity"` -} - -func init() { - t["HostFileSystemVolume"] = reflect.TypeOf((*HostFileSystemVolume)(nil)).Elem() -} - -type HostFileSystemVolumeInfo struct { - DynamicData - - VolumeTypeList []string `xml:"volumeTypeList,omitempty"` - MountInfo []HostFileSystemMountInfo `xml:"mountInfo,omitempty"` -} - -func init() { - t["HostFileSystemVolumeInfo"] = reflect.TypeOf((*HostFileSystemVolumeInfo)(nil)).Elem() -} - -type HostFirewallConfig struct { - DynamicData - - Rule []HostFirewallConfigRuleSetConfig `xml:"rule,omitempty"` - DefaultBlockingPolicy HostFirewallDefaultPolicy `xml:"defaultBlockingPolicy"` -} - -func init() { - t["HostFirewallConfig"] = reflect.TypeOf((*HostFirewallConfig)(nil)).Elem() -} - -type HostFirewallConfigRuleSetConfig struct { - DynamicData - - RulesetId string `xml:"rulesetId"` - Enabled bool `xml:"enabled"` - AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"` -} - -func init() { - t["HostFirewallConfigRuleSetConfig"] = reflect.TypeOf((*HostFirewallConfigRuleSetConfig)(nil)).Elem() -} - -type HostFirewallDefaultPolicy struct { - DynamicData - - IncomingBlocked *bool `xml:"incomingBlocked"` - OutgoingBlocked *bool `xml:"outgoingBlocked"` -} - -func init() { - t["HostFirewallDefaultPolicy"] = reflect.TypeOf((*HostFirewallDefaultPolicy)(nil)).Elem() -} - -type HostFirewallInfo struct { - DynamicData - - DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"` - Ruleset []HostFirewallRuleset `xml:"ruleset,omitempty"` -} - -func init() { - t["HostFirewallInfo"] = reflect.TypeOf((*HostFirewallInfo)(nil)).Elem() -} - -type HostFirewallRule struct { - DynamicData - - Port int32 `xml:"port"` - EndPort int32 `xml:"endPort,omitempty"` - Direction HostFirewallRuleDirection `xml:"direction"` - PortType HostFirewallRulePortType `xml:"portType,omitempty"` - Protocol string `xml:"protocol"` -} - -func init() { - t["HostFirewallRule"] = reflect.TypeOf((*HostFirewallRule)(nil)).Elem() -} - -type HostFirewallRuleset struct { - DynamicData - - Key string `xml:"key"` - Label string `xml:"label"` - Required bool `xml:"required"` - Rule []HostFirewallRule `xml:"rule"` - Service string `xml:"service,omitempty"` - Enabled bool `xml:"enabled"` - AllowedHosts *HostFirewallRulesetIpList `xml:"allowedHosts,omitempty"` -} - -func init() { - t["HostFirewallRuleset"] = reflect.TypeOf((*HostFirewallRuleset)(nil)).Elem() -} - -type HostFirewallRulesetIpList struct { - DynamicData - - IpAddress []string `xml:"ipAddress,omitempty"` - IpNetwork []HostFirewallRulesetIpNetwork `xml:"ipNetwork,omitempty"` - AllIp bool `xml:"allIp"` -} - -func init() { - t["HostFirewallRulesetIpList"] = reflect.TypeOf((*HostFirewallRulesetIpList)(nil)).Elem() -} - -type HostFirewallRulesetIpNetwork struct { - DynamicData - - Network string `xml:"network"` - PrefixLength int32 `xml:"prefixLength"` -} - -func init() { - t["HostFirewallRulesetIpNetwork"] = reflect.TypeOf((*HostFirewallRulesetIpNetwork)(nil)).Elem() -} - -type HostFirewallRulesetRulesetSpec struct { - DynamicData - - AllowedHosts HostFirewallRulesetIpList `xml:"allowedHosts"` -} - -func init() { - t["HostFirewallRulesetRulesetSpec"] = reflect.TypeOf((*HostFirewallRulesetRulesetSpec)(nil)).Elem() -} - -type HostFlagInfo struct { - DynamicData - - BackgroundSnapshotsEnabled *bool `xml:"backgroundSnapshotsEnabled"` -} - -func init() { - t["HostFlagInfo"] = reflect.TypeOf((*HostFlagInfo)(nil)).Elem() -} - -type HostForceMountedInfo struct { - DynamicData - - Persist bool `xml:"persist"` - Mounted bool `xml:"mounted"` -} - -func init() { - t["HostForceMountedInfo"] = reflect.TypeOf((*HostForceMountedInfo)(nil)).Elem() -} - -type HostFru struct { - DynamicData - - Type string `xml:"type"` - PartName string `xml:"partName"` - PartNumber string `xml:"partNumber"` - Manufacturer string `xml:"manufacturer"` - SerialNumber string `xml:"serialNumber,omitempty"` - MfgTimeStamp *time.Time `xml:"mfgTimeStamp"` -} - -func init() { - t["HostFru"] = reflect.TypeOf((*HostFru)(nil)).Elem() -} - -type HostGatewaySpec struct { - DynamicData - - GatewayType string `xml:"gatewayType"` - GatewayId string `xml:"gatewayId,omitempty"` - TrustVerificationToken string `xml:"trustVerificationToken,omitempty"` - HostAuthParams []KeyValue `xml:"hostAuthParams,omitempty"` -} - -func init() { - t["HostGatewaySpec"] = reflect.TypeOf((*HostGatewaySpec)(nil)).Elem() -} - -type HostGetShortNameFailedEvent struct { - HostEvent -} - -func init() { - t["HostGetShortNameFailedEvent"] = reflect.TypeOf((*HostGetShortNameFailedEvent)(nil)).Elem() -} - -type HostGetVFlashModuleDefaultConfig HostGetVFlashModuleDefaultConfigRequestType - -func init() { - t["HostGetVFlashModuleDefaultConfig"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfig)(nil)).Elem() -} - -type HostGetVFlashModuleDefaultConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - VFlashModule string `xml:"vFlashModule"` -} - -func init() { - t["HostGetVFlashModuleDefaultConfigRequestType"] = reflect.TypeOf((*HostGetVFlashModuleDefaultConfigRequestType)(nil)).Elem() -} - -type HostGetVFlashModuleDefaultConfigResponse struct { - Returnval VirtualDiskVFlashCacheConfigInfo `xml:"returnval"` -} - -type HostGraphicsConfig struct { - DynamicData - - HostDefaultGraphicsType string `xml:"hostDefaultGraphicsType"` - SharedPassthruAssignmentPolicy string `xml:"sharedPassthruAssignmentPolicy"` - DeviceType []HostGraphicsConfigDeviceType `xml:"deviceType,omitempty"` -} - -func init() { - t["HostGraphicsConfig"] = reflect.TypeOf((*HostGraphicsConfig)(nil)).Elem() -} - -type HostGraphicsConfigDeviceType struct { - DynamicData - - DeviceId string `xml:"deviceId"` - GraphicsType string `xml:"graphicsType"` -} - -func init() { - t["HostGraphicsConfigDeviceType"] = reflect.TypeOf((*HostGraphicsConfigDeviceType)(nil)).Elem() -} - -type HostGraphicsInfo struct { - DynamicData - - DeviceName string `xml:"deviceName"` - VendorName string `xml:"vendorName"` - PciId string `xml:"pciId"` - GraphicsType string `xml:"graphicsType"` - MemorySizeInKB int64 `xml:"memorySizeInKB"` - Vm []ManagedObjectReference `xml:"vm,omitempty"` -} - -func init() { - t["HostGraphicsInfo"] = reflect.TypeOf((*HostGraphicsInfo)(nil)).Elem() -} - -type HostHardwareElementInfo struct { - DynamicData - - Name string `xml:"name"` - Status BaseElementDescription `xml:"status,typeattr"` -} - -func init() { - t["HostHardwareElementInfo"] = reflect.TypeOf((*HostHardwareElementInfo)(nil)).Elem() -} - -type HostHardwareInfo struct { - DynamicData - - SystemInfo HostSystemInfo `xml:"systemInfo"` - CpuPowerManagementInfo *HostCpuPowerManagementInfo `xml:"cpuPowerManagementInfo,omitempty"` - CpuInfo HostCpuInfo `xml:"cpuInfo"` - CpuPkg []HostCpuPackage `xml:"cpuPkg"` - MemorySize int64 `xml:"memorySize"` - NumaInfo *HostNumaInfo `xml:"numaInfo,omitempty"` - SmcPresent *bool `xml:"smcPresent"` - PciDevice []HostPciDevice `xml:"pciDevice,omitempty"` - DvxClasses []HostDvxClass `xml:"dvxClasses,omitempty"` - CpuFeature []HostCpuIdInfo `xml:"cpuFeature,omitempty"` - BiosInfo *HostBIOSInfo `xml:"biosInfo,omitempty"` - ReliableMemoryInfo *HostReliableMemoryInfo `xml:"reliableMemoryInfo,omitempty"` - PersistentMemoryInfo *HostPersistentMemoryInfo `xml:"persistentMemoryInfo,omitempty"` - SgxInfo *HostSgxInfo `xml:"sgxInfo,omitempty"` - SevInfo *HostSevInfo `xml:"sevInfo,omitempty"` - MemoryTieringType string `xml:"memoryTieringType,omitempty"` - MemoryTierInfo []HostMemoryTierInfo `xml:"memoryTierInfo,omitempty"` -} - -func init() { - t["HostHardwareInfo"] = reflect.TypeOf((*HostHardwareInfo)(nil)).Elem() -} - -type HostHardwareStatusInfo struct { - DynamicData - - MemoryStatusInfo []BaseHostHardwareElementInfo `xml:"memoryStatusInfo,omitempty,typeattr"` - CpuStatusInfo []BaseHostHardwareElementInfo `xml:"cpuStatusInfo,omitempty,typeattr"` - StorageStatusInfo []HostStorageElementInfo `xml:"storageStatusInfo,omitempty"` - DpuStatusInfo []DpuStatusInfo `xml:"dpuStatusInfo,omitempty"` -} - -func init() { - t["HostHardwareStatusInfo"] = reflect.TypeOf((*HostHardwareStatusInfo)(nil)).Elem() -} - -type HostHardwareSummary struct { - DynamicData - - Vendor string `xml:"vendor"` - Model string `xml:"model"` - Uuid string `xml:"uuid"` - OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"` - MemorySize int64 `xml:"memorySize"` - CpuModel string `xml:"cpuModel"` - CpuMhz int32 `xml:"cpuMhz"` - NumCpuPkgs int16 `xml:"numCpuPkgs"` - NumCpuCores int16 `xml:"numCpuCores"` - NumCpuThreads int16 `xml:"numCpuThreads"` - NumNics int32 `xml:"numNics"` - NumHBAs int32 `xml:"numHBAs"` -} - -func init() { - t["HostHardwareSummary"] = reflect.TypeOf((*HostHardwareSummary)(nil)).Elem() -} - -type HostHasComponentFailure struct { - VimFault - - HostName string `xml:"hostName"` - ComponentType string `xml:"componentType"` - ComponentName string `xml:"componentName"` -} - -func init() { - t["HostHasComponentFailure"] = reflect.TypeOf((*HostHasComponentFailure)(nil)).Elem() -} - -type HostHasComponentFailureFault HostHasComponentFailure - -func init() { - t["HostHasComponentFailureFault"] = reflect.TypeOf((*HostHasComponentFailureFault)(nil)).Elem() -} - -type HostHbaCreateSpec struct { - DynamicData -} - -func init() { - t["HostHbaCreateSpec"] = reflect.TypeOf((*HostHbaCreateSpec)(nil)).Elem() -} - -type HostHostBusAdapter struct { - DynamicData - - Key string `xml:"key,omitempty"` - Device string `xml:"device"` - Bus int32 `xml:"bus"` - Status string `xml:"status"` - Model string `xml:"model"` - Driver string `xml:"driver,omitempty"` - Pci string `xml:"pci,omitempty"` - StorageProtocol string `xml:"storageProtocol,omitempty"` -} - -func init() { - t["HostHostBusAdapter"] = reflect.TypeOf((*HostHostBusAdapter)(nil)).Elem() -} - -type HostHyperThreadScheduleInfo struct { - DynamicData - - Available bool `xml:"available"` - Active bool `xml:"active"` - Config bool `xml:"config"` -} - -func init() { - t["HostHyperThreadScheduleInfo"] = reflect.TypeOf((*HostHyperThreadScheduleInfo)(nil)).Elem() -} - -type HostImageConfigGetAcceptance HostImageConfigGetAcceptanceRequestType - -func init() { - t["HostImageConfigGetAcceptance"] = reflect.TypeOf((*HostImageConfigGetAcceptance)(nil)).Elem() -} - -type HostImageConfigGetAcceptanceRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HostImageConfigGetAcceptanceRequestType"] = reflect.TypeOf((*HostImageConfigGetAcceptanceRequestType)(nil)).Elem() -} - -type HostImageConfigGetAcceptanceResponse struct { - Returnval string `xml:"returnval"` -} - -type HostImageConfigGetProfile HostImageConfigGetProfileRequestType - -func init() { - t["HostImageConfigGetProfile"] = reflect.TypeOf((*HostImageConfigGetProfile)(nil)).Elem() -} - -type HostImageConfigGetProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HostImageConfigGetProfileRequestType"] = reflect.TypeOf((*HostImageConfigGetProfileRequestType)(nil)).Elem() -} - -type HostImageConfigGetProfileResponse struct { - Returnval HostImageProfileSummary `xml:"returnval"` -} - -type HostImageProfileSummary struct { - DynamicData - - Name string `xml:"name"` - Vendor string `xml:"vendor"` -} - -func init() { - t["HostImageProfileSummary"] = reflect.TypeOf((*HostImageProfileSummary)(nil)).Elem() -} - -type HostInAuditModeEvent struct { - HostEvent -} - -func init() { - t["HostInAuditModeEvent"] = reflect.TypeOf((*HostInAuditModeEvent)(nil)).Elem() -} - -type HostInDomain struct { - HostConfigFault -} - -func init() { - t["HostInDomain"] = reflect.TypeOf((*HostInDomain)(nil)).Elem() -} - -type HostInDomainFault HostInDomain - -func init() { - t["HostInDomainFault"] = reflect.TypeOf((*HostInDomainFault)(nil)).Elem() -} - -type HostIncompatibleForFaultTolerance struct { - VmFaultToleranceIssue - - HostName string `xml:"hostName,omitempty"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["HostIncompatibleForFaultTolerance"] = reflect.TypeOf((*HostIncompatibleForFaultTolerance)(nil)).Elem() -} - -type HostIncompatibleForFaultToleranceFault HostIncompatibleForFaultTolerance - -func init() { - t["HostIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*HostIncompatibleForFaultToleranceFault)(nil)).Elem() -} - -type HostIncompatibleForRecordReplay struct { - VimFault - - HostName string `xml:"hostName,omitempty"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["HostIncompatibleForRecordReplay"] = reflect.TypeOf((*HostIncompatibleForRecordReplay)(nil)).Elem() -} - -type HostIncompatibleForRecordReplayFault HostIncompatibleForRecordReplay - -func init() { - t["HostIncompatibleForRecordReplayFault"] = reflect.TypeOf((*HostIncompatibleForRecordReplayFault)(nil)).Elem() -} - -type HostInflateDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostInflateDiskRequestType"] = reflect.TypeOf((*HostInflateDiskRequestType)(nil)).Elem() -} - -type HostInflateDisk_Task HostInflateDiskRequestType - -func init() { - t["HostInflateDisk_Task"] = reflect.TypeOf((*HostInflateDisk_Task)(nil)).Elem() -} - -type HostInflateDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostInternetScsiHba struct { - HostHostBusAdapter - - IsSoftwareBased bool `xml:"isSoftwareBased"` - CanBeDisabled *bool `xml:"canBeDisabled"` - NetworkBindingSupport HostInternetScsiHbaNetworkBindingSupportType `xml:"networkBindingSupport,omitempty"` - DiscoveryCapabilities HostInternetScsiHbaDiscoveryCapabilities `xml:"discoveryCapabilities"` - DiscoveryProperties HostInternetScsiHbaDiscoveryProperties `xml:"discoveryProperties"` - AuthenticationCapabilities HostInternetScsiHbaAuthenticationCapabilities `xml:"authenticationCapabilities"` - AuthenticationProperties HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties"` - DigestCapabilities *HostInternetScsiHbaDigestCapabilities `xml:"digestCapabilities,omitempty"` - DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` - IpCapabilities HostInternetScsiHbaIPCapabilities `xml:"ipCapabilities"` - IpProperties HostInternetScsiHbaIPProperties `xml:"ipProperties"` - SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` - AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` - IScsiName string `xml:"iScsiName"` - IScsiAlias string `xml:"iScsiAlias,omitempty"` - ConfiguredSendTarget []HostInternetScsiHbaSendTarget `xml:"configuredSendTarget,omitempty"` - ConfiguredStaticTarget []HostInternetScsiHbaStaticTarget `xml:"configuredStaticTarget,omitempty"` - MaxSpeedMb int32 `xml:"maxSpeedMb,omitempty"` - CurrentSpeedMb int32 `xml:"currentSpeedMb,omitempty"` -} - -func init() { - t["HostInternetScsiHba"] = reflect.TypeOf((*HostInternetScsiHba)(nil)).Elem() -} - -type HostInternetScsiHbaAuthenticationCapabilities struct { - DynamicData - - ChapAuthSettable bool `xml:"chapAuthSettable"` - Krb5AuthSettable bool `xml:"krb5AuthSettable"` - SrpAuthSettable bool `xml:"srpAuthSettable"` - SpkmAuthSettable bool `xml:"spkmAuthSettable"` - MutualChapSettable *bool `xml:"mutualChapSettable"` - TargetChapSettable *bool `xml:"targetChapSettable"` - TargetMutualChapSettable *bool `xml:"targetMutualChapSettable"` -} - -func init() { - t["HostInternetScsiHbaAuthenticationCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationCapabilities)(nil)).Elem() -} - -type HostInternetScsiHbaAuthenticationProperties struct { - DynamicData - - ChapAuthEnabled bool `xml:"chapAuthEnabled"` - ChapName string `xml:"chapName,omitempty"` - ChapSecret string `xml:"chapSecret,omitempty"` - ChapAuthenticationType string `xml:"chapAuthenticationType,omitempty"` - ChapInherited *bool `xml:"chapInherited"` - MutualChapName string `xml:"mutualChapName,omitempty"` - MutualChapSecret string `xml:"mutualChapSecret,omitempty"` - MutualChapAuthenticationType string `xml:"mutualChapAuthenticationType,omitempty"` - MutualChapInherited *bool `xml:"mutualChapInherited"` -} - -func init() { - t["HostInternetScsiHbaAuthenticationProperties"] = reflect.TypeOf((*HostInternetScsiHbaAuthenticationProperties)(nil)).Elem() -} - -type HostInternetScsiHbaDigestCapabilities struct { - DynamicData - - HeaderDigestSettable *bool `xml:"headerDigestSettable"` - DataDigestSettable *bool `xml:"dataDigestSettable"` - TargetHeaderDigestSettable *bool `xml:"targetHeaderDigestSettable"` - TargetDataDigestSettable *bool `xml:"targetDataDigestSettable"` -} - -func init() { - t["HostInternetScsiHbaDigestCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDigestCapabilities)(nil)).Elem() -} - -type HostInternetScsiHbaDigestProperties struct { - DynamicData - - HeaderDigestType string `xml:"headerDigestType,omitempty"` - HeaderDigestInherited *bool `xml:"headerDigestInherited"` - DataDigestType string `xml:"dataDigestType,omitempty"` - DataDigestInherited *bool `xml:"dataDigestInherited"` -} - -func init() { - t["HostInternetScsiHbaDigestProperties"] = reflect.TypeOf((*HostInternetScsiHbaDigestProperties)(nil)).Elem() -} - -type HostInternetScsiHbaDiscoveryCapabilities struct { - DynamicData - - ISnsDiscoverySettable bool `xml:"iSnsDiscoverySettable"` - SlpDiscoverySettable bool `xml:"slpDiscoverySettable"` - StaticTargetDiscoverySettable bool `xml:"staticTargetDiscoverySettable"` - SendTargetsDiscoverySettable bool `xml:"sendTargetsDiscoverySettable"` -} - -func init() { - t["HostInternetScsiHbaDiscoveryCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryCapabilities)(nil)).Elem() -} - -type HostInternetScsiHbaDiscoveryProperties struct { - DynamicData - - ISnsDiscoveryEnabled bool `xml:"iSnsDiscoveryEnabled"` - ISnsDiscoveryMethod string `xml:"iSnsDiscoveryMethod,omitempty"` - ISnsHost string `xml:"iSnsHost,omitempty"` - SlpDiscoveryEnabled bool `xml:"slpDiscoveryEnabled"` - SlpDiscoveryMethod string `xml:"slpDiscoveryMethod,omitempty"` - SlpHost string `xml:"slpHost,omitempty"` - StaticTargetDiscoveryEnabled bool `xml:"staticTargetDiscoveryEnabled"` - SendTargetsDiscoveryEnabled bool `xml:"sendTargetsDiscoveryEnabled"` -} - -func init() { - t["HostInternetScsiHbaDiscoveryProperties"] = reflect.TypeOf((*HostInternetScsiHbaDiscoveryProperties)(nil)).Elem() -} - -type HostInternetScsiHbaIPCapabilities struct { - DynamicData - - AddressSettable bool `xml:"addressSettable"` - IpConfigurationMethodSettable bool `xml:"ipConfigurationMethodSettable"` - SubnetMaskSettable bool `xml:"subnetMaskSettable"` - DefaultGatewaySettable bool `xml:"defaultGatewaySettable"` - PrimaryDnsServerAddressSettable bool `xml:"primaryDnsServerAddressSettable"` - AlternateDnsServerAddressSettable bool `xml:"alternateDnsServerAddressSettable"` - Ipv6Supported *bool `xml:"ipv6Supported"` - ArpRedirectSettable *bool `xml:"arpRedirectSettable"` - MtuSettable *bool `xml:"mtuSettable"` - HostNameAsTargetAddress *bool `xml:"hostNameAsTargetAddress"` - NameAliasSettable *bool `xml:"nameAliasSettable"` - Ipv4EnableSettable *bool `xml:"ipv4EnableSettable"` - Ipv6EnableSettable *bool `xml:"ipv6EnableSettable"` - Ipv6PrefixLengthSettable *bool `xml:"ipv6PrefixLengthSettable"` - Ipv6PrefixLength int32 `xml:"ipv6PrefixLength,omitempty"` - Ipv6DhcpConfigurationSettable *bool `xml:"ipv6DhcpConfigurationSettable"` - Ipv6LinkLocalAutoConfigurationSettable *bool `xml:"ipv6LinkLocalAutoConfigurationSettable"` - Ipv6RouterAdvertisementConfigurationSettable *bool `xml:"ipv6RouterAdvertisementConfigurationSettable"` - Ipv6DefaultGatewaySettable *bool `xml:"ipv6DefaultGatewaySettable"` - Ipv6MaxStaticAddressesSupported int32 `xml:"ipv6MaxStaticAddressesSupported,omitempty"` -} - -func init() { - t["HostInternetScsiHbaIPCapabilities"] = reflect.TypeOf((*HostInternetScsiHbaIPCapabilities)(nil)).Elem() -} - -type HostInternetScsiHbaIPProperties struct { - DynamicData - - Mac string `xml:"mac,omitempty"` - Address string `xml:"address,omitempty"` - DhcpConfigurationEnabled bool `xml:"dhcpConfigurationEnabled"` - SubnetMask string `xml:"subnetMask,omitempty"` - DefaultGateway string `xml:"defaultGateway,omitempty"` - PrimaryDnsServerAddress string `xml:"primaryDnsServerAddress,omitempty"` - AlternateDnsServerAddress string `xml:"alternateDnsServerAddress,omitempty"` - Ipv6Address string `xml:"ipv6Address,omitempty"` - Ipv6SubnetMask string `xml:"ipv6SubnetMask,omitempty"` - Ipv6DefaultGateway string `xml:"ipv6DefaultGateway,omitempty"` - ArpRedirectEnabled *bool `xml:"arpRedirectEnabled"` - Mtu int32 `xml:"mtu,omitempty"` - JumboFramesEnabled *bool `xml:"jumboFramesEnabled"` - Ipv4Enabled *bool `xml:"ipv4Enabled"` - Ipv6Enabled *bool `xml:"ipv6Enabled"` - Ipv6properties *HostInternetScsiHbaIPv6Properties `xml:"ipv6properties,omitempty"` -} - -func init() { - t["HostInternetScsiHbaIPProperties"] = reflect.TypeOf((*HostInternetScsiHbaIPProperties)(nil)).Elem() -} - -type HostInternetScsiHbaIPv6Properties struct { - DynamicData - - IscsiIpv6Address []HostInternetScsiHbaIscsiIpv6Address `xml:"iscsiIpv6Address,omitempty"` - Ipv6DhcpConfigurationEnabled *bool `xml:"ipv6DhcpConfigurationEnabled"` - Ipv6LinkLocalAutoConfigurationEnabled *bool `xml:"ipv6LinkLocalAutoConfigurationEnabled"` - Ipv6RouterAdvertisementConfigurationEnabled *bool `xml:"ipv6RouterAdvertisementConfigurationEnabled"` - Ipv6DefaultGateway string `xml:"ipv6DefaultGateway,omitempty"` -} - -func init() { - t["HostInternetScsiHbaIPv6Properties"] = reflect.TypeOf((*HostInternetScsiHbaIPv6Properties)(nil)).Elem() -} - -type HostInternetScsiHbaIscsiIpv6Address struct { - DynamicData - - Address string `xml:"address"` - PrefixLength int32 `xml:"prefixLength"` - Origin string `xml:"origin"` - Operation string `xml:"operation,omitempty"` -} - -func init() { - t["HostInternetScsiHbaIscsiIpv6Address"] = reflect.TypeOf((*HostInternetScsiHbaIscsiIpv6Address)(nil)).Elem() -} - -type HostInternetScsiHbaParamValue struct { - OptionValue - - IsInherited *bool `xml:"isInherited"` -} - -func init() { - t["HostInternetScsiHbaParamValue"] = reflect.TypeOf((*HostInternetScsiHbaParamValue)(nil)).Elem() -} - -type HostInternetScsiHbaSendTarget struct { - DynamicData - - Address string `xml:"address"` - Port int32 `xml:"port,omitempty"` - AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"` - DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` - SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` - AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` - Parent string `xml:"parent,omitempty"` -} - -func init() { - t["HostInternetScsiHbaSendTarget"] = reflect.TypeOf((*HostInternetScsiHbaSendTarget)(nil)).Elem() -} - -type HostInternetScsiHbaStaticTarget struct { - DynamicData - - Address string `xml:"address"` - Port int32 `xml:"port,omitempty"` - IScsiName string `xml:"iScsiName"` - DiscoveryMethod string `xml:"discoveryMethod,omitempty"` - AuthenticationProperties *HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties,omitempty"` - DigestProperties *HostInternetScsiHbaDigestProperties `xml:"digestProperties,omitempty"` - SupportedAdvancedOptions []OptionDef `xml:"supportedAdvancedOptions,omitempty"` - AdvancedOptions []HostInternetScsiHbaParamValue `xml:"advancedOptions,omitempty"` - Parent string `xml:"parent,omitempty"` -} - -func init() { - t["HostInternetScsiHbaStaticTarget"] = reflect.TypeOf((*HostInternetScsiHbaStaticTarget)(nil)).Elem() -} - -type HostInternetScsiHbaTargetSet struct { - DynamicData - - StaticTargets []HostInternetScsiHbaStaticTarget `xml:"staticTargets,omitempty"` - SendTargets []HostInternetScsiHbaSendTarget `xml:"sendTargets,omitempty"` -} - -func init() { - t["HostInternetScsiHbaTargetSet"] = reflect.TypeOf((*HostInternetScsiHbaTargetSet)(nil)).Elem() -} - -type HostInternetScsiTargetTransport struct { - HostTargetTransport - - IScsiName string `xml:"iScsiName"` - IScsiAlias string `xml:"iScsiAlias"` - Address []string `xml:"address,omitempty"` -} - -func init() { - t["HostInternetScsiTargetTransport"] = reflect.TypeOf((*HostInternetScsiTargetTransport)(nil)).Elem() -} - -type HostInventoryFull struct { - NotEnoughLicenses - - Capacity int32 `xml:"capacity"` -} - -func init() { - t["HostInventoryFull"] = reflect.TypeOf((*HostInventoryFull)(nil)).Elem() -} - -type HostInventoryFullEvent struct { - LicenseEvent - - Capacity int32 `xml:"capacity"` -} - -func init() { - t["HostInventoryFullEvent"] = reflect.TypeOf((*HostInventoryFullEvent)(nil)).Elem() -} - -type HostInventoryFullFault HostInventoryFull - -func init() { - t["HostInventoryFullFault"] = reflect.TypeOf((*HostInventoryFullFault)(nil)).Elem() -} - -type HostInventoryUnreadableEvent struct { - Event -} - -func init() { - t["HostInventoryUnreadableEvent"] = reflect.TypeOf((*HostInventoryUnreadableEvent)(nil)).Elem() -} - -type HostIoFilterInfo struct { - IoFilterInfo - - Available bool `xml:"available"` -} - -func init() { - t["HostIoFilterInfo"] = reflect.TypeOf((*HostIoFilterInfo)(nil)).Elem() -} - -type HostIpChangedEvent struct { - HostEvent - - OldIP string `xml:"oldIP"` - NewIP string `xml:"newIP"` -} - -func init() { - t["HostIpChangedEvent"] = reflect.TypeOf((*HostIpChangedEvent)(nil)).Elem() -} - -type HostIpConfig struct { - DynamicData - - Dhcp bool `xml:"dhcp"` - IpAddress string `xml:"ipAddress,omitempty"` - SubnetMask string `xml:"subnetMask,omitempty"` - IpV6Config *HostIpConfigIpV6AddressConfiguration `xml:"ipV6Config,omitempty"` -} - -func init() { - t["HostIpConfig"] = reflect.TypeOf((*HostIpConfig)(nil)).Elem() -} - -type HostIpConfigIpV6Address struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - PrefixLength int32 `xml:"prefixLength"` - Origin string `xml:"origin,omitempty"` - DadState string `xml:"dadState,omitempty"` - Lifetime *time.Time `xml:"lifetime"` - Operation string `xml:"operation,omitempty"` -} - -func init() { - t["HostIpConfigIpV6Address"] = reflect.TypeOf((*HostIpConfigIpV6Address)(nil)).Elem() -} - -type HostIpConfigIpV6AddressConfiguration struct { - DynamicData - - IpV6Address []HostIpConfigIpV6Address `xml:"ipV6Address,omitempty"` - AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` - DhcpV6Enabled *bool `xml:"dhcpV6Enabled"` -} - -func init() { - t["HostIpConfigIpV6AddressConfiguration"] = reflect.TypeOf((*HostIpConfigIpV6AddressConfiguration)(nil)).Elem() -} - -type HostIpInconsistentEvent struct { - HostEvent - - IpAddress string `xml:"ipAddress"` - IpAddress2 string `xml:"ipAddress2"` -} - -func init() { - t["HostIpInconsistentEvent"] = reflect.TypeOf((*HostIpInconsistentEvent)(nil)).Elem() -} - -type HostIpRouteConfig struct { - DynamicData - - DefaultGateway string `xml:"defaultGateway,omitempty"` - GatewayDevice string `xml:"gatewayDevice,omitempty"` - IpV6DefaultGateway string `xml:"ipV6DefaultGateway,omitempty"` - IpV6GatewayDevice string `xml:"ipV6GatewayDevice,omitempty"` -} - -func init() { - t["HostIpRouteConfig"] = reflect.TypeOf((*HostIpRouteConfig)(nil)).Elem() -} - -type HostIpRouteConfigSpec struct { - HostIpRouteConfig - - GatewayDeviceConnection *HostVirtualNicConnection `xml:"gatewayDeviceConnection,omitempty"` - IpV6GatewayDeviceConnection *HostVirtualNicConnection `xml:"ipV6GatewayDeviceConnection,omitempty"` -} - -func init() { - t["HostIpRouteConfigSpec"] = reflect.TypeOf((*HostIpRouteConfigSpec)(nil)).Elem() -} - -type HostIpRouteEntry struct { - DynamicData - - Network string `xml:"network"` - PrefixLength int32 `xml:"prefixLength"` - Gateway string `xml:"gateway"` - DeviceName string `xml:"deviceName,omitempty"` -} - -func init() { - t["HostIpRouteEntry"] = reflect.TypeOf((*HostIpRouteEntry)(nil)).Elem() -} - -type HostIpRouteOp struct { - DynamicData - - ChangeOperation string `xml:"changeOperation"` - Route HostIpRouteEntry `xml:"route"` -} - -func init() { - t["HostIpRouteOp"] = reflect.TypeOf((*HostIpRouteOp)(nil)).Elem() -} - -type HostIpRouteTableConfig struct { - DynamicData - - IpRoute []HostIpRouteOp `xml:"ipRoute,omitempty"` - Ipv6Route []HostIpRouteOp `xml:"ipv6Route,omitempty"` -} - -func init() { - t["HostIpRouteTableConfig"] = reflect.TypeOf((*HostIpRouteTableConfig)(nil)).Elem() -} - -type HostIpRouteTableInfo struct { - DynamicData - - IpRoute []HostIpRouteEntry `xml:"ipRoute,omitempty"` - Ipv6Route []HostIpRouteEntry `xml:"ipv6Route,omitempty"` -} - -func init() { - t["HostIpRouteTableInfo"] = reflect.TypeOf((*HostIpRouteTableInfo)(nil)).Elem() -} - -type HostIpToShortNameFailedEvent struct { - HostEvent -} - -func init() { - t["HostIpToShortNameFailedEvent"] = reflect.TypeOf((*HostIpToShortNameFailedEvent)(nil)).Elem() -} - -type HostIpmiInfo struct { - DynamicData - - BmcIpAddress string `xml:"bmcIpAddress,omitempty"` - BmcMacAddress string `xml:"bmcMacAddress,omitempty"` - Login string `xml:"login,omitempty"` - Password string `xml:"password,omitempty"` -} - -func init() { - t["HostIpmiInfo"] = reflect.TypeOf((*HostIpmiInfo)(nil)).Elem() -} - -type HostIsolationIpPingFailedEvent struct { - HostDasEvent - - IsolationIp string `xml:"isolationIp"` -} - -func init() { - t["HostIsolationIpPingFailedEvent"] = reflect.TypeOf((*HostIsolationIpPingFailedEvent)(nil)).Elem() -} - -type HostLicensableResourceInfo struct { - DynamicData - - Resource []KeyAnyValue `xml:"resource"` -} - -func init() { - t["HostLicensableResourceInfo"] = reflect.TypeOf((*HostLicensableResourceInfo)(nil)).Elem() -} - -type HostLicenseConnectInfo struct { - DynamicData - - License LicenseManagerLicenseInfo `xml:"license"` - Evaluation LicenseManagerEvaluationInfo `xml:"evaluation"` - Resource *HostLicensableResourceInfo `xml:"resource,omitempty"` -} - -func init() { - t["HostLicenseConnectInfo"] = reflect.TypeOf((*HostLicenseConnectInfo)(nil)).Elem() -} - -type HostLicenseExpiredEvent struct { - LicenseEvent -} - -func init() { - t["HostLicenseExpiredEvent"] = reflect.TypeOf((*HostLicenseExpiredEvent)(nil)).Elem() -} - -type HostLicenseSpec struct { - DynamicData - - Source BaseLicenseSource `xml:"source,omitempty,typeattr"` - EditionKey string `xml:"editionKey,omitempty"` - DisabledFeatureKey []string `xml:"disabledFeatureKey,omitempty"` - EnabledFeatureKey []string `xml:"enabledFeatureKey,omitempty"` -} - -func init() { - t["HostLicenseSpec"] = reflect.TypeOf((*HostLicenseSpec)(nil)).Elem() -} - -type HostListSummary struct { - DynamicData - - Host *ManagedObjectReference `xml:"host,omitempty"` - Hardware *HostHardwareSummary `xml:"hardware,omitempty"` - Runtime *HostRuntimeInfo `xml:"runtime,omitempty"` - Config HostConfigSummary `xml:"config"` - QuickStats HostListSummaryQuickStats `xml:"quickStats"` - OverallStatus ManagedEntityStatus `xml:"overallStatus"` - RebootRequired bool `xml:"rebootRequired"` - CustomValue []BaseCustomFieldValue `xml:"customValue,omitempty,typeattr"` - ManagementServerIp string `xml:"managementServerIp,omitempty"` - MaxEVCModeKey string `xml:"maxEVCModeKey,omitempty"` - CurrentEVCModeKey string `xml:"currentEVCModeKey,omitempty"` - CurrentEVCGraphicsModeKey string `xml:"currentEVCGraphicsModeKey,omitempty"` - Gateway *HostListSummaryGatewaySummary `xml:"gateway,omitempty"` - TpmAttestation *HostTpmAttestationInfo `xml:"tpmAttestation,omitempty"` - TrustAuthorityAttestationInfos []HostTrustAuthorityAttestationInfo `xml:"trustAuthorityAttestationInfos,omitempty"` -} - -func init() { - t["HostListSummary"] = reflect.TypeOf((*HostListSummary)(nil)).Elem() -} - -type HostListSummaryGatewaySummary struct { - DynamicData - - GatewayType string `xml:"gatewayType"` - GatewayId string `xml:"gatewayId"` -} - -func init() { - t["HostListSummaryGatewaySummary"] = reflect.TypeOf((*HostListSummaryGatewaySummary)(nil)).Elem() -} - -type HostListSummaryQuickStats struct { - DynamicData - - OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"` - OverallMemoryUsage int32 `xml:"overallMemoryUsage,omitempty"` - DistributedCpuFairness int32 `xml:"distributedCpuFairness,omitempty"` - DistributedMemoryFairness int32 `xml:"distributedMemoryFairness,omitempty"` - AvailablePMemCapacity int32 `xml:"availablePMemCapacity,omitempty"` - Uptime int32 `xml:"uptime,omitempty"` -} - -func init() { - t["HostListSummaryQuickStats"] = reflect.TypeOf((*HostListSummaryQuickStats)(nil)).Elem() -} - -type HostListVStorageObject HostListVStorageObjectRequestType - -func init() { - t["HostListVStorageObject"] = reflect.TypeOf((*HostListVStorageObject)(nil)).Elem() -} - -type HostListVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostListVStorageObjectRequestType"] = reflect.TypeOf((*HostListVStorageObjectRequestType)(nil)).Elem() -} - -type HostListVStorageObjectResponse struct { - Returnval []ID `xml:"returnval,omitempty"` -} - -type HostLocalAuthenticationInfo struct { - HostAuthenticationStoreInfo -} - -func init() { - t["HostLocalAuthenticationInfo"] = reflect.TypeOf((*HostLocalAuthenticationInfo)(nil)).Elem() -} - -type HostLocalFileSystemVolume struct { - HostFileSystemVolume - - Device string `xml:"device"` -} - -func init() { - t["HostLocalFileSystemVolume"] = reflect.TypeOf((*HostLocalFileSystemVolume)(nil)).Elem() -} - -type HostLocalFileSystemVolumeSpec struct { - DynamicData - - Device string `xml:"device"` - LocalPath string `xml:"localPath"` -} - -func init() { - t["HostLocalFileSystemVolumeSpec"] = reflect.TypeOf((*HostLocalFileSystemVolumeSpec)(nil)).Elem() -} - -type HostLocalPortCreatedEvent struct { - DvsEvent - - HostLocalPort DVSHostLocalPortInfo `xml:"hostLocalPort"` -} - -func init() { - t["HostLocalPortCreatedEvent"] = reflect.TypeOf((*HostLocalPortCreatedEvent)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerDiskLayoutSpec struct { - DynamicData - - ControllerType string `xml:"controllerType"` - BusNumber int32 `xml:"busNumber"` - UnitNumber *int32 `xml:"unitNumber"` - SrcFilename string `xml:"srcFilename"` - DstFilename string `xml:"dstFilename"` -} - -func init() { - t["HostLowLevelProvisioningManagerDiskLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerDiskLayoutSpec)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerFileDeleteResult struct { - DynamicData - - FileName string `xml:"fileName"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["HostLowLevelProvisioningManagerFileDeleteResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteResult)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerFileDeleteSpec struct { - DynamicData - - FileName string `xml:"fileName"` - FileType string `xml:"fileType"` -} - -func init() { - t["HostLowLevelProvisioningManagerFileDeleteSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileDeleteSpec)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerFileReserveResult struct { - DynamicData - - BaseName string `xml:"baseName"` - ParentDir string `xml:"parentDir"` - ReservedName string `xml:"reservedName"` -} - -func init() { - t["HostLowLevelProvisioningManagerFileReserveResult"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveResult)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerFileReserveSpec struct { - DynamicData - - BaseName string `xml:"baseName"` - ParentDir string `xml:"parentDir"` - FileType string `xml:"fileType"` - StorageProfile string `xml:"storageProfile"` -} - -func init() { - t["HostLowLevelProvisioningManagerFileReserveSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerFileReserveSpec)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerSnapshotLayoutSpec struct { - DynamicData - - Id int32 `xml:"id"` - SrcFilename string `xml:"srcFilename"` - DstFilename string `xml:"dstFilename"` - Disk []HostLowLevelProvisioningManagerDiskLayoutSpec `xml:"disk,omitempty"` -} - -func init() { - t["HostLowLevelProvisioningManagerSnapshotLayoutSpec"] = reflect.TypeOf((*HostLowLevelProvisioningManagerSnapshotLayoutSpec)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerVmMigrationStatus struct { - DynamicData - - MigrationId int64 `xml:"migrationId"` - Type string `xml:"type"` - Source bool `xml:"source"` - ConsideredSuccessful bool `xml:"consideredSuccessful"` -} - -func init() { - t["HostLowLevelProvisioningManagerVmMigrationStatus"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmMigrationStatus)(nil)).Elem() -} - -type HostLowLevelProvisioningManagerVmRecoveryInfo struct { - DynamicData - - Version string `xml:"version"` - BiosUUID string `xml:"biosUUID"` - InstanceUUID string `xml:"instanceUUID"` - FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` -} - -func init() { - t["HostLowLevelProvisioningManagerVmRecoveryInfo"] = reflect.TypeOf((*HostLowLevelProvisioningManagerVmRecoveryInfo)(nil)).Elem() -} - -type HostMaintenanceSpec struct { - DynamicData - - VsanMode *VsanHostDecommissionMode `xml:"vsanMode,omitempty"` - Purpose string `xml:"purpose,omitempty"` -} - -func init() { - t["HostMaintenanceSpec"] = reflect.TypeOf((*HostMaintenanceSpec)(nil)).Elem() -} - -type HostMemberHealthCheckResult struct { - DynamicData - - Summary string `xml:"summary,omitempty"` -} - -func init() { - t["HostMemberHealthCheckResult"] = reflect.TypeOf((*HostMemberHealthCheckResult)(nil)).Elem() -} - -type HostMemberRuntimeInfo struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Status string `xml:"status,omitempty"` - StatusDetail string `xml:"statusDetail,omitempty"` - NsxtStatus string `xml:"nsxtStatus,omitempty"` - NsxtStatusDetail string `xml:"nsxtStatusDetail,omitempty"` - HealthCheckResult []BaseHostMemberHealthCheckResult `xml:"healthCheckResult,omitempty,typeattr"` -} - -func init() { - t["HostMemberRuntimeInfo"] = reflect.TypeOf((*HostMemberRuntimeInfo)(nil)).Elem() -} - -type HostMemberUplinkHealthCheckResult struct { - HostMemberHealthCheckResult - - UplinkPortKey string `xml:"uplinkPortKey"` -} - -func init() { - t["HostMemberUplinkHealthCheckResult"] = reflect.TypeOf((*HostMemberUplinkHealthCheckResult)(nil)).Elem() -} - -type HostMemoryProfile struct { - ApplyProfile -} - -func init() { - t["HostMemoryProfile"] = reflect.TypeOf((*HostMemoryProfile)(nil)).Elem() -} - -type HostMemorySpec struct { - DynamicData - - ServiceConsoleReservation int64 `xml:"serviceConsoleReservation,omitempty"` -} - -func init() { - t["HostMemorySpec"] = reflect.TypeOf((*HostMemorySpec)(nil)).Elem() -} - -type HostMemoryTierInfo struct { - DynamicData - - Name string `xml:"name"` - Type string `xml:"type"` - Flags []string `xml:"flags,omitempty"` - Size int64 `xml:"size"` -} - -func init() { - t["HostMemoryTierInfo"] = reflect.TypeOf((*HostMemoryTierInfo)(nil)).Elem() -} - -type HostMissingNetworksEvent struct { - HostDasEvent - - Ips string `xml:"ips,omitempty"` -} - -func init() { - t["HostMissingNetworksEvent"] = reflect.TypeOf((*HostMissingNetworksEvent)(nil)).Elem() -} - -type HostMonitoringStateChangedEvent struct { - ClusterEvent - - State string `xml:"state"` - PrevState string `xml:"prevState,omitempty"` -} - -func init() { - t["HostMonitoringStateChangedEvent"] = reflect.TypeOf((*HostMonitoringStateChangedEvent)(nil)).Elem() -} - -type HostMountInfo struct { - DynamicData - - Path string `xml:"path,omitempty"` - AccessMode string `xml:"accessMode"` - Mounted *bool `xml:"mounted"` - Accessible *bool `xml:"accessible"` - InaccessibleReason string `xml:"inaccessibleReason,omitempty"` - MountFailedReason string `xml:"mountFailedReason,omitempty"` -} - -func init() { - t["HostMountInfo"] = reflect.TypeOf((*HostMountInfo)(nil)).Elem() -} - -type HostMultipathInfo struct { - DynamicData - - Lun []HostMultipathInfoLogicalUnit `xml:"lun,omitempty"` -} - -func init() { - t["HostMultipathInfo"] = reflect.TypeOf((*HostMultipathInfo)(nil)).Elem() -} - -type HostMultipathInfoFixedLogicalUnitPolicy struct { - HostMultipathInfoLogicalUnitPolicy - - Prefer string `xml:"prefer"` -} - -func init() { - t["HostMultipathInfoFixedLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoFixedLogicalUnitPolicy)(nil)).Elem() -} - -type HostMultipathInfoHppLogicalUnitPolicy struct { - HostMultipathInfoLogicalUnitPolicy - - Bytes int64 `xml:"bytes,omitempty"` - Iops int64 `xml:"iops,omitempty"` - Path string `xml:"path,omitempty"` - LatencyEvalTime int64 `xml:"latencyEvalTime,omitempty"` - SamplingIosPerPath int64 `xml:"samplingIosPerPath,omitempty"` -} - -func init() { - t["HostMultipathInfoHppLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoHppLogicalUnitPolicy)(nil)).Elem() -} - -type HostMultipathInfoLogicalUnit struct { - DynamicData - - Key string `xml:"key"` - Id string `xml:"id"` - Lun string `xml:"lun"` - Path []HostMultipathInfoPath `xml:"path"` - Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"` - StorageArrayTypePolicy *HostMultipathInfoLogicalUnitStorageArrayTypePolicy `xml:"storageArrayTypePolicy,omitempty"` -} - -func init() { - t["HostMultipathInfoLogicalUnit"] = reflect.TypeOf((*HostMultipathInfoLogicalUnit)(nil)).Elem() -} - -type HostMultipathInfoLogicalUnitPolicy struct { - DynamicData - - Policy string `xml:"policy"` -} - -func init() { - t["HostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem() -} - -type HostMultipathInfoLogicalUnitStorageArrayTypePolicy struct { - DynamicData - - Policy string `xml:"policy"` -} - -func init() { - t["HostMultipathInfoLogicalUnitStorageArrayTypePolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitStorageArrayTypePolicy)(nil)).Elem() -} - -type HostMultipathInfoPath struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - PathState string `xml:"pathState"` - State string `xml:"state,omitempty"` - IsWorkingPath *bool `xml:"isWorkingPath"` - Adapter string `xml:"adapter"` - Lun string `xml:"lun"` - Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` -} - -func init() { - t["HostMultipathInfoPath"] = reflect.TypeOf((*HostMultipathInfoPath)(nil)).Elem() -} - -type HostMultipathStateInfo struct { - DynamicData - - Path []HostMultipathStateInfoPath `xml:"path,omitempty"` -} - -func init() { - t["HostMultipathStateInfo"] = reflect.TypeOf((*HostMultipathStateInfo)(nil)).Elem() -} - -type HostMultipathStateInfoPath struct { - DynamicData - - Name string `xml:"name"` - PathState string `xml:"pathState"` -} - -func init() { - t["HostMultipathStateInfoPath"] = reflect.TypeOf((*HostMultipathStateInfoPath)(nil)).Elem() -} - -type HostNasVolume struct { - HostFileSystemVolume - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` - UserName string `xml:"userName,omitempty"` - RemoteHostNames []string `xml:"remoteHostNames,omitempty"` - SecurityType string `xml:"securityType,omitempty"` - ProtocolEndpoint *bool `xml:"protocolEndpoint"` -} - -func init() { - t["HostNasVolume"] = reflect.TypeOf((*HostNasVolume)(nil)).Elem() -} - -type HostNasVolumeConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Spec *HostNasVolumeSpec `xml:"spec,omitempty"` -} - -func init() { - t["HostNasVolumeConfig"] = reflect.TypeOf((*HostNasVolumeConfig)(nil)).Elem() -} - -type HostNasVolumeSpec struct { - DynamicData - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` - LocalPath string `xml:"localPath"` - AccessMode string `xml:"accessMode"` - Type string `xml:"type,omitempty"` - UserName string `xml:"userName,omitempty"` - Password string `xml:"password,omitempty"` - RemoteHostNames []string `xml:"remoteHostNames,omitempty"` - SecurityType string `xml:"securityType,omitempty"` -} - -func init() { - t["HostNasVolumeSpec"] = reflect.TypeOf((*HostNasVolumeSpec)(nil)).Elem() -} - -type HostNasVolumeUserInfo struct { - DynamicData - - User string `xml:"user"` -} - -func init() { - t["HostNasVolumeUserInfo"] = reflect.TypeOf((*HostNasVolumeUserInfo)(nil)).Elem() -} - -type HostNatService struct { - DynamicData - - Key string `xml:"key"` - Spec HostNatServiceSpec `xml:"spec"` -} - -func init() { - t["HostNatService"] = reflect.TypeOf((*HostNatService)(nil)).Elem() -} - -type HostNatServiceConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Key string `xml:"key"` - Spec HostNatServiceSpec `xml:"spec"` -} - -func init() { - t["HostNatServiceConfig"] = reflect.TypeOf((*HostNatServiceConfig)(nil)).Elem() -} - -type HostNatServiceNameServiceSpec struct { - DynamicData - - DnsAutoDetect bool `xml:"dnsAutoDetect"` - DnsPolicy string `xml:"dnsPolicy"` - DnsRetries int32 `xml:"dnsRetries"` - DnsTimeout int32 `xml:"dnsTimeout"` - DnsNameServer []string `xml:"dnsNameServer,omitempty"` - NbdsTimeout int32 `xml:"nbdsTimeout"` - NbnsRetries int32 `xml:"nbnsRetries"` - NbnsTimeout int32 `xml:"nbnsTimeout"` -} - -func init() { - t["HostNatServiceNameServiceSpec"] = reflect.TypeOf((*HostNatServiceNameServiceSpec)(nil)).Elem() -} - -type HostNatServicePortForwardSpec struct { - DynamicData - - Type string `xml:"type"` - Name string `xml:"name"` - HostPort int32 `xml:"hostPort"` - GuestPort int32 `xml:"guestPort"` - GuestIpAddress string `xml:"guestIpAddress"` -} - -func init() { - t["HostNatServicePortForwardSpec"] = reflect.TypeOf((*HostNatServicePortForwardSpec)(nil)).Elem() -} - -type HostNatServiceSpec struct { - DynamicData - - VirtualSwitch string `xml:"virtualSwitch"` - ActiveFtp bool `xml:"activeFtp"` - AllowAnyOui bool `xml:"allowAnyOui"` - ConfigPort bool `xml:"configPort"` - IpGatewayAddress string `xml:"ipGatewayAddress"` - UdpTimeout int32 `xml:"udpTimeout"` - PortForward []HostNatServicePortForwardSpec `xml:"portForward,omitempty"` - NameService *HostNatServiceNameServiceSpec `xml:"nameService,omitempty"` -} - -func init() { - t["HostNatServiceSpec"] = reflect.TypeOf((*HostNatServiceSpec)(nil)).Elem() -} - -type HostNetCapabilities struct { - DynamicData - - CanSetPhysicalNicLinkSpeed bool `xml:"canSetPhysicalNicLinkSpeed"` - SupportsNicTeaming bool `xml:"supportsNicTeaming"` - NicTeamingPolicy []string `xml:"nicTeamingPolicy,omitempty"` - SupportsVlan bool `xml:"supportsVlan"` - UsesServiceConsoleNic bool `xml:"usesServiceConsoleNic"` - SupportsNetworkHints bool `xml:"supportsNetworkHints"` - MaxPortGroupsPerVswitch int32 `xml:"maxPortGroupsPerVswitch,omitempty"` - VswitchConfigSupported bool `xml:"vswitchConfigSupported"` - VnicConfigSupported bool `xml:"vnicConfigSupported"` - IpRouteConfigSupported bool `xml:"ipRouteConfigSupported"` - DnsConfigSupported bool `xml:"dnsConfigSupported"` - DhcpOnVnicSupported bool `xml:"dhcpOnVnicSupported"` - IpV6Supported *bool `xml:"ipV6Supported"` - BackupNfcNiocSupported *bool `xml:"backupNfcNiocSupported"` -} - -func init() { - t["HostNetCapabilities"] = reflect.TypeOf((*HostNetCapabilities)(nil)).Elem() -} - -type HostNetOffloadCapabilities struct { - DynamicData - - CsumOffload *bool `xml:"csumOffload"` - TcpSegmentation *bool `xml:"tcpSegmentation"` - ZeroCopyXmit *bool `xml:"zeroCopyXmit"` -} - -func init() { - t["HostNetOffloadCapabilities"] = reflect.TypeOf((*HostNetOffloadCapabilities)(nil)).Elem() -} - -type HostNetStackInstance struct { - DynamicData - - Key string `xml:"key,omitempty"` - Name string `xml:"name,omitempty"` - DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` - IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` - RequestedMaxNumberOfConnections int32 `xml:"requestedMaxNumberOfConnections,omitempty"` - CongestionControlAlgorithm string `xml:"congestionControlAlgorithm,omitempty"` - IpV6Enabled *bool `xml:"ipV6Enabled"` - RouteTableConfig *HostIpRouteTableConfig `xml:"routeTableConfig,omitempty"` -} - -func init() { - t["HostNetStackInstance"] = reflect.TypeOf((*HostNetStackInstance)(nil)).Elem() -} - -type HostNetworkConfig struct { - DynamicData - - Vswitch []HostVirtualSwitchConfig `xml:"vswitch,omitempty"` - ProxySwitch []HostProxySwitchConfig `xml:"proxySwitch,omitempty"` - Portgroup []HostPortGroupConfig `xml:"portgroup,omitempty"` - Pnic []PhysicalNicConfig `xml:"pnic,omitempty"` - Vnic []HostVirtualNicConfig `xml:"vnic,omitempty"` - ConsoleVnic []HostVirtualNicConfig `xml:"consoleVnic,omitempty"` - DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` - IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` - ConsoleIpRouteConfig BaseHostIpRouteConfig `xml:"consoleIpRouteConfig,omitempty,typeattr"` - RouteTableConfig *HostIpRouteTableConfig `xml:"routeTableConfig,omitempty"` - Dhcp []HostDhcpServiceConfig `xml:"dhcp,omitempty"` - Nat []HostNatServiceConfig `xml:"nat,omitempty"` - IpV6Enabled *bool `xml:"ipV6Enabled"` - NetStackSpec []HostNetworkConfigNetStackSpec `xml:"netStackSpec,omitempty"` - MigrationStatus string `xml:"migrationStatus,omitempty"` -} - -func init() { - t["HostNetworkConfig"] = reflect.TypeOf((*HostNetworkConfig)(nil)).Elem() -} - -type HostNetworkConfigNetStackSpec struct { - DynamicData - - NetStackInstance HostNetStackInstance `xml:"netStackInstance"` - Operation string `xml:"operation,omitempty"` -} - -func init() { - t["HostNetworkConfigNetStackSpec"] = reflect.TypeOf((*HostNetworkConfigNetStackSpec)(nil)).Elem() -} - -type HostNetworkConfigResult struct { - DynamicData - - VnicDevice []string `xml:"vnicDevice,omitempty"` - ConsoleVnicDevice []string `xml:"consoleVnicDevice,omitempty"` -} - -func init() { - t["HostNetworkConfigResult"] = reflect.TypeOf((*HostNetworkConfigResult)(nil)).Elem() -} - -type HostNetworkInfo struct { - DynamicData - - Vswitch []HostVirtualSwitch `xml:"vswitch,omitempty"` - ProxySwitch []HostProxySwitch `xml:"proxySwitch,omitempty"` - Portgroup []HostPortGroup `xml:"portgroup,omitempty"` - Pnic []PhysicalNic `xml:"pnic,omitempty"` - RdmaDevice []HostRdmaDevice `xml:"rdmaDevice,omitempty"` - Vnic []HostVirtualNic `xml:"vnic,omitempty"` - ConsoleVnic []HostVirtualNic `xml:"consoleVnic,omitempty"` - DnsConfig BaseHostDnsConfig `xml:"dnsConfig,omitempty,typeattr"` - IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` - ConsoleIpRouteConfig BaseHostIpRouteConfig `xml:"consoleIpRouteConfig,omitempty,typeattr"` - RouteTableInfo *HostIpRouteTableInfo `xml:"routeTableInfo,omitempty"` - Dhcp []HostDhcpService `xml:"dhcp,omitempty"` - Nat []HostNatService `xml:"nat,omitempty"` - IpV6Enabled *bool `xml:"ipV6Enabled"` - AtBootIpV6Enabled *bool `xml:"atBootIpV6Enabled"` - NetStackInstance []HostNetStackInstance `xml:"netStackInstance,omitempty"` - OpaqueSwitch []HostOpaqueSwitch `xml:"opaqueSwitch,omitempty"` - OpaqueNetwork []HostOpaqueNetworkInfo `xml:"opaqueNetwork,omitempty"` - NsxTransportNodeId string `xml:"nsxTransportNodeId,omitempty"` - NvdsToVdsMigrationRequired *bool `xml:"nvdsToVdsMigrationRequired"` - MigrationStatus string `xml:"migrationStatus,omitempty"` -} - -func init() { - t["HostNetworkInfo"] = reflect.TypeOf((*HostNetworkInfo)(nil)).Elem() -} - -type HostNetworkPolicy struct { - DynamicData - - Security *HostNetworkSecurityPolicy `xml:"security,omitempty"` - NicTeaming *HostNicTeamingPolicy `xml:"nicTeaming,omitempty"` - OffloadPolicy *HostNetOffloadCapabilities `xml:"offloadPolicy,omitempty"` - ShapingPolicy *HostNetworkTrafficShapingPolicy `xml:"shapingPolicy,omitempty"` -} - -func init() { - t["HostNetworkPolicy"] = reflect.TypeOf((*HostNetworkPolicy)(nil)).Elem() -} - -type HostNetworkResourceRuntime struct { - DynamicData - - PnicResourceInfo []HostPnicNetworkResourceInfo `xml:"pnicResourceInfo"` -} - -func init() { - t["HostNetworkResourceRuntime"] = reflect.TypeOf((*HostNetworkResourceRuntime)(nil)).Elem() -} - -type HostNetworkSecurityPolicy struct { - DynamicData - - AllowPromiscuous *bool `xml:"allowPromiscuous"` - MacChanges *bool `xml:"macChanges"` - ForgedTransmits *bool `xml:"forgedTransmits"` -} - -func init() { - t["HostNetworkSecurityPolicy"] = reflect.TypeOf((*HostNetworkSecurityPolicy)(nil)).Elem() -} - -type HostNetworkTrafficShapingPolicy struct { - DynamicData - - Enabled *bool `xml:"enabled"` - AverageBandwidth int64 `xml:"averageBandwidth,omitempty"` - PeakBandwidth int64 `xml:"peakBandwidth,omitempty"` - BurstSize int64 `xml:"burstSize,omitempty"` -} - -func init() { - t["HostNetworkTrafficShapingPolicy"] = reflect.TypeOf((*HostNetworkTrafficShapingPolicy)(nil)).Elem() -} - -type HostNewNetworkConnectInfo struct { - HostConnectInfoNetworkInfo -} - -func init() { - t["HostNewNetworkConnectInfo"] = reflect.TypeOf((*HostNewNetworkConnectInfo)(nil)).Elem() -} - -type HostNfcConnectionInfo struct { - HostDataTransportConnectionInfo - - StreamingMemoryConsumed int64 `xml:"streamingMemoryConsumed,omitempty"` -} - -func init() { - t["HostNfcConnectionInfo"] = reflect.TypeOf((*HostNfcConnectionInfo)(nil)).Elem() -} - -type HostNicFailureCriteria struct { - DynamicData - - CheckSpeed string `xml:"checkSpeed,omitempty"` - Speed int32 `xml:"speed,omitempty"` - CheckDuplex *bool `xml:"checkDuplex"` - FullDuplex *bool `xml:"fullDuplex"` - CheckErrorPercent *bool `xml:"checkErrorPercent"` - Percentage int32 `xml:"percentage,omitempty"` - CheckBeacon *bool `xml:"checkBeacon"` -} - -func init() { - t["HostNicFailureCriteria"] = reflect.TypeOf((*HostNicFailureCriteria)(nil)).Elem() -} - -type HostNicOrderPolicy struct { - DynamicData - - ActiveNic []string `xml:"activeNic,omitempty"` - StandbyNic []string `xml:"standbyNic,omitempty"` -} - -func init() { - t["HostNicOrderPolicy"] = reflect.TypeOf((*HostNicOrderPolicy)(nil)).Elem() -} - -type HostNicTeamingPolicy struct { - DynamicData - - Policy string `xml:"policy,omitempty"` - ReversePolicy *bool `xml:"reversePolicy"` - NotifySwitches *bool `xml:"notifySwitches"` - RollingOrder *bool `xml:"rollingOrder"` - FailureCriteria *HostNicFailureCriteria `xml:"failureCriteria,omitempty"` - NicOrder *HostNicOrderPolicy `xml:"nicOrder,omitempty"` -} - -func init() { - t["HostNicTeamingPolicy"] = reflect.TypeOf((*HostNicTeamingPolicy)(nil)).Elem() -} - -type HostNoAvailableNetworksEvent struct { - HostDasEvent - - Ips string `xml:"ips,omitempty"` -} - -func init() { - t["HostNoAvailableNetworksEvent"] = reflect.TypeOf((*HostNoAvailableNetworksEvent)(nil)).Elem() -} - -type HostNoHAEnabledPortGroupsEvent struct { - HostDasEvent -} - -func init() { - t["HostNoHAEnabledPortGroupsEvent"] = reflect.TypeOf((*HostNoHAEnabledPortGroupsEvent)(nil)).Elem() -} - -type HostNoRedundantManagementNetworkEvent struct { - HostDasEvent -} - -func init() { - t["HostNoRedundantManagementNetworkEvent"] = reflect.TypeOf((*HostNoRedundantManagementNetworkEvent)(nil)).Elem() -} - -type HostNonCompliantEvent struct { - HostEvent -} - -func init() { - t["HostNonCompliantEvent"] = reflect.TypeOf((*HostNonCompliantEvent)(nil)).Elem() -} - -type HostNotConnected struct { - HostCommunication -} - -func init() { - t["HostNotConnected"] = reflect.TypeOf((*HostNotConnected)(nil)).Elem() -} - -type HostNotConnectedFault HostNotConnected - -func init() { - t["HostNotConnectedFault"] = reflect.TypeOf((*HostNotConnectedFault)(nil)).Elem() -} - -type HostNotInClusterEvent struct { - HostDasEvent -} - -func init() { - t["HostNotInClusterEvent"] = reflect.TypeOf((*HostNotInClusterEvent)(nil)).Elem() -} - -type HostNotReachable struct { - HostCommunication -} - -func init() { - t["HostNotReachable"] = reflect.TypeOf((*HostNotReachable)(nil)).Elem() -} - -type HostNotReachableFault HostNotReachable - -func init() { - t["HostNotReachableFault"] = reflect.TypeOf((*HostNotReachableFault)(nil)).Elem() -} - -type HostNtpConfig struct { - DynamicData - - Server []string `xml:"server,omitempty"` - ConfigFile []string `xml:"configFile,omitempty"` -} - -func init() { - t["HostNtpConfig"] = reflect.TypeOf((*HostNtpConfig)(nil)).Elem() -} - -type HostNumaInfo struct { - DynamicData - - Type string `xml:"type"` - NumNodes int32 `xml:"numNodes"` - NumaNode []HostNumaNode `xml:"numaNode,omitempty"` -} - -func init() { - t["HostNumaInfo"] = reflect.TypeOf((*HostNumaInfo)(nil)).Elem() -} - -type HostNumaNode struct { - DynamicData - - TypeId byte `xml:"typeId"` - CpuID []int16 `xml:"cpuID"` - MemorySize int64 `xml:"memorySize,omitempty"` - MemoryRangeBegin int64 `xml:"memoryRangeBegin"` - MemoryRangeLength int64 `xml:"memoryRangeLength"` - PciId []string `xml:"pciId,omitempty"` -} - -func init() { - t["HostNumaNode"] = reflect.TypeOf((*HostNumaNode)(nil)).Elem() -} - -type HostNumericSensorInfo struct { - DynamicData - - Name string `xml:"name"` - HealthState BaseElementDescription `xml:"healthState,omitempty,typeattr"` - CurrentReading int64 `xml:"currentReading"` - UnitModifier int32 `xml:"unitModifier"` - BaseUnits string `xml:"baseUnits"` - RateUnits string `xml:"rateUnits,omitempty"` - SensorType string `xml:"sensorType"` - Id string `xml:"id,omitempty"` - SensorNumber int64 `xml:"sensorNumber,omitempty"` - TimeStamp string `xml:"timeStamp,omitempty"` - Fru *HostFru `xml:"fru,omitempty"` -} - -func init() { - t["HostNumericSensorInfo"] = reflect.TypeOf((*HostNumericSensorInfo)(nil)).Elem() -} - -type HostNvmeConnectSpec struct { - HostNvmeSpec - - Subnqn string `xml:"subnqn"` - ControllerId int32 `xml:"controllerId,omitempty"` - AdminQueueSize int32 `xml:"adminQueueSize,omitempty"` - KeepAliveTimeout int32 `xml:"keepAliveTimeout,omitempty"` -} - -func init() { - t["HostNvmeConnectSpec"] = reflect.TypeOf((*HostNvmeConnectSpec)(nil)).Elem() -} - -type HostNvmeController struct { - DynamicData - - Key string `xml:"key"` - ControllerNumber int32 `xml:"controllerNumber"` - Subnqn string `xml:"subnqn"` - Name string `xml:"name"` - AssociatedAdapter string `xml:"associatedAdapter"` - TransportType string `xml:"transportType"` - FusedOperationSupported bool `xml:"fusedOperationSupported"` - NumberOfQueues int32 `xml:"numberOfQueues"` - QueueSize int32 `xml:"queueSize"` - AttachedNamespace []HostNvmeNamespace `xml:"attachedNamespace,omitempty"` - VendorId string `xml:"vendorId,omitempty"` - Model string `xml:"model,omitempty"` - SerialNumber string `xml:"serialNumber,omitempty"` - FirmwareVersion string `xml:"firmwareVersion,omitempty"` -} - -func init() { - t["HostNvmeController"] = reflect.TypeOf((*HostNvmeController)(nil)).Elem() -} - -type HostNvmeDisconnectSpec struct { - DynamicData - - HbaName string `xml:"hbaName"` - Subnqn string `xml:"subnqn,omitempty"` - ControllerNumber int32 `xml:"controllerNumber,omitempty"` -} - -func init() { - t["HostNvmeDisconnectSpec"] = reflect.TypeOf((*HostNvmeDisconnectSpec)(nil)).Elem() -} - -type HostNvmeDiscoverSpec struct { - HostNvmeSpec - - AutoConnect *bool `xml:"autoConnect"` - RootDiscoveryController *bool `xml:"rootDiscoveryController"` -} - -func init() { - t["HostNvmeDiscoverSpec"] = reflect.TypeOf((*HostNvmeDiscoverSpec)(nil)).Elem() -} - -type HostNvmeDiscoveryLog struct { - DynamicData - - Entry []HostNvmeDiscoveryLogEntry `xml:"entry,omitempty"` - Complete bool `xml:"complete"` -} - -func init() { - t["HostNvmeDiscoveryLog"] = reflect.TypeOf((*HostNvmeDiscoveryLog)(nil)).Elem() -} - -type HostNvmeDiscoveryLogEntry struct { - DynamicData - - Subnqn string `xml:"subnqn"` - SubsystemType string `xml:"subsystemType"` - SubsystemPortId int32 `xml:"subsystemPortId"` - ControllerId int32 `xml:"controllerId"` - AdminQueueMaxSize int32 `xml:"adminQueueMaxSize"` - TransportParameters BaseHostNvmeTransportParameters `xml:"transportParameters,typeattr"` - TransportRequirements string `xml:"transportRequirements"` - Connected bool `xml:"connected"` -} - -func init() { - t["HostNvmeDiscoveryLogEntry"] = reflect.TypeOf((*HostNvmeDiscoveryLogEntry)(nil)).Elem() -} - -type HostNvmeNamespace struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - Id int32 `xml:"id"` - BlockSize int32 `xml:"blockSize"` - CapacityInBlocks int64 `xml:"capacityInBlocks"` -} - -func init() { - t["HostNvmeNamespace"] = reflect.TypeOf((*HostNvmeNamespace)(nil)).Elem() -} - -type HostNvmeOpaqueTransportParameters struct { - HostNvmeTransportParameters - - Trtype string `xml:"trtype"` - Traddr string `xml:"traddr"` - Adrfam string `xml:"adrfam"` - Trsvcid string `xml:"trsvcid"` - Tsas []byte `xml:"tsas"` -} - -func init() { - t["HostNvmeOpaqueTransportParameters"] = reflect.TypeOf((*HostNvmeOpaqueTransportParameters)(nil)).Elem() -} - -type HostNvmeOverFibreChannelParameters struct { - HostNvmeTransportParameters - - NodeWorldWideName int64 `xml:"nodeWorldWideName"` - PortWorldWideName int64 `xml:"portWorldWideName"` -} - -func init() { - t["HostNvmeOverFibreChannelParameters"] = reflect.TypeOf((*HostNvmeOverFibreChannelParameters)(nil)).Elem() -} - -type HostNvmeOverRdmaParameters struct { - HostNvmeTransportParameters - - Address string `xml:"address"` - AddressFamily string `xml:"addressFamily,omitempty"` - PortNumber int32 `xml:"portNumber,omitempty"` -} - -func init() { - t["HostNvmeOverRdmaParameters"] = reflect.TypeOf((*HostNvmeOverRdmaParameters)(nil)).Elem() -} - -type HostNvmeOverTcpParameters struct { - HostNvmeTransportParameters - - Address string `xml:"address"` - PortNumber int32 `xml:"portNumber,omitempty"` - DigestVerification string `xml:"digestVerification,omitempty"` -} - -func init() { - t["HostNvmeOverTcpParameters"] = reflect.TypeOf((*HostNvmeOverTcpParameters)(nil)).Elem() -} - -type HostNvmeSpec struct { - DynamicData - - HbaName string `xml:"hbaName"` - TransportParameters BaseHostNvmeTransportParameters `xml:"transportParameters,typeattr"` -} - -func init() { - t["HostNvmeSpec"] = reflect.TypeOf((*HostNvmeSpec)(nil)).Elem() -} - -type HostNvmeTopology struct { - DynamicData - - Adapter []HostNvmeTopologyInterface `xml:"adapter,omitempty"` -} - -func init() { - t["HostNvmeTopology"] = reflect.TypeOf((*HostNvmeTopology)(nil)).Elem() -} - -type HostNvmeTopologyInterface struct { - DynamicData - - Key string `xml:"key"` - Adapter string `xml:"adapter"` - ConnectedController []HostNvmeController `xml:"connectedController,omitempty"` -} - -func init() { - t["HostNvmeTopologyInterface"] = reflect.TypeOf((*HostNvmeTopologyInterface)(nil)).Elem() -} - -type HostNvmeTransportParameters struct { - DynamicData -} - -func init() { - t["HostNvmeTransportParameters"] = reflect.TypeOf((*HostNvmeTransportParameters)(nil)).Elem() -} - -type HostOpaqueNetworkInfo struct { - DynamicData - - OpaqueNetworkId string `xml:"opaqueNetworkId"` - OpaqueNetworkName string `xml:"opaqueNetworkName"` - OpaqueNetworkType string `xml:"opaqueNetworkType"` - PnicZone []string `xml:"pnicZone,omitempty"` - Capability *OpaqueNetworkCapability `xml:"capability,omitempty"` - ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` -} - -func init() { - t["HostOpaqueNetworkInfo"] = reflect.TypeOf((*HostOpaqueNetworkInfo)(nil)).Elem() -} - -type HostOpaqueSwitch struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name,omitempty"` - Pnic []string `xml:"pnic,omitempty"` - PnicZone []HostOpaqueSwitchPhysicalNicZone `xml:"pnicZone,omitempty"` - Status string `xml:"status,omitempty"` - Vtep []HostVirtualNic `xml:"vtep,omitempty"` - ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` - FeatureCapability []HostFeatureCapability `xml:"featureCapability,omitempty"` -} - -func init() { - t["HostOpaqueSwitch"] = reflect.TypeOf((*HostOpaqueSwitch)(nil)).Elem() -} - -type HostOpaqueSwitchPhysicalNicZone struct { - DynamicData - - Key string `xml:"key"` - PnicDevice []string `xml:"pnicDevice,omitempty"` -} - -func init() { - t["HostOpaqueSwitchPhysicalNicZone"] = reflect.TypeOf((*HostOpaqueSwitchPhysicalNicZone)(nil)).Elem() -} - -type HostOvercommittedEvent struct { - ClusterOvercommittedEvent -} - -func init() { - t["HostOvercommittedEvent"] = reflect.TypeOf((*HostOvercommittedEvent)(nil)).Elem() -} - -type HostPMemVolume struct { - HostFileSystemVolume - - Uuid string `xml:"uuid"` - Version string `xml:"version"` -} - -func init() { - t["HostPMemVolume"] = reflect.TypeOf((*HostPMemVolume)(nil)).Elem() -} - -type HostParallelScsiHba struct { - HostHostBusAdapter -} - -func init() { - t["HostParallelScsiHba"] = reflect.TypeOf((*HostParallelScsiHba)(nil)).Elem() -} - -type HostParallelScsiTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostParallelScsiTargetTransport"] = reflect.TypeOf((*HostParallelScsiTargetTransport)(nil)).Elem() -} - -type HostPatchManagerLocator struct { - DynamicData - - Url string `xml:"url"` - Proxy string `xml:"proxy,omitempty"` -} - -func init() { - t["HostPatchManagerLocator"] = reflect.TypeOf((*HostPatchManagerLocator)(nil)).Elem() -} - -type HostPatchManagerPatchManagerOperationSpec struct { - DynamicData - - Proxy string `xml:"proxy,omitempty"` - Port int32 `xml:"port,omitempty"` - UserName string `xml:"userName,omitempty"` - Password string `xml:"password,omitempty"` - CmdOption string `xml:"cmdOption,omitempty"` -} - -func init() { - t["HostPatchManagerPatchManagerOperationSpec"] = reflect.TypeOf((*HostPatchManagerPatchManagerOperationSpec)(nil)).Elem() -} - -type HostPatchManagerResult struct { - DynamicData - - Version string `xml:"version"` - Status []HostPatchManagerStatus `xml:"status,omitempty"` - XmlResult string `xml:"xmlResult,omitempty"` -} - -func init() { - t["HostPatchManagerResult"] = reflect.TypeOf((*HostPatchManagerResult)(nil)).Elem() -} - -type HostPatchManagerStatus struct { - DynamicData - - Id string `xml:"id"` - Applicable bool `xml:"applicable"` - Reason []string `xml:"reason,omitempty"` - Integrity string `xml:"integrity,omitempty"` - Installed bool `xml:"installed"` - InstallState []string `xml:"installState,omitempty"` - PrerequisitePatch []HostPatchManagerStatusPrerequisitePatch `xml:"prerequisitePatch,omitempty"` - RestartRequired bool `xml:"restartRequired"` - ReconnectRequired bool `xml:"reconnectRequired"` - VmOffRequired bool `xml:"vmOffRequired"` - SupersededPatchIds []string `xml:"supersededPatchIds,omitempty"` -} - -func init() { - t["HostPatchManagerStatus"] = reflect.TypeOf((*HostPatchManagerStatus)(nil)).Elem() -} - -type HostPatchManagerStatusPrerequisitePatch struct { - DynamicData - - Id string `xml:"id"` - InstallState []string `xml:"installState,omitempty"` -} - -func init() { - t["HostPatchManagerStatusPrerequisitePatch"] = reflect.TypeOf((*HostPatchManagerStatusPrerequisitePatch)(nil)).Elem() -} - -type HostPathSelectionPolicyOption struct { - DynamicData - - Policy BaseElementDescription `xml:"policy,typeattr"` -} - -func init() { - t["HostPathSelectionPolicyOption"] = reflect.TypeOf((*HostPathSelectionPolicyOption)(nil)).Elem() -} - -type HostPciDevice struct { - DynamicData - - Id string `xml:"id"` - ClassId int16 `xml:"classId"` - Bus byte `xml:"bus"` - Slot byte `xml:"slot"` - Function byte `xml:"function"` - VendorId int16 `xml:"vendorId"` - SubVendorId int16 `xml:"subVendorId"` - VendorName string `xml:"vendorName"` - DeviceId int16 `xml:"deviceId"` - SubDeviceId int16 `xml:"subDeviceId"` - ParentBridge string `xml:"parentBridge,omitempty"` - DeviceName string `xml:"deviceName"` -} - -func init() { - t["HostPciDevice"] = reflect.TypeOf((*HostPciDevice)(nil)).Elem() -} - -type HostPciPassthruConfig struct { - DynamicData - - Id string `xml:"id"` - PassthruEnabled bool `xml:"passthruEnabled"` - ApplyNow *bool `xml:"applyNow"` - HardwareLabel string `xml:"hardwareLabel,omitempty"` -} - -func init() { - t["HostPciPassthruConfig"] = reflect.TypeOf((*HostPciPassthruConfig)(nil)).Elem() -} - -type HostPciPassthruInfo struct { - DynamicData - - Id string `xml:"id"` - DependentDevice string `xml:"dependentDevice"` - PassthruEnabled bool `xml:"passthruEnabled"` - PassthruCapable bool `xml:"passthruCapable"` - PassthruActive bool `xml:"passthruActive"` - HardwareLabel string `xml:"hardwareLabel,omitempty"` -} - -func init() { - t["HostPciPassthruInfo"] = reflect.TypeOf((*HostPciPassthruInfo)(nil)).Elem() -} - -type HostPcieHba struct { - HostHostBusAdapter -} - -func init() { - t["HostPcieHba"] = reflect.TypeOf((*HostPcieHba)(nil)).Elem() -} - -type HostPcieTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostPcieTargetTransport"] = reflect.TypeOf((*HostPcieTargetTransport)(nil)).Elem() -} - -type HostPersistentMemoryInfo struct { - DynamicData - - CapacityInMB int64 `xml:"capacityInMB,omitempty"` - VolumeUUID string `xml:"volumeUUID,omitempty"` -} - -func init() { - t["HostPersistentMemoryInfo"] = reflect.TypeOf((*HostPersistentMemoryInfo)(nil)).Elem() -} - -type HostPlacedVirtualNicIdentifier struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - VnicKey string `xml:"vnicKey"` - Reservation *int32 `xml:"reservation"` -} - -func init() { - t["HostPlacedVirtualNicIdentifier"] = reflect.TypeOf((*HostPlacedVirtualNicIdentifier)(nil)).Elem() -} - -type HostPlugStoreTopology struct { - DynamicData - - Adapter []HostPlugStoreTopologyAdapter `xml:"adapter,omitempty"` - Path []HostPlugStoreTopologyPath `xml:"path,omitempty"` - Target []HostPlugStoreTopologyTarget `xml:"target,omitempty"` - Device []HostPlugStoreTopologyDevice `xml:"device,omitempty"` - Plugin []HostPlugStoreTopologyPlugin `xml:"plugin,omitempty"` -} - -func init() { - t["HostPlugStoreTopology"] = reflect.TypeOf((*HostPlugStoreTopology)(nil)).Elem() -} - -type HostPlugStoreTopologyAdapter struct { - DynamicData - - Key string `xml:"key"` - Adapter string `xml:"adapter"` - Path []string `xml:"path,omitempty"` -} - -func init() { - t["HostPlugStoreTopologyAdapter"] = reflect.TypeOf((*HostPlugStoreTopologyAdapter)(nil)).Elem() -} - -type HostPlugStoreTopologyDevice struct { - DynamicData - - Key string `xml:"key"` - Lun string `xml:"lun"` - Path []string `xml:"path,omitempty"` -} - -func init() { - t["HostPlugStoreTopologyDevice"] = reflect.TypeOf((*HostPlugStoreTopologyDevice)(nil)).Elem() -} - -type HostPlugStoreTopologyPath struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - ChannelNumber int32 `xml:"channelNumber,omitempty"` - TargetNumber int32 `xml:"targetNumber,omitempty"` - LunNumber int32 `xml:"lunNumber,omitempty"` - Adapter string `xml:"adapter,omitempty"` - Target string `xml:"target,omitempty"` - Device string `xml:"device,omitempty"` -} - -func init() { - t["HostPlugStoreTopologyPath"] = reflect.TypeOf((*HostPlugStoreTopologyPath)(nil)).Elem() -} - -type HostPlugStoreTopologyPlugin struct { - DynamicData - - Key string `xml:"key"` - Name string `xml:"name"` - Device []string `xml:"device,omitempty"` - ClaimedPath []string `xml:"claimedPath,omitempty"` -} - -func init() { - t["HostPlugStoreTopologyPlugin"] = reflect.TypeOf((*HostPlugStoreTopologyPlugin)(nil)).Elem() -} - -type HostPlugStoreTopologyTarget struct { - DynamicData - - Key string `xml:"key"` - Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` -} - -func init() { - t["HostPlugStoreTopologyTarget"] = reflect.TypeOf((*HostPlugStoreTopologyTarget)(nil)).Elem() -} - -type HostPnicNetworkResourceInfo struct { - DynamicData - - PnicDevice string `xml:"pnicDevice"` - AvailableBandwidthForVMTraffic int64 `xml:"availableBandwidthForVMTraffic,omitempty"` - UnusedBandwidthForVMTraffic int64 `xml:"unusedBandwidthForVMTraffic,omitempty"` - PlacedVirtualNics []HostPlacedVirtualNicIdentifier `xml:"placedVirtualNics,omitempty"` -} - -func init() { - t["HostPnicNetworkResourceInfo"] = reflect.TypeOf((*HostPnicNetworkResourceInfo)(nil)).Elem() -} - -type HostPortGroup struct { - DynamicData - - Key string `xml:"key,omitempty"` - Port []HostPortGroupPort `xml:"port,omitempty"` - Vswitch string `xml:"vswitch,omitempty"` - ComputedPolicy HostNetworkPolicy `xml:"computedPolicy"` - Spec HostPortGroupSpec `xml:"spec"` -} - -func init() { - t["HostPortGroup"] = reflect.TypeOf((*HostPortGroup)(nil)).Elem() -} - -type HostPortGroupConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Spec *HostPortGroupSpec `xml:"spec,omitempty"` -} - -func init() { - t["HostPortGroupConfig"] = reflect.TypeOf((*HostPortGroupConfig)(nil)).Elem() -} - -type HostPortGroupPort struct { - DynamicData - - Key string `xml:"key,omitempty"` - Mac []string `xml:"mac,omitempty"` - Type string `xml:"type"` -} - -func init() { - t["HostPortGroupPort"] = reflect.TypeOf((*HostPortGroupPort)(nil)).Elem() -} - -type HostPortGroupProfile struct { - PortGroupProfile - - IpConfig IpAddressProfile `xml:"ipConfig"` -} - -func init() { - t["HostPortGroupProfile"] = reflect.TypeOf((*HostPortGroupProfile)(nil)).Elem() -} - -type HostPortGroupSpec struct { - DynamicData - - Name string `xml:"name"` - VlanId int32 `xml:"vlanId"` - VswitchName string `xml:"vswitchName"` - Policy HostNetworkPolicy `xml:"policy"` -} - -func init() { - t["HostPortGroupSpec"] = reflect.TypeOf((*HostPortGroupSpec)(nil)).Elem() -} - -type HostPosixAccountSpec struct { - HostAccountSpec - - PosixId int32 `xml:"posixId,omitempty"` - ShellAccess *bool `xml:"shellAccess"` -} - -func init() { - t["HostPosixAccountSpec"] = reflect.TypeOf((*HostPosixAccountSpec)(nil)).Elem() -} - -type HostPowerOpFailed struct { - VimFault -} - -func init() { - t["HostPowerOpFailed"] = reflect.TypeOf((*HostPowerOpFailed)(nil)).Elem() -} - -type HostPowerOpFailedFault BaseHostPowerOpFailed - -func init() { - t["HostPowerOpFailedFault"] = reflect.TypeOf((*HostPowerOpFailedFault)(nil)).Elem() -} - -type HostPowerPolicy struct { - DynamicData - - Key int32 `xml:"key"` - Name string `xml:"name"` - ShortName string `xml:"shortName"` - Description string `xml:"description"` -} - -func init() { - t["HostPowerPolicy"] = reflect.TypeOf((*HostPowerPolicy)(nil)).Elem() -} - -type HostPrimaryAgentNotShortNameEvent struct { - HostDasEvent - - PrimaryAgent string `xml:"primaryAgent"` -} - -func init() { - t["HostPrimaryAgentNotShortNameEvent"] = reflect.TypeOf((*HostPrimaryAgentNotShortNameEvent)(nil)).Elem() -} - -type HostProfileAppliedEvent struct { - HostEvent - - Profile ProfileEventArgument `xml:"profile"` -} - -func init() { - t["HostProfileAppliedEvent"] = reflect.TypeOf((*HostProfileAppliedEvent)(nil)).Elem() -} - -type HostProfileCompleteConfigSpec struct { - HostProfileConfigSpec - - ApplyProfile *HostApplyProfile `xml:"applyProfile,omitempty"` - CustomComplyProfile *ComplianceProfile `xml:"customComplyProfile,omitempty"` - DisabledExpressionListChanged bool `xml:"disabledExpressionListChanged"` - DisabledExpressionList []string `xml:"disabledExpressionList,omitempty"` - ValidatorHost *ManagedObjectReference `xml:"validatorHost,omitempty"` - Validating *bool `xml:"validating"` - HostConfig *HostProfileConfigInfo `xml:"hostConfig,omitempty"` -} - -func init() { - t["HostProfileCompleteConfigSpec"] = reflect.TypeOf((*HostProfileCompleteConfigSpec)(nil)).Elem() -} - -type HostProfileConfigInfo struct { - ProfileConfigInfo - - ApplyProfile *HostApplyProfile `xml:"applyProfile,omitempty"` - DefaultComplyProfile *ComplianceProfile `xml:"defaultComplyProfile,omitempty"` - DefaultComplyLocator []ComplianceLocator `xml:"defaultComplyLocator,omitempty"` - CustomComplyProfile *ComplianceProfile `xml:"customComplyProfile,omitempty"` - DisabledExpressionList []string `xml:"disabledExpressionList,omitempty"` - Description *ProfileDescription `xml:"description,omitempty"` -} - -func init() { - t["HostProfileConfigInfo"] = reflect.TypeOf((*HostProfileConfigInfo)(nil)).Elem() -} - -type HostProfileConfigSpec struct { - ProfileCreateSpec -} - -func init() { - t["HostProfileConfigSpec"] = reflect.TypeOf((*HostProfileConfigSpec)(nil)).Elem() -} - -type HostProfileHostBasedConfigSpec struct { - HostProfileConfigSpec - - Host ManagedObjectReference `xml:"host"` - UseHostProfileEngine *bool `xml:"useHostProfileEngine"` -} - -func init() { - t["HostProfileHostBasedConfigSpec"] = reflect.TypeOf((*HostProfileHostBasedConfigSpec)(nil)).Elem() -} - -type HostProfileManagerCompositionResult struct { - DynamicData - - Errors []LocalizableMessage `xml:"errors,omitempty"` - Results []HostProfileManagerCompositionResultResultElement `xml:"results,omitempty"` -} - -func init() { - t["HostProfileManagerCompositionResult"] = reflect.TypeOf((*HostProfileManagerCompositionResult)(nil)).Elem() -} - -type HostProfileManagerCompositionResultResultElement struct { - DynamicData - - Target ManagedObjectReference `xml:"target"` - Status string `xml:"status"` - Errors []LocalizableMessage `xml:"errors,omitempty"` -} - -func init() { - t["HostProfileManagerCompositionResultResultElement"] = reflect.TypeOf((*HostProfileManagerCompositionResultResultElement)(nil)).Elem() -} - -type HostProfileManagerCompositionValidationResult struct { - DynamicData - - Results []HostProfileManagerCompositionValidationResultResultElement `xml:"results,omitempty"` - Errors []LocalizableMessage `xml:"errors,omitempty"` -} - -func init() { - t["HostProfileManagerCompositionValidationResult"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResult)(nil)).Elem() -} - -type HostProfileManagerCompositionValidationResultResultElement struct { - DynamicData - - Target ManagedObjectReference `xml:"target"` - Status string `xml:"status"` - Errors []LocalizableMessage `xml:"errors,omitempty"` - SourceDiffForToBeMerged *HostApplyProfile `xml:"sourceDiffForToBeMerged,omitempty"` - TargetDiffForToBeMerged *HostApplyProfile `xml:"targetDiffForToBeMerged,omitempty"` - ToBeAdded *HostApplyProfile `xml:"toBeAdded,omitempty"` - ToBeDeleted *HostApplyProfile `xml:"toBeDeleted,omitempty"` - ToBeDisabled *HostApplyProfile `xml:"toBeDisabled,omitempty"` - ToBeEnabled *HostApplyProfile `xml:"toBeEnabled,omitempty"` - ToBeReenableCC *HostApplyProfile `xml:"toBeReenableCC,omitempty"` -} - -func init() { - t["HostProfileManagerCompositionValidationResultResultElement"] = reflect.TypeOf((*HostProfileManagerCompositionValidationResultResultElement)(nil)).Elem() -} - -type HostProfileManagerConfigTaskList struct { - DynamicData - - ConfigSpec *HostConfigSpec `xml:"configSpec,omitempty"` - TaskDescription []LocalizableMessage `xml:"taskDescription,omitempty"` - TaskListRequirement []string `xml:"taskListRequirement,omitempty"` -} - -func init() { - t["HostProfileManagerConfigTaskList"] = reflect.TypeOf((*HostProfileManagerConfigTaskList)(nil)).Elem() -} - -type HostProfileManagerHostToConfigSpecMap struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"` -} - -func init() { - t["HostProfileManagerHostToConfigSpecMap"] = reflect.TypeOf((*HostProfileManagerHostToConfigSpecMap)(nil)).Elem() -} - -type HostProfileResetValidationState HostProfileResetValidationStateRequestType - -func init() { - t["HostProfileResetValidationState"] = reflect.TypeOf((*HostProfileResetValidationState)(nil)).Elem() -} - -type HostProfileResetValidationStateRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HostProfileResetValidationStateRequestType"] = reflect.TypeOf((*HostProfileResetValidationStateRequestType)(nil)).Elem() -} - -type HostProfileResetValidationStateResponse struct { -} - -type HostProfileSerializedHostProfileSpec struct { - ProfileSerializedCreateSpec - - ValidatorHost *ManagedObjectReference `xml:"validatorHost,omitempty"` - Validating *bool `xml:"validating"` -} - -func init() { - t["HostProfileSerializedHostProfileSpec"] = reflect.TypeOf((*HostProfileSerializedHostProfileSpec)(nil)).Elem() -} - -type HostProfileValidationFailureInfo struct { - DynamicData - - Name string `xml:"name"` - Annotation string `xml:"annotation"` - UpdateType string `xml:"updateType"` - Host *ManagedObjectReference `xml:"host,omitempty"` - ApplyProfile *HostApplyProfile `xml:"applyProfile,omitempty"` - Failures []ProfileUpdateFailedUpdateFailure `xml:"failures,omitempty"` - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["HostProfileValidationFailureInfo"] = reflect.TypeOf((*HostProfileValidationFailureInfo)(nil)).Elem() -} - -type HostProfilesEntityCustomizations struct { - DynamicData -} - -func init() { - t["HostProfilesEntityCustomizations"] = reflect.TypeOf((*HostProfilesEntityCustomizations)(nil)).Elem() -} - -type HostProtocolEndpoint struct { - DynamicData - - PeType string `xml:"peType"` - Type string `xml:"type,omitempty"` - Uuid string `xml:"uuid"` - HostKey []ManagedObjectReference `xml:"hostKey,omitempty"` - StorageArray string `xml:"storageArray,omitempty"` - NfsServer string `xml:"nfsServer,omitempty"` - NfsDir string `xml:"nfsDir,omitempty"` - NfsServerScope string `xml:"nfsServerScope,omitempty"` - NfsServerMajor string `xml:"nfsServerMajor,omitempty"` - NfsServerAuthType string `xml:"nfsServerAuthType,omitempty"` - NfsServerUser string `xml:"nfsServerUser,omitempty"` - DeviceId string `xml:"deviceId,omitempty"` -} - -func init() { - t["HostProtocolEndpoint"] = reflect.TypeOf((*HostProtocolEndpoint)(nil)).Elem() -} - -type HostProxySwitch struct { - DynamicData - - DvsUuid string `xml:"dvsUuid"` - DvsName string `xml:"dvsName"` - Key string `xml:"key"` - NumPorts int32 `xml:"numPorts"` - ConfigNumPorts int32 `xml:"configNumPorts,omitempty"` - NumPortsAvailable int32 `xml:"numPortsAvailable"` - UplinkPort []KeyValue `xml:"uplinkPort,omitempty"` - Mtu int32 `xml:"mtu,omitempty"` - Pnic []string `xml:"pnic,omitempty"` - Spec HostProxySwitchSpec `xml:"spec"` - HostLag []HostProxySwitchHostLagConfig `xml:"hostLag,omitempty"` - NetworkReservationSupported *bool `xml:"networkReservationSupported"` - NsxtEnabled *bool `xml:"nsxtEnabled"` - EnsEnabled *bool `xml:"ensEnabled"` - EnsInterruptEnabled *bool `xml:"ensInterruptEnabled"` - TransportZones []DistributedVirtualSwitchHostMemberTransportZoneInfo `xml:"transportZones,omitempty"` - NsxUsedUplinkPort []string `xml:"nsxUsedUplinkPort,omitempty"` - NsxtStatus string `xml:"nsxtStatus,omitempty"` - NsxtStatusDetail string `xml:"nsxtStatusDetail,omitempty"` - EnsInfo *HostProxySwitchEnsInfo `xml:"ensInfo,omitempty"` - NetworkOffloadingEnabled *bool `xml:"networkOffloadingEnabled"` -} - -func init() { - t["HostProxySwitch"] = reflect.TypeOf((*HostProxySwitch)(nil)).Elem() -} - -type HostProxySwitchConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Uuid string `xml:"uuid"` - Spec *HostProxySwitchSpec `xml:"spec,omitempty"` -} - -func init() { - t["HostProxySwitchConfig"] = reflect.TypeOf((*HostProxySwitchConfig)(nil)).Elem() -} - -type HostProxySwitchEnsInfo struct { - DynamicData - - OpsVersion int64 `xml:"opsVersion"` - NumPSOps int64 `xml:"numPSOps"` - NumLcoreOps int64 `xml:"numLcoreOps"` - ErrorStatus int64 `xml:"errorStatus"` - LcoreStatus int64 `xml:"lcoreStatus"` -} - -func init() { - t["HostProxySwitchEnsInfo"] = reflect.TypeOf((*HostProxySwitchEnsInfo)(nil)).Elem() -} - -type HostProxySwitchHostLagConfig struct { - DynamicData - - LagKey string `xml:"lagKey"` - LagName string `xml:"lagName,omitempty"` - UplinkPort []KeyValue `xml:"uplinkPort,omitempty"` -} - -func init() { - t["HostProxySwitchHostLagConfig"] = reflect.TypeOf((*HostProxySwitchHostLagConfig)(nil)).Elem() -} - -type HostProxySwitchSpec struct { - DynamicData - - Backing BaseDistributedVirtualSwitchHostMemberBacking `xml:"backing,omitempty,typeattr"` -} - -func init() { - t["HostProxySwitchSpec"] = reflect.TypeOf((*HostProxySwitchSpec)(nil)).Elem() -} - -type HostPtpConfig struct { - DynamicData - - Domain int32 `xml:"domain,omitempty"` - Port []HostPtpConfigPtpPort `xml:"port,omitempty"` -} - -func init() { - t["HostPtpConfig"] = reflect.TypeOf((*HostPtpConfig)(nil)).Elem() -} - -type HostPtpConfigPtpPort struct { - DynamicData - - Index int32 `xml:"index"` - DeviceType string `xml:"deviceType,omitempty"` - Device string `xml:"device,omitempty"` - IpConfig *HostIpConfig `xml:"ipConfig,omitempty"` -} - -func init() { - t["HostPtpConfigPtpPort"] = reflect.TypeOf((*HostPtpConfigPtpPort)(nil)).Elem() -} - -type HostQualifiedName struct { - DynamicData - - Value string `xml:"value"` - Type string `xml:"type"` -} - -func init() { - t["HostQualifiedName"] = reflect.TypeOf((*HostQualifiedName)(nil)).Elem() -} - -type HostRdmaDevice struct { - DynamicData - - Key string `xml:"key"` - Device string `xml:"device"` - Driver string `xml:"driver,omitempty"` - Description string `xml:"description,omitempty"` - Backing BaseHostRdmaDeviceBacking `xml:"backing,omitempty,typeattr"` - ConnectionInfo HostRdmaDeviceConnectionInfo `xml:"connectionInfo"` - Capability HostRdmaDeviceCapability `xml:"capability"` -} - -func init() { - t["HostRdmaDevice"] = reflect.TypeOf((*HostRdmaDevice)(nil)).Elem() -} - -type HostRdmaDeviceBacking struct { - DynamicData -} - -func init() { - t["HostRdmaDeviceBacking"] = reflect.TypeOf((*HostRdmaDeviceBacking)(nil)).Elem() -} - -type HostRdmaDeviceCapability struct { - DynamicData - - RoceV1Capable bool `xml:"roceV1Capable"` - RoceV2Capable bool `xml:"roceV2Capable"` - IWarpCapable bool `xml:"iWarpCapable"` -} - -func init() { - t["HostRdmaDeviceCapability"] = reflect.TypeOf((*HostRdmaDeviceCapability)(nil)).Elem() -} - -type HostRdmaDeviceConnectionInfo struct { - DynamicData - - State string `xml:"state"` - Mtu int32 `xml:"mtu"` - SpeedInMbps int32 `xml:"speedInMbps"` -} - -func init() { - t["HostRdmaDeviceConnectionInfo"] = reflect.TypeOf((*HostRdmaDeviceConnectionInfo)(nil)).Elem() -} - -type HostRdmaDevicePnicBacking struct { - HostRdmaDeviceBacking - - PairedUplink string `xml:"pairedUplink"` -} - -func init() { - t["HostRdmaDevicePnicBacking"] = reflect.TypeOf((*HostRdmaDevicePnicBacking)(nil)).Elem() -} - -type HostRdmaHba struct { - HostHostBusAdapter - - AssociatedRdmaDevice string `xml:"associatedRdmaDevice,omitempty"` -} - -func init() { - t["HostRdmaHba"] = reflect.TypeOf((*HostRdmaHba)(nil)).Elem() -} - -type HostRdmaTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostRdmaTargetTransport"] = reflect.TypeOf((*HostRdmaTargetTransport)(nil)).Elem() -} - -type HostReconcileDatastoreInventoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostReconcileDatastoreInventoryRequestType)(nil)).Elem() -} - -type HostReconcileDatastoreInventory_Task HostReconcileDatastoreInventoryRequestType - -func init() { - t["HostReconcileDatastoreInventory_Task"] = reflect.TypeOf((*HostReconcileDatastoreInventory_Task)(nil)).Elem() -} - -type HostReconcileDatastoreInventory_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostReconnectionFailedEvent struct { - HostEvent -} - -func init() { - t["HostReconnectionFailedEvent"] = reflect.TypeOf((*HostReconnectionFailedEvent)(nil)).Elem() -} - -type HostRegisterDisk HostRegisterDiskRequestType - -func init() { - t["HostRegisterDisk"] = reflect.TypeOf((*HostRegisterDisk)(nil)).Elem() -} - -type HostRegisterDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Path string `xml:"path"` - Name string `xml:"name,omitempty"` -} - -func init() { - t["HostRegisterDiskRequestType"] = reflect.TypeOf((*HostRegisterDiskRequestType)(nil)).Elem() -} - -type HostRegisterDiskResponse struct { - Returnval VStorageObject `xml:"returnval"` -} - -type HostReliableMemoryInfo struct { - DynamicData - - MemorySize int64 `xml:"memorySize"` -} - -func init() { - t["HostReliableMemoryInfo"] = reflect.TypeOf((*HostReliableMemoryInfo)(nil)).Elem() -} - -type HostRelocateVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VslmRelocateSpec `xml:"spec"` -} - -func init() { - t["HostRelocateVStorageObjectRequestType"] = reflect.TypeOf((*HostRelocateVStorageObjectRequestType)(nil)).Elem() -} - -type HostRelocateVStorageObject_Task HostRelocateVStorageObjectRequestType - -func init() { - t["HostRelocateVStorageObject_Task"] = reflect.TypeOf((*HostRelocateVStorageObject_Task)(nil)).Elem() -} - -type HostRelocateVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostRemoveVFlashResource HostRemoveVFlashResourceRequestType - -func init() { - t["HostRemoveVFlashResource"] = reflect.TypeOf((*HostRemoveVFlashResource)(nil)).Elem() -} - -type HostRemoveVFlashResourceRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HostRemoveVFlashResourceRequestType"] = reflect.TypeOf((*HostRemoveVFlashResourceRequestType)(nil)).Elem() -} - -type HostRemoveVFlashResourceResponse struct { -} - -type HostRemovedEvent struct { - HostEvent -} - -func init() { - t["HostRemovedEvent"] = reflect.TypeOf((*HostRemovedEvent)(nil)).Elem() -} - -type HostRenameVStorageObject HostRenameVStorageObjectRequestType - -func init() { - t["HostRenameVStorageObject"] = reflect.TypeOf((*HostRenameVStorageObject)(nil)).Elem() -} - -type HostRenameVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Name string `xml:"name"` -} - -func init() { - t["HostRenameVStorageObjectRequestType"] = reflect.TypeOf((*HostRenameVStorageObjectRequestType)(nil)).Elem() -} - -type HostRenameVStorageObjectResponse struct { -} - -type HostResignatureRescanResult struct { - DynamicData - - Rescan []HostVmfsRescanResult `xml:"rescan,omitempty"` - Result ManagedObjectReference `xml:"result"` -} - -func init() { - t["HostResignatureRescanResult"] = reflect.TypeOf((*HostResignatureRescanResult)(nil)).Elem() -} - -type HostRetrieveVStorageInfrastructureObjectPolicy HostRetrieveVStorageInfrastructureObjectPolicyRequestType - -func init() { - t["HostRetrieveVStorageInfrastructureObjectPolicy"] = reflect.TypeOf((*HostRetrieveVStorageInfrastructureObjectPolicy)(nil)).Elem() -} - -type HostRetrieveVStorageInfrastructureObjectPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostRetrieveVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*HostRetrieveVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem() -} - -type HostRetrieveVStorageInfrastructureObjectPolicyResponse struct { - Returnval []VslmInfrastructureObjectPolicy `xml:"returnval,omitempty"` -} - -type HostRetrieveVStorageObject HostRetrieveVStorageObjectRequestType - -func init() { - t["HostRetrieveVStorageObject"] = reflect.TypeOf((*HostRetrieveVStorageObject)(nil)).Elem() -} - -type HostRetrieveVStorageObjectMetadata HostRetrieveVStorageObjectMetadataRequestType - -func init() { - t["HostRetrieveVStorageObjectMetadata"] = reflect.TypeOf((*HostRetrieveVStorageObjectMetadata)(nil)).Elem() -} - -type HostRetrieveVStorageObjectMetadataRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId *ID `xml:"snapshotId,omitempty"` - Prefix string `xml:"prefix,omitempty"` -} - -func init() { - t["HostRetrieveVStorageObjectMetadataRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectMetadataRequestType)(nil)).Elem() -} - -type HostRetrieveVStorageObjectMetadataResponse struct { - Returnval []KeyValue `xml:"returnval,omitempty"` -} - -type HostRetrieveVStorageObjectMetadataValue HostRetrieveVStorageObjectMetadataValueRequestType - -func init() { - t["HostRetrieveVStorageObjectMetadataValue"] = reflect.TypeOf((*HostRetrieveVStorageObjectMetadataValue)(nil)).Elem() -} - -type HostRetrieveVStorageObjectMetadataValueRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId *ID `xml:"snapshotId,omitempty"` - Key string `xml:"key"` -} - -func init() { - t["HostRetrieveVStorageObjectMetadataValueRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectMetadataValueRequestType)(nil)).Elem() -} - -type HostRetrieveVStorageObjectMetadataValueResponse struct { - Returnval string `xml:"returnval"` -} - -type HostRetrieveVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - DiskInfoFlags []string `xml:"diskInfoFlags,omitempty"` -} - -func init() { - t["HostRetrieveVStorageObjectRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectRequestType)(nil)).Elem() -} - -type HostRetrieveVStorageObjectResponse struct { - Returnval VStorageObject `xml:"returnval"` -} - -type HostRetrieveVStorageObjectState HostRetrieveVStorageObjectStateRequestType - -func init() { - t["HostRetrieveVStorageObjectState"] = reflect.TypeOf((*HostRetrieveVStorageObjectState)(nil)).Elem() -} - -type HostRetrieveVStorageObjectStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostRetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*HostRetrieveVStorageObjectStateRequestType)(nil)).Elem() -} - -type HostRetrieveVStorageObjectStateResponse struct { - Returnval VStorageObjectStateInfo `xml:"returnval"` -} - -type HostRuntimeInfo struct { - DynamicData - - ConnectionState HostSystemConnectionState `xml:"connectionState"` - PowerState HostSystemPowerState `xml:"powerState"` - StandbyMode string `xml:"standbyMode,omitempty"` - InMaintenanceMode bool `xml:"inMaintenanceMode"` - InQuarantineMode *bool `xml:"inQuarantineMode"` - BootTime *time.Time `xml:"bootTime"` - HealthSystemRuntime *HealthSystemRuntime `xml:"healthSystemRuntime,omitempty"` - DasHostState *ClusterDasFdmHostState `xml:"dasHostState,omitempty"` - TpmPcrValues []HostTpmDigestInfo `xml:"tpmPcrValues,omitempty"` - VsanRuntimeInfo *VsanHostRuntimeInfo `xml:"vsanRuntimeInfo,omitempty"` - NetworkRuntimeInfo *HostRuntimeInfoNetworkRuntimeInfo `xml:"networkRuntimeInfo,omitempty"` - VFlashResourceRuntimeInfo *HostVFlashManagerVFlashResourceRunTimeInfo `xml:"vFlashResourceRuntimeInfo,omitempty"` - HostMaxVirtualDiskCapacity int64 `xml:"hostMaxVirtualDiskCapacity,omitempty"` - CryptoState string `xml:"cryptoState,omitempty"` - CryptoKeyId *CryptoKeyId `xml:"cryptoKeyId,omitempty"` - StatelessNvdsMigrationReady string `xml:"statelessNvdsMigrationReady,omitempty"` - StateEncryption *HostRuntimeInfoStateEncryptionInfo `xml:"stateEncryption,omitempty"` -} - -func init() { - t["HostRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfo)(nil)).Elem() -} - -type HostRuntimeInfoNetStackInstanceRuntimeInfo struct { - DynamicData - - NetStackInstanceKey string `xml:"netStackInstanceKey"` - State string `xml:"state,omitempty"` - VmknicKeys []string `xml:"vmknicKeys,omitempty"` - MaxNumberOfConnections int32 `xml:"maxNumberOfConnections,omitempty"` - CurrentIpV6Enabled *bool `xml:"currentIpV6Enabled"` -} - -func init() { - t["HostRuntimeInfoNetStackInstanceRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetStackInstanceRuntimeInfo)(nil)).Elem() -} - -type HostRuntimeInfoNetworkRuntimeInfo struct { - DynamicData - - NetStackInstanceRuntimeInfo []HostRuntimeInfoNetStackInstanceRuntimeInfo `xml:"netStackInstanceRuntimeInfo,omitempty"` - NetworkResourceRuntime *HostNetworkResourceRuntime `xml:"networkResourceRuntime,omitempty"` -} - -func init() { - t["HostRuntimeInfoNetworkRuntimeInfo"] = reflect.TypeOf((*HostRuntimeInfoNetworkRuntimeInfo)(nil)).Elem() -} - -type HostRuntimeInfoStateEncryptionInfo struct { - DynamicData - - ProtectionMode string `xml:"protectionMode"` - RequireSecureBoot *bool `xml:"requireSecureBoot"` - RequireExecInstalledOnly *bool `xml:"requireExecInstalledOnly"` -} - -func init() { - t["HostRuntimeInfoStateEncryptionInfo"] = reflect.TypeOf((*HostRuntimeInfoStateEncryptionInfo)(nil)).Elem() -} - -type HostScheduleReconcileDatastoreInventory HostScheduleReconcileDatastoreInventoryRequestType - -func init() { - t["HostScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventory)(nil)).Elem() -} - -type HostScheduleReconcileDatastoreInventoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*HostScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem() -} - -type HostScheduleReconcileDatastoreInventoryResponse struct { -} - -type HostScsiDisk struct { - ScsiLun - - Capacity HostDiskDimensionsLba `xml:"capacity"` - DevicePath string `xml:"devicePath"` - Ssd *bool `xml:"ssd"` - LocalDisk *bool `xml:"localDisk"` - PhysicalLocation []string `xml:"physicalLocation,omitempty"` - EmulatedDIXDIFEnabled *bool `xml:"emulatedDIXDIFEnabled"` - VsanDiskInfo *VsanHostVsanDiskInfo `xml:"vsanDiskInfo,omitempty"` - ScsiDiskType string `xml:"scsiDiskType,omitempty"` -} - -func init() { - t["HostScsiDisk"] = reflect.TypeOf((*HostScsiDisk)(nil)).Elem() -} - -type HostScsiDiskPartition struct { - DynamicData - - DiskName string `xml:"diskName"` - Partition int32 `xml:"partition"` -} - -func init() { - t["HostScsiDiskPartition"] = reflect.TypeOf((*HostScsiDiskPartition)(nil)).Elem() -} - -type HostScsiTopology struct { - DynamicData - - Adapter []HostScsiTopologyInterface `xml:"adapter,omitempty"` -} - -func init() { - t["HostScsiTopology"] = reflect.TypeOf((*HostScsiTopology)(nil)).Elem() -} - -type HostScsiTopologyInterface struct { - DynamicData - - Key string `xml:"key"` - Adapter string `xml:"adapter"` - Target []HostScsiTopologyTarget `xml:"target,omitempty"` -} - -func init() { - t["HostScsiTopologyInterface"] = reflect.TypeOf((*HostScsiTopologyInterface)(nil)).Elem() -} - -type HostScsiTopologyLun struct { - DynamicData - - Key string `xml:"key"` - Lun int32 `xml:"lun"` - ScsiLun string `xml:"scsiLun"` -} - -func init() { - t["HostScsiTopologyLun"] = reflect.TypeOf((*HostScsiTopologyLun)(nil)).Elem() -} - -type HostScsiTopologyTarget struct { - DynamicData - - Key string `xml:"key"` - Target int32 `xml:"target"` - Lun []HostScsiTopologyLun `xml:"lun,omitempty"` - Transport BaseHostTargetTransport `xml:"transport,omitempty,typeattr"` -} - -func init() { - t["HostScsiTopologyTarget"] = reflect.TypeOf((*HostScsiTopologyTarget)(nil)).Elem() -} - -type HostSecuritySpec struct { - DynamicData - - AdminPassword string `xml:"adminPassword,omitempty"` - RemovePermission []Permission `xml:"removePermission,omitempty"` - AddPermission []Permission `xml:"addPermission,omitempty"` -} - -func init() { - t["HostSecuritySpec"] = reflect.TypeOf((*HostSecuritySpec)(nil)).Elem() -} - -type HostSerialAttachedHba struct { - HostHostBusAdapter - - NodeWorldWideName string `xml:"nodeWorldWideName"` -} - -func init() { - t["HostSerialAttachedHba"] = reflect.TypeOf((*HostSerialAttachedHba)(nil)).Elem() -} - -type HostSerialAttachedTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostSerialAttachedTargetTransport"] = reflect.TypeOf((*HostSerialAttachedTargetTransport)(nil)).Elem() -} - -type HostService struct { - DynamicData - - Key string `xml:"key"` - Label string `xml:"label"` - Required bool `xml:"required"` - Uninstallable bool `xml:"uninstallable"` - Running bool `xml:"running"` - Ruleset []string `xml:"ruleset,omitempty"` - Policy string `xml:"policy"` - SourcePackage *HostServiceSourcePackage `xml:"sourcePackage,omitempty"` -} - -func init() { - t["HostService"] = reflect.TypeOf((*HostService)(nil)).Elem() -} - -type HostServiceConfig struct { - DynamicData - - ServiceId string `xml:"serviceId"` - StartupPolicy string `xml:"startupPolicy"` -} - -func init() { - t["HostServiceConfig"] = reflect.TypeOf((*HostServiceConfig)(nil)).Elem() -} - -type HostServiceInfo struct { - DynamicData - - Service []HostService `xml:"service,omitempty"` -} - -func init() { - t["HostServiceInfo"] = reflect.TypeOf((*HostServiceInfo)(nil)).Elem() -} - -type HostServiceSourcePackage struct { - DynamicData - - SourcePackageName string `xml:"sourcePackageName"` - Description string `xml:"description"` -} - -func init() { - t["HostServiceSourcePackage"] = reflect.TypeOf((*HostServiceSourcePackage)(nil)).Elem() -} - -type HostServiceTicket struct { - DynamicData - - Host string `xml:"host,omitempty"` - Port int32 `xml:"port,omitempty"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - Service string `xml:"service"` - ServiceVersion string `xml:"serviceVersion"` - SessionId string `xml:"sessionId"` -} - -func init() { - t["HostServiceTicket"] = reflect.TypeOf((*HostServiceTicket)(nil)).Elem() -} - -type HostSetVStorageObjectControlFlags HostSetVStorageObjectControlFlagsRequestType - -func init() { - t["HostSetVStorageObjectControlFlags"] = reflect.TypeOf((*HostSetVStorageObjectControlFlags)(nil)).Elem() -} - -type HostSetVStorageObjectControlFlagsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - ControlFlags []string `xml:"controlFlags,omitempty"` -} - -func init() { - t["HostSetVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*HostSetVStorageObjectControlFlagsRequestType)(nil)).Elem() -} - -type HostSetVStorageObjectControlFlagsResponse struct { -} - -type HostSevInfo struct { - DynamicData - - SevState string `xml:"sevState"` - MaxSevEsGuests int64 `xml:"maxSevEsGuests"` -} - -func init() { - t["HostSevInfo"] = reflect.TypeOf((*HostSevInfo)(nil)).Elem() -} - -type HostSgxInfo struct { - DynamicData - - SgxState string `xml:"sgxState"` - TotalEpcMemory int64 `xml:"totalEpcMemory"` - FlcMode string `xml:"flcMode"` - LePubKeyHash string `xml:"lePubKeyHash,omitempty"` - RegistrationInfo *HostSgxRegistrationInfo `xml:"registrationInfo,omitempty"` -} - -func init() { - t["HostSgxInfo"] = reflect.TypeOf((*HostSgxInfo)(nil)).Elem() -} - -type HostSgxRegistrationInfo struct { - DynamicData - - Status string `xml:"status,omitempty"` - BiosError int32 `xml:"biosError,omitempty"` - RegistrationUrl string `xml:"registrationUrl,omitempty"` - Type string `xml:"type,omitempty"` - Ppid string `xml:"ppid,omitempty"` - LastRegisteredTime *time.Time `xml:"lastRegisteredTime"` -} - -func init() { - t["HostSgxRegistrationInfo"] = reflect.TypeOf((*HostSgxRegistrationInfo)(nil)).Elem() -} - -type HostSharedGpuCapabilities struct { - DynamicData - - Vgpu string `xml:"vgpu"` - DiskSnapshotSupported bool `xml:"diskSnapshotSupported"` - MemorySnapshotSupported bool `xml:"memorySnapshotSupported"` - SuspendSupported bool `xml:"suspendSupported"` - MigrateSupported bool `xml:"migrateSupported"` -} - -func init() { - t["HostSharedGpuCapabilities"] = reflect.TypeOf((*HostSharedGpuCapabilities)(nil)).Elem() -} - -type HostShortNameInconsistentEvent struct { - HostDasEvent - - ShortName string `xml:"shortName"` - ShortName2 string `xml:"shortName2"` -} - -func init() { - t["HostShortNameInconsistentEvent"] = reflect.TypeOf((*HostShortNameInconsistentEvent)(nil)).Elem() -} - -type HostShortNameToIpFailedEvent struct { - HostEvent - - ShortName string `xml:"shortName"` -} - -func init() { - t["HostShortNameToIpFailedEvent"] = reflect.TypeOf((*HostShortNameToIpFailedEvent)(nil)).Elem() -} - -type HostShutdownEvent struct { - HostEvent - - Reason string `xml:"reason"` -} - -func init() { - t["HostShutdownEvent"] = reflect.TypeOf((*HostShutdownEvent)(nil)).Elem() -} - -type HostSnmpConfigSpec struct { - DynamicData - - Enabled *bool `xml:"enabled"` - Port int32 `xml:"port,omitempty"` - ReadOnlyCommunities []string `xml:"readOnlyCommunities,omitempty"` - TrapTargets []HostSnmpDestination `xml:"trapTargets,omitempty"` - Option []KeyValue `xml:"option,omitempty"` -} - -func init() { - t["HostSnmpConfigSpec"] = reflect.TypeOf((*HostSnmpConfigSpec)(nil)).Elem() -} - -type HostSnmpDestination struct { - DynamicData - - HostName string `xml:"hostName"` - Port int32 `xml:"port"` - Community string `xml:"community"` -} - -func init() { - t["HostSnmpDestination"] = reflect.TypeOf((*HostSnmpDestination)(nil)).Elem() -} - -type HostSnmpSystemAgentLimits struct { - DynamicData - - MaxReadOnlyCommunities int32 `xml:"maxReadOnlyCommunities"` - MaxTrapDestinations int32 `xml:"maxTrapDestinations"` - MaxCommunityLength int32 `xml:"maxCommunityLength"` - MaxBufferSize int32 `xml:"maxBufferSize"` - Capability HostSnmpAgentCapability `xml:"capability,omitempty"` -} - -func init() { - t["HostSnmpSystemAgentLimits"] = reflect.TypeOf((*HostSnmpSystemAgentLimits)(nil)).Elem() -} - -type HostSpecGetUpdatedHosts HostSpecGetUpdatedHostsRequestType - -func init() { - t["HostSpecGetUpdatedHosts"] = reflect.TypeOf((*HostSpecGetUpdatedHosts)(nil)).Elem() -} - -type HostSpecGetUpdatedHostsRequestType struct { - This ManagedObjectReference `xml:"_this"` - StartChangeID string `xml:"startChangeID,omitempty"` - EndChangeID string `xml:"endChangeID,omitempty"` -} - -func init() { - t["HostSpecGetUpdatedHostsRequestType"] = reflect.TypeOf((*HostSpecGetUpdatedHostsRequestType)(nil)).Elem() -} - -type HostSpecGetUpdatedHostsResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type HostSpecification struct { - DynamicData - - CreatedTime time.Time `xml:"createdTime"` - LastModified *time.Time `xml:"lastModified"` - Host ManagedObjectReference `xml:"host"` - SubSpecs []HostSubSpecification `xml:"subSpecs,omitempty"` - ChangeID string `xml:"changeID,omitempty"` -} - -func init() { - t["HostSpecification"] = reflect.TypeOf((*HostSpecification)(nil)).Elem() -} - -type HostSpecificationChangedEvent struct { - HostEvent -} - -func init() { - t["HostSpecificationChangedEvent"] = reflect.TypeOf((*HostSpecificationChangedEvent)(nil)).Elem() -} - -type HostSpecificationOperationFailed struct { - VimFault - - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["HostSpecificationOperationFailed"] = reflect.TypeOf((*HostSpecificationOperationFailed)(nil)).Elem() -} - -type HostSpecificationOperationFailedFault HostSpecificationOperationFailed - -func init() { - t["HostSpecificationOperationFailedFault"] = reflect.TypeOf((*HostSpecificationOperationFailedFault)(nil)).Elem() -} - -type HostSpecificationRequireEvent struct { - HostEvent -} - -func init() { - t["HostSpecificationRequireEvent"] = reflect.TypeOf((*HostSpecificationRequireEvent)(nil)).Elem() -} - -type HostSpecificationUpdateEvent struct { - HostEvent - - HostSpec HostSpecification `xml:"hostSpec"` -} - -func init() { - t["HostSpecificationUpdateEvent"] = reflect.TypeOf((*HostSpecificationUpdateEvent)(nil)).Elem() -} - -type HostSriovConfig struct { - HostPciPassthruConfig - - SriovEnabled bool `xml:"sriovEnabled"` - NumVirtualFunction int32 `xml:"numVirtualFunction"` -} - -func init() { - t["HostSriovConfig"] = reflect.TypeOf((*HostSriovConfig)(nil)).Elem() -} - -type HostSriovDevicePoolInfo struct { - DynamicData - - Key string `xml:"key"` -} - -func init() { - t["HostSriovDevicePoolInfo"] = reflect.TypeOf((*HostSriovDevicePoolInfo)(nil)).Elem() -} - -type HostSriovInfo struct { - HostPciPassthruInfo - - SriovEnabled bool `xml:"sriovEnabled"` - SriovCapable bool `xml:"sriovCapable"` - SriovActive bool `xml:"sriovActive"` - NumVirtualFunctionRequested int32 `xml:"numVirtualFunctionRequested"` - NumVirtualFunction int32 `xml:"numVirtualFunction"` - MaxVirtualFunctionSupported int32 `xml:"maxVirtualFunctionSupported"` -} - -func init() { - t["HostSriovInfo"] = reflect.TypeOf((*HostSriovInfo)(nil)).Elem() -} - -type HostSriovNetworkDevicePoolInfo struct { - HostSriovDevicePoolInfo - - SwitchKey string `xml:"switchKey,omitempty"` - SwitchUuid string `xml:"switchUuid,omitempty"` - Pnic []PhysicalNic `xml:"pnic,omitempty"` -} - -func init() { - t["HostSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*HostSriovNetworkDevicePoolInfo)(nil)).Elem() -} - -type HostSslThumbprintInfo struct { - DynamicData - - Principal string `xml:"principal"` - OwnerTag string `xml:"ownerTag,omitempty"` - SslThumbprints []string `xml:"sslThumbprints,omitempty"` -} - -func init() { - t["HostSslThumbprintInfo"] = reflect.TypeOf((*HostSslThumbprintInfo)(nil)).Elem() -} - -type HostStatusChangedEvent struct { - ClusterStatusChangedEvent -} - -func init() { - t["HostStatusChangedEvent"] = reflect.TypeOf((*HostStatusChangedEvent)(nil)).Elem() -} - -type HostStorageArrayTypePolicyOption struct { - DynamicData - - Policy BaseElementDescription `xml:"policy,typeattr"` -} - -func init() { - t["HostStorageArrayTypePolicyOption"] = reflect.TypeOf((*HostStorageArrayTypePolicyOption)(nil)).Elem() -} - -type HostStorageDeviceInfo struct { - DynamicData - - HostBusAdapter []BaseHostHostBusAdapter `xml:"hostBusAdapter,omitempty,typeattr"` - ScsiLun []BaseScsiLun `xml:"scsiLun,omitempty,typeattr"` - ScsiTopology *HostScsiTopology `xml:"scsiTopology,omitempty"` - NvmeTopology *HostNvmeTopology `xml:"nvmeTopology,omitempty"` - MultipathInfo *HostMultipathInfo `xml:"multipathInfo,omitempty"` - PlugStoreTopology *HostPlugStoreTopology `xml:"plugStoreTopology,omitempty"` - SoftwareInternetScsiEnabled bool `xml:"softwareInternetScsiEnabled"` -} - -func init() { - t["HostStorageDeviceInfo"] = reflect.TypeOf((*HostStorageDeviceInfo)(nil)).Elem() -} - -type HostStorageElementInfo struct { - HostHardwareElementInfo - - OperationalInfo []HostStorageOperationalInfo `xml:"operationalInfo,omitempty"` -} - -func init() { - t["HostStorageElementInfo"] = reflect.TypeOf((*HostStorageElementInfo)(nil)).Elem() -} - -type HostStorageOperationalInfo struct { - DynamicData - - Property string `xml:"property"` - Value string `xml:"value"` -} - -func init() { - t["HostStorageOperationalInfo"] = reflect.TypeOf((*HostStorageOperationalInfo)(nil)).Elem() -} - -type HostStorageSystemDiskLocatorLedResult struct { - DynamicData - - Key string `xml:"key"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["HostStorageSystemDiskLocatorLedResult"] = reflect.TypeOf((*HostStorageSystemDiskLocatorLedResult)(nil)).Elem() -} - -type HostStorageSystemScsiLunResult struct { - DynamicData - - Key string `xml:"key"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostStorageSystemScsiLunResult"] = reflect.TypeOf((*HostStorageSystemScsiLunResult)(nil)).Elem() -} - -type HostStorageSystemVmfsVolumeResult struct { - DynamicData - - Key string `xml:"key"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostStorageSystemVmfsVolumeResult"] = reflect.TypeOf((*HostStorageSystemVmfsVolumeResult)(nil)).Elem() -} - -type HostSubSpecification struct { - DynamicData - - Name string `xml:"name"` - CreatedTime time.Time `xml:"createdTime"` - Data []byte `xml:"data,omitempty"` - BinaryData []byte `xml:"binaryData,omitempty"` -} - -func init() { - t["HostSubSpecification"] = reflect.TypeOf((*HostSubSpecification)(nil)).Elem() -} - -type HostSubSpecificationDeleteEvent struct { - HostEvent - - SubSpecName string `xml:"subSpecName"` -} - -func init() { - t["HostSubSpecificationDeleteEvent"] = reflect.TypeOf((*HostSubSpecificationDeleteEvent)(nil)).Elem() -} - -type HostSubSpecificationUpdateEvent struct { - HostEvent - - HostSubSpec HostSubSpecification `xml:"hostSubSpec"` -} - -func init() { - t["HostSubSpecificationUpdateEvent"] = reflect.TypeOf((*HostSubSpecificationUpdateEvent)(nil)).Elem() -} - -type HostSyncFailedEvent struct { - HostEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["HostSyncFailedEvent"] = reflect.TypeOf((*HostSyncFailedEvent)(nil)).Elem() -} - -type HostSystemComplianceCheckState struct { - DynamicData - - State string `xml:"state"` - CheckTime time.Time `xml:"checkTime"` -} - -func init() { - t["HostSystemComplianceCheckState"] = reflect.TypeOf((*HostSystemComplianceCheckState)(nil)).Elem() -} - -type HostSystemHealthInfo struct { - DynamicData - - NumericSensorInfo []HostNumericSensorInfo `xml:"numericSensorInfo,omitempty"` -} - -func init() { - t["HostSystemHealthInfo"] = reflect.TypeOf((*HostSystemHealthInfo)(nil)).Elem() -} - -type HostSystemIdentificationInfo struct { - DynamicData - - IdentifierValue string `xml:"identifierValue"` - IdentifierType BaseElementDescription `xml:"identifierType,typeattr"` -} - -func init() { - t["HostSystemIdentificationInfo"] = reflect.TypeOf((*HostSystemIdentificationInfo)(nil)).Elem() -} - -type HostSystemInfo struct { - DynamicData - - Vendor string `xml:"vendor"` - Model string `xml:"model"` - Uuid string `xml:"uuid"` - OtherIdentifyingInfo []HostSystemIdentificationInfo `xml:"otherIdentifyingInfo,omitempty"` - SerialNumber string `xml:"serialNumber,omitempty"` - QualifiedName []HostQualifiedName `xml:"qualifiedName,omitempty"` - VvolHostNQN *HostQualifiedName `xml:"vvolHostNQN,omitempty"` - VvolHostId string `xml:"vvolHostId,omitempty"` -} - -func init() { - t["HostSystemInfo"] = reflect.TypeOf((*HostSystemInfo)(nil)).Elem() -} - -type HostSystemReconnectSpec struct { - DynamicData - - SyncState *bool `xml:"syncState"` -} - -func init() { - t["HostSystemReconnectSpec"] = reflect.TypeOf((*HostSystemReconnectSpec)(nil)).Elem() -} - -type HostSystemRemediationState struct { - DynamicData - - State string `xml:"state"` - OperationTime time.Time `xml:"operationTime"` -} - -func init() { - t["HostSystemRemediationState"] = reflect.TypeOf((*HostSystemRemediationState)(nil)).Elem() -} - -type HostSystemResourceInfo struct { - DynamicData - - Key string `xml:"key"` - Config *ResourceConfigSpec `xml:"config,omitempty"` - Child []HostSystemResourceInfo `xml:"child,omitempty"` -} - -func init() { - t["HostSystemResourceInfo"] = reflect.TypeOf((*HostSystemResourceInfo)(nil)).Elem() -} - -type HostSystemSwapConfiguration struct { - DynamicData - - Option []BaseHostSystemSwapConfigurationSystemSwapOption `xml:"option,omitempty,typeattr"` -} - -func init() { - t["HostSystemSwapConfiguration"] = reflect.TypeOf((*HostSystemSwapConfiguration)(nil)).Elem() -} - -type HostSystemSwapConfigurationDatastoreOption struct { - HostSystemSwapConfigurationSystemSwapOption - - Datastore string `xml:"datastore"` -} - -func init() { - t["HostSystemSwapConfigurationDatastoreOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDatastoreOption)(nil)).Elem() -} - -type HostSystemSwapConfigurationDisabledOption struct { - HostSystemSwapConfigurationSystemSwapOption -} - -func init() { - t["HostSystemSwapConfigurationDisabledOption"] = reflect.TypeOf((*HostSystemSwapConfigurationDisabledOption)(nil)).Elem() -} - -type HostSystemSwapConfigurationHostCacheOption struct { - HostSystemSwapConfigurationSystemSwapOption -} - -func init() { - t["HostSystemSwapConfigurationHostCacheOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostCacheOption)(nil)).Elem() -} - -type HostSystemSwapConfigurationHostLocalSwapOption struct { - HostSystemSwapConfigurationSystemSwapOption -} - -func init() { - t["HostSystemSwapConfigurationHostLocalSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationHostLocalSwapOption)(nil)).Elem() -} - -type HostSystemSwapConfigurationSystemSwapOption struct { - DynamicData - - Key int32 `xml:"key"` -} - -func init() { - t["HostSystemSwapConfigurationSystemSwapOption"] = reflect.TypeOf((*HostSystemSwapConfigurationSystemSwapOption)(nil)).Elem() -} - -type HostTargetTransport struct { - DynamicData -} - -func init() { - t["HostTargetTransport"] = reflect.TypeOf((*HostTargetTransport)(nil)).Elem() -} - -type HostTcpHba struct { - HostHostBusAdapter - - AssociatedPnic string `xml:"associatedPnic,omitempty"` -} - -func init() { - t["HostTcpHba"] = reflect.TypeOf((*HostTcpHba)(nil)).Elem() -} - -type HostTcpHbaCreateSpec struct { - HostHbaCreateSpec - - Pnic string `xml:"pnic"` -} - -func init() { - t["HostTcpHbaCreateSpec"] = reflect.TypeOf((*HostTcpHbaCreateSpec)(nil)).Elem() -} - -type HostTcpTargetTransport struct { - HostTargetTransport -} - -func init() { - t["HostTcpTargetTransport"] = reflect.TypeOf((*HostTcpTargetTransport)(nil)).Elem() -} - -type HostTpmAttestationInfo struct { - DynamicData - - Time time.Time `xml:"time"` - Status HostTpmAttestationInfoAcceptanceStatus `xml:"status"` - Message *LocalizableMessage `xml:"message,omitempty"` -} - -func init() { - t["HostTpmAttestationInfo"] = reflect.TypeOf((*HostTpmAttestationInfo)(nil)).Elem() -} - -type HostTpmAttestationReport struct { - DynamicData - - TpmPcrValues []HostTpmDigestInfo `xml:"tpmPcrValues"` - TpmEvents []HostTpmEventLogEntry `xml:"tpmEvents"` - TpmLogReliable bool `xml:"tpmLogReliable"` -} - -func init() { - t["HostTpmAttestationReport"] = reflect.TypeOf((*HostTpmAttestationReport)(nil)).Elem() -} - -type HostTpmBootSecurityOptionEventDetails struct { - HostTpmEventDetails - - BootSecurityOption string `xml:"bootSecurityOption"` -} - -func init() { - t["HostTpmBootSecurityOptionEventDetails"] = reflect.TypeOf((*HostTpmBootSecurityOptionEventDetails)(nil)).Elem() -} - -type HostTpmCommandEventDetails struct { - HostTpmEventDetails - - CommandLine string `xml:"commandLine"` -} - -func init() { - t["HostTpmCommandEventDetails"] = reflect.TypeOf((*HostTpmCommandEventDetails)(nil)).Elem() -} - -type HostTpmDigestInfo struct { - HostDigestInfo - - PcrNumber int32 `xml:"pcrNumber"` -} - -func init() { - t["HostTpmDigestInfo"] = reflect.TypeOf((*HostTpmDigestInfo)(nil)).Elem() -} - -type HostTpmEventDetails struct { - DynamicData - - DataHash []byte `xml:"dataHash"` - DataHashMethod string `xml:"dataHashMethod,omitempty"` -} - -func init() { - t["HostTpmEventDetails"] = reflect.TypeOf((*HostTpmEventDetails)(nil)).Elem() -} - -type HostTpmEventLogEntry struct { - DynamicData - - PcrIndex int32 `xml:"pcrIndex"` - EventDetails BaseHostTpmEventDetails `xml:"eventDetails,typeattr"` -} - -func init() { - t["HostTpmEventLogEntry"] = reflect.TypeOf((*HostTpmEventLogEntry)(nil)).Elem() -} - -type HostTpmNvTagEventDetails struct { - HostTpmBootSecurityOptionEventDetails -} - -func init() { - t["HostTpmNvTagEventDetails"] = reflect.TypeOf((*HostTpmNvTagEventDetails)(nil)).Elem() -} - -type HostTpmOptionEventDetails struct { - HostTpmEventDetails - - OptionsFileName string `xml:"optionsFileName"` - BootOptions []byte `xml:"bootOptions,omitempty"` -} - -func init() { - t["HostTpmOptionEventDetails"] = reflect.TypeOf((*HostTpmOptionEventDetails)(nil)).Elem() -} - -type HostTpmSignerEventDetails struct { - HostTpmBootSecurityOptionEventDetails -} - -func init() { - t["HostTpmSignerEventDetails"] = reflect.TypeOf((*HostTpmSignerEventDetails)(nil)).Elem() -} - -type HostTpmSoftwareComponentEventDetails struct { - HostTpmEventDetails - - ComponentName string `xml:"componentName"` - VibName string `xml:"vibName"` - VibVersion string `xml:"vibVersion"` - VibVendor string `xml:"vibVendor"` -} - -func init() { - t["HostTpmSoftwareComponentEventDetails"] = reflect.TypeOf((*HostTpmSoftwareComponentEventDetails)(nil)).Elem() -} - -type HostTpmVersionEventDetails struct { - HostTpmEventDetails - - Version []byte `xml:"version"` -} - -func init() { - t["HostTpmVersionEventDetails"] = reflect.TypeOf((*HostTpmVersionEventDetails)(nil)).Elem() -} - -type HostTrustAuthorityAttestationInfo struct { - DynamicData - - AttestationStatus string `xml:"attestationStatus"` - ServiceId string `xml:"serviceId,omitempty"` - AttestedAt *time.Time `xml:"attestedAt"` - AttestedUntil *time.Time `xml:"attestedUntil"` - Messages []LocalizableMessage `xml:"messages,omitempty"` -} - -func init() { - t["HostTrustAuthorityAttestationInfo"] = reflect.TypeOf((*HostTrustAuthorityAttestationInfo)(nil)).Elem() -} - -type HostUnresolvedVmfsExtent struct { - DynamicData - - Device HostScsiDiskPartition `xml:"device"` - DevicePath string `xml:"devicePath"` - VmfsUuid string `xml:"vmfsUuid"` - IsHeadExtent bool `xml:"isHeadExtent"` - Ordinal int32 `xml:"ordinal"` - StartBlock int32 `xml:"startBlock"` - EndBlock int32 `xml:"endBlock"` - Reason string `xml:"reason"` -} - -func init() { - t["HostUnresolvedVmfsExtent"] = reflect.TypeOf((*HostUnresolvedVmfsExtent)(nil)).Elem() -} - -type HostUnresolvedVmfsResignatureSpec struct { - DynamicData - - ExtentDevicePath []string `xml:"extentDevicePath"` -} - -func init() { - t["HostUnresolvedVmfsResignatureSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResignatureSpec)(nil)).Elem() -} - -type HostUnresolvedVmfsResolutionResult struct { - DynamicData - - Spec HostUnresolvedVmfsResolutionSpec `xml:"spec"` - Vmfs *HostVmfsVolume `xml:"vmfs,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostUnresolvedVmfsResolutionResult"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionResult)(nil)).Elem() -} - -type HostUnresolvedVmfsResolutionSpec struct { - DynamicData - - ExtentDevicePath []string `xml:"extentDevicePath"` - UuidResolution string `xml:"uuidResolution"` -} - -func init() { - t["HostUnresolvedVmfsResolutionSpec"] = reflect.TypeOf((*HostUnresolvedVmfsResolutionSpec)(nil)).Elem() -} - -type HostUnresolvedVmfsVolume struct { - DynamicData - - Extent []HostUnresolvedVmfsExtent `xml:"extent"` - VmfsLabel string `xml:"vmfsLabel"` - VmfsUuid string `xml:"vmfsUuid"` - TotalBlocks int32 `xml:"totalBlocks"` - ResolveStatus HostUnresolvedVmfsVolumeResolveStatus `xml:"resolveStatus"` -} - -func init() { - t["HostUnresolvedVmfsVolume"] = reflect.TypeOf((*HostUnresolvedVmfsVolume)(nil)).Elem() -} - -type HostUnresolvedVmfsVolumeResolveStatus struct { - DynamicData - - Resolvable bool `xml:"resolvable"` - IncompleteExtents *bool `xml:"incompleteExtents"` - MultipleCopies *bool `xml:"multipleCopies"` -} - -func init() { - t["HostUnresolvedVmfsVolumeResolveStatus"] = reflect.TypeOf((*HostUnresolvedVmfsVolumeResolveStatus)(nil)).Elem() -} - -type HostUpdateVStorageObjectMetadataExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Metadata []KeyValue `xml:"metadata,omitempty"` - DeleteKeys []string `xml:"deleteKeys,omitempty"` -} - -func init() { - t["HostUpdateVStorageObjectMetadataExRequestType"] = reflect.TypeOf((*HostUpdateVStorageObjectMetadataExRequestType)(nil)).Elem() -} - -type HostUpdateVStorageObjectMetadataEx_Task HostUpdateVStorageObjectMetadataExRequestType - -func init() { - t["HostUpdateVStorageObjectMetadataEx_Task"] = reflect.TypeOf((*HostUpdateVStorageObjectMetadataEx_Task)(nil)).Elem() -} - -type HostUpdateVStorageObjectMetadataEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostUpdateVStorageObjectMetadataRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Metadata []KeyValue `xml:"metadata,omitempty"` - DeleteKeys []string `xml:"deleteKeys,omitempty"` -} - -func init() { - t["HostUpdateVStorageObjectMetadataRequestType"] = reflect.TypeOf((*HostUpdateVStorageObjectMetadataRequestType)(nil)).Elem() -} - -type HostUpdateVStorageObjectMetadata_Task HostUpdateVStorageObjectMetadataRequestType - -func init() { - t["HostUpdateVStorageObjectMetadata_Task"] = reflect.TypeOf((*HostUpdateVStorageObjectMetadata_Task)(nil)).Elem() -} - -type HostUpdateVStorageObjectMetadata_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostUpgradeFailedEvent struct { - HostEvent -} - -func init() { - t["HostUpgradeFailedEvent"] = reflect.TypeOf((*HostUpgradeFailedEvent)(nil)).Elem() -} - -type HostUserWorldSwapNotEnabledEvent struct { - HostEvent -} - -func init() { - t["HostUserWorldSwapNotEnabledEvent"] = reflect.TypeOf((*HostUserWorldSwapNotEnabledEvent)(nil)).Elem() -} - -type HostVFlashManagerVFlashCacheConfigInfo struct { - DynamicData - - VFlashModuleConfigOption []HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModuleConfigOption,omitempty"` - DefaultVFlashModule string `xml:"defaultVFlashModule,omitempty"` - SwapCacheReservationInGB int64 `xml:"swapCacheReservationInGB,omitempty"` -} - -func init() { - t["HostVFlashManagerVFlashCacheConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfo)(nil)).Elem() -} - -type HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption struct { - DynamicData - - VFlashModule string `xml:"vFlashModule"` - VFlashModuleVersion string `xml:"vFlashModuleVersion"` - MinSupportedModuleVersion string `xml:"minSupportedModuleVersion"` - CacheConsistencyType ChoiceOption `xml:"cacheConsistencyType"` - CacheMode ChoiceOption `xml:"cacheMode"` - BlockSizeInKBOption LongOption `xml:"blockSizeInKBOption"` - ReservationInMBOption LongOption `xml:"reservationInMBOption"` - MaxDiskSizeInKB int64 `xml:"maxDiskSizeInKB"` -} - -func init() { - t["HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption)(nil)).Elem() -} - -type HostVFlashManagerVFlashCacheConfigSpec struct { - DynamicData - - DefaultVFlashModule string `xml:"defaultVFlashModule"` - SwapCacheReservationInGB int64 `xml:"swapCacheReservationInGB"` -} - -func init() { - t["HostVFlashManagerVFlashCacheConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashCacheConfigSpec)(nil)).Elem() -} - -type HostVFlashManagerVFlashConfigInfo struct { - DynamicData - - VFlashResourceConfigInfo *HostVFlashManagerVFlashResourceConfigInfo `xml:"vFlashResourceConfigInfo,omitempty"` - VFlashCacheConfigInfo *HostVFlashManagerVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"` -} - -func init() { - t["HostVFlashManagerVFlashConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashConfigInfo)(nil)).Elem() -} - -type HostVFlashManagerVFlashResourceConfigInfo struct { - DynamicData - - Vffs *HostVffsVolume `xml:"vffs,omitempty"` - Capacity int64 `xml:"capacity"` -} - -func init() { - t["HostVFlashManagerVFlashResourceConfigInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigInfo)(nil)).Elem() -} - -type HostVFlashManagerVFlashResourceConfigSpec struct { - DynamicData - - VffsUuid string `xml:"vffsUuid"` -} - -func init() { - t["HostVFlashManagerVFlashResourceConfigSpec"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceConfigSpec)(nil)).Elem() -} - -type HostVFlashManagerVFlashResourceRunTimeInfo struct { - DynamicData - - Usage int64 `xml:"usage"` - Capacity int64 `xml:"capacity"` - Accessible bool `xml:"accessible"` - CapacityForVmCache int64 `xml:"capacityForVmCache"` - FreeForVmCache int64 `xml:"freeForVmCache"` -} - -func init() { - t["HostVFlashManagerVFlashResourceRunTimeInfo"] = reflect.TypeOf((*HostVFlashManagerVFlashResourceRunTimeInfo)(nil)).Elem() -} - -type HostVFlashResourceConfigurationResult struct { - DynamicData - - DevicePath []string `xml:"devicePath,omitempty"` - Vffs *HostVffsVolume `xml:"vffs,omitempty"` - DiskConfigurationResult []HostDiskConfigurationResult `xml:"diskConfigurationResult,omitempty"` -} - -func init() { - t["HostVFlashResourceConfigurationResult"] = reflect.TypeOf((*HostVFlashResourceConfigurationResult)(nil)).Elem() -} - -type HostVMotionCompatibility struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Compatibility []string `xml:"compatibility,omitempty"` -} - -func init() { - t["HostVMotionCompatibility"] = reflect.TypeOf((*HostVMotionCompatibility)(nil)).Elem() -} - -type HostVMotionConfig struct { - DynamicData - - VmotionNicKey string `xml:"vmotionNicKey,omitempty"` - Enabled bool `xml:"enabled"` -} - -func init() { - t["HostVMotionConfig"] = reflect.TypeOf((*HostVMotionConfig)(nil)).Elem() -} - -type HostVMotionInfo struct { - DynamicData - - NetConfig *HostVMotionNetConfig `xml:"netConfig,omitempty"` - IpConfig *HostIpConfig `xml:"ipConfig,omitempty"` -} - -func init() { - t["HostVMotionInfo"] = reflect.TypeOf((*HostVMotionInfo)(nil)).Elem() -} - -type HostVMotionManagerDstInstantCloneResult struct { - DynamicData - - DstVmId int32 `xml:"dstVmId,omitempty"` - StartTime int64 `xml:"startTime,omitempty"` - CptLoadTime int64 `xml:"cptLoadTime,omitempty"` - CptLoadDoneTime int64 `xml:"cptLoadDoneTime,omitempty"` - ReplicateMemDoneTime int64 `xml:"replicateMemDoneTime,omitempty"` - EndTime int64 `xml:"endTime,omitempty"` - CptXferTime int64 `xml:"cptXferTime,omitempty"` - CptCacheUsed int64 `xml:"cptCacheUsed,omitempty"` - DevCptStreamSize int64 `xml:"devCptStreamSize,omitempty"` - DevCptStreamTime int64 `xml:"devCptStreamTime,omitempty"` -} - -func init() { - t["HostVMotionManagerDstInstantCloneResult"] = reflect.TypeOf((*HostVMotionManagerDstInstantCloneResult)(nil)).Elem() -} - -type HostVMotionManagerSrcInstantCloneResult struct { - DynamicData - - StartTime int64 `xml:"startTime,omitempty"` - QuiesceTime int64 `xml:"quiesceTime,omitempty"` - QuiesceDoneTime int64 `xml:"quiesceDoneTime,omitempty"` - ResumeDoneTime int64 `xml:"resumeDoneTime,omitempty"` - EndTime int64 `xml:"endTime,omitempty"` -} - -func init() { - t["HostVMotionManagerSrcInstantCloneResult"] = reflect.TypeOf((*HostVMotionManagerSrcInstantCloneResult)(nil)).Elem() -} - -type HostVMotionNetConfig struct { - DynamicData - - CandidateVnic []HostVirtualNic `xml:"candidateVnic,omitempty"` - SelectedVnic string `xml:"selectedVnic,omitempty"` -} - -func init() { - t["HostVMotionNetConfig"] = reflect.TypeOf((*HostVMotionNetConfig)(nil)).Elem() -} - -type HostVStorageObjectCreateDiskFromSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` - Name string `xml:"name"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` - Path string `xml:"path,omitempty"` - ProvisioningType string `xml:"provisioningType,omitempty"` -} - -func init() { - t["HostVStorageObjectCreateDiskFromSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectCreateDiskFromSnapshotRequestType)(nil)).Elem() -} - -type HostVStorageObjectCreateDiskFromSnapshot_Task HostVStorageObjectCreateDiskFromSnapshotRequestType - -func init() { - t["HostVStorageObjectCreateDiskFromSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectCreateDiskFromSnapshot_Task)(nil)).Elem() -} - -type HostVStorageObjectCreateDiskFromSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostVStorageObjectCreateSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Description string `xml:"description"` -} - -func init() { - t["HostVStorageObjectCreateSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectCreateSnapshotRequestType)(nil)).Elem() -} - -type HostVStorageObjectCreateSnapshot_Task HostVStorageObjectCreateSnapshotRequestType - -func init() { - t["HostVStorageObjectCreateSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectCreateSnapshot_Task)(nil)).Elem() -} - -type HostVStorageObjectCreateSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostVStorageObjectDeleteSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` -} - -func init() { - t["HostVStorageObjectDeleteSnapshotRequestType"] = reflect.TypeOf((*HostVStorageObjectDeleteSnapshotRequestType)(nil)).Elem() -} - -type HostVStorageObjectDeleteSnapshot_Task HostVStorageObjectDeleteSnapshotRequestType - -func init() { - t["HostVStorageObjectDeleteSnapshot_Task"] = reflect.TypeOf((*HostVStorageObjectDeleteSnapshot_Task)(nil)).Elem() -} - -type HostVStorageObjectDeleteSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostVStorageObjectRetrieveSnapshotInfo HostVStorageObjectRetrieveSnapshotInfoRequestType - -func init() { - t["HostVStorageObjectRetrieveSnapshotInfo"] = reflect.TypeOf((*HostVStorageObjectRetrieveSnapshotInfo)(nil)).Elem() -} - -type HostVStorageObjectRetrieveSnapshotInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["HostVStorageObjectRetrieveSnapshotInfoRequestType"] = reflect.TypeOf((*HostVStorageObjectRetrieveSnapshotInfoRequestType)(nil)).Elem() -} - -type HostVStorageObjectRetrieveSnapshotInfoResponse struct { - Returnval VStorageObjectSnapshotInfo `xml:"returnval"` -} - -type HostVStorageObjectRevertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` -} - -func init() { - t["HostVStorageObjectRevertRequestType"] = reflect.TypeOf((*HostVStorageObjectRevertRequestType)(nil)).Elem() -} - -type HostVStorageObjectRevert_Task HostVStorageObjectRevertRequestType - -func init() { - t["HostVStorageObjectRevert_Task"] = reflect.TypeOf((*HostVStorageObjectRevert_Task)(nil)).Elem() -} - -type HostVStorageObjectRevert_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HostVfatVolume struct { - HostFileSystemVolume -} - -func init() { - t["HostVfatVolume"] = reflect.TypeOf((*HostVfatVolume)(nil)).Elem() -} - -type HostVffsSpec struct { - DynamicData - - DevicePath string `xml:"devicePath"` - Partition *HostDiskPartitionSpec `xml:"partition,omitempty"` - MajorVersion int32 `xml:"majorVersion"` - VolumeName string `xml:"volumeName"` -} - -func init() { - t["HostVffsSpec"] = reflect.TypeOf((*HostVffsSpec)(nil)).Elem() -} - -type HostVffsVolume struct { - HostFileSystemVolume - - MajorVersion int32 `xml:"majorVersion"` - Version string `xml:"version"` - Uuid string `xml:"uuid"` - Extent []HostScsiDiskPartition `xml:"extent"` -} - -func init() { - t["HostVffsVolume"] = reflect.TypeOf((*HostVffsVolume)(nil)).Elem() -} - -type HostVirtualNic struct { - DynamicData - - Device string `xml:"device"` - Key string `xml:"key"` - Portgroup string `xml:"portgroup"` - Spec HostVirtualNicSpec `xml:"spec"` - Port string `xml:"port,omitempty"` -} - -func init() { - t["HostVirtualNic"] = reflect.TypeOf((*HostVirtualNic)(nil)).Elem() -} - -type HostVirtualNicConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Device string `xml:"device,omitempty"` - Portgroup string `xml:"portgroup"` - Spec *HostVirtualNicSpec `xml:"spec,omitempty"` -} - -func init() { - t["HostVirtualNicConfig"] = reflect.TypeOf((*HostVirtualNicConfig)(nil)).Elem() -} - -type HostVirtualNicConnection struct { - DynamicData - - Portgroup string `xml:"portgroup,omitempty"` - DvPort *DistributedVirtualSwitchPortConnection `xml:"dvPort,omitempty"` - OpNetwork *HostVirtualNicOpaqueNetworkSpec `xml:"opNetwork,omitempty"` -} - -func init() { - t["HostVirtualNicConnection"] = reflect.TypeOf((*HostVirtualNicConnection)(nil)).Elem() -} - -type HostVirtualNicIpRouteSpec struct { - DynamicData - - IpRouteConfig BaseHostIpRouteConfig `xml:"ipRouteConfig,omitempty,typeattr"` -} - -func init() { - t["HostVirtualNicIpRouteSpec"] = reflect.TypeOf((*HostVirtualNicIpRouteSpec)(nil)).Elem() -} - -type HostVirtualNicManagerInfo struct { - DynamicData - - NetConfig []VirtualNicManagerNetConfig `xml:"netConfig,omitempty"` -} - -func init() { - t["HostVirtualNicManagerInfo"] = reflect.TypeOf((*HostVirtualNicManagerInfo)(nil)).Elem() -} - -type HostVirtualNicManagerNicTypeSelection struct { - DynamicData - - Vnic HostVirtualNicConnection `xml:"vnic"` - NicType []string `xml:"nicType,omitempty"` -} - -func init() { - t["HostVirtualNicManagerNicTypeSelection"] = reflect.TypeOf((*HostVirtualNicManagerNicTypeSelection)(nil)).Elem() -} - -type HostVirtualNicOpaqueNetworkSpec struct { - DynamicData - - OpaqueNetworkId string `xml:"opaqueNetworkId"` - OpaqueNetworkType string `xml:"opaqueNetworkType"` -} - -func init() { - t["HostVirtualNicOpaqueNetworkSpec"] = reflect.TypeOf((*HostVirtualNicOpaqueNetworkSpec)(nil)).Elem() -} - -type HostVirtualNicSpec struct { - DynamicData - - Ip *HostIpConfig `xml:"ip,omitempty"` - Mac string `xml:"mac,omitempty"` - DistributedVirtualPort *DistributedVirtualSwitchPortConnection `xml:"distributedVirtualPort,omitempty"` - Portgroup string `xml:"portgroup,omitempty"` - Mtu int32 `xml:"mtu,omitempty"` - TsoEnabled *bool `xml:"tsoEnabled"` - NetStackInstanceKey string `xml:"netStackInstanceKey,omitempty"` - OpaqueNetwork *HostVirtualNicOpaqueNetworkSpec `xml:"opaqueNetwork,omitempty"` - ExternalId string `xml:"externalId,omitempty"` - PinnedPnic string `xml:"pinnedPnic,omitempty"` - IpRouteSpec *HostVirtualNicIpRouteSpec `xml:"ipRouteSpec,omitempty"` - SystemOwned *bool `xml:"systemOwned"` - DpuId string `xml:"dpuId,omitempty"` -} - -func init() { - t["HostVirtualNicSpec"] = reflect.TypeOf((*HostVirtualNicSpec)(nil)).Elem() -} - -type HostVirtualSwitch struct { - DynamicData - - Name string `xml:"name"` - Key string `xml:"key"` - NumPorts int32 `xml:"numPorts"` - NumPortsAvailable int32 `xml:"numPortsAvailable"` - Mtu int32 `xml:"mtu,omitempty"` - Portgroup []string `xml:"portgroup,omitempty"` - Pnic []string `xml:"pnic,omitempty"` - Spec HostVirtualSwitchSpec `xml:"spec"` -} - -func init() { - t["HostVirtualSwitch"] = reflect.TypeOf((*HostVirtualSwitch)(nil)).Elem() -} - -type HostVirtualSwitchAutoBridge struct { - HostVirtualSwitchBridge - - ExcludedNicDevice []string `xml:"excludedNicDevice,omitempty"` -} - -func init() { - t["HostVirtualSwitchAutoBridge"] = reflect.TypeOf((*HostVirtualSwitchAutoBridge)(nil)).Elem() -} - -type HostVirtualSwitchBeaconConfig struct { - DynamicData - - Interval int32 `xml:"interval"` -} - -func init() { - t["HostVirtualSwitchBeaconConfig"] = reflect.TypeOf((*HostVirtualSwitchBeaconConfig)(nil)).Elem() -} - -type HostVirtualSwitchBondBridge struct { - HostVirtualSwitchBridge - - NicDevice []string `xml:"nicDevice"` - Beacon *HostVirtualSwitchBeaconConfig `xml:"beacon,omitempty"` - LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` -} - -func init() { - t["HostVirtualSwitchBondBridge"] = reflect.TypeOf((*HostVirtualSwitchBondBridge)(nil)).Elem() -} - -type HostVirtualSwitchBridge struct { - DynamicData -} - -func init() { - t["HostVirtualSwitchBridge"] = reflect.TypeOf((*HostVirtualSwitchBridge)(nil)).Elem() -} - -type HostVirtualSwitchConfig struct { - DynamicData - - ChangeOperation string `xml:"changeOperation,omitempty"` - Name string `xml:"name"` - Spec *HostVirtualSwitchSpec `xml:"spec,omitempty"` -} - -func init() { - t["HostVirtualSwitchConfig"] = reflect.TypeOf((*HostVirtualSwitchConfig)(nil)).Elem() -} - -type HostVirtualSwitchSimpleBridge struct { - HostVirtualSwitchBridge - - NicDevice string `xml:"nicDevice"` -} - -func init() { - t["HostVirtualSwitchSimpleBridge"] = reflect.TypeOf((*HostVirtualSwitchSimpleBridge)(nil)).Elem() -} - -type HostVirtualSwitchSpec struct { - DynamicData - - NumPorts int32 `xml:"numPorts"` - Bridge BaseHostVirtualSwitchBridge `xml:"bridge,omitempty,typeattr"` - Policy *HostNetworkPolicy `xml:"policy,omitempty"` - Mtu int32 `xml:"mtu,omitempty"` -} - -func init() { - t["HostVirtualSwitchSpec"] = reflect.TypeOf((*HostVirtualSwitchSpec)(nil)).Elem() -} - -type HostVmciAccessManagerAccessSpec struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - Services []string `xml:"services,omitempty"` - Mode string `xml:"mode"` -} - -func init() { - t["HostVmciAccessManagerAccessSpec"] = reflect.TypeOf((*HostVmciAccessManagerAccessSpec)(nil)).Elem() -} - -type HostVmfsRescanResult struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HostVmfsRescanResult"] = reflect.TypeOf((*HostVmfsRescanResult)(nil)).Elem() -} - -type HostVmfsSpec struct { - DynamicData - - Extent HostScsiDiskPartition `xml:"extent"` - BlockSizeMb int32 `xml:"blockSizeMb,omitempty"` - MajorVersion int32 `xml:"majorVersion"` - VolumeName string `xml:"volumeName"` - BlockSize int32 `xml:"blockSize,omitempty"` - UnmapGranularity int32 `xml:"unmapGranularity,omitempty"` - UnmapPriority string `xml:"unmapPriority,omitempty"` - UnmapBandwidthSpec *VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec,omitempty"` -} - -func init() { - t["HostVmfsSpec"] = reflect.TypeOf((*HostVmfsSpec)(nil)).Elem() -} - -type HostVmfsVolume struct { - HostFileSystemVolume - - BlockSizeMb int32 `xml:"blockSizeMb"` - BlockSize int32 `xml:"blockSize,omitempty"` - UnmapGranularity int32 `xml:"unmapGranularity,omitempty"` - UnmapPriority string `xml:"unmapPriority,omitempty"` - UnmapBandwidthSpec *VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec,omitempty"` - MaxBlocks int32 `xml:"maxBlocks"` - MajorVersion int32 `xml:"majorVersion"` - Version string `xml:"version"` - Uuid string `xml:"uuid"` - Extent []HostScsiDiskPartition `xml:"extent"` - VmfsUpgradable bool `xml:"vmfsUpgradable"` - ForceMountedInfo *HostForceMountedInfo `xml:"forceMountedInfo,omitempty"` - Ssd *bool `xml:"ssd"` - Local *bool `xml:"local"` - ScsiDiskType string `xml:"scsiDiskType,omitempty"` -} - -func init() { - t["HostVmfsVolume"] = reflect.TypeOf((*HostVmfsVolume)(nil)).Elem() -} - -type HostVnicConnectedToCustomizedDVPortEvent struct { - HostEvent - - Vnic VnicPortArgument `xml:"vnic"` - PrevPortKey string `xml:"prevPortKey,omitempty"` -} - -func init() { - t["HostVnicConnectedToCustomizedDVPortEvent"] = reflect.TypeOf((*HostVnicConnectedToCustomizedDVPortEvent)(nil)).Elem() -} - -type HostVsanInternalSystemCmmdsQuery struct { - DynamicData - - Type string `xml:"type,omitempty"` - Uuid string `xml:"uuid,omitempty"` - Owner string `xml:"owner,omitempty"` -} - -func init() { - t["HostVsanInternalSystemCmmdsQuery"] = reflect.TypeOf((*HostVsanInternalSystemCmmdsQuery)(nil)).Elem() -} - -type HostVsanInternalSystemDeleteVsanObjectsResult struct { - DynamicData - - Uuid string `xml:"uuid"` - Success bool `xml:"success"` - FailureReason []LocalizableMessage `xml:"failureReason,omitempty"` -} - -func init() { - t["HostVsanInternalSystemDeleteVsanObjectsResult"] = reflect.TypeOf((*HostVsanInternalSystemDeleteVsanObjectsResult)(nil)).Elem() -} - -type HostVsanInternalSystemVsanObjectOperationResult struct { - DynamicData - - Uuid string `xml:"uuid"` - FailureReason []LocalizableMessage `xml:"failureReason,omitempty"` -} - -func init() { - t["HostVsanInternalSystemVsanObjectOperationResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanObjectOperationResult)(nil)).Elem() -} - -type HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult struct { - DynamicData - - DiskUuid string `xml:"diskUuid"` - Success bool `xml:"success"` - FailureReason string `xml:"failureReason,omitempty"` -} - -func init() { - t["HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult"] = reflect.TypeOf((*HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult)(nil)).Elem() -} - -type HostVvolVolume struct { - HostFileSystemVolume - - ScId string `xml:"scId"` - HostPE []VVolHostPE `xml:"hostPE,omitempty"` - VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` - StorageArray []VASAStorageArray `xml:"storageArray,omitempty"` - ProtocolEndpointType string `xml:"protocolEndpointType,omitempty"` -} - -func init() { - t["HostVvolVolume"] = reflect.TypeOf((*HostVvolVolume)(nil)).Elem() -} - -type HostVvolVolumeSpecification struct { - DynamicData - - MaxSizeInMB int64 `xml:"maxSizeInMB"` - VolumeName string `xml:"volumeName"` - VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` - StorageArray []VASAStorageArray `xml:"storageArray,omitempty"` - Uuid string `xml:"uuid"` -} - -func init() { - t["HostVvolVolumeSpecification"] = reflect.TypeOf((*HostVvolVolumeSpecification)(nil)).Elem() -} - -type HostWwnChangedEvent struct { - HostEvent - - OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"` - OldPortWwns []int64 `xml:"oldPortWwns,omitempty"` - NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"` - NewPortWwns []int64 `xml:"newPortWwns,omitempty"` -} - -func init() { - t["HostWwnChangedEvent"] = reflect.TypeOf((*HostWwnChangedEvent)(nil)).Elem() -} - -type HostWwnConflictEvent struct { - HostEvent - - ConflictedVms []VmEventArgument `xml:"conflictedVms,omitempty"` - ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"` - Wwn int64 `xml:"wwn"` -} - -func init() { - t["HostWwnConflictEvent"] = reflect.TypeOf((*HostWwnConflictEvent)(nil)).Elem() -} - -type HotSnapshotMoveNotSupported struct { - SnapshotCopyNotSupported -} - -func init() { - t["HotSnapshotMoveNotSupported"] = reflect.TypeOf((*HotSnapshotMoveNotSupported)(nil)).Elem() -} - -type HotSnapshotMoveNotSupportedFault HotSnapshotMoveNotSupported - -func init() { - t["HotSnapshotMoveNotSupportedFault"] = reflect.TypeOf((*HotSnapshotMoveNotSupportedFault)(nil)).Elem() -} - -type HourlyTaskScheduler struct { - RecurrentTaskScheduler - - Minute int32 `xml:"minute"` -} - -func init() { - t["HourlyTaskScheduler"] = reflect.TypeOf((*HourlyTaskScheduler)(nil)).Elem() -} - -type HttpFault struct { - VimFault - - StatusCode int32 `xml:"statusCode"` - StatusMessage string `xml:"statusMessage"` -} - -func init() { - t["HttpFault"] = reflect.TypeOf((*HttpFault)(nil)).Elem() -} - -type HttpFaultFault HttpFault - -func init() { - t["HttpFaultFault"] = reflect.TypeOf((*HttpFaultFault)(nil)).Elem() -} - -type HttpNfcLeaseAbort HttpNfcLeaseAbortRequestType - -func init() { - t["HttpNfcLeaseAbort"] = reflect.TypeOf((*HttpNfcLeaseAbort)(nil)).Elem() -} - -type HttpNfcLeaseAbortRequestType struct { - This ManagedObjectReference `xml:"_this"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["HttpNfcLeaseAbortRequestType"] = reflect.TypeOf((*HttpNfcLeaseAbortRequestType)(nil)).Elem() -} - -type HttpNfcLeaseAbortResponse struct { -} - -type HttpNfcLeaseCapabilities struct { - DynamicData - - PullModeSupported bool `xml:"pullModeSupported"` - CorsSupported bool `xml:"corsSupported"` -} - -func init() { - t["HttpNfcLeaseCapabilities"] = reflect.TypeOf((*HttpNfcLeaseCapabilities)(nil)).Elem() -} - -type HttpNfcLeaseComplete HttpNfcLeaseCompleteRequestType - -func init() { - t["HttpNfcLeaseComplete"] = reflect.TypeOf((*HttpNfcLeaseComplete)(nil)).Elem() -} - -type HttpNfcLeaseCompleteRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HttpNfcLeaseCompleteRequestType"] = reflect.TypeOf((*HttpNfcLeaseCompleteRequestType)(nil)).Elem() -} - -type HttpNfcLeaseCompleteResponse struct { -} - -type HttpNfcLeaseDatastoreLeaseInfo struct { - DynamicData - - DatastoreKey string `xml:"datastoreKey"` - Hosts []HttpNfcLeaseHostInfo `xml:"hosts"` -} - -func init() { - t["HttpNfcLeaseDatastoreLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseDatastoreLeaseInfo)(nil)).Elem() -} - -type HttpNfcLeaseDeviceUrl struct { - DynamicData - - Key string `xml:"key"` - ImportKey string `xml:"importKey"` - Url string `xml:"url"` - SslThumbprint string `xml:"sslThumbprint"` - Disk *bool `xml:"disk"` - TargetId string `xml:"targetId,omitempty"` - DatastoreKey string `xml:"datastoreKey,omitempty"` - FileSize int64 `xml:"fileSize,omitempty"` -} - -func init() { - t["HttpNfcLeaseDeviceUrl"] = reflect.TypeOf((*HttpNfcLeaseDeviceUrl)(nil)).Elem() -} - -type HttpNfcLeaseGetManifest HttpNfcLeaseGetManifestRequestType - -func init() { - t["HttpNfcLeaseGetManifest"] = reflect.TypeOf((*HttpNfcLeaseGetManifest)(nil)).Elem() -} - -type HttpNfcLeaseGetManifestRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["HttpNfcLeaseGetManifestRequestType"] = reflect.TypeOf((*HttpNfcLeaseGetManifestRequestType)(nil)).Elem() -} - -type HttpNfcLeaseGetManifestResponse struct { - Returnval []HttpNfcLeaseManifestEntry `xml:"returnval,omitempty"` -} - -type HttpNfcLeaseHostInfo struct { - DynamicData - - Url string `xml:"url"` - SslThumbprint string `xml:"sslThumbprint"` -} - -func init() { - t["HttpNfcLeaseHostInfo"] = reflect.TypeOf((*HttpNfcLeaseHostInfo)(nil)).Elem() -} - -type HttpNfcLeaseInfo struct { - DynamicData - - Lease ManagedObjectReference `xml:"lease"` - Entity ManagedObjectReference `xml:"entity"` - DeviceUrl []HttpNfcLeaseDeviceUrl `xml:"deviceUrl,omitempty"` - TotalDiskCapacityInKB int64 `xml:"totalDiskCapacityInKB"` - LeaseTimeout int32 `xml:"leaseTimeout"` - HostMap []HttpNfcLeaseDatastoreLeaseInfo `xml:"hostMap,omitempty"` -} - -func init() { - t["HttpNfcLeaseInfo"] = reflect.TypeOf((*HttpNfcLeaseInfo)(nil)).Elem() -} - -type HttpNfcLeaseManifestEntry struct { - DynamicData - - Key string `xml:"key"` - Sha1 string `xml:"sha1"` - Checksum string `xml:"checksum,omitempty"` - ChecksumType string `xml:"checksumType,omitempty"` - Size int64 `xml:"size"` - Disk bool `xml:"disk"` - Capacity int64 `xml:"capacity,omitempty"` - PopulatedSize int64 `xml:"populatedSize,omitempty"` -} - -func init() { - t["HttpNfcLeaseManifestEntry"] = reflect.TypeOf((*HttpNfcLeaseManifestEntry)(nil)).Elem() -} - -type HttpNfcLeaseProbeResult struct { - DynamicData - - ServerAccessible bool `xml:"serverAccessible"` -} - -func init() { - t["HttpNfcLeaseProbeResult"] = reflect.TypeOf((*HttpNfcLeaseProbeResult)(nil)).Elem() -} - -type HttpNfcLeaseProbeUrls HttpNfcLeaseProbeUrlsRequestType - -func init() { - t["HttpNfcLeaseProbeUrls"] = reflect.TypeOf((*HttpNfcLeaseProbeUrls)(nil)).Elem() -} - -type HttpNfcLeaseProbeUrlsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Files []HttpNfcLeaseSourceFile `xml:"files,omitempty"` - Timeout int32 `xml:"timeout,omitempty"` -} - -func init() { - t["HttpNfcLeaseProbeUrlsRequestType"] = reflect.TypeOf((*HttpNfcLeaseProbeUrlsRequestType)(nil)).Elem() -} - -type HttpNfcLeaseProbeUrlsResponse struct { - Returnval []HttpNfcLeaseProbeResult `xml:"returnval,omitempty"` -} - -type HttpNfcLeaseProgress HttpNfcLeaseProgressRequestType - -func init() { - t["HttpNfcLeaseProgress"] = reflect.TypeOf((*HttpNfcLeaseProgress)(nil)).Elem() -} - -type HttpNfcLeaseProgressRequestType struct { - This ManagedObjectReference `xml:"_this"` - Percent int32 `xml:"percent"` -} - -func init() { - t["HttpNfcLeaseProgressRequestType"] = reflect.TypeOf((*HttpNfcLeaseProgressRequestType)(nil)).Elem() -} - -type HttpNfcLeaseProgressResponse struct { -} - -type HttpNfcLeasePullFromUrlsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Files []HttpNfcLeaseSourceFile `xml:"files,omitempty"` -} - -func init() { - t["HttpNfcLeasePullFromUrlsRequestType"] = reflect.TypeOf((*HttpNfcLeasePullFromUrlsRequestType)(nil)).Elem() -} - -type HttpNfcLeasePullFromUrls_Task HttpNfcLeasePullFromUrlsRequestType - -func init() { - t["HttpNfcLeasePullFromUrls_Task"] = reflect.TypeOf((*HttpNfcLeasePullFromUrls_Task)(nil)).Elem() -} - -type HttpNfcLeasePullFromUrls_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type HttpNfcLeaseSetManifestChecksumType HttpNfcLeaseSetManifestChecksumTypeRequestType - -func init() { - t["HttpNfcLeaseSetManifestChecksumType"] = reflect.TypeOf((*HttpNfcLeaseSetManifestChecksumType)(nil)).Elem() -} - -type HttpNfcLeaseSetManifestChecksumTypeRequestType struct { - This ManagedObjectReference `xml:"_this"` - DeviceUrlsToChecksumTypes []KeyValue `xml:"deviceUrlsToChecksumTypes,omitempty"` -} - -func init() { - t["HttpNfcLeaseSetManifestChecksumTypeRequestType"] = reflect.TypeOf((*HttpNfcLeaseSetManifestChecksumTypeRequestType)(nil)).Elem() -} - -type HttpNfcLeaseSetManifestChecksumTypeResponse struct { -} - -type HttpNfcLeaseSourceFile struct { - DynamicData - - TargetDeviceId string `xml:"targetDeviceId"` - Url string `xml:"url"` - MemberName string `xml:"memberName,omitempty"` - Create bool `xml:"create"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - HttpHeaders []KeyValue `xml:"httpHeaders,omitempty"` - Size int64 `xml:"size,omitempty"` -} - -func init() { - t["HttpNfcLeaseSourceFile"] = reflect.TypeOf((*HttpNfcLeaseSourceFile)(nil)).Elem() -} - -type ID struct { - DynamicData - - Id string `xml:"id"` -} - -func init() { - t["ID"] = reflect.TypeOf((*ID)(nil)).Elem() -} - -type IDEDiskNotSupported struct { - DiskNotSupported -} - -func init() { - t["IDEDiskNotSupported"] = reflect.TypeOf((*IDEDiskNotSupported)(nil)).Elem() -} - -type IDEDiskNotSupportedFault IDEDiskNotSupported - -func init() { - t["IDEDiskNotSupportedFault"] = reflect.TypeOf((*IDEDiskNotSupportedFault)(nil)).Elem() -} - -type IORMNotSupportedHostOnDatastore struct { - VimFault - - Datastore ManagedObjectReference `xml:"datastore"` - DatastoreName string `xml:"datastoreName"` - Host []ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["IORMNotSupportedHostOnDatastore"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastore)(nil)).Elem() -} - -type IORMNotSupportedHostOnDatastoreFault IORMNotSupportedHostOnDatastore - -func init() { - t["IORMNotSupportedHostOnDatastoreFault"] = reflect.TypeOf((*IORMNotSupportedHostOnDatastoreFault)(nil)).Elem() -} - -type IScsiBootFailureEvent struct { - HostEvent -} - -func init() { - t["IScsiBootFailureEvent"] = reflect.TypeOf((*IScsiBootFailureEvent)(nil)).Elem() -} - -type ImpersonateUser ImpersonateUserRequestType - -func init() { - t["ImpersonateUser"] = reflect.TypeOf((*ImpersonateUser)(nil)).Elem() -} - -type ImpersonateUserRequestType struct { - This ManagedObjectReference `xml:"_this"` - UserName string `xml:"userName"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["ImpersonateUserRequestType"] = reflect.TypeOf((*ImpersonateUserRequestType)(nil)).Elem() -} - -type ImpersonateUserResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type ImportCertificateForCAMRequestType struct { - This ManagedObjectReference `xml:"_this"` - CertPath string `xml:"certPath"` - CamServer string `xml:"camServer"` -} - -func init() { - t["ImportCertificateForCAMRequestType"] = reflect.TypeOf((*ImportCertificateForCAMRequestType)(nil)).Elem() -} - -type ImportCertificateForCAM_Task ImportCertificateForCAMRequestType - -func init() { - t["ImportCertificateForCAM_Task"] = reflect.TypeOf((*ImportCertificateForCAM_Task)(nil)).Elem() -} - -type ImportCertificateForCAM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ImportHostAddFailure struct { - DvsFault - - HostIp []string `xml:"hostIp"` -} - -func init() { - t["ImportHostAddFailure"] = reflect.TypeOf((*ImportHostAddFailure)(nil)).Elem() -} - -type ImportHostAddFailureFault ImportHostAddFailure - -func init() { - t["ImportHostAddFailureFault"] = reflect.TypeOf((*ImportHostAddFailureFault)(nil)).Elem() -} - -type ImportOperationBulkFault struct { - DvsFault - - ImportFaults []ImportOperationBulkFaultFaultOnImport `xml:"importFaults"` -} - -func init() { - t["ImportOperationBulkFault"] = reflect.TypeOf((*ImportOperationBulkFault)(nil)).Elem() -} - -type ImportOperationBulkFaultFault ImportOperationBulkFault - -func init() { - t["ImportOperationBulkFaultFault"] = reflect.TypeOf((*ImportOperationBulkFaultFault)(nil)).Elem() -} - -type ImportOperationBulkFaultFaultOnImport struct { - DynamicData - - EntityType string `xml:"entityType,omitempty"` - Key string `xml:"key,omitempty"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["ImportOperationBulkFaultFaultOnImport"] = reflect.TypeOf((*ImportOperationBulkFaultFaultOnImport)(nil)).Elem() -} - -type ImportSpec struct { - DynamicData - - EntityConfig *VAppEntityConfigInfo `xml:"entityConfig,omitempty"` - InstantiationOst *OvfConsumerOstNode `xml:"instantiationOst,omitempty"` -} - -func init() { - t["ImportSpec"] = reflect.TypeOf((*ImportSpec)(nil)).Elem() -} - -type ImportUnmanagedSnapshot ImportUnmanagedSnapshotRequestType - -func init() { - t["ImportUnmanagedSnapshot"] = reflect.TypeOf((*ImportUnmanagedSnapshot)(nil)).Elem() -} - -type ImportUnmanagedSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vdisk string `xml:"vdisk"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - VvolId string `xml:"vvolId"` -} - -func init() { - t["ImportUnmanagedSnapshotRequestType"] = reflect.TypeOf((*ImportUnmanagedSnapshotRequestType)(nil)).Elem() -} - -type ImportUnmanagedSnapshotResponse struct { -} - -type ImportVApp ImportVAppRequestType - -func init() { - t["ImportVApp"] = reflect.TypeOf((*ImportVApp)(nil)).Elem() -} - -type ImportVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseImportSpec `xml:"spec,typeattr"` - Folder *ManagedObjectReference `xml:"folder,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["ImportVAppRequestType"] = reflect.TypeOf((*ImportVAppRequestType)(nil)).Elem() -} - -type ImportVAppResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InUseFeatureManipulationDisallowed struct { - NotEnoughLicenses -} - -func init() { - t["InUseFeatureManipulationDisallowed"] = reflect.TypeOf((*InUseFeatureManipulationDisallowed)(nil)).Elem() -} - -type InUseFeatureManipulationDisallowedFault InUseFeatureManipulationDisallowed - -func init() { - t["InUseFeatureManipulationDisallowedFault"] = reflect.TypeOf((*InUseFeatureManipulationDisallowedFault)(nil)).Elem() -} - -type InaccessibleDatastore struct { - InvalidDatastore - - Detail string `xml:"detail,omitempty"` -} - -func init() { - t["InaccessibleDatastore"] = reflect.TypeOf((*InaccessibleDatastore)(nil)).Elem() -} - -type InaccessibleDatastoreFault BaseInaccessibleDatastore - -func init() { - t["InaccessibleDatastoreFault"] = reflect.TypeOf((*InaccessibleDatastoreFault)(nil)).Elem() -} - -type InaccessibleFTMetadataDatastore struct { - InaccessibleDatastore -} - -func init() { - t["InaccessibleFTMetadataDatastore"] = reflect.TypeOf((*InaccessibleFTMetadataDatastore)(nil)).Elem() -} - -type InaccessibleFTMetadataDatastoreFault InaccessibleFTMetadataDatastore - -func init() { - t["InaccessibleFTMetadataDatastoreFault"] = reflect.TypeOf((*InaccessibleFTMetadataDatastoreFault)(nil)).Elem() -} - -type InaccessibleVFlashSource struct { - VimFault - - HostName string `xml:"hostName"` -} - -func init() { - t["InaccessibleVFlashSource"] = reflect.TypeOf((*InaccessibleVFlashSource)(nil)).Elem() -} - -type InaccessibleVFlashSourceFault InaccessibleVFlashSource - -func init() { - t["InaccessibleVFlashSourceFault"] = reflect.TypeOf((*InaccessibleVFlashSourceFault)(nil)).Elem() -} - -type IncompatibleDefaultDevice struct { - MigrationFault - - Device string `xml:"device"` -} - -func init() { - t["IncompatibleDefaultDevice"] = reflect.TypeOf((*IncompatibleDefaultDevice)(nil)).Elem() -} - -type IncompatibleDefaultDeviceFault IncompatibleDefaultDevice - -func init() { - t["IncompatibleDefaultDeviceFault"] = reflect.TypeOf((*IncompatibleDefaultDeviceFault)(nil)).Elem() -} - -type IncompatibleHostForFtSecondary struct { - VmFaultToleranceIssue - - Host ManagedObjectReference `xml:"host"` - Error []LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["IncompatibleHostForFtSecondary"] = reflect.TypeOf((*IncompatibleHostForFtSecondary)(nil)).Elem() -} - -type IncompatibleHostForFtSecondaryFault IncompatibleHostForFtSecondary - -func init() { - t["IncompatibleHostForFtSecondaryFault"] = reflect.TypeOf((*IncompatibleHostForFtSecondaryFault)(nil)).Elem() -} - -type IncompatibleHostForVmReplication struct { - ReplicationFault - - VmName string `xml:"vmName"` - HostName string `xml:"hostName"` - Reason string `xml:"reason"` -} - -func init() { - t["IncompatibleHostForVmReplication"] = reflect.TypeOf((*IncompatibleHostForVmReplication)(nil)).Elem() -} - -type IncompatibleHostForVmReplicationFault IncompatibleHostForVmReplication - -func init() { - t["IncompatibleHostForVmReplicationFault"] = reflect.TypeOf((*IncompatibleHostForVmReplicationFault)(nil)).Elem() -} - -type IncompatibleSetting struct { - InvalidArgument - - ConflictingProperty string `xml:"conflictingProperty"` -} - -func init() { - t["IncompatibleSetting"] = reflect.TypeOf((*IncompatibleSetting)(nil)).Elem() -} - -type IncompatibleSettingFault IncompatibleSetting - -func init() { - t["IncompatibleSettingFault"] = reflect.TypeOf((*IncompatibleSettingFault)(nil)).Elem() -} - -type IncorrectFileType struct { - FileFault -} - -func init() { - t["IncorrectFileType"] = reflect.TypeOf((*IncorrectFileType)(nil)).Elem() -} - -type IncorrectFileTypeFault IncorrectFileType - -func init() { - t["IncorrectFileTypeFault"] = reflect.TypeOf((*IncorrectFileTypeFault)(nil)).Elem() -} - -type IncorrectHostInformation struct { - NotEnoughLicenses -} - -func init() { - t["IncorrectHostInformation"] = reflect.TypeOf((*IncorrectHostInformation)(nil)).Elem() -} - -type IncorrectHostInformationEvent struct { - LicenseEvent -} - -func init() { - t["IncorrectHostInformationEvent"] = reflect.TypeOf((*IncorrectHostInformationEvent)(nil)).Elem() -} - -type IncorrectHostInformationFault IncorrectHostInformation - -func init() { - t["IncorrectHostInformationFault"] = reflect.TypeOf((*IncorrectHostInformationFault)(nil)).Elem() -} - -type IndependentDiskVMotionNotSupported struct { - MigrationFeatureNotSupported -} - -func init() { - t["IndependentDiskVMotionNotSupported"] = reflect.TypeOf((*IndependentDiskVMotionNotSupported)(nil)).Elem() -} - -type IndependentDiskVMotionNotSupportedFault IndependentDiskVMotionNotSupported - -func init() { - t["IndependentDiskVMotionNotSupportedFault"] = reflect.TypeOf((*IndependentDiskVMotionNotSupportedFault)(nil)).Elem() -} - -type InflateDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["InflateDiskRequestType"] = reflect.TypeOf((*InflateDiskRequestType)(nil)).Elem() -} - -type InflateDisk_Task InflateDiskRequestType - -func init() { - t["InflateDisk_Task"] = reflect.TypeOf((*InflateDisk_Task)(nil)).Elem() -} - -type InflateDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InflateVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["InflateVirtualDiskRequestType"] = reflect.TypeOf((*InflateVirtualDiskRequestType)(nil)).Elem() -} - -type InflateVirtualDisk_Task InflateVirtualDiskRequestType - -func init() { - t["InflateVirtualDisk_Task"] = reflect.TypeOf((*InflateVirtualDisk_Task)(nil)).Elem() -} - -type InflateVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InfoUpgradeEvent struct { - UpgradeEvent -} - -func init() { - t["InfoUpgradeEvent"] = reflect.TypeOf((*InfoUpgradeEvent)(nil)).Elem() -} - -type InheritablePolicy struct { - DynamicData - - Inherited bool `xml:"inherited"` -} - -func init() { - t["InheritablePolicy"] = reflect.TypeOf((*InheritablePolicy)(nil)).Elem() -} - -type InitializeDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mapping []VsanHostDiskMapping `xml:"mapping"` -} - -func init() { - t["InitializeDisksRequestType"] = reflect.TypeOf((*InitializeDisksRequestType)(nil)).Elem() -} - -type InitializeDisks_Task InitializeDisksRequestType - -func init() { - t["InitializeDisks_Task"] = reflect.TypeOf((*InitializeDisks_Task)(nil)).Elem() -} - -type InitializeDisks_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InitiateFileTransferFromGuest InitiateFileTransferFromGuestRequestType - -func init() { - t["InitiateFileTransferFromGuest"] = reflect.TypeOf((*InitiateFileTransferFromGuest)(nil)).Elem() -} - -type InitiateFileTransferFromGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - GuestFilePath string `xml:"guestFilePath"` -} - -func init() { - t["InitiateFileTransferFromGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferFromGuestRequestType)(nil)).Elem() -} - -type InitiateFileTransferFromGuestResponse struct { - Returnval FileTransferInformation `xml:"returnval"` -} - -type InitiateFileTransferToGuest InitiateFileTransferToGuestRequestType - -func init() { - t["InitiateFileTransferToGuest"] = reflect.TypeOf((*InitiateFileTransferToGuest)(nil)).Elem() -} - -type InitiateFileTransferToGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - GuestFilePath string `xml:"guestFilePath"` - FileAttributes BaseGuestFileAttributes `xml:"fileAttributes,typeattr"` - FileSize int64 `xml:"fileSize"` - Overwrite bool `xml:"overwrite"` -} - -func init() { - t["InitiateFileTransferToGuestRequestType"] = reflect.TypeOf((*InitiateFileTransferToGuestRequestType)(nil)).Elem() -} - -type InitiateFileTransferToGuestResponse struct { - Returnval string `xml:"returnval"` -} - -type InstallHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - Repository HostPatchManagerLocator `xml:"repository"` - UpdateID string `xml:"updateID"` - Force *bool `xml:"force"` -} - -func init() { - t["InstallHostPatchRequestType"] = reflect.TypeOf((*InstallHostPatchRequestType)(nil)).Elem() -} - -type InstallHostPatchV2RequestType struct { - This ManagedObjectReference `xml:"_this"` - MetaUrls []string `xml:"metaUrls,omitempty"` - BundleUrls []string `xml:"bundleUrls,omitempty"` - VibUrls []string `xml:"vibUrls,omitempty"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["InstallHostPatchV2RequestType"] = reflect.TypeOf((*InstallHostPatchV2RequestType)(nil)).Elem() -} - -type InstallHostPatchV2_Task InstallHostPatchV2RequestType - -func init() { - t["InstallHostPatchV2_Task"] = reflect.TypeOf((*InstallHostPatchV2_Task)(nil)).Elem() -} - -type InstallHostPatchV2_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InstallHostPatch_Task InstallHostPatchRequestType - -func init() { - t["InstallHostPatch_Task"] = reflect.TypeOf((*InstallHostPatch_Task)(nil)).Elem() -} - -type InstallHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InstallIoFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - VibUrl string `xml:"vibUrl"` - CompRes ManagedObjectReference `xml:"compRes"` -} - -func init() { - t["InstallIoFilterRequestType"] = reflect.TypeOf((*InstallIoFilterRequestType)(nil)).Elem() -} - -type InstallIoFilter_Task InstallIoFilterRequestType - -func init() { - t["InstallIoFilter_Task"] = reflect.TypeOf((*InstallIoFilter_Task)(nil)).Elem() -} - -type InstallIoFilter_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InstallServerCertificate InstallServerCertificateRequestType - -func init() { - t["InstallServerCertificate"] = reflect.TypeOf((*InstallServerCertificate)(nil)).Elem() -} - -type InstallServerCertificateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cert string `xml:"cert"` -} - -func init() { - t["InstallServerCertificateRequestType"] = reflect.TypeOf((*InstallServerCertificateRequestType)(nil)).Elem() -} - -type InstallServerCertificateResponse struct { -} - -type InstallSmartCardTrustAnchor InstallSmartCardTrustAnchorRequestType - -func init() { - t["InstallSmartCardTrustAnchor"] = reflect.TypeOf((*InstallSmartCardTrustAnchor)(nil)).Elem() -} - -type InstallSmartCardTrustAnchorRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cert string `xml:"cert"` -} - -func init() { - t["InstallSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*InstallSmartCardTrustAnchorRequestType)(nil)).Elem() -} - -type InstallSmartCardTrustAnchorResponse struct { -} - -type InstantCloneRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VirtualMachineInstantCloneSpec `xml:"spec"` -} - -func init() { - t["InstantCloneRequestType"] = reflect.TypeOf((*InstantCloneRequestType)(nil)).Elem() -} - -type InstantClone_Task InstantCloneRequestType - -func init() { - t["InstantClone_Task"] = reflect.TypeOf((*InstantClone_Task)(nil)).Elem() -} - -type InstantClone_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InsufficientAgentVmsDeployed struct { - InsufficientResourcesFault - - HostName string `xml:"hostName"` - RequiredNumAgentVms int32 `xml:"requiredNumAgentVms"` - CurrentNumAgentVms int32 `xml:"currentNumAgentVms"` -} - -func init() { - t["InsufficientAgentVmsDeployed"] = reflect.TypeOf((*InsufficientAgentVmsDeployed)(nil)).Elem() -} - -type InsufficientAgentVmsDeployedFault InsufficientAgentVmsDeployed - -func init() { - t["InsufficientAgentVmsDeployedFault"] = reflect.TypeOf((*InsufficientAgentVmsDeployedFault)(nil)).Elem() -} - -type InsufficientCpuResourcesFault struct { - InsufficientResourcesFault - - Unreserved int64 `xml:"unreserved"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientCpuResourcesFault"] = reflect.TypeOf((*InsufficientCpuResourcesFault)(nil)).Elem() -} - -type InsufficientCpuResourcesFaultFault InsufficientCpuResourcesFault - -func init() { - t["InsufficientCpuResourcesFaultFault"] = reflect.TypeOf((*InsufficientCpuResourcesFaultFault)(nil)).Elem() -} - -type InsufficientDisks struct { - VsanDiskFault -} - -func init() { - t["InsufficientDisks"] = reflect.TypeOf((*InsufficientDisks)(nil)).Elem() -} - -type InsufficientDisksFault InsufficientDisks - -func init() { - t["InsufficientDisksFault"] = reflect.TypeOf((*InsufficientDisksFault)(nil)).Elem() -} - -type InsufficientFailoverResourcesEvent struct { - ClusterEvent -} - -func init() { - t["InsufficientFailoverResourcesEvent"] = reflect.TypeOf((*InsufficientFailoverResourcesEvent)(nil)).Elem() -} - -type InsufficientFailoverResourcesFault struct { - InsufficientResourcesFault -} - -func init() { - t["InsufficientFailoverResourcesFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFault)(nil)).Elem() -} - -type InsufficientFailoverResourcesFaultFault InsufficientFailoverResourcesFault - -func init() { - t["InsufficientFailoverResourcesFaultFault"] = reflect.TypeOf((*InsufficientFailoverResourcesFaultFault)(nil)).Elem() -} - -type InsufficientGraphicsResourcesFault struct { - InsufficientResourcesFault -} - -func init() { - t["InsufficientGraphicsResourcesFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFault)(nil)).Elem() -} - -type InsufficientGraphicsResourcesFaultFault InsufficientGraphicsResourcesFault - -func init() { - t["InsufficientGraphicsResourcesFaultFault"] = reflect.TypeOf((*InsufficientGraphicsResourcesFaultFault)(nil)).Elem() -} - -type InsufficientHostCapacityFault struct { - InsufficientResourcesFault - - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["InsufficientHostCapacityFault"] = reflect.TypeOf((*InsufficientHostCapacityFault)(nil)).Elem() -} - -type InsufficientHostCapacityFaultFault BaseInsufficientHostCapacityFault - -func init() { - t["InsufficientHostCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCapacityFaultFault)(nil)).Elem() -} - -type InsufficientHostCpuCapacityFault struct { - InsufficientHostCapacityFault - - Unreserved int64 `xml:"unreserved"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientHostCpuCapacityFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFault)(nil)).Elem() -} - -type InsufficientHostCpuCapacityFaultFault InsufficientHostCpuCapacityFault - -func init() { - t["InsufficientHostCpuCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostCpuCapacityFaultFault)(nil)).Elem() -} - -type InsufficientHostMemoryCapacityFault struct { - InsufficientHostCapacityFault - - Unreserved int64 `xml:"unreserved"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientHostMemoryCapacityFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFault)(nil)).Elem() -} - -type InsufficientHostMemoryCapacityFaultFault InsufficientHostMemoryCapacityFault - -func init() { - t["InsufficientHostMemoryCapacityFaultFault"] = reflect.TypeOf((*InsufficientHostMemoryCapacityFaultFault)(nil)).Elem() -} - -type InsufficientMemoryResourcesFault struct { - InsufficientResourcesFault - - Unreserved int64 `xml:"unreserved"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientMemoryResourcesFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFault)(nil)).Elem() -} - -type InsufficientMemoryResourcesFaultFault InsufficientMemoryResourcesFault - -func init() { - t["InsufficientMemoryResourcesFaultFault"] = reflect.TypeOf((*InsufficientMemoryResourcesFaultFault)(nil)).Elem() -} - -type InsufficientNetworkCapacity struct { - InsufficientResourcesFault -} - -func init() { - t["InsufficientNetworkCapacity"] = reflect.TypeOf((*InsufficientNetworkCapacity)(nil)).Elem() -} - -type InsufficientNetworkCapacityFault InsufficientNetworkCapacity - -func init() { - t["InsufficientNetworkCapacityFault"] = reflect.TypeOf((*InsufficientNetworkCapacityFault)(nil)).Elem() -} - -type InsufficientNetworkResourcePoolCapacity struct { - InsufficientResourcesFault - - DvsName string `xml:"dvsName"` - DvsUuid string `xml:"dvsUuid"` - ResourcePoolKey string `xml:"resourcePoolKey"` - Available int64 `xml:"available"` - Requested int64 `xml:"requested"` - Device []string `xml:"device"` -} - -func init() { - t["InsufficientNetworkResourcePoolCapacity"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacity)(nil)).Elem() -} - -type InsufficientNetworkResourcePoolCapacityFault InsufficientNetworkResourcePoolCapacity - -func init() { - t["InsufficientNetworkResourcePoolCapacityFault"] = reflect.TypeOf((*InsufficientNetworkResourcePoolCapacityFault)(nil)).Elem() -} - -type InsufficientPerCpuCapacity struct { - InsufficientHostCapacityFault -} - -func init() { - t["InsufficientPerCpuCapacity"] = reflect.TypeOf((*InsufficientPerCpuCapacity)(nil)).Elem() -} - -type InsufficientPerCpuCapacityFault InsufficientPerCpuCapacity - -func init() { - t["InsufficientPerCpuCapacityFault"] = reflect.TypeOf((*InsufficientPerCpuCapacityFault)(nil)).Elem() -} - -type InsufficientResourcesFault struct { - VimFault -} - -func init() { - t["InsufficientResourcesFault"] = reflect.TypeOf((*InsufficientResourcesFault)(nil)).Elem() -} - -type InsufficientResourcesFaultFault BaseInsufficientResourcesFault - -func init() { - t["InsufficientResourcesFaultFault"] = reflect.TypeOf((*InsufficientResourcesFaultFault)(nil)).Elem() -} - -type InsufficientStandbyCpuResource struct { - InsufficientStandbyResource - - Available int64 `xml:"available"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientStandbyCpuResource"] = reflect.TypeOf((*InsufficientStandbyCpuResource)(nil)).Elem() -} - -type InsufficientStandbyCpuResourceFault InsufficientStandbyCpuResource - -func init() { - t["InsufficientStandbyCpuResourceFault"] = reflect.TypeOf((*InsufficientStandbyCpuResourceFault)(nil)).Elem() -} - -type InsufficientStandbyMemoryResource struct { - InsufficientStandbyResource - - Available int64 `xml:"available"` - Requested int64 `xml:"requested"` -} - -func init() { - t["InsufficientStandbyMemoryResource"] = reflect.TypeOf((*InsufficientStandbyMemoryResource)(nil)).Elem() -} - -type InsufficientStandbyMemoryResourceFault InsufficientStandbyMemoryResource - -func init() { - t["InsufficientStandbyMemoryResourceFault"] = reflect.TypeOf((*InsufficientStandbyMemoryResourceFault)(nil)).Elem() -} - -type InsufficientStandbyResource struct { - InsufficientResourcesFault -} - -func init() { - t["InsufficientStandbyResource"] = reflect.TypeOf((*InsufficientStandbyResource)(nil)).Elem() -} - -type InsufficientStandbyResourceFault BaseInsufficientStandbyResource - -func init() { - t["InsufficientStandbyResourceFault"] = reflect.TypeOf((*InsufficientStandbyResourceFault)(nil)).Elem() -} - -type InsufficientStorageIops struct { - VimFault - - UnreservedIops int64 `xml:"unreservedIops"` - RequestedIops int64 `xml:"requestedIops"` - DatastoreName string `xml:"datastoreName"` -} - -func init() { - t["InsufficientStorageIops"] = reflect.TypeOf((*InsufficientStorageIops)(nil)).Elem() -} - -type InsufficientStorageIopsFault InsufficientStorageIops - -func init() { - t["InsufficientStorageIopsFault"] = reflect.TypeOf((*InsufficientStorageIopsFault)(nil)).Elem() -} - -type InsufficientStorageSpace struct { - InsufficientResourcesFault -} - -func init() { - t["InsufficientStorageSpace"] = reflect.TypeOf((*InsufficientStorageSpace)(nil)).Elem() -} - -type InsufficientStorageSpaceFault InsufficientStorageSpace - -func init() { - t["InsufficientStorageSpaceFault"] = reflect.TypeOf((*InsufficientStorageSpaceFault)(nil)).Elem() -} - -type InsufficientVFlashResourcesFault struct { - InsufficientResourcesFault - - FreeSpaceInMB int64 `xml:"freeSpaceInMB,omitempty"` - FreeSpace int64 `xml:"freeSpace"` - RequestedSpaceInMB int64 `xml:"requestedSpaceInMB,omitempty"` - RequestedSpace int64 `xml:"requestedSpace"` -} - -func init() { - t["InsufficientVFlashResourcesFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFault)(nil)).Elem() -} - -type InsufficientVFlashResourcesFaultFault InsufficientVFlashResourcesFault - -func init() { - t["InsufficientVFlashResourcesFaultFault"] = reflect.TypeOf((*InsufficientVFlashResourcesFaultFault)(nil)).Elem() -} - -type IntExpression struct { - NegatableExpression - - Value int32 `xml:"value,omitempty"` -} - -func init() { - t["IntExpression"] = reflect.TypeOf((*IntExpression)(nil)).Elem() -} - -type IntOption struct { - OptionType - - Min int32 `xml:"min"` - Max int32 `xml:"max"` - DefaultValue int32 `xml:"defaultValue"` -} - -func init() { - t["IntOption"] = reflect.TypeOf((*IntOption)(nil)).Elem() -} - -type IntPolicy struct { - InheritablePolicy - - Value int32 `xml:"value,omitempty"` -} - -func init() { - t["IntPolicy"] = reflect.TypeOf((*IntPolicy)(nil)).Elem() -} - -type InvalidAffinitySettingFault struct { - VimFault -} - -func init() { - t["InvalidAffinitySettingFault"] = reflect.TypeOf((*InvalidAffinitySettingFault)(nil)).Elem() -} - -type InvalidAffinitySettingFaultFault InvalidAffinitySettingFault - -func init() { - t["InvalidAffinitySettingFaultFault"] = reflect.TypeOf((*InvalidAffinitySettingFaultFault)(nil)).Elem() -} - -type InvalidArgument struct { - RuntimeFault - - InvalidProperty string `xml:"invalidProperty,omitempty"` -} - -func init() { - t["InvalidArgument"] = reflect.TypeOf((*InvalidArgument)(nil)).Elem() -} - -type InvalidArgumentFault BaseInvalidArgument - -func init() { - t["InvalidArgumentFault"] = reflect.TypeOf((*InvalidArgumentFault)(nil)).Elem() -} - -type InvalidBmcRole struct { - VimFault -} - -func init() { - t["InvalidBmcRole"] = reflect.TypeOf((*InvalidBmcRole)(nil)).Elem() -} - -type InvalidBmcRoleFault InvalidBmcRole - -func init() { - t["InvalidBmcRoleFault"] = reflect.TypeOf((*InvalidBmcRoleFault)(nil)).Elem() -} - -type InvalidBundle struct { - PlatformConfigFault -} - -func init() { - t["InvalidBundle"] = reflect.TypeOf((*InvalidBundle)(nil)).Elem() -} - -type InvalidBundleFault InvalidBundle - -func init() { - t["InvalidBundleFault"] = reflect.TypeOf((*InvalidBundleFault)(nil)).Elem() -} - -type InvalidCAMCertificate struct { - InvalidCAMServer -} - -func init() { - t["InvalidCAMCertificate"] = reflect.TypeOf((*InvalidCAMCertificate)(nil)).Elem() -} - -type InvalidCAMCertificateFault InvalidCAMCertificate - -func init() { - t["InvalidCAMCertificateFault"] = reflect.TypeOf((*InvalidCAMCertificateFault)(nil)).Elem() -} - -type InvalidCAMServer struct { - ActiveDirectoryFault - - CamServer string `xml:"camServer"` -} - -func init() { - t["InvalidCAMServer"] = reflect.TypeOf((*InvalidCAMServer)(nil)).Elem() -} - -type InvalidCAMServerFault BaseInvalidCAMServer - -func init() { - t["InvalidCAMServerFault"] = reflect.TypeOf((*InvalidCAMServerFault)(nil)).Elem() -} - -type InvalidClientCertificate struct { - InvalidLogin -} - -func init() { - t["InvalidClientCertificate"] = reflect.TypeOf((*InvalidClientCertificate)(nil)).Elem() -} - -type InvalidClientCertificateFault InvalidClientCertificate - -func init() { - t["InvalidClientCertificateFault"] = reflect.TypeOf((*InvalidClientCertificateFault)(nil)).Elem() -} - -type InvalidCollectorVersion struct { - MethodFault -} - -func init() { - t["InvalidCollectorVersion"] = reflect.TypeOf((*InvalidCollectorVersion)(nil)).Elem() -} - -type InvalidCollectorVersionFault InvalidCollectorVersion - -func init() { - t["InvalidCollectorVersionFault"] = reflect.TypeOf((*InvalidCollectorVersionFault)(nil)).Elem() -} - -type InvalidController struct { - InvalidDeviceSpec - - ControllerKey int32 `xml:"controllerKey"` -} - -func init() { - t["InvalidController"] = reflect.TypeOf((*InvalidController)(nil)).Elem() -} - -type InvalidControllerFault InvalidController - -func init() { - t["InvalidControllerFault"] = reflect.TypeOf((*InvalidControllerFault)(nil)).Elem() -} - -type InvalidDasConfigArgument struct { - InvalidArgument - - Entry string `xml:"entry,omitempty"` - ClusterName string `xml:"clusterName,omitempty"` -} - -func init() { - t["InvalidDasConfigArgument"] = reflect.TypeOf((*InvalidDasConfigArgument)(nil)).Elem() -} - -type InvalidDasConfigArgumentFault InvalidDasConfigArgument - -func init() { - t["InvalidDasConfigArgumentFault"] = reflect.TypeOf((*InvalidDasConfigArgumentFault)(nil)).Elem() -} - -type InvalidDasRestartPriorityForFtVm struct { - InvalidArgument - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["InvalidDasRestartPriorityForFtVm"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVm)(nil)).Elem() -} - -type InvalidDasRestartPriorityForFtVmFault InvalidDasRestartPriorityForFtVm - -func init() { - t["InvalidDasRestartPriorityForFtVmFault"] = reflect.TypeOf((*InvalidDasRestartPriorityForFtVmFault)(nil)).Elem() -} - -type InvalidDatastore struct { - VimFault - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - Name string `xml:"name,omitempty"` -} - -func init() { - t["InvalidDatastore"] = reflect.TypeOf((*InvalidDatastore)(nil)).Elem() -} - -type InvalidDatastoreFault BaseInvalidDatastore - -func init() { - t["InvalidDatastoreFault"] = reflect.TypeOf((*InvalidDatastoreFault)(nil)).Elem() -} - -type InvalidDatastorePath struct { - InvalidDatastore - - DatastorePath string `xml:"datastorePath"` -} - -func init() { - t["InvalidDatastorePath"] = reflect.TypeOf((*InvalidDatastorePath)(nil)).Elem() -} - -type InvalidDatastorePathFault InvalidDatastorePath - -func init() { - t["InvalidDatastorePathFault"] = reflect.TypeOf((*InvalidDatastorePathFault)(nil)).Elem() -} - -type InvalidDatastoreState struct { - InvalidState - - DatastoreName string `xml:"datastoreName,omitempty"` -} - -func init() { - t["InvalidDatastoreState"] = reflect.TypeOf((*InvalidDatastoreState)(nil)).Elem() -} - -type InvalidDatastoreStateFault InvalidDatastoreState - -func init() { - t["InvalidDatastoreStateFault"] = reflect.TypeOf((*InvalidDatastoreStateFault)(nil)).Elem() -} - -type InvalidDeviceBacking struct { - InvalidDeviceSpec -} - -func init() { - t["InvalidDeviceBacking"] = reflect.TypeOf((*InvalidDeviceBacking)(nil)).Elem() -} - -type InvalidDeviceBackingFault InvalidDeviceBacking - -func init() { - t["InvalidDeviceBackingFault"] = reflect.TypeOf((*InvalidDeviceBackingFault)(nil)).Elem() -} - -type InvalidDeviceOperation struct { - InvalidDeviceSpec - - BadOp VirtualDeviceConfigSpecOperation `xml:"badOp,omitempty"` - BadFileOp VirtualDeviceConfigSpecFileOperation `xml:"badFileOp,omitempty"` -} - -func init() { - t["InvalidDeviceOperation"] = reflect.TypeOf((*InvalidDeviceOperation)(nil)).Elem() -} - -type InvalidDeviceOperationFault InvalidDeviceOperation - -func init() { - t["InvalidDeviceOperationFault"] = reflect.TypeOf((*InvalidDeviceOperationFault)(nil)).Elem() -} - -type InvalidDeviceSpec struct { - InvalidVmConfig - - DeviceIndex int32 `xml:"deviceIndex"` -} - -func init() { - t["InvalidDeviceSpec"] = reflect.TypeOf((*InvalidDeviceSpec)(nil)).Elem() -} - -type InvalidDeviceSpecFault BaseInvalidDeviceSpec - -func init() { - t["InvalidDeviceSpecFault"] = reflect.TypeOf((*InvalidDeviceSpecFault)(nil)).Elem() -} - -type InvalidDiskFormat struct { - InvalidFormat -} - -func init() { - t["InvalidDiskFormat"] = reflect.TypeOf((*InvalidDiskFormat)(nil)).Elem() -} - -type InvalidDiskFormatFault InvalidDiskFormat - -func init() { - t["InvalidDiskFormatFault"] = reflect.TypeOf((*InvalidDiskFormatFault)(nil)).Elem() -} - -type InvalidDrsBehaviorForFtVm struct { - InvalidArgument - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["InvalidDrsBehaviorForFtVm"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVm)(nil)).Elem() -} - -type InvalidDrsBehaviorForFtVmFault InvalidDrsBehaviorForFtVm - -func init() { - t["InvalidDrsBehaviorForFtVmFault"] = reflect.TypeOf((*InvalidDrsBehaviorForFtVmFault)(nil)).Elem() -} - -type InvalidEditionEvent struct { - LicenseEvent - - Feature string `xml:"feature"` -} - -func init() { - t["InvalidEditionEvent"] = reflect.TypeOf((*InvalidEditionEvent)(nil)).Elem() -} - -type InvalidEditionLicense struct { - NotEnoughLicenses - - Feature string `xml:"feature"` -} - -func init() { - t["InvalidEditionLicense"] = reflect.TypeOf((*InvalidEditionLicense)(nil)).Elem() -} - -type InvalidEditionLicenseFault InvalidEditionLicense - -func init() { - t["InvalidEditionLicenseFault"] = reflect.TypeOf((*InvalidEditionLicenseFault)(nil)).Elem() -} - -type InvalidEvent struct { - VimFault -} - -func init() { - t["InvalidEvent"] = reflect.TypeOf((*InvalidEvent)(nil)).Elem() -} - -type InvalidEventFault InvalidEvent - -func init() { - t["InvalidEventFault"] = reflect.TypeOf((*InvalidEventFault)(nil)).Elem() -} - -type InvalidFolder struct { - VimFault - - Target ManagedObjectReference `xml:"target"` -} - -func init() { - t["InvalidFolder"] = reflect.TypeOf((*InvalidFolder)(nil)).Elem() -} - -type InvalidFolderFault BaseInvalidFolder - -func init() { - t["InvalidFolderFault"] = reflect.TypeOf((*InvalidFolderFault)(nil)).Elem() -} - -type InvalidFormat struct { - VmConfigFault -} - -func init() { - t["InvalidFormat"] = reflect.TypeOf((*InvalidFormat)(nil)).Elem() -} - -type InvalidFormatFault BaseInvalidFormat - -func init() { - t["InvalidFormatFault"] = reflect.TypeOf((*InvalidFormatFault)(nil)).Elem() -} - -type InvalidGuestLogin struct { - GuestOperationsFault -} - -func init() { - t["InvalidGuestLogin"] = reflect.TypeOf((*InvalidGuestLogin)(nil)).Elem() -} - -type InvalidGuestLoginFault InvalidGuestLogin - -func init() { - t["InvalidGuestLoginFault"] = reflect.TypeOf((*InvalidGuestLoginFault)(nil)).Elem() -} - -type InvalidHostConnectionState struct { - InvalidHostState -} - -func init() { - t["InvalidHostConnectionState"] = reflect.TypeOf((*InvalidHostConnectionState)(nil)).Elem() -} - -type InvalidHostConnectionStateFault InvalidHostConnectionState - -func init() { - t["InvalidHostConnectionStateFault"] = reflect.TypeOf((*InvalidHostConnectionStateFault)(nil)).Elem() -} - -type InvalidHostName struct { - HostConfigFault -} - -func init() { - t["InvalidHostName"] = reflect.TypeOf((*InvalidHostName)(nil)).Elem() -} - -type InvalidHostNameFault InvalidHostName - -func init() { - t["InvalidHostNameFault"] = reflect.TypeOf((*InvalidHostNameFault)(nil)).Elem() -} - -type InvalidHostState struct { - InvalidState - - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["InvalidHostState"] = reflect.TypeOf((*InvalidHostState)(nil)).Elem() -} - -type InvalidHostStateFault BaseInvalidHostState - -func init() { - t["InvalidHostStateFault"] = reflect.TypeOf((*InvalidHostStateFault)(nil)).Elem() -} - -type InvalidIndexArgument struct { - InvalidArgument - - Key string `xml:"key"` -} - -func init() { - t["InvalidIndexArgument"] = reflect.TypeOf((*InvalidIndexArgument)(nil)).Elem() -} - -type InvalidIndexArgumentFault InvalidIndexArgument - -func init() { - t["InvalidIndexArgumentFault"] = reflect.TypeOf((*InvalidIndexArgumentFault)(nil)).Elem() -} - -type InvalidIpfixConfig struct { - DvsFault - - Property string `xml:"property,omitempty"` -} - -func init() { - t["InvalidIpfixConfig"] = reflect.TypeOf((*InvalidIpfixConfig)(nil)).Elem() -} - -type InvalidIpfixConfigFault InvalidIpfixConfig - -func init() { - t["InvalidIpfixConfigFault"] = reflect.TypeOf((*InvalidIpfixConfigFault)(nil)).Elem() -} - -type InvalidIpmiLoginInfo struct { - VimFault -} - -func init() { - t["InvalidIpmiLoginInfo"] = reflect.TypeOf((*InvalidIpmiLoginInfo)(nil)).Elem() -} - -type InvalidIpmiLoginInfoFault InvalidIpmiLoginInfo - -func init() { - t["InvalidIpmiLoginInfoFault"] = reflect.TypeOf((*InvalidIpmiLoginInfoFault)(nil)).Elem() -} - -type InvalidIpmiMacAddress struct { - VimFault - - UserProvidedMacAddress string `xml:"userProvidedMacAddress"` - ObservedMacAddress string `xml:"observedMacAddress"` -} - -func init() { - t["InvalidIpmiMacAddress"] = reflect.TypeOf((*InvalidIpmiMacAddress)(nil)).Elem() -} - -type InvalidIpmiMacAddressFault InvalidIpmiMacAddress - -func init() { - t["InvalidIpmiMacAddressFault"] = reflect.TypeOf((*InvalidIpmiMacAddressFault)(nil)).Elem() -} - -type InvalidLicense struct { - VimFault - - LicenseContent string `xml:"licenseContent"` -} - -func init() { - t["InvalidLicense"] = reflect.TypeOf((*InvalidLicense)(nil)).Elem() -} - -type InvalidLicenseFault InvalidLicense - -func init() { - t["InvalidLicenseFault"] = reflect.TypeOf((*InvalidLicenseFault)(nil)).Elem() -} - -type InvalidLocale struct { - VimFault -} - -func init() { - t["InvalidLocale"] = reflect.TypeOf((*InvalidLocale)(nil)).Elem() -} - -type InvalidLocaleFault InvalidLocale - -func init() { - t["InvalidLocaleFault"] = reflect.TypeOf((*InvalidLocaleFault)(nil)).Elem() -} - -type InvalidLogin struct { - VimFault -} - -func init() { - t["InvalidLogin"] = reflect.TypeOf((*InvalidLogin)(nil)).Elem() -} - -type InvalidLoginFault BaseInvalidLogin - -func init() { - t["InvalidLoginFault"] = reflect.TypeOf((*InvalidLoginFault)(nil)).Elem() -} - -type InvalidName struct { - VimFault - - Name string `xml:"name"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["InvalidName"] = reflect.TypeOf((*InvalidName)(nil)).Elem() -} - -type InvalidNameFault InvalidName - -func init() { - t["InvalidNameFault"] = reflect.TypeOf((*InvalidNameFault)(nil)).Elem() -} - -type InvalidNasCredentials struct { - NasConfigFault - - UserName string `xml:"userName"` -} - -func init() { - t["InvalidNasCredentials"] = reflect.TypeOf((*InvalidNasCredentials)(nil)).Elem() -} - -type InvalidNasCredentialsFault InvalidNasCredentials - -func init() { - t["InvalidNasCredentialsFault"] = reflect.TypeOf((*InvalidNasCredentialsFault)(nil)).Elem() -} - -type InvalidNetworkInType struct { - VAppPropertyFault -} - -func init() { - t["InvalidNetworkInType"] = reflect.TypeOf((*InvalidNetworkInType)(nil)).Elem() -} - -type InvalidNetworkInTypeFault InvalidNetworkInType - -func init() { - t["InvalidNetworkInTypeFault"] = reflect.TypeOf((*InvalidNetworkInTypeFault)(nil)).Elem() -} - -type InvalidNetworkResource struct { - NasConfigFault - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` -} - -func init() { - t["InvalidNetworkResource"] = reflect.TypeOf((*InvalidNetworkResource)(nil)).Elem() -} - -type InvalidNetworkResourceFault InvalidNetworkResource - -func init() { - t["InvalidNetworkResourceFault"] = reflect.TypeOf((*InvalidNetworkResourceFault)(nil)).Elem() -} - -type InvalidOperationOnSecondaryVm struct { - VmFaultToleranceIssue - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["InvalidOperationOnSecondaryVm"] = reflect.TypeOf((*InvalidOperationOnSecondaryVm)(nil)).Elem() -} - -type InvalidOperationOnSecondaryVmFault InvalidOperationOnSecondaryVm - -func init() { - t["InvalidOperationOnSecondaryVmFault"] = reflect.TypeOf((*InvalidOperationOnSecondaryVmFault)(nil)).Elem() -} - -type InvalidPowerState struct { - InvalidState - - RequestedState VirtualMachinePowerState `xml:"requestedState,omitempty"` - ExistingState VirtualMachinePowerState `xml:"existingState"` -} - -func init() { - t["InvalidPowerState"] = reflect.TypeOf((*InvalidPowerState)(nil)).Elem() -} - -type InvalidPowerStateFault InvalidPowerState - -func init() { - t["InvalidPowerStateFault"] = reflect.TypeOf((*InvalidPowerStateFault)(nil)).Elem() -} - -type InvalidPrivilege struct { - VimFault - - Privilege string `xml:"privilege"` -} - -func init() { - t["InvalidPrivilege"] = reflect.TypeOf((*InvalidPrivilege)(nil)).Elem() -} - -type InvalidPrivilegeFault InvalidPrivilege - -func init() { - t["InvalidPrivilegeFault"] = reflect.TypeOf((*InvalidPrivilegeFault)(nil)).Elem() -} - -type InvalidProfileReferenceHost struct { - RuntimeFault - - Reason string `xml:"reason,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` - ProfileName string `xml:"profileName,omitempty"` -} - -func init() { - t["InvalidProfileReferenceHost"] = reflect.TypeOf((*InvalidProfileReferenceHost)(nil)).Elem() -} - -type InvalidProfileReferenceHostFault InvalidProfileReferenceHost - -func init() { - t["InvalidProfileReferenceHostFault"] = reflect.TypeOf((*InvalidProfileReferenceHostFault)(nil)).Elem() -} - -type InvalidProperty struct { - MethodFault - - Name string `xml:"name"` -} - -func init() { - t["InvalidProperty"] = reflect.TypeOf((*InvalidProperty)(nil)).Elem() -} - -type InvalidPropertyFault InvalidProperty - -func init() { - t["InvalidPropertyFault"] = reflect.TypeOf((*InvalidPropertyFault)(nil)).Elem() -} - -type InvalidPropertyType struct { - VAppPropertyFault -} - -func init() { - t["InvalidPropertyType"] = reflect.TypeOf((*InvalidPropertyType)(nil)).Elem() -} - -type InvalidPropertyTypeFault InvalidPropertyType - -func init() { - t["InvalidPropertyTypeFault"] = reflect.TypeOf((*InvalidPropertyTypeFault)(nil)).Elem() -} - -type InvalidPropertyValue struct { - VAppPropertyFault -} - -func init() { - t["InvalidPropertyValue"] = reflect.TypeOf((*InvalidPropertyValue)(nil)).Elem() -} - -type InvalidPropertyValueFault BaseInvalidPropertyValue - -func init() { - t["InvalidPropertyValueFault"] = reflect.TypeOf((*InvalidPropertyValueFault)(nil)).Elem() -} - -type InvalidRequest struct { - RuntimeFault -} - -func init() { - t["InvalidRequest"] = reflect.TypeOf((*InvalidRequest)(nil)).Elem() -} - -type InvalidRequestFault BaseInvalidRequest - -func init() { - t["InvalidRequestFault"] = reflect.TypeOf((*InvalidRequestFault)(nil)).Elem() -} - -type InvalidResourcePoolStructureFault struct { - InsufficientResourcesFault -} - -func init() { - t["InvalidResourcePoolStructureFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFault)(nil)).Elem() -} - -type InvalidResourcePoolStructureFaultFault InvalidResourcePoolStructureFault - -func init() { - t["InvalidResourcePoolStructureFaultFault"] = reflect.TypeOf((*InvalidResourcePoolStructureFaultFault)(nil)).Elem() -} - -type InvalidSnapshotFormat struct { - InvalidFormat -} - -func init() { - t["InvalidSnapshotFormat"] = reflect.TypeOf((*InvalidSnapshotFormat)(nil)).Elem() -} - -type InvalidSnapshotFormatFault InvalidSnapshotFormat - -func init() { - t["InvalidSnapshotFormatFault"] = reflect.TypeOf((*InvalidSnapshotFormatFault)(nil)).Elem() -} - -type InvalidState struct { - VimFault -} - -func init() { - t["InvalidState"] = reflect.TypeOf((*InvalidState)(nil)).Elem() -} - -type InvalidStateFault BaseInvalidState - -func init() { - t["InvalidStateFault"] = reflect.TypeOf((*InvalidStateFault)(nil)).Elem() -} - -type InvalidType struct { - InvalidRequest - - Argument string `xml:"argument,omitempty"` -} - -func init() { - t["InvalidType"] = reflect.TypeOf((*InvalidType)(nil)).Elem() -} - -type InvalidTypeFault InvalidType - -func init() { - t["InvalidTypeFault"] = reflect.TypeOf((*InvalidTypeFault)(nil)).Elem() -} - -type InvalidVmConfig struct { - VmConfigFault - - Property string `xml:"property,omitempty"` -} - -func init() { - t["InvalidVmConfig"] = reflect.TypeOf((*InvalidVmConfig)(nil)).Elem() -} - -type InvalidVmConfigFault BaseInvalidVmConfig - -func init() { - t["InvalidVmConfigFault"] = reflect.TypeOf((*InvalidVmConfigFault)(nil)).Elem() -} - -type InvalidVmState struct { - InvalidState - - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["InvalidVmState"] = reflect.TypeOf((*InvalidVmState)(nil)).Elem() -} - -type InvalidVmStateFault InvalidVmState - -func init() { - t["InvalidVmStateFault"] = reflect.TypeOf((*InvalidVmStateFault)(nil)).Elem() -} - -type InventoryDescription struct { - DynamicData - - NumHosts int32 `xml:"numHosts"` - NumVirtualMachines int32 `xml:"numVirtualMachines"` - NumResourcePools int32 `xml:"numResourcePools,omitempty"` - NumClusters int32 `xml:"numClusters,omitempty"` - NumCpuDev int32 `xml:"numCpuDev,omitempty"` - NumNetDev int32 `xml:"numNetDev,omitempty"` - NumDiskDev int32 `xml:"numDiskDev,omitempty"` - NumvCpuDev int32 `xml:"numvCpuDev,omitempty"` - NumvNetDev int32 `xml:"numvNetDev,omitempty"` - NumvDiskDev int32 `xml:"numvDiskDev,omitempty"` -} - -func init() { - t["InventoryDescription"] = reflect.TypeOf((*InventoryDescription)(nil)).Elem() -} - -type InventoryHasStandardAloneHosts struct { - NotEnoughLicenses - - Hosts []string `xml:"hosts"` -} - -func init() { - t["InventoryHasStandardAloneHosts"] = reflect.TypeOf((*InventoryHasStandardAloneHosts)(nil)).Elem() -} - -type InventoryHasStandardAloneHostsFault InventoryHasStandardAloneHosts - -func init() { - t["InventoryHasStandardAloneHostsFault"] = reflect.TypeOf((*InventoryHasStandardAloneHostsFault)(nil)).Elem() -} - -type IoFilterHostIssue struct { - DynamicData - - Host ManagedObjectReference `xml:"host"` - Issue []LocalizedMethodFault `xml:"issue"` -} - -func init() { - t["IoFilterHostIssue"] = reflect.TypeOf((*IoFilterHostIssue)(nil)).Elem() -} - -type IoFilterInfo struct { - DynamicData - - Id string `xml:"id"` - Name string `xml:"name"` - Vendor string `xml:"vendor"` - Version string `xml:"version"` - Type string `xml:"type,omitempty"` - Summary string `xml:"summary,omitempty"` - ReleaseDate string `xml:"releaseDate,omitempty"` -} - -func init() { - t["IoFilterInfo"] = reflect.TypeOf((*IoFilterInfo)(nil)).Elem() -} - -type IoFilterQueryIssueResult struct { - DynamicData - - OpType string `xml:"opType"` - HostIssue []IoFilterHostIssue `xml:"hostIssue,omitempty"` -} - -func init() { - t["IoFilterQueryIssueResult"] = reflect.TypeOf((*IoFilterQueryIssueResult)(nil)).Elem() -} - -type IpAddress struct { - NegatableExpression -} - -func init() { - t["IpAddress"] = reflect.TypeOf((*IpAddress)(nil)).Elem() -} - -type IpAddressProfile struct { - ApplyProfile -} - -func init() { - t["IpAddressProfile"] = reflect.TypeOf((*IpAddressProfile)(nil)).Elem() -} - -type IpHostnameGeneratorError struct { - CustomizationFault -} - -func init() { - t["IpHostnameGeneratorError"] = reflect.TypeOf((*IpHostnameGeneratorError)(nil)).Elem() -} - -type IpHostnameGeneratorErrorFault IpHostnameGeneratorError - -func init() { - t["IpHostnameGeneratorErrorFault"] = reflect.TypeOf((*IpHostnameGeneratorErrorFault)(nil)).Elem() -} - -type IpPool struct { - DynamicData - - Id int32 `xml:"id,omitempty"` - Name string `xml:"name,omitempty"` - Ipv4Config *IpPoolIpPoolConfigInfo `xml:"ipv4Config,omitempty"` - Ipv6Config *IpPoolIpPoolConfigInfo `xml:"ipv6Config,omitempty"` - DnsDomain string `xml:"dnsDomain,omitempty"` - DnsSearchPath string `xml:"dnsSearchPath,omitempty"` - HostPrefix string `xml:"hostPrefix,omitempty"` - HttpProxy string `xml:"httpProxy,omitempty"` - NetworkAssociation []IpPoolAssociation `xml:"networkAssociation,omitempty"` - AvailableIpv4Addresses int32 `xml:"availableIpv4Addresses,omitempty"` - AvailableIpv6Addresses int32 `xml:"availableIpv6Addresses,omitempty"` - AllocatedIpv4Addresses int32 `xml:"allocatedIpv4Addresses,omitempty"` - AllocatedIpv6Addresses int32 `xml:"allocatedIpv6Addresses,omitempty"` -} - -func init() { - t["IpPool"] = reflect.TypeOf((*IpPool)(nil)).Elem() -} - -type IpPoolAssociation struct { - DynamicData - - Network *ManagedObjectReference `xml:"network,omitempty"` - NetworkName string `xml:"networkName"` -} - -func init() { - t["IpPoolAssociation"] = reflect.TypeOf((*IpPoolAssociation)(nil)).Elem() -} - -type IpPoolIpPoolConfigInfo struct { - DynamicData - - SubnetAddress string `xml:"subnetAddress,omitempty"` - Netmask string `xml:"netmask,omitempty"` - Gateway string `xml:"gateway,omitempty"` - Range string `xml:"range,omitempty"` - Dns []string `xml:"dns,omitempty"` - DhcpServerAvailable *bool `xml:"dhcpServerAvailable"` - IpPoolEnabled *bool `xml:"ipPoolEnabled"` -} - -func init() { - t["IpPoolIpPoolConfigInfo"] = reflect.TypeOf((*IpPoolIpPoolConfigInfo)(nil)).Elem() -} - -type IpPoolManagerIpAllocation struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - AllocationId string `xml:"allocationId"` -} - -func init() { - t["IpPoolManagerIpAllocation"] = reflect.TypeOf((*IpPoolManagerIpAllocation)(nil)).Elem() -} - -type IpRange struct { - IpAddress - - AddressPrefix string `xml:"addressPrefix"` - PrefixLength int32 `xml:"prefixLength,omitempty"` -} - -func init() { - t["IpRange"] = reflect.TypeOf((*IpRange)(nil)).Elem() -} - -type IpRouteProfile struct { - ApplyProfile - - StaticRoute []StaticRouteProfile `xml:"staticRoute,omitempty"` -} - -func init() { - t["IpRouteProfile"] = reflect.TypeOf((*IpRouteProfile)(nil)).Elem() -} - -type IsKmsClusterActive IsKmsClusterActiveRequestType - -func init() { - t["IsKmsClusterActive"] = reflect.TypeOf((*IsKmsClusterActive)(nil)).Elem() -} - -type IsKmsClusterActiveRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster *KeyProviderId `xml:"cluster,omitempty"` -} - -func init() { - t["IsKmsClusterActiveRequestType"] = reflect.TypeOf((*IsKmsClusterActiveRequestType)(nil)).Elem() -} - -type IsKmsClusterActiveResponse struct { - Returnval bool `xml:"returnval"` -} - -type IsSharedGraphicsActive IsSharedGraphicsActiveRequestType - -func init() { - t["IsSharedGraphicsActive"] = reflect.TypeOf((*IsSharedGraphicsActive)(nil)).Elem() -} - -type IsSharedGraphicsActiveRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["IsSharedGraphicsActiveRequestType"] = reflect.TypeOf((*IsSharedGraphicsActiveRequestType)(nil)).Elem() -} - -type IsSharedGraphicsActiveResponse struct { - Returnval bool `xml:"returnval"` -} - -type IscsiDependencyEntity struct { - DynamicData - - PnicDevice string `xml:"pnicDevice"` - VnicDevice string `xml:"vnicDevice"` - VmhbaName string `xml:"vmhbaName"` -} - -func init() { - t["IscsiDependencyEntity"] = reflect.TypeOf((*IscsiDependencyEntity)(nil)).Elem() -} - -type IscsiFault struct { - VimFault -} - -func init() { - t["IscsiFault"] = reflect.TypeOf((*IscsiFault)(nil)).Elem() -} - -type IscsiFaultFault BaseIscsiFault - -func init() { - t["IscsiFaultFault"] = reflect.TypeOf((*IscsiFaultFault)(nil)).Elem() -} - -type IscsiFaultInvalidVnic struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultInvalidVnic"] = reflect.TypeOf((*IscsiFaultInvalidVnic)(nil)).Elem() -} - -type IscsiFaultInvalidVnicFault IscsiFaultInvalidVnic - -func init() { - t["IscsiFaultInvalidVnicFault"] = reflect.TypeOf((*IscsiFaultInvalidVnicFault)(nil)).Elem() -} - -type IscsiFaultPnicInUse struct { - IscsiFault - - PnicDevice string `xml:"pnicDevice"` -} - -func init() { - t["IscsiFaultPnicInUse"] = reflect.TypeOf((*IscsiFaultPnicInUse)(nil)).Elem() -} - -type IscsiFaultPnicInUseFault IscsiFaultPnicInUse - -func init() { - t["IscsiFaultPnicInUseFault"] = reflect.TypeOf((*IscsiFaultPnicInUseFault)(nil)).Elem() -} - -type IscsiFaultVnicAlreadyBound struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicAlreadyBound"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBound)(nil)).Elem() -} - -type IscsiFaultVnicAlreadyBoundFault IscsiFaultVnicAlreadyBound - -func init() { - t["IscsiFaultVnicAlreadyBoundFault"] = reflect.TypeOf((*IscsiFaultVnicAlreadyBoundFault)(nil)).Elem() -} - -type IscsiFaultVnicHasActivePaths struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicHasActivePaths"] = reflect.TypeOf((*IscsiFaultVnicHasActivePaths)(nil)).Elem() -} - -type IscsiFaultVnicHasActivePathsFault IscsiFaultVnicHasActivePaths - -func init() { - t["IscsiFaultVnicHasActivePathsFault"] = reflect.TypeOf((*IscsiFaultVnicHasActivePathsFault)(nil)).Elem() -} - -type IscsiFaultVnicHasMultipleUplinks struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicHasMultipleUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinks)(nil)).Elem() -} - -type IscsiFaultVnicHasMultipleUplinksFault IscsiFaultVnicHasMultipleUplinks - -func init() { - t["IscsiFaultVnicHasMultipleUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasMultipleUplinksFault)(nil)).Elem() -} - -type IscsiFaultVnicHasNoUplinks struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicHasNoUplinks"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinks)(nil)).Elem() -} - -type IscsiFaultVnicHasNoUplinksFault IscsiFaultVnicHasNoUplinks - -func init() { - t["IscsiFaultVnicHasNoUplinksFault"] = reflect.TypeOf((*IscsiFaultVnicHasNoUplinksFault)(nil)).Elem() -} - -type IscsiFaultVnicHasWrongUplink struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicHasWrongUplink"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplink)(nil)).Elem() -} - -type IscsiFaultVnicHasWrongUplinkFault IscsiFaultVnicHasWrongUplink - -func init() { - t["IscsiFaultVnicHasWrongUplinkFault"] = reflect.TypeOf((*IscsiFaultVnicHasWrongUplinkFault)(nil)).Elem() -} - -type IscsiFaultVnicInUse struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicInUse"] = reflect.TypeOf((*IscsiFaultVnicInUse)(nil)).Elem() -} - -type IscsiFaultVnicInUseFault IscsiFaultVnicInUse - -func init() { - t["IscsiFaultVnicInUseFault"] = reflect.TypeOf((*IscsiFaultVnicInUseFault)(nil)).Elem() -} - -type IscsiFaultVnicIsLastPath struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicIsLastPath"] = reflect.TypeOf((*IscsiFaultVnicIsLastPath)(nil)).Elem() -} - -type IscsiFaultVnicIsLastPathFault IscsiFaultVnicIsLastPath - -func init() { - t["IscsiFaultVnicIsLastPathFault"] = reflect.TypeOf((*IscsiFaultVnicIsLastPathFault)(nil)).Elem() -} - -type IscsiFaultVnicNotBound struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicNotBound"] = reflect.TypeOf((*IscsiFaultVnicNotBound)(nil)).Elem() -} - -type IscsiFaultVnicNotBoundFault IscsiFaultVnicNotBound - -func init() { - t["IscsiFaultVnicNotBoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotBoundFault)(nil)).Elem() -} - -type IscsiFaultVnicNotFound struct { - IscsiFault - - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["IscsiFaultVnicNotFound"] = reflect.TypeOf((*IscsiFaultVnicNotFound)(nil)).Elem() -} - -type IscsiFaultVnicNotFoundFault IscsiFaultVnicNotFound - -func init() { - t["IscsiFaultVnicNotFoundFault"] = reflect.TypeOf((*IscsiFaultVnicNotFoundFault)(nil)).Elem() -} - -type IscsiMigrationDependency struct { - DynamicData - - MigrationAllowed bool `xml:"migrationAllowed"` - DisallowReason *IscsiStatus `xml:"disallowReason,omitempty"` - Dependency []IscsiDependencyEntity `xml:"dependency,omitempty"` -} - -func init() { - t["IscsiMigrationDependency"] = reflect.TypeOf((*IscsiMigrationDependency)(nil)).Elem() -} - -type IscsiPortInfo struct { - DynamicData - - VnicDevice string `xml:"vnicDevice,omitempty"` - Vnic *HostVirtualNic `xml:"vnic,omitempty"` - PnicDevice string `xml:"pnicDevice,omitempty"` - Pnic *PhysicalNic `xml:"pnic,omitempty"` - SwitchName string `xml:"switchName,omitempty"` - SwitchUuid string `xml:"switchUuid,omitempty"` - PortgroupName string `xml:"portgroupName,omitempty"` - PortgroupKey string `xml:"portgroupKey,omitempty"` - PortKey string `xml:"portKey,omitempty"` - OpaqueNetworkId string `xml:"opaqueNetworkId,omitempty"` - OpaqueNetworkType string `xml:"opaqueNetworkType,omitempty"` - OpaqueNetworkName string `xml:"opaqueNetworkName,omitempty"` - ExternalId string `xml:"externalId,omitempty"` - ComplianceStatus *IscsiStatus `xml:"complianceStatus,omitempty"` - PathStatus string `xml:"pathStatus,omitempty"` -} - -func init() { - t["IscsiPortInfo"] = reflect.TypeOf((*IscsiPortInfo)(nil)).Elem() -} - -type IscsiStatus struct { - DynamicData - - Reason []LocalizedMethodFault `xml:"reason,omitempty"` -} - -func init() { - t["IscsiStatus"] = reflect.TypeOf((*IscsiStatus)(nil)).Elem() -} - -type IsoImageFileInfo struct { - FileInfo -} - -func init() { - t["IsoImageFileInfo"] = reflect.TypeOf((*IsoImageFileInfo)(nil)).Elem() -} - -type IsoImageFileQuery struct { - FileQuery -} - -func init() { - t["IsoImageFileQuery"] = reflect.TypeOf((*IsoImageFileQuery)(nil)).Elem() -} - -type JoinDomainRequestType struct { - This ManagedObjectReference `xml:"_this"` - DomainName string `xml:"domainName"` - UserName string `xml:"userName"` - Password string `xml:"password"` -} - -func init() { - t["JoinDomainRequestType"] = reflect.TypeOf((*JoinDomainRequestType)(nil)).Elem() -} - -type JoinDomainWithCAMRequestType struct { - This ManagedObjectReference `xml:"_this"` - DomainName string `xml:"domainName"` - CamServer string `xml:"camServer"` -} - -func init() { - t["JoinDomainWithCAMRequestType"] = reflect.TypeOf((*JoinDomainWithCAMRequestType)(nil)).Elem() -} - -type JoinDomainWithCAM_Task JoinDomainWithCAMRequestType - -func init() { - t["JoinDomainWithCAM_Task"] = reflect.TypeOf((*JoinDomainWithCAM_Task)(nil)).Elem() -} - -type JoinDomainWithCAM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type JoinDomain_Task JoinDomainRequestType - -func init() { - t["JoinDomain_Task"] = reflect.TypeOf((*JoinDomain_Task)(nil)).Elem() -} - -type JoinDomain_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type KernelModuleInfo struct { - DynamicData - - Id int32 `xml:"id"` - Name string `xml:"name"` - Version string `xml:"version"` - Filename string `xml:"filename"` - OptionString string `xml:"optionString"` - Loaded bool `xml:"loaded"` - Enabled bool `xml:"enabled"` - UseCount int32 `xml:"useCount"` - ReadOnlySection KernelModuleSectionInfo `xml:"readOnlySection"` - WritableSection KernelModuleSectionInfo `xml:"writableSection"` - TextSection KernelModuleSectionInfo `xml:"textSection"` - DataSection KernelModuleSectionInfo `xml:"dataSection"` - BssSection KernelModuleSectionInfo `xml:"bssSection"` -} - -func init() { - t["KernelModuleInfo"] = reflect.TypeOf((*KernelModuleInfo)(nil)).Elem() -} - -type KernelModuleSectionInfo struct { - DynamicData - - Address int64 `xml:"address"` - Length int32 `xml:"length,omitempty"` -} - -func init() { - t["KernelModuleSectionInfo"] = reflect.TypeOf((*KernelModuleSectionInfo)(nil)).Elem() -} - -type KeyAnyValue struct { - DynamicData - - Key string `xml:"key"` - Value AnyType `xml:"value,typeattr"` -} - -func init() { - t["KeyAnyValue"] = reflect.TypeOf((*KeyAnyValue)(nil)).Elem() -} - -type KeyNotFound struct { - VimFault - - Key string `xml:"key"` -} - -func init() { - t["KeyNotFound"] = reflect.TypeOf((*KeyNotFound)(nil)).Elem() -} - -type KeyNotFoundFault KeyNotFound - -func init() { - t["KeyNotFoundFault"] = reflect.TypeOf((*KeyNotFoundFault)(nil)).Elem() -} - -type KeyProviderId struct { - DynamicData - - Id string `xml:"id"` -} - -func init() { - t["KeyProviderId"] = reflect.TypeOf((*KeyProviderId)(nil)).Elem() -} - -type KeyValue struct { - DynamicData - - Key string `xml:"key"` - Value string `xml:"value"` -} - -func init() { - t["KeyValue"] = reflect.TypeOf((*KeyValue)(nil)).Elem() -} - -type KmipClusterInfo struct { - DynamicData - - ClusterId KeyProviderId `xml:"clusterId"` - Servers []KmipServerInfo `xml:"servers,omitempty"` - UseAsDefault bool `xml:"useAsDefault"` - ManagementType string `xml:"managementType,omitempty"` - UseAsEntityDefault []ManagedObjectReference `xml:"useAsEntityDefault,omitempty"` - HasBackup *bool `xml:"hasBackup"` - TpmRequired *bool `xml:"tpmRequired"` - KeyId string `xml:"keyId,omitempty"` -} - -func init() { - t["KmipClusterInfo"] = reflect.TypeOf((*KmipClusterInfo)(nil)).Elem() -} - -type KmipServerInfo struct { - DynamicData - - Name string `xml:"name"` - Address string `xml:"address"` - Port int32 `xml:"port"` - ProxyAddress string `xml:"proxyAddress,omitempty"` - ProxyPort int32 `xml:"proxyPort,omitempty"` - Reconnect int32 `xml:"reconnect,omitempty"` - Protocol string `xml:"protocol,omitempty"` - Nbio int32 `xml:"nbio,omitempty"` - Timeout int32 `xml:"timeout,omitempty"` - UserName string `xml:"userName,omitempty"` -} - -func init() { - t["KmipServerInfo"] = reflect.TypeOf((*KmipServerInfo)(nil)).Elem() -} - -type KmipServerSpec struct { - DynamicData - - ClusterId KeyProviderId `xml:"clusterId"` - Info KmipServerInfo `xml:"info"` - Password string `xml:"password,omitempty"` -} - -func init() { - t["KmipServerSpec"] = reflect.TypeOf((*KmipServerSpec)(nil)).Elem() -} - -type KmipServerStatus struct { - DynamicData - - ClusterId KeyProviderId `xml:"clusterId"` - Name string `xml:"name"` - Status ManagedEntityStatus `xml:"status"` - Description string `xml:"description"` -} - -func init() { - t["KmipServerStatus"] = reflect.TypeOf((*KmipServerStatus)(nil)).Elem() -} - -type LargeRDMConversionNotSupported struct { - MigrationFault - - Device string `xml:"device"` -} - -func init() { - t["LargeRDMConversionNotSupported"] = reflect.TypeOf((*LargeRDMConversionNotSupported)(nil)).Elem() -} - -type LargeRDMConversionNotSupportedFault LargeRDMConversionNotSupported - -func init() { - t["LargeRDMConversionNotSupportedFault"] = reflect.TypeOf((*LargeRDMConversionNotSupportedFault)(nil)).Elem() -} - -type LargeRDMNotSupportedOnDatastore struct { - VmConfigFault - - Device string `xml:"device"` - Datastore ManagedObjectReference `xml:"datastore"` - DatastoreName string `xml:"datastoreName"` -} - -func init() { - t["LargeRDMNotSupportedOnDatastore"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastore)(nil)).Elem() -} - -type LargeRDMNotSupportedOnDatastoreFault LargeRDMNotSupportedOnDatastore - -func init() { - t["LargeRDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*LargeRDMNotSupportedOnDatastoreFault)(nil)).Elem() -} - -type LatencySensitivity struct { - DynamicData - - Level LatencySensitivitySensitivityLevel `xml:"level"` - Sensitivity int32 `xml:"sensitivity,omitempty"` -} - -func init() { - t["LatencySensitivity"] = reflect.TypeOf((*LatencySensitivity)(nil)).Elem() -} - -type LeaveCurrentDomainRequestType struct { - This ManagedObjectReference `xml:"_this"` - Force bool `xml:"force"` -} - -func init() { - t["LeaveCurrentDomainRequestType"] = reflect.TypeOf((*LeaveCurrentDomainRequestType)(nil)).Elem() -} - -type LeaveCurrentDomain_Task LeaveCurrentDomainRequestType - -func init() { - t["LeaveCurrentDomain_Task"] = reflect.TypeOf((*LeaveCurrentDomain_Task)(nil)).Elem() -} - -type LeaveCurrentDomain_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type LegacyNetworkInterfaceInUse struct { - CannotAccessNetwork -} - -func init() { - t["LegacyNetworkInterfaceInUse"] = reflect.TypeOf((*LegacyNetworkInterfaceInUse)(nil)).Elem() -} - -type LegacyNetworkInterfaceInUseFault LegacyNetworkInterfaceInUse - -func init() { - t["LegacyNetworkInterfaceInUseFault"] = reflect.TypeOf((*LegacyNetworkInterfaceInUseFault)(nil)).Elem() -} - -type LicenseAssignmentFailed struct { - RuntimeFault - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["LicenseAssignmentFailed"] = reflect.TypeOf((*LicenseAssignmentFailed)(nil)).Elem() -} - -type LicenseAssignmentFailedFault LicenseAssignmentFailed - -func init() { - t["LicenseAssignmentFailedFault"] = reflect.TypeOf((*LicenseAssignmentFailedFault)(nil)).Elem() -} - -type LicenseAssignmentManagerLicenseAssignment struct { - DynamicData - - EntityId string `xml:"entityId"` - Scope string `xml:"scope,omitempty"` - EntityDisplayName string `xml:"entityDisplayName,omitempty"` - AssignedLicense LicenseManagerLicenseInfo `xml:"assignedLicense"` - Properties []KeyAnyValue `xml:"properties,omitempty"` -} - -func init() { - t["LicenseAssignmentManagerLicenseAssignment"] = reflect.TypeOf((*LicenseAssignmentManagerLicenseAssignment)(nil)).Elem() -} - -type LicenseAvailabilityInfo struct { - DynamicData - - Feature LicenseFeatureInfo `xml:"feature"` - Total int32 `xml:"total"` - Available int32 `xml:"available"` -} - -func init() { - t["LicenseAvailabilityInfo"] = reflect.TypeOf((*LicenseAvailabilityInfo)(nil)).Elem() -} - -type LicenseDiagnostics struct { - DynamicData - - SourceLastChanged time.Time `xml:"sourceLastChanged"` - SourceLost string `xml:"sourceLost"` - SourceLatency float32 `xml:"sourceLatency"` - LicenseRequests string `xml:"licenseRequests"` - LicenseRequestFailures string `xml:"licenseRequestFailures"` - LicenseFeatureUnknowns string `xml:"licenseFeatureUnknowns"` - OpState LicenseManagerState `xml:"opState"` - LastStatusUpdate time.Time `xml:"lastStatusUpdate"` - OpFailureMessage string `xml:"opFailureMessage"` -} - -func init() { - t["LicenseDiagnostics"] = reflect.TypeOf((*LicenseDiagnostics)(nil)).Elem() -} - -type LicenseDowngradeDisallowed struct { - NotEnoughLicenses - - Edition string `xml:"edition"` - EntityId string `xml:"entityId"` - Features []KeyAnyValue `xml:"features"` -} - -func init() { - t["LicenseDowngradeDisallowed"] = reflect.TypeOf((*LicenseDowngradeDisallowed)(nil)).Elem() -} - -type LicenseDowngradeDisallowedFault LicenseDowngradeDisallowed - -func init() { - t["LicenseDowngradeDisallowedFault"] = reflect.TypeOf((*LicenseDowngradeDisallowedFault)(nil)).Elem() -} - -type LicenseEntityNotFound struct { - VimFault - - EntityId string `xml:"entityId"` -} - -func init() { - t["LicenseEntityNotFound"] = reflect.TypeOf((*LicenseEntityNotFound)(nil)).Elem() -} - -type LicenseEntityNotFoundFault LicenseEntityNotFound - -func init() { - t["LicenseEntityNotFoundFault"] = reflect.TypeOf((*LicenseEntityNotFoundFault)(nil)).Elem() -} - -type LicenseEvent struct { - Event -} - -func init() { - t["LicenseEvent"] = reflect.TypeOf((*LicenseEvent)(nil)).Elem() -} - -type LicenseExpired struct { - NotEnoughLicenses - - LicenseKey string `xml:"licenseKey"` -} - -func init() { - t["LicenseExpired"] = reflect.TypeOf((*LicenseExpired)(nil)).Elem() -} - -type LicenseExpiredEvent struct { - Event - - Feature LicenseFeatureInfo `xml:"feature"` -} - -func init() { - t["LicenseExpiredEvent"] = reflect.TypeOf((*LicenseExpiredEvent)(nil)).Elem() -} - -type LicenseExpiredFault LicenseExpired - -func init() { - t["LicenseExpiredFault"] = reflect.TypeOf((*LicenseExpiredFault)(nil)).Elem() -} - -type LicenseFeatureInfo struct { - DynamicData - - Key string `xml:"key"` - FeatureName string `xml:"featureName"` - FeatureDescription string `xml:"featureDescription,omitempty"` - State LicenseFeatureInfoState `xml:"state,omitempty"` - CostUnit string `xml:"costUnit"` - SourceRestriction string `xml:"sourceRestriction,omitempty"` - DependentKey []string `xml:"dependentKey,omitempty"` - Edition *bool `xml:"edition"` - ExpiresOn *time.Time `xml:"expiresOn"` -} - -func init() { - t["LicenseFeatureInfo"] = reflect.TypeOf((*LicenseFeatureInfo)(nil)).Elem() -} - -type LicenseKeyEntityMismatch struct { - NotEnoughLicenses -} - -func init() { - t["LicenseKeyEntityMismatch"] = reflect.TypeOf((*LicenseKeyEntityMismatch)(nil)).Elem() -} - -type LicenseKeyEntityMismatchFault LicenseKeyEntityMismatch - -func init() { - t["LicenseKeyEntityMismatchFault"] = reflect.TypeOf((*LicenseKeyEntityMismatchFault)(nil)).Elem() -} - -type LicenseManagerEvaluationInfo struct { - DynamicData - - Properties []KeyAnyValue `xml:"properties"` -} - -func init() { - t["LicenseManagerEvaluationInfo"] = reflect.TypeOf((*LicenseManagerEvaluationInfo)(nil)).Elem() -} - -type LicenseManagerLicenseInfo struct { - DynamicData - - LicenseKey string `xml:"licenseKey"` - EditionKey string `xml:"editionKey"` - Name string `xml:"name"` - Total int32 `xml:"total"` - Used int32 `xml:"used,omitempty"` - CostUnit string `xml:"costUnit"` - Properties []KeyAnyValue `xml:"properties,omitempty"` - Labels []KeyValue `xml:"labels,omitempty"` -} - -func init() { - t["LicenseManagerLicenseInfo"] = reflect.TypeOf((*LicenseManagerLicenseInfo)(nil)).Elem() -} - -type LicenseNonComplianceEvent struct { - LicenseEvent - - Url string `xml:"url"` -} - -func init() { - t["LicenseNonComplianceEvent"] = reflect.TypeOf((*LicenseNonComplianceEvent)(nil)).Elem() -} - -type LicenseReservationInfo struct { - DynamicData - - Key string `xml:"key"` - State LicenseReservationInfoState `xml:"state"` - Required int32 `xml:"required"` -} - -func init() { - t["LicenseReservationInfo"] = reflect.TypeOf((*LicenseReservationInfo)(nil)).Elem() -} - -type LicenseRestricted struct { - NotEnoughLicenses -} - -func init() { - t["LicenseRestricted"] = reflect.TypeOf((*LicenseRestricted)(nil)).Elem() -} - -type LicenseRestrictedEvent struct { - LicenseEvent -} - -func init() { - t["LicenseRestrictedEvent"] = reflect.TypeOf((*LicenseRestrictedEvent)(nil)).Elem() -} - -type LicenseRestrictedFault LicenseRestricted - -func init() { - t["LicenseRestrictedFault"] = reflect.TypeOf((*LicenseRestrictedFault)(nil)).Elem() -} - -type LicenseServerAvailableEvent struct { - LicenseEvent - - LicenseServer string `xml:"licenseServer"` -} - -func init() { - t["LicenseServerAvailableEvent"] = reflect.TypeOf((*LicenseServerAvailableEvent)(nil)).Elem() -} - -type LicenseServerSource struct { - LicenseSource - - LicenseServer string `xml:"licenseServer"` -} - -func init() { - t["LicenseServerSource"] = reflect.TypeOf((*LicenseServerSource)(nil)).Elem() -} - -type LicenseServerUnavailable struct { - VimFault - - LicenseServer string `xml:"licenseServer"` -} - -func init() { - t["LicenseServerUnavailable"] = reflect.TypeOf((*LicenseServerUnavailable)(nil)).Elem() -} - -type LicenseServerUnavailableEvent struct { - LicenseEvent - - LicenseServer string `xml:"licenseServer"` -} - -func init() { - t["LicenseServerUnavailableEvent"] = reflect.TypeOf((*LicenseServerUnavailableEvent)(nil)).Elem() -} - -type LicenseServerUnavailableFault LicenseServerUnavailable - -func init() { - t["LicenseServerUnavailableFault"] = reflect.TypeOf((*LicenseServerUnavailableFault)(nil)).Elem() -} - -type LicenseSource struct { - DynamicData -} - -func init() { - t["LicenseSource"] = reflect.TypeOf((*LicenseSource)(nil)).Elem() -} - -type LicenseSourceUnavailable struct { - NotEnoughLicenses - - LicenseSource BaseLicenseSource `xml:"licenseSource,typeattr"` -} - -func init() { - t["LicenseSourceUnavailable"] = reflect.TypeOf((*LicenseSourceUnavailable)(nil)).Elem() -} - -type LicenseSourceUnavailableFault LicenseSourceUnavailable - -func init() { - t["LicenseSourceUnavailableFault"] = reflect.TypeOf((*LicenseSourceUnavailableFault)(nil)).Elem() -} - -type LicenseUsageInfo struct { - DynamicData - - Source BaseLicenseSource `xml:"source,typeattr"` - SourceAvailable bool `xml:"sourceAvailable"` - ReservationInfo []LicenseReservationInfo `xml:"reservationInfo,omitempty"` - FeatureInfo []LicenseFeatureInfo `xml:"featureInfo,omitempty"` -} - -func init() { - t["LicenseUsageInfo"] = reflect.TypeOf((*LicenseUsageInfo)(nil)).Elem() -} - -type LimitExceeded struct { - VimFault - - Property string `xml:"property,omitempty"` - Limit *int32 `xml:"limit"` -} - -func init() { - t["LimitExceeded"] = reflect.TypeOf((*LimitExceeded)(nil)).Elem() -} - -type LimitExceededFault LimitExceeded - -func init() { - t["LimitExceededFault"] = reflect.TypeOf((*LimitExceededFault)(nil)).Elem() -} - -type LinkDiscoveryProtocolConfig struct { - DynamicData - - Protocol string `xml:"protocol"` - Operation string `xml:"operation"` -} - -func init() { - t["LinkDiscoveryProtocolConfig"] = reflect.TypeOf((*LinkDiscoveryProtocolConfig)(nil)).Elem() -} - -type LinkLayerDiscoveryProtocolInfo struct { - DynamicData - - ChassisId string `xml:"chassisId"` - PortId string `xml:"portId"` - TimeToLive int32 `xml:"timeToLive"` - Parameter []KeyAnyValue `xml:"parameter,omitempty"` -} - -func init() { - t["LinkLayerDiscoveryProtocolInfo"] = reflect.TypeOf((*LinkLayerDiscoveryProtocolInfo)(nil)).Elem() -} - -type LinkProfile struct { - ApplyProfile -} - -func init() { - t["LinkProfile"] = reflect.TypeOf((*LinkProfile)(nil)).Elem() -} - -type LinuxVolumeNotClean struct { - CustomizationFault -} - -func init() { - t["LinuxVolumeNotClean"] = reflect.TypeOf((*LinuxVolumeNotClean)(nil)).Elem() -} - -type LinuxVolumeNotCleanFault LinuxVolumeNotClean - -func init() { - t["LinuxVolumeNotCleanFault"] = reflect.TypeOf((*LinuxVolumeNotCleanFault)(nil)).Elem() -} - -type ListCACertificateRevocationLists ListCACertificateRevocationListsRequestType - -func init() { - t["ListCACertificateRevocationLists"] = reflect.TypeOf((*ListCACertificateRevocationLists)(nil)).Elem() -} - -type ListCACertificateRevocationListsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ListCACertificateRevocationListsRequestType"] = reflect.TypeOf((*ListCACertificateRevocationListsRequestType)(nil)).Elem() -} - -type ListCACertificateRevocationListsResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type ListCACertificates ListCACertificatesRequestType - -func init() { - t["ListCACertificates"] = reflect.TypeOf((*ListCACertificates)(nil)).Elem() -} - -type ListCACertificatesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ListCACertificatesRequestType"] = reflect.TypeOf((*ListCACertificatesRequestType)(nil)).Elem() -} - -type ListCACertificatesResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type ListFilesInGuest ListFilesInGuestRequestType - -func init() { - t["ListFilesInGuest"] = reflect.TypeOf((*ListFilesInGuest)(nil)).Elem() -} - -type ListFilesInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - FilePath string `xml:"filePath"` - Index int32 `xml:"index,omitempty"` - MaxResults int32 `xml:"maxResults,omitempty"` - MatchPattern string `xml:"matchPattern,omitempty"` -} - -func init() { - t["ListFilesInGuestRequestType"] = reflect.TypeOf((*ListFilesInGuestRequestType)(nil)).Elem() -} - -type ListFilesInGuestResponse struct { - Returnval GuestListFileInfo `xml:"returnval"` -} - -type ListGuestAliases ListGuestAliasesRequestType - -func init() { - t["ListGuestAliases"] = reflect.TypeOf((*ListGuestAliases)(nil)).Elem() -} - -type ListGuestAliasesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Username string `xml:"username"` -} - -func init() { - t["ListGuestAliasesRequestType"] = reflect.TypeOf((*ListGuestAliasesRequestType)(nil)).Elem() -} - -type ListGuestAliasesResponse struct { - Returnval []GuestAliases `xml:"returnval,omitempty"` -} - -type ListGuestMappedAliases ListGuestMappedAliasesRequestType - -func init() { - t["ListGuestMappedAliases"] = reflect.TypeOf((*ListGuestMappedAliases)(nil)).Elem() -} - -type ListGuestMappedAliasesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` -} - -func init() { - t["ListGuestMappedAliasesRequestType"] = reflect.TypeOf((*ListGuestMappedAliasesRequestType)(nil)).Elem() -} - -type ListGuestMappedAliasesResponse struct { - Returnval []GuestMappedAliases `xml:"returnval,omitempty"` -} - -type ListKeys ListKeysRequestType - -func init() { - t["ListKeys"] = reflect.TypeOf((*ListKeys)(nil)).Elem() -} - -type ListKeysRequestType struct { - This ManagedObjectReference `xml:"_this"` - Limit *int32 `xml:"limit"` -} - -func init() { - t["ListKeysRequestType"] = reflect.TypeOf((*ListKeysRequestType)(nil)).Elem() -} - -type ListKeysResponse struct { - Returnval []CryptoKeyId `xml:"returnval,omitempty"` -} - -type ListKmipServers ListKmipServersRequestType - -func init() { - t["ListKmipServers"] = reflect.TypeOf((*ListKmipServers)(nil)).Elem() -} - -type ListKmipServersRequestType struct { - This ManagedObjectReference `xml:"_this"` - Limit *int32 `xml:"limit"` -} - -func init() { - t["ListKmipServersRequestType"] = reflect.TypeOf((*ListKmipServersRequestType)(nil)).Elem() -} - -type ListKmipServersResponse struct { - Returnval []KmipClusterInfo `xml:"returnval,omitempty"` -} - -type ListKmsClusters ListKmsClustersRequestType - -func init() { - t["ListKmsClusters"] = reflect.TypeOf((*ListKmsClusters)(nil)).Elem() -} - -type ListKmsClustersRequestType struct { - This ManagedObjectReference `xml:"_this"` - IncludeKmsServers *bool `xml:"includeKmsServers"` - ManagementTypeFilter int32 `xml:"managementTypeFilter,omitempty"` - StatusFilter int32 `xml:"statusFilter,omitempty"` -} - -func init() { - t["ListKmsClustersRequestType"] = reflect.TypeOf((*ListKmsClustersRequestType)(nil)).Elem() -} - -type ListKmsClustersResponse struct { - Returnval []KmipClusterInfo `xml:"returnval,omitempty"` -} - -type ListProcessesInGuest ListProcessesInGuestRequestType - -func init() { - t["ListProcessesInGuest"] = reflect.TypeOf((*ListProcessesInGuest)(nil)).Elem() -} - -type ListProcessesInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Pids []int64 `xml:"pids,omitempty"` -} - -func init() { - t["ListProcessesInGuestRequestType"] = reflect.TypeOf((*ListProcessesInGuestRequestType)(nil)).Elem() -} - -type ListProcessesInGuestResponse struct { - Returnval []GuestProcessInfo `xml:"returnval,omitempty"` -} - -type ListRegistryKeysInGuest ListRegistryKeysInGuestRequestType - -func init() { - t["ListRegistryKeysInGuest"] = reflect.TypeOf((*ListRegistryKeysInGuest)(nil)).Elem() -} - -type ListRegistryKeysInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - KeyName GuestRegKeyNameSpec `xml:"keyName"` - Recursive bool `xml:"recursive"` - MatchPattern string `xml:"matchPattern,omitempty"` -} - -func init() { - t["ListRegistryKeysInGuestRequestType"] = reflect.TypeOf((*ListRegistryKeysInGuestRequestType)(nil)).Elem() -} - -type ListRegistryKeysInGuestResponse struct { - Returnval []GuestRegKeyRecordSpec `xml:"returnval,omitempty"` -} - -type ListRegistryValuesInGuest ListRegistryValuesInGuestRequestType - -func init() { - t["ListRegistryValuesInGuest"] = reflect.TypeOf((*ListRegistryValuesInGuest)(nil)).Elem() -} - -type ListRegistryValuesInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - KeyName GuestRegKeyNameSpec `xml:"keyName"` - ExpandStrings bool `xml:"expandStrings"` - MatchPattern string `xml:"matchPattern,omitempty"` -} - -func init() { - t["ListRegistryValuesInGuestRequestType"] = reflect.TypeOf((*ListRegistryValuesInGuestRequestType)(nil)).Elem() -} - -type ListRegistryValuesInGuestResponse struct { - Returnval []GuestRegValueSpec `xml:"returnval,omitempty"` -} - -type ListSmartCardTrustAnchors ListSmartCardTrustAnchorsRequestType - -func init() { - t["ListSmartCardTrustAnchors"] = reflect.TypeOf((*ListSmartCardTrustAnchors)(nil)).Elem() -} - -type ListSmartCardTrustAnchorsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ListSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ListSmartCardTrustAnchorsRequestType)(nil)).Elem() -} - -type ListSmartCardTrustAnchorsResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type ListTagsAttachedToVStorageObject ListTagsAttachedToVStorageObjectRequestType - -func init() { - t["ListTagsAttachedToVStorageObject"] = reflect.TypeOf((*ListTagsAttachedToVStorageObject)(nil)).Elem() -} - -type ListTagsAttachedToVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` -} - -func init() { - t["ListTagsAttachedToVStorageObjectRequestType"] = reflect.TypeOf((*ListTagsAttachedToVStorageObjectRequestType)(nil)).Elem() -} - -type ListTagsAttachedToVStorageObjectResponse struct { - Returnval []VslmTagEntry `xml:"returnval,omitempty"` -} - -type ListVStorageObject ListVStorageObjectRequestType - -func init() { - t["ListVStorageObject"] = reflect.TypeOf((*ListVStorageObject)(nil)).Elem() -} - -type ListVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["ListVStorageObjectRequestType"] = reflect.TypeOf((*ListVStorageObjectRequestType)(nil)).Elem() -} - -type ListVStorageObjectResponse struct { - Returnval []ID `xml:"returnval,omitempty"` -} - -type ListVStorageObjectsAttachedToTag ListVStorageObjectsAttachedToTagRequestType - -func init() { - t["ListVStorageObjectsAttachedToTag"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTag)(nil)).Elem() -} - -type ListVStorageObjectsAttachedToTagRequestType struct { - This ManagedObjectReference `xml:"_this"` - Category string `xml:"category"` - Tag string `xml:"tag"` -} - -func init() { - t["ListVStorageObjectsAttachedToTagRequestType"] = reflect.TypeOf((*ListVStorageObjectsAttachedToTagRequestType)(nil)).Elem() -} - -type ListVStorageObjectsAttachedToTagResponse struct { - Returnval []ID `xml:"returnval,omitempty"` -} - -type LocalDatastoreCreatedEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` - DatastoreUrl string `xml:"datastoreUrl,omitempty"` -} - -func init() { - t["LocalDatastoreCreatedEvent"] = reflect.TypeOf((*LocalDatastoreCreatedEvent)(nil)).Elem() -} - -type LocalDatastoreInfo struct { - DatastoreInfo - - Path string `xml:"path,omitempty"` -} - -func init() { - t["LocalDatastoreInfo"] = reflect.TypeOf((*LocalDatastoreInfo)(nil)).Elem() -} - -type LocalLicenseSource struct { - LicenseSource - - LicenseKeys string `xml:"licenseKeys"` -} - -func init() { - t["LocalLicenseSource"] = reflect.TypeOf((*LocalLicenseSource)(nil)).Elem() -} - -type LocalTSMEnabledEvent struct { - HostEvent -} - -func init() { - t["LocalTSMEnabledEvent"] = reflect.TypeOf((*LocalTSMEnabledEvent)(nil)).Elem() -} - -type LocalizableMessage struct { - DynamicData - - Key string `xml:"key"` - Arg []KeyAnyValue `xml:"arg,omitempty"` - Message string `xml:"message,omitempty"` -} - -func init() { - t["LocalizableMessage"] = reflect.TypeOf((*LocalizableMessage)(nil)).Elem() -} - -type LocalizationManagerMessageCatalog struct { - DynamicData - - ModuleName string `xml:"moduleName"` - CatalogName string `xml:"catalogName"` - Locale string `xml:"locale"` - CatalogUri string `xml:"catalogUri"` - LastModified *time.Time `xml:"lastModified"` - Md5sum string `xml:"md5sum,omitempty"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["LocalizationManagerMessageCatalog"] = reflect.TypeOf((*LocalizationManagerMessageCatalog)(nil)).Elem() -} - -type LocalizedMethodFault struct { - DynamicData - - Fault BaseMethodFault `xml:"fault,typeattr"` - LocalizedMessage string `xml:"localizedMessage,omitempty"` -} - -func init() { - t["LocalizedMethodFault"] = reflect.TypeOf((*LocalizedMethodFault)(nil)).Elem() -} - -type LockerMisconfiguredEvent struct { - Event - - Datastore DatastoreEventArgument `xml:"datastore"` -} - -func init() { - t["LockerMisconfiguredEvent"] = reflect.TypeOf((*LockerMisconfiguredEvent)(nil)).Elem() -} - -type LockerReconfiguredEvent struct { - Event - - OldDatastore *DatastoreEventArgument `xml:"oldDatastore,omitempty"` - NewDatastore *DatastoreEventArgument `xml:"newDatastore,omitempty"` -} - -func init() { - t["LockerReconfiguredEvent"] = reflect.TypeOf((*LockerReconfiguredEvent)(nil)).Elem() -} - -type LogBundlingFailed struct { - VimFault -} - -func init() { - t["LogBundlingFailed"] = reflect.TypeOf((*LogBundlingFailed)(nil)).Elem() -} - -type LogBundlingFailedFault LogBundlingFailed - -func init() { - t["LogBundlingFailedFault"] = reflect.TypeOf((*LogBundlingFailedFault)(nil)).Elem() -} - -type LogUserEvent LogUserEventRequestType - -func init() { - t["LogUserEvent"] = reflect.TypeOf((*LogUserEvent)(nil)).Elem() -} - -type LogUserEventRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Msg string `xml:"msg"` -} - -func init() { - t["LogUserEventRequestType"] = reflect.TypeOf((*LogUserEventRequestType)(nil)).Elem() -} - -type LogUserEventResponse struct { -} - -type Login LoginRequestType - -func init() { - t["Login"] = reflect.TypeOf((*Login)(nil)).Elem() -} - -type LoginBySSPI LoginBySSPIRequestType - -func init() { - t["LoginBySSPI"] = reflect.TypeOf((*LoginBySSPI)(nil)).Elem() -} - -type LoginBySSPIRequestType struct { - This ManagedObjectReference `xml:"_this"` - Base64Token string `xml:"base64Token"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["LoginBySSPIRequestType"] = reflect.TypeOf((*LoginBySSPIRequestType)(nil)).Elem() -} - -type LoginBySSPIResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type LoginByToken LoginByTokenRequestType - -func init() { - t["LoginByToken"] = reflect.TypeOf((*LoginByToken)(nil)).Elem() -} - -type LoginByTokenRequestType struct { - This ManagedObjectReference `xml:"_this"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["LoginByTokenRequestType"] = reflect.TypeOf((*LoginByTokenRequestType)(nil)).Elem() -} - -type LoginByTokenResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type LoginExtensionByCertificate LoginExtensionByCertificateRequestType - -func init() { - t["LoginExtensionByCertificate"] = reflect.TypeOf((*LoginExtensionByCertificate)(nil)).Elem() -} - -type LoginExtensionByCertificateRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["LoginExtensionByCertificateRequestType"] = reflect.TypeOf((*LoginExtensionByCertificateRequestType)(nil)).Elem() -} - -type LoginExtensionByCertificateResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type LoginExtensionBySubjectName LoginExtensionBySubjectNameRequestType - -func init() { - t["LoginExtensionBySubjectName"] = reflect.TypeOf((*LoginExtensionBySubjectName)(nil)).Elem() -} - -type LoginExtensionBySubjectNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["LoginExtensionBySubjectNameRequestType"] = reflect.TypeOf((*LoginExtensionBySubjectNameRequestType)(nil)).Elem() -} - -type LoginExtensionBySubjectNameResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type LoginRequestType struct { - This ManagedObjectReference `xml:"_this"` - UserName string `xml:"userName"` - Password string `xml:"password"` - Locale string `xml:"locale,omitempty"` -} - -func init() { - t["LoginRequestType"] = reflect.TypeOf((*LoginRequestType)(nil)).Elem() -} - -type LoginResponse struct { - Returnval UserSession `xml:"returnval"` -} - -type Logout LogoutRequestType - -func init() { - t["Logout"] = reflect.TypeOf((*Logout)(nil)).Elem() -} - -type LogoutRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["LogoutRequestType"] = reflect.TypeOf((*LogoutRequestType)(nil)).Elem() -} - -type LogoutResponse struct { -} - -type LongOption struct { - OptionType - - Min int64 `xml:"min"` - Max int64 `xml:"max"` - DefaultValue int64 `xml:"defaultValue"` -} - -func init() { - t["LongOption"] = reflect.TypeOf((*LongOption)(nil)).Elem() -} - -type LongPolicy struct { - InheritablePolicy - - Value int64 `xml:"value,omitempty"` -} - -func init() { - t["LongPolicy"] = reflect.TypeOf((*LongPolicy)(nil)).Elem() -} - -type LookupDvPortGroup LookupDvPortGroupRequestType - -func init() { - t["LookupDvPortGroup"] = reflect.TypeOf((*LookupDvPortGroup)(nil)).Elem() -} - -type LookupDvPortGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - PortgroupKey string `xml:"portgroupKey"` -} - -func init() { - t["LookupDvPortGroupRequestType"] = reflect.TypeOf((*LookupDvPortGroupRequestType)(nil)).Elem() -} - -type LookupDvPortGroupResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type LookupVmOverheadMemory LookupVmOverheadMemoryRequestType - -func init() { - t["LookupVmOverheadMemory"] = reflect.TypeOf((*LookupVmOverheadMemory)(nil)).Elem() -} - -type LookupVmOverheadMemoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["LookupVmOverheadMemoryRequestType"] = reflect.TypeOf((*LookupVmOverheadMemoryRequestType)(nil)).Elem() -} - -type LookupVmOverheadMemoryResponse struct { - Returnval int64 `xml:"returnval"` -} - -type MacAddress struct { - NegatableExpression -} - -func init() { - t["MacAddress"] = reflect.TypeOf((*MacAddress)(nil)).Elem() -} - -type MacRange struct { - MacAddress - - Address string `xml:"address"` - Mask string `xml:"mask"` -} - -func init() { - t["MacRange"] = reflect.TypeOf((*MacRange)(nil)).Elem() -} - -type MaintenanceModeFileMove struct { - MigrationFault -} - -func init() { - t["MaintenanceModeFileMove"] = reflect.TypeOf((*MaintenanceModeFileMove)(nil)).Elem() -} - -type MaintenanceModeFileMoveFault MaintenanceModeFileMove - -func init() { - t["MaintenanceModeFileMoveFault"] = reflect.TypeOf((*MaintenanceModeFileMoveFault)(nil)).Elem() -} - -type MakeDirectory MakeDirectoryRequestType - -func init() { - t["MakeDirectory"] = reflect.TypeOf((*MakeDirectory)(nil)).Elem() -} - -type MakeDirectoryInGuest MakeDirectoryInGuestRequestType - -func init() { - t["MakeDirectoryInGuest"] = reflect.TypeOf((*MakeDirectoryInGuest)(nil)).Elem() -} - -type MakeDirectoryInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - DirectoryPath string `xml:"directoryPath"` - CreateParentDirectories bool `xml:"createParentDirectories"` -} - -func init() { - t["MakeDirectoryInGuestRequestType"] = reflect.TypeOf((*MakeDirectoryInGuestRequestType)(nil)).Elem() -} - -type MakeDirectoryInGuestResponse struct { -} - -type MakeDirectoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - CreateParentDirectories *bool `xml:"createParentDirectories"` -} - -func init() { - t["MakeDirectoryRequestType"] = reflect.TypeOf((*MakeDirectoryRequestType)(nil)).Elem() -} - -type MakeDirectoryResponse struct { -} - -type MakePrimaryVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["MakePrimaryVMRequestType"] = reflect.TypeOf((*MakePrimaryVMRequestType)(nil)).Elem() -} - -type MakePrimaryVM_Task MakePrimaryVMRequestType - -func init() { - t["MakePrimaryVM_Task"] = reflect.TypeOf((*MakePrimaryVM_Task)(nil)).Elem() -} - -type MakePrimaryVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ManagedByInfo struct { - DynamicData - - ExtensionKey string `xml:"extensionKey"` - Type string `xml:"type"` -} - -func init() { - t["ManagedByInfo"] = reflect.TypeOf((*ManagedByInfo)(nil)).Elem() -} - -type ManagedEntityEventArgument struct { - EntityEventArgument - - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["ManagedEntityEventArgument"] = reflect.TypeOf((*ManagedEntityEventArgument)(nil)).Elem() -} - -type ManagedObjectNotFound struct { - RuntimeFault - - Obj ManagedObjectReference `xml:"obj"` -} - -func init() { - t["ManagedObjectNotFound"] = reflect.TypeOf((*ManagedObjectNotFound)(nil)).Elem() -} - -type ManagedObjectNotFoundFault ManagedObjectNotFound - -func init() { - t["ManagedObjectNotFoundFault"] = reflect.TypeOf((*ManagedObjectNotFoundFault)(nil)).Elem() -} - -type ManagedObjectReference struct { - Type string `xml:"type,attr"` - Value string `xml:",chardata"` -} - -func init() { - t["ManagedObjectReference"] = reflect.TypeOf((*ManagedObjectReference)(nil)).Elem() -} - -type MarkAsLocalRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuid string `xml:"scsiDiskUuid"` -} - -func init() { - t["MarkAsLocalRequestType"] = reflect.TypeOf((*MarkAsLocalRequestType)(nil)).Elem() -} - -type MarkAsLocal_Task MarkAsLocalRequestType - -func init() { - t["MarkAsLocal_Task"] = reflect.TypeOf((*MarkAsLocal_Task)(nil)).Elem() -} - -type MarkAsLocal_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MarkAsNonLocalRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuid string `xml:"scsiDiskUuid"` -} - -func init() { - t["MarkAsNonLocalRequestType"] = reflect.TypeOf((*MarkAsNonLocalRequestType)(nil)).Elem() -} - -type MarkAsNonLocal_Task MarkAsNonLocalRequestType - -func init() { - t["MarkAsNonLocal_Task"] = reflect.TypeOf((*MarkAsNonLocal_Task)(nil)).Elem() -} - -type MarkAsNonLocal_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MarkAsNonSsdRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuid string `xml:"scsiDiskUuid"` -} - -func init() { - t["MarkAsNonSsdRequestType"] = reflect.TypeOf((*MarkAsNonSsdRequestType)(nil)).Elem() -} - -type MarkAsNonSsd_Task MarkAsNonSsdRequestType - -func init() { - t["MarkAsNonSsd_Task"] = reflect.TypeOf((*MarkAsNonSsd_Task)(nil)).Elem() -} - -type MarkAsNonSsd_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MarkAsSsdRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuid string `xml:"scsiDiskUuid"` -} - -func init() { - t["MarkAsSsdRequestType"] = reflect.TypeOf((*MarkAsSsdRequestType)(nil)).Elem() -} - -type MarkAsSsd_Task MarkAsSsdRequestType - -func init() { - t["MarkAsSsd_Task"] = reflect.TypeOf((*MarkAsSsd_Task)(nil)).Elem() -} - -type MarkAsSsd_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MarkAsTemplate MarkAsTemplateRequestType - -func init() { - t["MarkAsTemplate"] = reflect.TypeOf((*MarkAsTemplate)(nil)).Elem() -} - -type MarkAsTemplateRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["MarkAsTemplateRequestType"] = reflect.TypeOf((*MarkAsTemplateRequestType)(nil)).Elem() -} - -type MarkAsTemplateResponse struct { -} - -type MarkAsVirtualMachine MarkAsVirtualMachineRequestType - -func init() { - t["MarkAsVirtualMachine"] = reflect.TypeOf((*MarkAsVirtualMachine)(nil)).Elem() -} - -type MarkAsVirtualMachineRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pool ManagedObjectReference `xml:"pool"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["MarkAsVirtualMachineRequestType"] = reflect.TypeOf((*MarkAsVirtualMachineRequestType)(nil)).Elem() -} - -type MarkAsVirtualMachineResponse struct { -} - -type MarkDefault MarkDefaultRequestType - -func init() { - t["MarkDefault"] = reflect.TypeOf((*MarkDefault)(nil)).Elem() -} - -type MarkDefaultRequestType struct { - This ManagedObjectReference `xml:"_this"` - ClusterId KeyProviderId `xml:"clusterId"` -} - -func init() { - t["MarkDefaultRequestType"] = reflect.TypeOf((*MarkDefaultRequestType)(nil)).Elem() -} - -type MarkDefaultResponse struct { -} - -type MarkForRemoval MarkForRemovalRequestType - -func init() { - t["MarkForRemoval"] = reflect.TypeOf((*MarkForRemoval)(nil)).Elem() -} - -type MarkForRemovalRequestType struct { - This ManagedObjectReference `xml:"_this"` - HbaName string `xml:"hbaName"` - Remove bool `xml:"remove"` -} - -func init() { - t["MarkForRemovalRequestType"] = reflect.TypeOf((*MarkForRemovalRequestType)(nil)).Elem() -} - -type MarkForRemovalResponse struct { -} - -type MarkPerenniallyReserved MarkPerenniallyReservedRequestType - -func init() { - t["MarkPerenniallyReserved"] = reflect.TypeOf((*MarkPerenniallyReserved)(nil)).Elem() -} - -type MarkPerenniallyReservedExRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid []string `xml:"lunUuid,omitempty"` - State bool `xml:"state"` -} - -func init() { - t["MarkPerenniallyReservedExRequestType"] = reflect.TypeOf((*MarkPerenniallyReservedExRequestType)(nil)).Elem() -} - -type MarkPerenniallyReservedEx_Task MarkPerenniallyReservedExRequestType - -func init() { - t["MarkPerenniallyReservedEx_Task"] = reflect.TypeOf((*MarkPerenniallyReservedEx_Task)(nil)).Elem() -} - -type MarkPerenniallyReservedEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MarkPerenniallyReservedRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid string `xml:"lunUuid"` - State bool `xml:"state"` -} - -func init() { - t["MarkPerenniallyReservedRequestType"] = reflect.TypeOf((*MarkPerenniallyReservedRequestType)(nil)).Elem() -} - -type MarkPerenniallyReservedResponse struct { -} - -type MarkServiceProviderEntities MarkServiceProviderEntitiesRequestType - -func init() { - t["MarkServiceProviderEntities"] = reflect.TypeOf((*MarkServiceProviderEntities)(nil)).Elem() -} - -type MarkServiceProviderEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["MarkServiceProviderEntitiesRequestType"] = reflect.TypeOf((*MarkServiceProviderEntitiesRequestType)(nil)).Elem() -} - -type MarkServiceProviderEntitiesResponse struct { -} - -type MemoryFileFormatNotSupportedByDatastore struct { - UnsupportedDatastore - - DatastoreName string `xml:"datastoreName"` - Type string `xml:"type"` -} - -func init() { - t["MemoryFileFormatNotSupportedByDatastore"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastore)(nil)).Elem() -} - -type MemoryFileFormatNotSupportedByDatastoreFault MemoryFileFormatNotSupportedByDatastore - -func init() { - t["MemoryFileFormatNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemoryFileFormatNotSupportedByDatastoreFault)(nil)).Elem() -} - -type MemoryHotPlugNotSupported struct { - VmConfigFault -} - -func init() { - t["MemoryHotPlugNotSupported"] = reflect.TypeOf((*MemoryHotPlugNotSupported)(nil)).Elem() -} - -type MemoryHotPlugNotSupportedFault MemoryHotPlugNotSupported - -func init() { - t["MemoryHotPlugNotSupportedFault"] = reflect.TypeOf((*MemoryHotPlugNotSupportedFault)(nil)).Elem() -} - -type MemorySizeNotRecommended struct { - VirtualHardwareCompatibilityIssue - - MemorySizeMB int32 `xml:"memorySizeMB"` - MinMemorySizeMB int32 `xml:"minMemorySizeMB"` - MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` -} - -func init() { - t["MemorySizeNotRecommended"] = reflect.TypeOf((*MemorySizeNotRecommended)(nil)).Elem() -} - -type MemorySizeNotRecommendedFault MemorySizeNotRecommended - -func init() { - t["MemorySizeNotRecommendedFault"] = reflect.TypeOf((*MemorySizeNotRecommendedFault)(nil)).Elem() -} - -type MemorySizeNotSupported struct { - VirtualHardwareCompatibilityIssue - - MemorySizeMB int32 `xml:"memorySizeMB"` - MinMemorySizeMB int32 `xml:"minMemorySizeMB"` - MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` -} - -func init() { - t["MemorySizeNotSupported"] = reflect.TypeOf((*MemorySizeNotSupported)(nil)).Elem() -} - -type MemorySizeNotSupportedByDatastore struct { - VirtualHardwareCompatibilityIssue - - Datastore ManagedObjectReference `xml:"datastore"` - MemorySizeMB int32 `xml:"memorySizeMB"` - MaxMemorySizeMB int32 `xml:"maxMemorySizeMB"` -} - -func init() { - t["MemorySizeNotSupportedByDatastore"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastore)(nil)).Elem() -} - -type MemorySizeNotSupportedByDatastoreFault MemorySizeNotSupportedByDatastore - -func init() { - t["MemorySizeNotSupportedByDatastoreFault"] = reflect.TypeOf((*MemorySizeNotSupportedByDatastoreFault)(nil)).Elem() -} - -type MemorySizeNotSupportedFault MemorySizeNotSupported - -func init() { - t["MemorySizeNotSupportedFault"] = reflect.TypeOf((*MemorySizeNotSupportedFault)(nil)).Elem() -} - -type MemorySnapshotOnIndependentDisk struct { - SnapshotFault -} - -func init() { - t["MemorySnapshotOnIndependentDisk"] = reflect.TypeOf((*MemorySnapshotOnIndependentDisk)(nil)).Elem() -} - -type MemorySnapshotOnIndependentDiskFault MemorySnapshotOnIndependentDisk - -func init() { - t["MemorySnapshotOnIndependentDiskFault"] = reflect.TypeOf((*MemorySnapshotOnIndependentDiskFault)(nil)).Elem() -} - -type MergeDvsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dvs ManagedObjectReference `xml:"dvs"` -} - -func init() { - t["MergeDvsRequestType"] = reflect.TypeOf((*MergeDvsRequestType)(nil)).Elem() -} - -type MergeDvs_Task MergeDvsRequestType - -func init() { - t["MergeDvs_Task"] = reflect.TypeOf((*MergeDvs_Task)(nil)).Elem() -} - -type MergeDvs_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MergePermissions MergePermissionsRequestType - -func init() { - t["MergePermissions"] = reflect.TypeOf((*MergePermissions)(nil)).Elem() -} - -type MergePermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - SrcRoleId int32 `xml:"srcRoleId"` - DstRoleId int32 `xml:"dstRoleId"` -} - -func init() { - t["MergePermissionsRequestType"] = reflect.TypeOf((*MergePermissionsRequestType)(nil)).Elem() -} - -type MergePermissionsResponse struct { -} - -type MethodAction struct { - Action - - Name string `xml:"name"` - Argument []MethodActionArgument `xml:"argument,omitempty"` -} - -func init() { - t["MethodAction"] = reflect.TypeOf((*MethodAction)(nil)).Elem() -} - -type MethodActionArgument struct { - DynamicData - - Value AnyType `xml:"value,typeattr"` -} - -func init() { - t["MethodActionArgument"] = reflect.TypeOf((*MethodActionArgument)(nil)).Elem() -} - -type MethodAlreadyDisabledFault struct { - RuntimeFault - - SourceId string `xml:"sourceId"` -} - -func init() { - t["MethodAlreadyDisabledFault"] = reflect.TypeOf((*MethodAlreadyDisabledFault)(nil)).Elem() -} - -type MethodAlreadyDisabledFaultFault MethodAlreadyDisabledFault - -func init() { - t["MethodAlreadyDisabledFaultFault"] = reflect.TypeOf((*MethodAlreadyDisabledFaultFault)(nil)).Elem() -} - -type MethodDescription struct { - Description - - Key string `xml:"key"` -} - -func init() { - t["MethodDescription"] = reflect.TypeOf((*MethodDescription)(nil)).Elem() -} - -type MethodDisabled struct { - RuntimeFault - - Source string `xml:"source,omitempty"` -} - -func init() { - t["MethodDisabled"] = reflect.TypeOf((*MethodDisabled)(nil)).Elem() -} - -type MethodDisabledFault MethodDisabled - -func init() { - t["MethodDisabledFault"] = reflect.TypeOf((*MethodDisabledFault)(nil)).Elem() -} - -type MethodFault struct { - FaultCause *LocalizedMethodFault `xml:"faultCause,omitempty"` - FaultMessage []LocalizableMessage `xml:"faultMessage,omitempty"` -} - -func init() { - t["MethodFault"] = reflect.TypeOf((*MethodFault)(nil)).Elem() -} - -type MethodFaultFault BaseMethodFault - -func init() { - t["MethodFaultFault"] = reflect.TypeOf((*MethodFaultFault)(nil)).Elem() -} - -type MethodNotFound struct { - InvalidRequest - - Receiver ManagedObjectReference `xml:"receiver"` - Method string `xml:"method"` -} - -func init() { - t["MethodNotFound"] = reflect.TypeOf((*MethodNotFound)(nil)).Elem() -} - -type MethodNotFoundFault MethodNotFound - -func init() { - t["MethodNotFoundFault"] = reflect.TypeOf((*MethodNotFoundFault)(nil)).Elem() -} - -type MetricAlarmExpression struct { - AlarmExpression - - Operator MetricAlarmOperator `xml:"operator"` - Type string `xml:"type"` - Metric PerfMetricId `xml:"metric"` - Yellow int32 `xml:"yellow,omitempty"` - YellowInterval int32 `xml:"yellowInterval,omitempty"` - Red int32 `xml:"red,omitempty"` - RedInterval int32 `xml:"redInterval,omitempty"` -} - -func init() { - t["MetricAlarmExpression"] = reflect.TypeOf((*MetricAlarmExpression)(nil)).Elem() -} - -type MigrateVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Priority VirtualMachineMovePriority `xml:"priority"` - State VirtualMachinePowerState `xml:"state,omitempty"` -} - -func init() { - t["MigrateVMRequestType"] = reflect.TypeOf((*MigrateVMRequestType)(nil)).Elem() -} - -type MigrateVM_Task MigrateVMRequestType - -func init() { - t["MigrateVM_Task"] = reflect.TypeOf((*MigrateVM_Task)(nil)).Elem() -} - -type MigrateVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MigrationDisabled struct { - MigrationFault -} - -func init() { - t["MigrationDisabled"] = reflect.TypeOf((*MigrationDisabled)(nil)).Elem() -} - -type MigrationDisabledFault MigrationDisabled - -func init() { - t["MigrationDisabledFault"] = reflect.TypeOf((*MigrationDisabledFault)(nil)).Elem() -} - -type MigrationErrorEvent struct { - MigrationEvent -} - -func init() { - t["MigrationErrorEvent"] = reflect.TypeOf((*MigrationErrorEvent)(nil)).Elem() -} - -type MigrationEvent struct { - VmEvent - - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["MigrationEvent"] = reflect.TypeOf((*MigrationEvent)(nil)).Elem() -} - -type MigrationFault struct { - VimFault -} - -func init() { - t["MigrationFault"] = reflect.TypeOf((*MigrationFault)(nil)).Elem() -} - -type MigrationFaultFault BaseMigrationFault - -func init() { - t["MigrationFaultFault"] = reflect.TypeOf((*MigrationFaultFault)(nil)).Elem() -} - -type MigrationFeatureNotSupported struct { - MigrationFault - - AtSourceHost bool `xml:"atSourceHost"` - FailedHostName string `xml:"failedHostName"` - FailedHost ManagedObjectReference `xml:"failedHost"` -} - -func init() { - t["MigrationFeatureNotSupported"] = reflect.TypeOf((*MigrationFeatureNotSupported)(nil)).Elem() -} - -type MigrationFeatureNotSupportedFault BaseMigrationFeatureNotSupported - -func init() { - t["MigrationFeatureNotSupportedFault"] = reflect.TypeOf((*MigrationFeatureNotSupportedFault)(nil)).Elem() -} - -type MigrationHostErrorEvent struct { - MigrationEvent - - DstHost HostEventArgument `xml:"dstHost"` -} - -func init() { - t["MigrationHostErrorEvent"] = reflect.TypeOf((*MigrationHostErrorEvent)(nil)).Elem() -} - -type MigrationHostWarningEvent struct { - MigrationEvent - - DstHost HostEventArgument `xml:"dstHost"` -} - -func init() { - t["MigrationHostWarningEvent"] = reflect.TypeOf((*MigrationHostWarningEvent)(nil)).Elem() -} - -type MigrationNotReady struct { - MigrationFault - - Reason string `xml:"reason"` -} - -func init() { - t["MigrationNotReady"] = reflect.TypeOf((*MigrationNotReady)(nil)).Elem() -} - -type MigrationNotReadyFault MigrationNotReady - -func init() { - t["MigrationNotReadyFault"] = reflect.TypeOf((*MigrationNotReadyFault)(nil)).Elem() -} - -type MigrationResourceErrorEvent struct { - MigrationEvent - - DstPool ResourcePoolEventArgument `xml:"dstPool"` - DstHost HostEventArgument `xml:"dstHost"` -} - -func init() { - t["MigrationResourceErrorEvent"] = reflect.TypeOf((*MigrationResourceErrorEvent)(nil)).Elem() -} - -type MigrationResourceWarningEvent struct { - MigrationEvent - - DstPool ResourcePoolEventArgument `xml:"dstPool"` - DstHost HostEventArgument `xml:"dstHost"` -} - -func init() { - t["MigrationResourceWarningEvent"] = reflect.TypeOf((*MigrationResourceWarningEvent)(nil)).Elem() -} - -type MigrationWarningEvent struct { - MigrationEvent -} - -func init() { - t["MigrationWarningEvent"] = reflect.TypeOf((*MigrationWarningEvent)(nil)).Elem() -} - -type MismatchedBundle struct { - VimFault - - BundleUuid string `xml:"bundleUuid"` - HostUuid string `xml:"hostUuid"` - BundleBuildNumber int32 `xml:"bundleBuildNumber"` - HostBuildNumber int32 `xml:"hostBuildNumber"` -} - -func init() { - t["MismatchedBundle"] = reflect.TypeOf((*MismatchedBundle)(nil)).Elem() -} - -type MismatchedBundleFault MismatchedBundle - -func init() { - t["MismatchedBundleFault"] = reflect.TypeOf((*MismatchedBundleFault)(nil)).Elem() -} - -type MismatchedNetworkPolicies struct { - MigrationFault - - Device string `xml:"device"` - Backing string `xml:"backing"` - Connected bool `xml:"connected"` -} - -func init() { - t["MismatchedNetworkPolicies"] = reflect.TypeOf((*MismatchedNetworkPolicies)(nil)).Elem() -} - -type MismatchedNetworkPoliciesFault MismatchedNetworkPolicies - -func init() { - t["MismatchedNetworkPoliciesFault"] = reflect.TypeOf((*MismatchedNetworkPoliciesFault)(nil)).Elem() -} - -type MismatchedVMotionNetworkNames struct { - MigrationFault - - SourceNetwork string `xml:"sourceNetwork"` - DestNetwork string `xml:"destNetwork"` -} - -func init() { - t["MismatchedVMotionNetworkNames"] = reflect.TypeOf((*MismatchedVMotionNetworkNames)(nil)).Elem() -} - -type MismatchedVMotionNetworkNamesFault MismatchedVMotionNetworkNames - -func init() { - t["MismatchedVMotionNetworkNamesFault"] = reflect.TypeOf((*MismatchedVMotionNetworkNamesFault)(nil)).Elem() -} - -type MissingBmcSupport struct { - VimFault -} - -func init() { - t["MissingBmcSupport"] = reflect.TypeOf((*MissingBmcSupport)(nil)).Elem() -} - -type MissingBmcSupportFault MissingBmcSupport - -func init() { - t["MissingBmcSupportFault"] = reflect.TypeOf((*MissingBmcSupportFault)(nil)).Elem() -} - -type MissingController struct { - InvalidDeviceSpec -} - -func init() { - t["MissingController"] = reflect.TypeOf((*MissingController)(nil)).Elem() -} - -type MissingControllerFault MissingController - -func init() { - t["MissingControllerFault"] = reflect.TypeOf((*MissingControllerFault)(nil)).Elem() -} - -type MissingIpPool struct { - VAppPropertyFault -} - -func init() { - t["MissingIpPool"] = reflect.TypeOf((*MissingIpPool)(nil)).Elem() -} - -type MissingIpPoolFault MissingIpPool - -func init() { - t["MissingIpPoolFault"] = reflect.TypeOf((*MissingIpPoolFault)(nil)).Elem() -} - -type MissingLinuxCustResources struct { - CustomizationFault -} - -func init() { - t["MissingLinuxCustResources"] = reflect.TypeOf((*MissingLinuxCustResources)(nil)).Elem() -} - -type MissingLinuxCustResourcesFault MissingLinuxCustResources - -func init() { - t["MissingLinuxCustResourcesFault"] = reflect.TypeOf((*MissingLinuxCustResourcesFault)(nil)).Elem() -} - -type MissingNetworkIpConfig struct { - VAppPropertyFault -} - -func init() { - t["MissingNetworkIpConfig"] = reflect.TypeOf((*MissingNetworkIpConfig)(nil)).Elem() -} - -type MissingNetworkIpConfigFault MissingNetworkIpConfig - -func init() { - t["MissingNetworkIpConfigFault"] = reflect.TypeOf((*MissingNetworkIpConfigFault)(nil)).Elem() -} - -type MissingObject struct { - DynamicData - - Obj ManagedObjectReference `xml:"obj"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["MissingObject"] = reflect.TypeOf((*MissingObject)(nil)).Elem() -} - -type MissingPowerOffConfiguration struct { - VAppConfigFault -} - -func init() { - t["MissingPowerOffConfiguration"] = reflect.TypeOf((*MissingPowerOffConfiguration)(nil)).Elem() -} - -type MissingPowerOffConfigurationFault MissingPowerOffConfiguration - -func init() { - t["MissingPowerOffConfigurationFault"] = reflect.TypeOf((*MissingPowerOffConfigurationFault)(nil)).Elem() -} - -type MissingPowerOnConfiguration struct { - VAppConfigFault -} - -func init() { - t["MissingPowerOnConfiguration"] = reflect.TypeOf((*MissingPowerOnConfiguration)(nil)).Elem() -} - -type MissingPowerOnConfigurationFault MissingPowerOnConfiguration - -func init() { - t["MissingPowerOnConfigurationFault"] = reflect.TypeOf((*MissingPowerOnConfigurationFault)(nil)).Elem() -} - -type MissingProperty struct { - DynamicData - - Path string `xml:"path"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["MissingProperty"] = reflect.TypeOf((*MissingProperty)(nil)).Elem() -} - -type MissingWindowsCustResources struct { - CustomizationFault -} - -func init() { - t["MissingWindowsCustResources"] = reflect.TypeOf((*MissingWindowsCustResources)(nil)).Elem() -} - -type MissingWindowsCustResourcesFault MissingWindowsCustResources - -func init() { - t["MissingWindowsCustResourcesFault"] = reflect.TypeOf((*MissingWindowsCustResourcesFault)(nil)).Elem() -} - -type MksConnectionLimitReached struct { - InvalidState - - ConnectionLimit int32 `xml:"connectionLimit"` -} - -func init() { - t["MksConnectionLimitReached"] = reflect.TypeOf((*MksConnectionLimitReached)(nil)).Elem() -} - -type MksConnectionLimitReachedFault MksConnectionLimitReached - -func init() { - t["MksConnectionLimitReachedFault"] = reflect.TypeOf((*MksConnectionLimitReachedFault)(nil)).Elem() -} - -type ModeInfo struct { - DynamicData - - Browse string `xml:"browse,omitempty"` - Read string `xml:"read"` - Modify string `xml:"modify"` - Use string `xml:"use"` - Admin string `xml:"admin,omitempty"` - Full string `xml:"full"` -} - -func init() { - t["ModeInfo"] = reflect.TypeOf((*ModeInfo)(nil)).Elem() -} - -type ModifyListView ModifyListViewRequestType - -func init() { - t["ModifyListView"] = reflect.TypeOf((*ModifyListView)(nil)).Elem() -} - -type ModifyListViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - Add []ManagedObjectReference `xml:"add,omitempty"` - Remove []ManagedObjectReference `xml:"remove,omitempty"` -} - -func init() { - t["ModifyListViewRequestType"] = reflect.TypeOf((*ModifyListViewRequestType)(nil)).Elem() -} - -type ModifyListViewResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type MonthlyByDayTaskScheduler struct { - MonthlyTaskScheduler - - Day int32 `xml:"day"` -} - -func init() { - t["MonthlyByDayTaskScheduler"] = reflect.TypeOf((*MonthlyByDayTaskScheduler)(nil)).Elem() -} - -type MonthlyByWeekdayTaskScheduler struct { - MonthlyTaskScheduler - - Offset WeekOfMonth `xml:"offset"` - Weekday DayOfWeek `xml:"weekday"` -} - -func init() { - t["MonthlyByWeekdayTaskScheduler"] = reflect.TypeOf((*MonthlyByWeekdayTaskScheduler)(nil)).Elem() -} - -type MonthlyTaskScheduler struct { - DailyTaskScheduler -} - -func init() { - t["MonthlyTaskScheduler"] = reflect.TypeOf((*MonthlyTaskScheduler)(nil)).Elem() -} - -type MountError struct { - CustomizationFault - - Vm ManagedObjectReference `xml:"vm"` - DiskIndex int32 `xml:"diskIndex"` -} - -func init() { - t["MountError"] = reflect.TypeOf((*MountError)(nil)).Elem() -} - -type MountErrorFault MountError - -func init() { - t["MountErrorFault"] = reflect.TypeOf((*MountErrorFault)(nil)).Elem() -} - -type MountToolsInstaller MountToolsInstallerRequestType - -func init() { - t["MountToolsInstaller"] = reflect.TypeOf((*MountToolsInstaller)(nil)).Elem() -} - -type MountToolsInstallerRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["MountToolsInstallerRequestType"] = reflect.TypeOf((*MountToolsInstallerRequestType)(nil)).Elem() -} - -type MountToolsInstallerResponse struct { -} - -type MountVffsVolume MountVffsVolumeRequestType - -func init() { - t["MountVffsVolume"] = reflect.TypeOf((*MountVffsVolume)(nil)).Elem() -} - -type MountVffsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsUuid string `xml:"vffsUuid"` -} - -func init() { - t["MountVffsVolumeRequestType"] = reflect.TypeOf((*MountVffsVolumeRequestType)(nil)).Elem() -} - -type MountVffsVolumeResponse struct { -} - -type MountVmfsVolume MountVmfsVolumeRequestType - -func init() { - t["MountVmfsVolume"] = reflect.TypeOf((*MountVmfsVolume)(nil)).Elem() -} - -type MountVmfsVolumeExRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid []string `xml:"vmfsUuid"` -} - -func init() { - t["MountVmfsVolumeExRequestType"] = reflect.TypeOf((*MountVmfsVolumeExRequestType)(nil)).Elem() -} - -type MountVmfsVolumeEx_Task MountVmfsVolumeExRequestType - -func init() { - t["MountVmfsVolumeEx_Task"] = reflect.TypeOf((*MountVmfsVolumeEx_Task)(nil)).Elem() -} - -type MountVmfsVolumeEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MountVmfsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` -} - -func init() { - t["MountVmfsVolumeRequestType"] = reflect.TypeOf((*MountVmfsVolumeRequestType)(nil)).Elem() -} - -type MountVmfsVolumeResponse struct { -} - -type MoveDVPortRequestType struct { - This ManagedObjectReference `xml:"_this"` - PortKey []string `xml:"portKey"` - DestinationPortgroupKey string `xml:"destinationPortgroupKey,omitempty"` -} - -func init() { - t["MoveDVPortRequestType"] = reflect.TypeOf((*MoveDVPortRequestType)(nil)).Elem() -} - -type MoveDVPort_Task MoveDVPortRequestType - -func init() { - t["MoveDVPort_Task"] = reflect.TypeOf((*MoveDVPort_Task)(nil)).Elem() -} - -type MoveDVPort_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MoveDatastoreFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - SourceName string `xml:"sourceName"` - SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` - DestinationName string `xml:"destinationName"` - DestinationDatacenter *ManagedObjectReference `xml:"destinationDatacenter,omitempty"` - Force *bool `xml:"force"` -} - -func init() { - t["MoveDatastoreFileRequestType"] = reflect.TypeOf((*MoveDatastoreFileRequestType)(nil)).Elem() -} - -type MoveDatastoreFile_Task MoveDatastoreFileRequestType - -func init() { - t["MoveDatastoreFile_Task"] = reflect.TypeOf((*MoveDatastoreFile_Task)(nil)).Elem() -} - -type MoveDatastoreFile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MoveDirectoryInGuest MoveDirectoryInGuestRequestType - -func init() { - t["MoveDirectoryInGuest"] = reflect.TypeOf((*MoveDirectoryInGuest)(nil)).Elem() -} - -type MoveDirectoryInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - SrcDirectoryPath string `xml:"srcDirectoryPath"` - DstDirectoryPath string `xml:"dstDirectoryPath"` -} - -func init() { - t["MoveDirectoryInGuestRequestType"] = reflect.TypeOf((*MoveDirectoryInGuestRequestType)(nil)).Elem() -} - -type MoveDirectoryInGuestResponse struct { -} - -type MoveFileInGuest MoveFileInGuestRequestType - -func init() { - t["MoveFileInGuest"] = reflect.TypeOf((*MoveFileInGuest)(nil)).Elem() -} - -type MoveFileInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - SrcFilePath string `xml:"srcFilePath"` - DstFilePath string `xml:"dstFilePath"` - Overwrite bool `xml:"overwrite"` -} - -func init() { - t["MoveFileInGuestRequestType"] = reflect.TypeOf((*MoveFileInGuestRequestType)(nil)).Elem() -} - -type MoveFileInGuestResponse struct { -} - -type MoveHostIntoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` -} - -func init() { - t["MoveHostIntoRequestType"] = reflect.TypeOf((*MoveHostIntoRequestType)(nil)).Elem() -} - -type MoveHostInto_Task MoveHostIntoRequestType - -func init() { - t["MoveHostInto_Task"] = reflect.TypeOf((*MoveHostInto_Task)(nil)).Elem() -} - -type MoveHostInto_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MoveIntoFolderRequestType struct { - This ManagedObjectReference `xml:"_this"` - List []ManagedObjectReference `xml:"list"` -} - -func init() { - t["MoveIntoFolderRequestType"] = reflect.TypeOf((*MoveIntoFolderRequestType)(nil)).Elem() -} - -type MoveIntoFolder_Task MoveIntoFolderRequestType - -func init() { - t["MoveIntoFolder_Task"] = reflect.TypeOf((*MoveIntoFolder_Task)(nil)).Elem() -} - -type MoveIntoFolder_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MoveIntoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["MoveIntoRequestType"] = reflect.TypeOf((*MoveIntoRequestType)(nil)).Elem() -} - -type MoveIntoResourcePool MoveIntoResourcePoolRequestType - -func init() { - t["MoveIntoResourcePool"] = reflect.TypeOf((*MoveIntoResourcePool)(nil)).Elem() -} - -type MoveIntoResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - List []ManagedObjectReference `xml:"list"` -} - -func init() { - t["MoveIntoResourcePoolRequestType"] = reflect.TypeOf((*MoveIntoResourcePoolRequestType)(nil)).Elem() -} - -type MoveIntoResourcePoolResponse struct { -} - -type MoveInto_Task MoveIntoRequestType - -func init() { - t["MoveInto_Task"] = reflect.TypeOf((*MoveInto_Task)(nil)).Elem() -} - -type MoveInto_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MoveVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - SourceName string `xml:"sourceName"` - SourceDatacenter *ManagedObjectReference `xml:"sourceDatacenter,omitempty"` - DestName string `xml:"destName"` - DestDatacenter *ManagedObjectReference `xml:"destDatacenter,omitempty"` - Force *bool `xml:"force"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["MoveVirtualDiskRequestType"] = reflect.TypeOf((*MoveVirtualDiskRequestType)(nil)).Elem() -} - -type MoveVirtualDisk_Task MoveVirtualDiskRequestType - -func init() { - t["MoveVirtualDisk_Task"] = reflect.TypeOf((*MoveVirtualDisk_Task)(nil)).Elem() -} - -type MoveVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type MtuMatchEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["MtuMatchEvent"] = reflect.TypeOf((*MtuMatchEvent)(nil)).Elem() -} - -type MtuMismatchEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["MtuMismatchEvent"] = reflect.TypeOf((*MtuMismatchEvent)(nil)).Elem() -} - -type MultiWriterNotSupported struct { - DeviceNotSupported -} - -func init() { - t["MultiWriterNotSupported"] = reflect.TypeOf((*MultiWriterNotSupported)(nil)).Elem() -} - -type MultiWriterNotSupportedFault MultiWriterNotSupported - -func init() { - t["MultiWriterNotSupportedFault"] = reflect.TypeOf((*MultiWriterNotSupportedFault)(nil)).Elem() -} - -type MultipleCertificatesVerifyFault struct { - HostConnectFault - - ThumbprintData []MultipleCertificatesVerifyFaultThumbprintData `xml:"thumbprintData"` -} - -func init() { - t["MultipleCertificatesVerifyFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFault)(nil)).Elem() -} - -type MultipleCertificatesVerifyFaultFault MultipleCertificatesVerifyFault - -func init() { - t["MultipleCertificatesVerifyFaultFault"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultFault)(nil)).Elem() -} - -type MultipleCertificatesVerifyFaultThumbprintData struct { - DynamicData - - Port int32 `xml:"port"` - Thumbprint string `xml:"thumbprint"` -} - -func init() { - t["MultipleCertificatesVerifyFaultThumbprintData"] = reflect.TypeOf((*MultipleCertificatesVerifyFaultThumbprintData)(nil)).Elem() -} - -type MultipleSnapshotsNotSupported struct { - SnapshotFault -} - -func init() { - t["MultipleSnapshotsNotSupported"] = reflect.TypeOf((*MultipleSnapshotsNotSupported)(nil)).Elem() -} - -type MultipleSnapshotsNotSupportedFault MultipleSnapshotsNotSupported - -func init() { - t["MultipleSnapshotsNotSupportedFault"] = reflect.TypeOf((*MultipleSnapshotsNotSupportedFault)(nil)).Elem() -} - -type NASDatastoreCreatedEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` - DatastoreUrl string `xml:"datastoreUrl,omitempty"` -} - -func init() { - t["NASDatastoreCreatedEvent"] = reflect.TypeOf((*NASDatastoreCreatedEvent)(nil)).Elem() -} - -type NamePasswordAuthentication struct { - GuestAuthentication - - Username string `xml:"username"` - Password string `xml:"password"` -} - -func init() { - t["NamePasswordAuthentication"] = reflect.TypeOf((*NamePasswordAuthentication)(nil)).Elem() -} - -type NamespaceFull struct { - VimFault - - Name string `xml:"name"` - CurrentMaxSize int64 `xml:"currentMaxSize"` - RequiredSize int64 `xml:"requiredSize,omitempty"` -} - -func init() { - t["NamespaceFull"] = reflect.TypeOf((*NamespaceFull)(nil)).Elem() -} - -type NamespaceFullFault NamespaceFull - -func init() { - t["NamespaceFullFault"] = reflect.TypeOf((*NamespaceFullFault)(nil)).Elem() -} - -type NamespaceLimitReached struct { - VimFault - - Limit *int32 `xml:"limit"` -} - -func init() { - t["NamespaceLimitReached"] = reflect.TypeOf((*NamespaceLimitReached)(nil)).Elem() -} - -type NamespaceLimitReachedFault NamespaceLimitReached - -func init() { - t["NamespaceLimitReachedFault"] = reflect.TypeOf((*NamespaceLimitReachedFault)(nil)).Elem() -} - -type NamespaceWriteProtected struct { - VimFault - - Name string `xml:"name"` -} - -func init() { - t["NamespaceWriteProtected"] = reflect.TypeOf((*NamespaceWriteProtected)(nil)).Elem() -} - -type NamespaceWriteProtectedFault NamespaceWriteProtected - -func init() { - t["NamespaceWriteProtectedFault"] = reflect.TypeOf((*NamespaceWriteProtectedFault)(nil)).Elem() -} - -type NasConfigFault struct { - HostConfigFault - - Name string `xml:"name"` -} - -func init() { - t["NasConfigFault"] = reflect.TypeOf((*NasConfigFault)(nil)).Elem() -} - -type NasConfigFaultFault BaseNasConfigFault - -func init() { - t["NasConfigFaultFault"] = reflect.TypeOf((*NasConfigFaultFault)(nil)).Elem() -} - -type NasConnectionLimitReached struct { - NasConfigFault - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` -} - -func init() { - t["NasConnectionLimitReached"] = reflect.TypeOf((*NasConnectionLimitReached)(nil)).Elem() -} - -type NasConnectionLimitReachedFault NasConnectionLimitReached - -func init() { - t["NasConnectionLimitReachedFault"] = reflect.TypeOf((*NasConnectionLimitReachedFault)(nil)).Elem() -} - -type NasDatastoreInfo struct { - DatastoreInfo - - Nas *HostNasVolume `xml:"nas,omitempty"` -} - -func init() { - t["NasDatastoreInfo"] = reflect.TypeOf((*NasDatastoreInfo)(nil)).Elem() -} - -type NasSessionCredentialConflict struct { - NasConfigFault - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` - UserName string `xml:"userName"` -} - -func init() { - t["NasSessionCredentialConflict"] = reflect.TypeOf((*NasSessionCredentialConflict)(nil)).Elem() -} - -type NasSessionCredentialConflictFault NasSessionCredentialConflict - -func init() { - t["NasSessionCredentialConflictFault"] = reflect.TypeOf((*NasSessionCredentialConflictFault)(nil)).Elem() -} - -type NasStorageProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["NasStorageProfile"] = reflect.TypeOf((*NasStorageProfile)(nil)).Elem() -} - -type NasVolumeNotMounted struct { - NasConfigFault - - RemoteHost string `xml:"remoteHost"` - RemotePath string `xml:"remotePath"` -} - -func init() { - t["NasVolumeNotMounted"] = reflect.TypeOf((*NasVolumeNotMounted)(nil)).Elem() -} - -type NasVolumeNotMountedFault NasVolumeNotMounted - -func init() { - t["NasVolumeNotMountedFault"] = reflect.TypeOf((*NasVolumeNotMountedFault)(nil)).Elem() -} - -type NegatableExpression struct { - DynamicData - - Negate *bool `xml:"negate"` -} - -func init() { - t["NegatableExpression"] = reflect.TypeOf((*NegatableExpression)(nil)).Elem() -} - -type NetBIOSConfigInfo struct { - DynamicData - - Mode string `xml:"mode"` -} - -func init() { - t["NetBIOSConfigInfo"] = reflect.TypeOf((*NetBIOSConfigInfo)(nil)).Elem() -} - -type NetDhcpConfigInfo struct { - DynamicData - - Ipv6 *NetDhcpConfigInfoDhcpOptions `xml:"ipv6,omitempty"` - Ipv4 *NetDhcpConfigInfoDhcpOptions `xml:"ipv4,omitempty"` -} - -func init() { - t["NetDhcpConfigInfo"] = reflect.TypeOf((*NetDhcpConfigInfo)(nil)).Elem() -} - -type NetDhcpConfigInfoDhcpOptions struct { - DynamicData - - Enable bool `xml:"enable"` - Config []KeyValue `xml:"config,omitempty"` -} - -func init() { - t["NetDhcpConfigInfoDhcpOptions"] = reflect.TypeOf((*NetDhcpConfigInfoDhcpOptions)(nil)).Elem() -} - -type NetDhcpConfigSpec struct { - DynamicData - - Ipv6 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv6,omitempty"` - Ipv4 *NetDhcpConfigSpecDhcpOptionsSpec `xml:"ipv4,omitempty"` -} - -func init() { - t["NetDhcpConfigSpec"] = reflect.TypeOf((*NetDhcpConfigSpec)(nil)).Elem() -} - -type NetDhcpConfigSpecDhcpOptionsSpec struct { - DynamicData - - Enable *bool `xml:"enable"` - Config []KeyValue `xml:"config"` - Operation string `xml:"operation"` -} - -func init() { - t["NetDhcpConfigSpecDhcpOptionsSpec"] = reflect.TypeOf((*NetDhcpConfigSpecDhcpOptionsSpec)(nil)).Elem() -} - -type NetDnsConfigInfo struct { - DynamicData - - Dhcp bool `xml:"dhcp"` - HostName string `xml:"hostName"` - DomainName string `xml:"domainName"` - IpAddress []string `xml:"ipAddress,omitempty"` - SearchDomain []string `xml:"searchDomain,omitempty"` -} - -func init() { - t["NetDnsConfigInfo"] = reflect.TypeOf((*NetDnsConfigInfo)(nil)).Elem() -} - -type NetDnsConfigSpec struct { - DynamicData - - Dhcp *bool `xml:"dhcp"` - HostName string `xml:"hostName,omitempty"` - DomainName string `xml:"domainName,omitempty"` - IpAddress []string `xml:"ipAddress,omitempty"` - SearchDomain []string `xml:"searchDomain,omitempty"` -} - -func init() { - t["NetDnsConfigSpec"] = reflect.TypeOf((*NetDnsConfigSpec)(nil)).Elem() -} - -type NetIpConfigInfo struct { - DynamicData - - IpAddress []NetIpConfigInfoIpAddress `xml:"ipAddress,omitempty"` - Dhcp *NetDhcpConfigInfo `xml:"dhcp,omitempty"` - AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` -} - -func init() { - t["NetIpConfigInfo"] = reflect.TypeOf((*NetIpConfigInfo)(nil)).Elem() -} - -type NetIpConfigInfoIpAddress struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - PrefixLength int32 `xml:"prefixLength"` - Origin string `xml:"origin,omitempty"` - State string `xml:"state,omitempty"` - Lifetime *time.Time `xml:"lifetime"` -} - -func init() { - t["NetIpConfigInfoIpAddress"] = reflect.TypeOf((*NetIpConfigInfoIpAddress)(nil)).Elem() -} - -type NetIpConfigSpec struct { - DynamicData - - IpAddress []NetIpConfigSpecIpAddressSpec `xml:"ipAddress,omitempty"` - Dhcp *NetDhcpConfigSpec `xml:"dhcp,omitempty"` - AutoConfigurationEnabled *bool `xml:"autoConfigurationEnabled"` -} - -func init() { - t["NetIpConfigSpec"] = reflect.TypeOf((*NetIpConfigSpec)(nil)).Elem() -} - -type NetIpConfigSpecIpAddressSpec struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - PrefixLength int32 `xml:"prefixLength"` - Operation string `xml:"operation"` -} - -func init() { - t["NetIpConfigSpecIpAddressSpec"] = reflect.TypeOf((*NetIpConfigSpecIpAddressSpec)(nil)).Elem() -} - -type NetIpRouteConfigInfo struct { - DynamicData - - IpRoute []NetIpRouteConfigInfoIpRoute `xml:"ipRoute,omitempty"` -} - -func init() { - t["NetIpRouteConfigInfo"] = reflect.TypeOf((*NetIpRouteConfigInfo)(nil)).Elem() -} - -type NetIpRouteConfigInfoGateway struct { - DynamicData - - IpAddress string `xml:"ipAddress,omitempty"` - Device string `xml:"device,omitempty"` -} - -func init() { - t["NetIpRouteConfigInfoGateway"] = reflect.TypeOf((*NetIpRouteConfigInfoGateway)(nil)).Elem() -} - -type NetIpRouteConfigInfoIpRoute struct { - DynamicData - - Network string `xml:"network"` - PrefixLength int32 `xml:"prefixLength"` - Gateway NetIpRouteConfigInfoGateway `xml:"gateway"` -} - -func init() { - t["NetIpRouteConfigInfoIpRoute"] = reflect.TypeOf((*NetIpRouteConfigInfoIpRoute)(nil)).Elem() -} - -type NetIpRouteConfigSpec struct { - DynamicData - - IpRoute []NetIpRouteConfigSpecIpRouteSpec `xml:"ipRoute,omitempty"` -} - -func init() { - t["NetIpRouteConfigSpec"] = reflect.TypeOf((*NetIpRouteConfigSpec)(nil)).Elem() -} - -type NetIpRouteConfigSpecGatewaySpec struct { - DynamicData - - IpAddress string `xml:"ipAddress,omitempty"` - Device string `xml:"device,omitempty"` -} - -func init() { - t["NetIpRouteConfigSpecGatewaySpec"] = reflect.TypeOf((*NetIpRouteConfigSpecGatewaySpec)(nil)).Elem() -} - -type NetIpRouteConfigSpecIpRouteSpec struct { - DynamicData - - Network string `xml:"network"` - PrefixLength int32 `xml:"prefixLength"` - Gateway NetIpRouteConfigSpecGatewaySpec `xml:"gateway"` - Operation string `xml:"operation"` -} - -func init() { - t["NetIpRouteConfigSpecIpRouteSpec"] = reflect.TypeOf((*NetIpRouteConfigSpecIpRouteSpec)(nil)).Elem() -} - -type NetIpStackInfo struct { - DynamicData - - Neighbor []NetIpStackInfoNetToMedia `xml:"neighbor,omitempty"` - DefaultRouter []NetIpStackInfoDefaultRouter `xml:"defaultRouter,omitempty"` -} - -func init() { - t["NetIpStackInfo"] = reflect.TypeOf((*NetIpStackInfo)(nil)).Elem() -} - -type NetIpStackInfoDefaultRouter struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - Device string `xml:"device"` - Lifetime time.Time `xml:"lifetime"` - Preference string `xml:"preference"` -} - -func init() { - t["NetIpStackInfoDefaultRouter"] = reflect.TypeOf((*NetIpStackInfoDefaultRouter)(nil)).Elem() -} - -type NetIpStackInfoNetToMedia struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - PhysicalAddress string `xml:"physicalAddress"` - Device string `xml:"device"` - Type string `xml:"type"` -} - -func init() { - t["NetIpStackInfoNetToMedia"] = reflect.TypeOf((*NetIpStackInfoNetToMedia)(nil)).Elem() -} - -type NetStackInstanceProfile struct { - ApplyProfile - - Key string `xml:"key"` - DnsConfig NetworkProfileDnsConfigProfile `xml:"dnsConfig"` - IpRouteConfig IpRouteProfile `xml:"ipRouteConfig"` -} - -func init() { - t["NetStackInstanceProfile"] = reflect.TypeOf((*NetStackInstanceProfile)(nil)).Elem() -} - -type NetworkCopyFault struct { - FileFault -} - -func init() { - t["NetworkCopyFault"] = reflect.TypeOf((*NetworkCopyFault)(nil)).Elem() -} - -type NetworkCopyFaultFault NetworkCopyFault - -func init() { - t["NetworkCopyFaultFault"] = reflect.TypeOf((*NetworkCopyFaultFault)(nil)).Elem() -} - -type NetworkDisruptedAndConfigRolledBack struct { - VimFault - - Host string `xml:"host"` -} - -func init() { - t["NetworkDisruptedAndConfigRolledBack"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBack)(nil)).Elem() -} - -type NetworkDisruptedAndConfigRolledBackFault NetworkDisruptedAndConfigRolledBack - -func init() { - t["NetworkDisruptedAndConfigRolledBackFault"] = reflect.TypeOf((*NetworkDisruptedAndConfigRolledBackFault)(nil)).Elem() -} - -type NetworkEventArgument struct { - EntityEventArgument - - Network ManagedObjectReference `xml:"network"` -} - -func init() { - t["NetworkEventArgument"] = reflect.TypeOf((*NetworkEventArgument)(nil)).Elem() -} - -type NetworkInaccessible struct { - NasConfigFault -} - -func init() { - t["NetworkInaccessible"] = reflect.TypeOf((*NetworkInaccessible)(nil)).Elem() -} - -type NetworkInaccessibleFault NetworkInaccessible - -func init() { - t["NetworkInaccessibleFault"] = reflect.TypeOf((*NetworkInaccessibleFault)(nil)).Elem() -} - -type NetworkPolicyProfile struct { - ApplyProfile -} - -func init() { - t["NetworkPolicyProfile"] = reflect.TypeOf((*NetworkPolicyProfile)(nil)).Elem() -} - -type NetworkProfile struct { - ApplyProfile - - Vswitch []VirtualSwitchProfile `xml:"vswitch,omitempty"` - VmPortGroup []VmPortGroupProfile `xml:"vmPortGroup,omitempty"` - HostPortGroup []HostPortGroupProfile `xml:"hostPortGroup,omitempty"` - ServiceConsolePortGroup []ServiceConsolePortGroupProfile `xml:"serviceConsolePortGroup,omitempty"` - DnsConfig *NetworkProfileDnsConfigProfile `xml:"dnsConfig,omitempty"` - IpRouteConfig *IpRouteProfile `xml:"ipRouteConfig,omitempty"` - ConsoleIpRouteConfig *IpRouteProfile `xml:"consoleIpRouteConfig,omitempty"` - Pnic []PhysicalNicProfile `xml:"pnic,omitempty"` - Dvswitch []DvsProfile `xml:"dvswitch,omitempty"` - DvsServiceConsoleNic []DvsServiceConsoleVNicProfile `xml:"dvsServiceConsoleNic,omitempty"` - DvsHostNic []DvsHostVNicProfile `xml:"dvsHostNic,omitempty"` - NsxHostNic []NsxHostVNicProfile `xml:"nsxHostNic,omitempty"` - NetStackInstance []NetStackInstanceProfile `xml:"netStackInstance,omitempty"` - OpaqueSwitch *OpaqueSwitchProfile `xml:"opaqueSwitch,omitempty"` -} - -func init() { - t["NetworkProfile"] = reflect.TypeOf((*NetworkProfile)(nil)).Elem() -} - -type NetworkProfileDnsConfigProfile struct { - ApplyProfile -} - -func init() { - t["NetworkProfileDnsConfigProfile"] = reflect.TypeOf((*NetworkProfileDnsConfigProfile)(nil)).Elem() -} - -type NetworkRollbackEvent struct { - Event - - MethodName string `xml:"methodName"` - TransactionId string `xml:"transactionId"` -} - -func init() { - t["NetworkRollbackEvent"] = reflect.TypeOf((*NetworkRollbackEvent)(nil)).Elem() -} - -type NetworkSummary struct { - DynamicData - - Network *ManagedObjectReference `xml:"network,omitempty"` - Name string `xml:"name"` - Accessible bool `xml:"accessible"` - IpPoolName string `xml:"ipPoolName"` - IpPoolId *int32 `xml:"ipPoolId"` -} - -func init() { - t["NetworkSummary"] = reflect.TypeOf((*NetworkSummary)(nil)).Elem() -} - -type NetworksMayNotBeTheSame struct { - MigrationFault - - Name string `xml:"name,omitempty"` -} - -func init() { - t["NetworksMayNotBeTheSame"] = reflect.TypeOf((*NetworksMayNotBeTheSame)(nil)).Elem() -} - -type NetworksMayNotBeTheSameFault NetworksMayNotBeTheSame - -func init() { - t["NetworksMayNotBeTheSameFault"] = reflect.TypeOf((*NetworksMayNotBeTheSameFault)(nil)).Elem() -} - -type NicSettingMismatch struct { - CustomizationFault - - NumberOfNicsInSpec int32 `xml:"numberOfNicsInSpec"` - NumberOfNicsInVM int32 `xml:"numberOfNicsInVM"` -} - -func init() { - t["NicSettingMismatch"] = reflect.TypeOf((*NicSettingMismatch)(nil)).Elem() -} - -type NicSettingMismatchFault NicSettingMismatch - -func init() { - t["NicSettingMismatchFault"] = reflect.TypeOf((*NicSettingMismatchFault)(nil)).Elem() -} - -type NoAccessUserEvent struct { - SessionEvent - - IpAddress string `xml:"ipAddress"` -} - -func init() { - t["NoAccessUserEvent"] = reflect.TypeOf((*NoAccessUserEvent)(nil)).Elem() -} - -type NoActiveHostInCluster struct { - InvalidState - - ComputeResource ManagedObjectReference `xml:"computeResource"` -} - -func init() { - t["NoActiveHostInCluster"] = reflect.TypeOf((*NoActiveHostInCluster)(nil)).Elem() -} - -type NoActiveHostInClusterFault NoActiveHostInCluster - -func init() { - t["NoActiveHostInClusterFault"] = reflect.TypeOf((*NoActiveHostInClusterFault)(nil)).Elem() -} - -type NoAvailableIp struct { - VAppPropertyFault - - Network ManagedObjectReference `xml:"network"` -} - -func init() { - t["NoAvailableIp"] = reflect.TypeOf((*NoAvailableIp)(nil)).Elem() -} - -type NoAvailableIpFault NoAvailableIp - -func init() { - t["NoAvailableIpFault"] = reflect.TypeOf((*NoAvailableIpFault)(nil)).Elem() -} - -type NoClientCertificate struct { - VimFault -} - -func init() { - t["NoClientCertificate"] = reflect.TypeOf((*NoClientCertificate)(nil)).Elem() -} - -type NoClientCertificateFault NoClientCertificate - -func init() { - t["NoClientCertificateFault"] = reflect.TypeOf((*NoClientCertificateFault)(nil)).Elem() -} - -type NoCompatibleDatastore struct { - VimFault -} - -func init() { - t["NoCompatibleDatastore"] = reflect.TypeOf((*NoCompatibleDatastore)(nil)).Elem() -} - -type NoCompatibleDatastoreFault NoCompatibleDatastore - -func init() { - t["NoCompatibleDatastoreFault"] = reflect.TypeOf((*NoCompatibleDatastoreFault)(nil)).Elem() -} - -type NoCompatibleHardAffinityHost struct { - VmConfigFault - - VmName string `xml:"vmName"` -} - -func init() { - t["NoCompatibleHardAffinityHost"] = reflect.TypeOf((*NoCompatibleHardAffinityHost)(nil)).Elem() -} - -type NoCompatibleHardAffinityHostFault NoCompatibleHardAffinityHost - -func init() { - t["NoCompatibleHardAffinityHostFault"] = reflect.TypeOf((*NoCompatibleHardAffinityHostFault)(nil)).Elem() -} - -type NoCompatibleHost struct { - VimFault - - Host []ManagedObjectReference `xml:"host,omitempty"` - Error []LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["NoCompatibleHost"] = reflect.TypeOf((*NoCompatibleHost)(nil)).Elem() -} - -type NoCompatibleHostFault BaseNoCompatibleHost - -func init() { - t["NoCompatibleHostFault"] = reflect.TypeOf((*NoCompatibleHostFault)(nil)).Elem() -} - -type NoCompatibleHostWithAccessToDevice struct { - NoCompatibleHost -} - -func init() { - t["NoCompatibleHostWithAccessToDevice"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDevice)(nil)).Elem() -} - -type NoCompatibleHostWithAccessToDeviceFault NoCompatibleHostWithAccessToDevice - -func init() { - t["NoCompatibleHostWithAccessToDeviceFault"] = reflect.TypeOf((*NoCompatibleHostWithAccessToDeviceFault)(nil)).Elem() -} - -type NoCompatibleSoftAffinityHost struct { - VmConfigFault - - VmName string `xml:"vmName"` -} - -func init() { - t["NoCompatibleSoftAffinityHost"] = reflect.TypeOf((*NoCompatibleSoftAffinityHost)(nil)).Elem() -} - -type NoCompatibleSoftAffinityHostFault NoCompatibleSoftAffinityHost - -func init() { - t["NoCompatibleSoftAffinityHostFault"] = reflect.TypeOf((*NoCompatibleSoftAffinityHostFault)(nil)).Elem() -} - -type NoConnectedDatastore struct { - VimFault -} - -func init() { - t["NoConnectedDatastore"] = reflect.TypeOf((*NoConnectedDatastore)(nil)).Elem() -} - -type NoConnectedDatastoreFault NoConnectedDatastore - -func init() { - t["NoConnectedDatastoreFault"] = reflect.TypeOf((*NoConnectedDatastoreFault)(nil)).Elem() -} - -type NoDatastoresConfiguredEvent struct { - HostEvent -} - -func init() { - t["NoDatastoresConfiguredEvent"] = reflect.TypeOf((*NoDatastoresConfiguredEvent)(nil)).Elem() -} - -type NoDiskFound struct { - VimFault -} - -func init() { - t["NoDiskFound"] = reflect.TypeOf((*NoDiskFound)(nil)).Elem() -} - -type NoDiskFoundFault NoDiskFound - -func init() { - t["NoDiskFoundFault"] = reflect.TypeOf((*NoDiskFoundFault)(nil)).Elem() -} - -type NoDiskSpace struct { - FileFault - - Datastore string `xml:"datastore"` -} - -func init() { - t["NoDiskSpace"] = reflect.TypeOf((*NoDiskSpace)(nil)).Elem() -} - -type NoDiskSpaceFault NoDiskSpace - -func init() { - t["NoDiskSpaceFault"] = reflect.TypeOf((*NoDiskSpaceFault)(nil)).Elem() -} - -type NoDisksToCustomize struct { - CustomizationFault -} - -func init() { - t["NoDisksToCustomize"] = reflect.TypeOf((*NoDisksToCustomize)(nil)).Elem() -} - -type NoDisksToCustomizeFault NoDisksToCustomize - -func init() { - t["NoDisksToCustomizeFault"] = reflect.TypeOf((*NoDisksToCustomizeFault)(nil)).Elem() -} - -type NoGateway struct { - HostConfigFault -} - -func init() { - t["NoGateway"] = reflect.TypeOf((*NoGateway)(nil)).Elem() -} - -type NoGatewayFault NoGateway - -func init() { - t["NoGatewayFault"] = reflect.TypeOf((*NoGatewayFault)(nil)).Elem() -} - -type NoGuestHeartbeat struct { - MigrationFault -} - -func init() { - t["NoGuestHeartbeat"] = reflect.TypeOf((*NoGuestHeartbeat)(nil)).Elem() -} - -type NoGuestHeartbeatFault NoGuestHeartbeat - -func init() { - t["NoGuestHeartbeatFault"] = reflect.TypeOf((*NoGuestHeartbeatFault)(nil)).Elem() -} - -type NoHost struct { - HostConnectFault - - Name string `xml:"name,omitempty"` -} - -func init() { - t["NoHost"] = reflect.TypeOf((*NoHost)(nil)).Elem() -} - -type NoHostFault NoHost - -func init() { - t["NoHostFault"] = reflect.TypeOf((*NoHostFault)(nil)).Elem() -} - -type NoHostSuitableForFtSecondary struct { - VmFaultToleranceIssue - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` -} - -func init() { - t["NoHostSuitableForFtSecondary"] = reflect.TypeOf((*NoHostSuitableForFtSecondary)(nil)).Elem() -} - -type NoHostSuitableForFtSecondaryFault NoHostSuitableForFtSecondary - -func init() { - t["NoHostSuitableForFtSecondaryFault"] = reflect.TypeOf((*NoHostSuitableForFtSecondaryFault)(nil)).Elem() -} - -type NoLicenseEvent struct { - LicenseEvent - - Feature LicenseFeatureInfo `xml:"feature"` -} - -func init() { - t["NoLicenseEvent"] = reflect.TypeOf((*NoLicenseEvent)(nil)).Elem() -} - -type NoLicenseServerConfigured struct { - NotEnoughLicenses -} - -func init() { - t["NoLicenseServerConfigured"] = reflect.TypeOf((*NoLicenseServerConfigured)(nil)).Elem() -} - -type NoLicenseServerConfiguredFault NoLicenseServerConfigured - -func init() { - t["NoLicenseServerConfiguredFault"] = reflect.TypeOf((*NoLicenseServerConfiguredFault)(nil)).Elem() -} - -type NoMaintenanceModeDrsRecommendationForVM struct { - VmEvent -} - -func init() { - t["NoMaintenanceModeDrsRecommendationForVM"] = reflect.TypeOf((*NoMaintenanceModeDrsRecommendationForVM)(nil)).Elem() -} - -type NoPeerHostFound struct { - HostPowerOpFailed -} - -func init() { - t["NoPeerHostFound"] = reflect.TypeOf((*NoPeerHostFound)(nil)).Elem() -} - -type NoPeerHostFoundFault NoPeerHostFound - -func init() { - t["NoPeerHostFoundFault"] = reflect.TypeOf((*NoPeerHostFoundFault)(nil)).Elem() -} - -type NoPermission struct { - SecurityError - - Object *ManagedObjectReference `xml:"object,omitempty"` - PrivilegeId string `xml:"privilegeId,omitempty"` - MissingPrivileges []NoPermissionEntityPrivileges `xml:"missingPrivileges,omitempty"` -} - -func init() { - t["NoPermission"] = reflect.TypeOf((*NoPermission)(nil)).Elem() -} - -type NoPermissionEntityPrivileges struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - PrivilegeIds []string `xml:"privilegeIds,omitempty"` -} - -func init() { - t["NoPermissionEntityPrivileges"] = reflect.TypeOf((*NoPermissionEntityPrivileges)(nil)).Elem() -} - -type NoPermissionFault BaseNoPermission - -func init() { - t["NoPermissionFault"] = reflect.TypeOf((*NoPermissionFault)(nil)).Elem() -} - -type NoPermissionOnAD struct { - ActiveDirectoryFault -} - -func init() { - t["NoPermissionOnAD"] = reflect.TypeOf((*NoPermissionOnAD)(nil)).Elem() -} - -type NoPermissionOnADFault NoPermissionOnAD - -func init() { - t["NoPermissionOnADFault"] = reflect.TypeOf((*NoPermissionOnADFault)(nil)).Elem() -} - -type NoPermissionOnHost struct { - HostConnectFault -} - -func init() { - t["NoPermissionOnHost"] = reflect.TypeOf((*NoPermissionOnHost)(nil)).Elem() -} - -type NoPermissionOnHostFault NoPermissionOnHost - -func init() { - t["NoPermissionOnHostFault"] = reflect.TypeOf((*NoPermissionOnHostFault)(nil)).Elem() -} - -type NoPermissionOnNasVolume struct { - NasConfigFault - - UserName string `xml:"userName,omitempty"` -} - -func init() { - t["NoPermissionOnNasVolume"] = reflect.TypeOf((*NoPermissionOnNasVolume)(nil)).Elem() -} - -type NoPermissionOnNasVolumeFault NoPermissionOnNasVolume - -func init() { - t["NoPermissionOnNasVolumeFault"] = reflect.TypeOf((*NoPermissionOnNasVolumeFault)(nil)).Elem() -} - -type NoSubjectName struct { - VimFault -} - -func init() { - t["NoSubjectName"] = reflect.TypeOf((*NoSubjectName)(nil)).Elem() -} - -type NoSubjectNameFault NoSubjectName - -func init() { - t["NoSubjectNameFault"] = reflect.TypeOf((*NoSubjectNameFault)(nil)).Elem() -} - -type NoVcManagedIpConfigured struct { - VAppPropertyFault -} - -func init() { - t["NoVcManagedIpConfigured"] = reflect.TypeOf((*NoVcManagedIpConfigured)(nil)).Elem() -} - -type NoVcManagedIpConfiguredFault NoVcManagedIpConfigured - -func init() { - t["NoVcManagedIpConfiguredFault"] = reflect.TypeOf((*NoVcManagedIpConfiguredFault)(nil)).Elem() -} - -type NoVirtualNic struct { - HostConfigFault -} - -func init() { - t["NoVirtualNic"] = reflect.TypeOf((*NoVirtualNic)(nil)).Elem() -} - -type NoVirtualNicFault NoVirtualNic - -func init() { - t["NoVirtualNicFault"] = reflect.TypeOf((*NoVirtualNicFault)(nil)).Elem() -} - -type NoVmInVApp struct { - VAppConfigFault -} - -func init() { - t["NoVmInVApp"] = reflect.TypeOf((*NoVmInVApp)(nil)).Elem() -} - -type NoVmInVAppFault NoVmInVApp - -func init() { - t["NoVmInVAppFault"] = reflect.TypeOf((*NoVmInVAppFault)(nil)).Elem() -} - -type NodeDeploymentSpec struct { - DynamicData - - EsxHost *ManagedObjectReference `xml:"esxHost,omitempty"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - PublicNetworkPortGroup *ManagedObjectReference `xml:"publicNetworkPortGroup,omitempty"` - ClusterNetworkPortGroup *ManagedObjectReference `xml:"clusterNetworkPortGroup,omitempty"` - Folder ManagedObjectReference `xml:"folder"` - ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` - ManagementVc *ServiceLocator `xml:"managementVc,omitempty"` - NodeName string `xml:"nodeName"` - IpSettings CustomizationIPSettings `xml:"ipSettings"` -} - -func init() { - t["NodeDeploymentSpec"] = reflect.TypeOf((*NodeDeploymentSpec)(nil)).Elem() -} - -type NodeNetworkSpec struct { - DynamicData - - IpSettings CustomizationIPSettings `xml:"ipSettings"` -} - -func init() { - t["NodeNetworkSpec"] = reflect.TypeOf((*NodeNetworkSpec)(nil)).Elem() -} - -type NonADUserRequired struct { - ActiveDirectoryFault -} - -func init() { - t["NonADUserRequired"] = reflect.TypeOf((*NonADUserRequired)(nil)).Elem() -} - -type NonADUserRequiredFault NonADUserRequired - -func init() { - t["NonADUserRequiredFault"] = reflect.TypeOf((*NonADUserRequiredFault)(nil)).Elem() -} - -type NonHomeRDMVMotionNotSupported struct { - MigrationFeatureNotSupported - - Device string `xml:"device"` -} - -func init() { - t["NonHomeRDMVMotionNotSupported"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupported)(nil)).Elem() -} - -type NonHomeRDMVMotionNotSupportedFault NonHomeRDMVMotionNotSupported - -func init() { - t["NonHomeRDMVMotionNotSupportedFault"] = reflect.TypeOf((*NonHomeRDMVMotionNotSupportedFault)(nil)).Elem() -} - -type NonPersistentDisksNotSupported struct { - DeviceNotSupported -} - -func init() { - t["NonPersistentDisksNotSupported"] = reflect.TypeOf((*NonPersistentDisksNotSupported)(nil)).Elem() -} - -type NonPersistentDisksNotSupportedFault NonPersistentDisksNotSupported - -func init() { - t["NonPersistentDisksNotSupportedFault"] = reflect.TypeOf((*NonPersistentDisksNotSupportedFault)(nil)).Elem() -} - -type NonVIWorkloadDetectedOnDatastoreEvent struct { - DatastoreEvent -} - -func init() { - t["NonVIWorkloadDetectedOnDatastoreEvent"] = reflect.TypeOf((*NonVIWorkloadDetectedOnDatastoreEvent)(nil)).Elem() -} - -type NonVmwareOuiMacNotSupportedHost struct { - NotSupportedHost - - HostName string `xml:"hostName"` -} - -func init() { - t["NonVmwareOuiMacNotSupportedHost"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHost)(nil)).Elem() -} - -type NonVmwareOuiMacNotSupportedHostFault NonVmwareOuiMacNotSupportedHost - -func init() { - t["NonVmwareOuiMacNotSupportedHostFault"] = reflect.TypeOf((*NonVmwareOuiMacNotSupportedHostFault)(nil)).Elem() -} - -type NotADirectory struct { - FileFault -} - -func init() { - t["NotADirectory"] = reflect.TypeOf((*NotADirectory)(nil)).Elem() -} - -type NotADirectoryFault NotADirectory - -func init() { - t["NotADirectoryFault"] = reflect.TypeOf((*NotADirectoryFault)(nil)).Elem() -} - -type NotAFile struct { - FileFault -} - -func init() { - t["NotAFile"] = reflect.TypeOf((*NotAFile)(nil)).Elem() -} - -type NotAFileFault NotAFile - -func init() { - t["NotAFileFault"] = reflect.TypeOf((*NotAFileFault)(nil)).Elem() -} - -type NotAuthenticated struct { - NoPermission -} - -func init() { - t["NotAuthenticated"] = reflect.TypeOf((*NotAuthenticated)(nil)).Elem() -} - -type NotAuthenticatedFault NotAuthenticated - -func init() { - t["NotAuthenticatedFault"] = reflect.TypeOf((*NotAuthenticatedFault)(nil)).Elem() -} - -type NotEnoughCpus struct { - VirtualHardwareCompatibilityIssue - - NumCpuDest int32 `xml:"numCpuDest"` - NumCpuVm int32 `xml:"numCpuVm"` -} - -func init() { - t["NotEnoughCpus"] = reflect.TypeOf((*NotEnoughCpus)(nil)).Elem() -} - -type NotEnoughCpusFault BaseNotEnoughCpus - -func init() { - t["NotEnoughCpusFault"] = reflect.TypeOf((*NotEnoughCpusFault)(nil)).Elem() -} - -type NotEnoughLicenses struct { - RuntimeFault -} - -func init() { - t["NotEnoughLicenses"] = reflect.TypeOf((*NotEnoughLicenses)(nil)).Elem() -} - -type NotEnoughLicensesFault BaseNotEnoughLicenses - -func init() { - t["NotEnoughLicensesFault"] = reflect.TypeOf((*NotEnoughLicensesFault)(nil)).Elem() -} - -type NotEnoughLogicalCpus struct { - NotEnoughCpus - - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["NotEnoughLogicalCpus"] = reflect.TypeOf((*NotEnoughLogicalCpus)(nil)).Elem() -} - -type NotEnoughLogicalCpusFault NotEnoughLogicalCpus - -func init() { - t["NotEnoughLogicalCpusFault"] = reflect.TypeOf((*NotEnoughLogicalCpusFault)(nil)).Elem() -} - -type NotEnoughResourcesToStartVmEvent struct { - VmEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["NotEnoughResourcesToStartVmEvent"] = reflect.TypeOf((*NotEnoughResourcesToStartVmEvent)(nil)).Elem() -} - -type NotFound struct { - VimFault -} - -func init() { - t["NotFound"] = reflect.TypeOf((*NotFound)(nil)).Elem() -} - -type NotFoundFault NotFound - -func init() { - t["NotFoundFault"] = reflect.TypeOf((*NotFoundFault)(nil)).Elem() -} - -type NotImplemented struct { - RuntimeFault -} - -func init() { - t["NotImplemented"] = reflect.TypeOf((*NotImplemented)(nil)).Elem() -} - -type NotImplementedFault NotImplemented - -func init() { - t["NotImplementedFault"] = reflect.TypeOf((*NotImplementedFault)(nil)).Elem() -} - -type NotSupported struct { - RuntimeFault -} - -func init() { - t["NotSupported"] = reflect.TypeOf((*NotSupported)(nil)).Elem() -} - -type NotSupportedDeviceForFT struct { - VmFaultToleranceIssue - - Host ManagedObjectReference `xml:"host"` - HostName string `xml:"hostName,omitempty"` - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName,omitempty"` - DeviceType string `xml:"deviceType"` - DeviceLabel string `xml:"deviceLabel,omitempty"` -} - -func init() { - t["NotSupportedDeviceForFT"] = reflect.TypeOf((*NotSupportedDeviceForFT)(nil)).Elem() -} - -type NotSupportedDeviceForFTFault NotSupportedDeviceForFT - -func init() { - t["NotSupportedDeviceForFTFault"] = reflect.TypeOf((*NotSupportedDeviceForFTFault)(nil)).Elem() -} - -type NotSupportedFault BaseNotSupported - -func init() { - t["NotSupportedFault"] = reflect.TypeOf((*NotSupportedFault)(nil)).Elem() -} - -type NotSupportedHost struct { - HostConnectFault - - ProductName string `xml:"productName,omitempty"` - ProductVersion string `xml:"productVersion,omitempty"` -} - -func init() { - t["NotSupportedHost"] = reflect.TypeOf((*NotSupportedHost)(nil)).Elem() -} - -type NotSupportedHostFault BaseNotSupportedHost - -func init() { - t["NotSupportedHostFault"] = reflect.TypeOf((*NotSupportedHostFault)(nil)).Elem() -} - -type NotSupportedHostForChecksum struct { - VimFault -} - -func init() { - t["NotSupportedHostForChecksum"] = reflect.TypeOf((*NotSupportedHostForChecksum)(nil)).Elem() -} - -type NotSupportedHostForChecksumFault NotSupportedHostForChecksum - -func init() { - t["NotSupportedHostForChecksumFault"] = reflect.TypeOf((*NotSupportedHostForChecksumFault)(nil)).Elem() -} - -type NotSupportedHostForVFlash struct { - NotSupportedHost - - HostName string `xml:"hostName"` -} - -func init() { - t["NotSupportedHostForVFlash"] = reflect.TypeOf((*NotSupportedHostForVFlash)(nil)).Elem() -} - -type NotSupportedHostForVFlashFault NotSupportedHostForVFlash - -func init() { - t["NotSupportedHostForVFlashFault"] = reflect.TypeOf((*NotSupportedHostForVFlashFault)(nil)).Elem() -} - -type NotSupportedHostForVmcp struct { - NotSupportedHost - - HostName string `xml:"hostName"` -} - -func init() { - t["NotSupportedHostForVmcp"] = reflect.TypeOf((*NotSupportedHostForVmcp)(nil)).Elem() -} - -type NotSupportedHostForVmcpFault NotSupportedHostForVmcp - -func init() { - t["NotSupportedHostForVmcpFault"] = reflect.TypeOf((*NotSupportedHostForVmcpFault)(nil)).Elem() -} - -type NotSupportedHostForVmemFile struct { - NotSupportedHost - - HostName string `xml:"hostName"` -} - -func init() { - t["NotSupportedHostForVmemFile"] = reflect.TypeOf((*NotSupportedHostForVmemFile)(nil)).Elem() -} - -type NotSupportedHostForVmemFileFault NotSupportedHostForVmemFile - -func init() { - t["NotSupportedHostForVmemFileFault"] = reflect.TypeOf((*NotSupportedHostForVmemFileFault)(nil)).Elem() -} - -type NotSupportedHostForVsan struct { - NotSupportedHost - - HostName string `xml:"hostName"` -} - -func init() { - t["NotSupportedHostForVsan"] = reflect.TypeOf((*NotSupportedHostForVsan)(nil)).Elem() -} - -type NotSupportedHostForVsanFault NotSupportedHostForVsan - -func init() { - t["NotSupportedHostForVsanFault"] = reflect.TypeOf((*NotSupportedHostForVsanFault)(nil)).Elem() -} - -type NotSupportedHostInCluster struct { - NotSupportedHost -} - -func init() { - t["NotSupportedHostInCluster"] = reflect.TypeOf((*NotSupportedHostInCluster)(nil)).Elem() -} - -type NotSupportedHostInClusterFault BaseNotSupportedHostInCluster - -func init() { - t["NotSupportedHostInClusterFault"] = reflect.TypeOf((*NotSupportedHostInClusterFault)(nil)).Elem() -} - -type NotSupportedHostInDvs struct { - NotSupportedHost - - SwitchProductSpec DistributedVirtualSwitchProductSpec `xml:"switchProductSpec"` -} - -func init() { - t["NotSupportedHostInDvs"] = reflect.TypeOf((*NotSupportedHostInDvs)(nil)).Elem() -} - -type NotSupportedHostInDvsFault NotSupportedHostInDvs - -func init() { - t["NotSupportedHostInDvsFault"] = reflect.TypeOf((*NotSupportedHostInDvsFault)(nil)).Elem() -} - -type NotSupportedHostInHACluster struct { - NotSupportedHost - - HostName string `xml:"hostName"` - Build string `xml:"build"` -} - -func init() { - t["NotSupportedHostInHACluster"] = reflect.TypeOf((*NotSupportedHostInHACluster)(nil)).Elem() -} - -type NotSupportedHostInHAClusterFault NotSupportedHostInHACluster - -func init() { - t["NotSupportedHostInHAClusterFault"] = reflect.TypeOf((*NotSupportedHostInHAClusterFault)(nil)).Elem() -} - -type NotUserConfigurableProperty struct { - VAppPropertyFault -} - -func init() { - t["NotUserConfigurableProperty"] = reflect.TypeOf((*NotUserConfigurableProperty)(nil)).Elem() -} - -type NotUserConfigurablePropertyFault NotUserConfigurableProperty - -func init() { - t["NotUserConfigurablePropertyFault"] = reflect.TypeOf((*NotUserConfigurablePropertyFault)(nil)).Elem() -} - -type NsxHostVNicProfile struct { - ApplyProfile - - Key string `xml:"key"` - IpConfig IpAddressProfile `xml:"ipConfig"` -} - -func init() { - t["NsxHostVNicProfile"] = reflect.TypeOf((*NsxHostVNicProfile)(nil)).Elem() -} - -type NumPortsProfile struct { - ApplyProfile -} - -func init() { - t["NumPortsProfile"] = reflect.TypeOf((*NumPortsProfile)(nil)).Elem() -} - -type NumVirtualCoresPerSocketNotSupported struct { - VirtualHardwareCompatibilityIssue - - MaxSupportedCoresPerSocketDest int32 `xml:"maxSupportedCoresPerSocketDest"` - NumCoresPerSocketVm int32 `xml:"numCoresPerSocketVm"` -} - -func init() { - t["NumVirtualCoresPerSocketNotSupported"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupported)(nil)).Elem() -} - -type NumVirtualCoresPerSocketNotSupportedFault NumVirtualCoresPerSocketNotSupported - -func init() { - t["NumVirtualCoresPerSocketNotSupportedFault"] = reflect.TypeOf((*NumVirtualCoresPerSocketNotSupportedFault)(nil)).Elem() -} - -type NumVirtualCpusExceedsLimit struct { - InsufficientResourcesFault - - MaxSupportedVcpus int32 `xml:"maxSupportedVcpus"` -} - -func init() { - t["NumVirtualCpusExceedsLimit"] = reflect.TypeOf((*NumVirtualCpusExceedsLimit)(nil)).Elem() -} - -type NumVirtualCpusExceedsLimitFault NumVirtualCpusExceedsLimit - -func init() { - t["NumVirtualCpusExceedsLimitFault"] = reflect.TypeOf((*NumVirtualCpusExceedsLimitFault)(nil)).Elem() -} - -type NumVirtualCpusIncompatible struct { - VmConfigFault - - Reason string `xml:"reason"` - NumCpu int32 `xml:"numCpu"` -} - -func init() { - t["NumVirtualCpusIncompatible"] = reflect.TypeOf((*NumVirtualCpusIncompatible)(nil)).Elem() -} - -type NumVirtualCpusIncompatibleFault NumVirtualCpusIncompatible - -func init() { - t["NumVirtualCpusIncompatibleFault"] = reflect.TypeOf((*NumVirtualCpusIncompatibleFault)(nil)).Elem() -} - -type NumVirtualCpusNotSupported struct { - VirtualHardwareCompatibilityIssue - - MaxSupportedVcpusDest int32 `xml:"maxSupportedVcpusDest"` - NumCpuVm int32 `xml:"numCpuVm"` -} - -func init() { - t["NumVirtualCpusNotSupported"] = reflect.TypeOf((*NumVirtualCpusNotSupported)(nil)).Elem() -} - -type NumVirtualCpusNotSupportedFault NumVirtualCpusNotSupported - -func init() { - t["NumVirtualCpusNotSupportedFault"] = reflect.TypeOf((*NumVirtualCpusNotSupportedFault)(nil)).Elem() -} - -type NumericRange struct { - DynamicData - - Start int32 `xml:"start"` - End int32 `xml:"end"` -} - -func init() { - t["NumericRange"] = reflect.TypeOf((*NumericRange)(nil)).Elem() -} - -type NvdimmDimmInfo struct { - DynamicData - - DimmHandle int32 `xml:"dimmHandle"` - HealthInfo NvdimmHealthInfo `xml:"healthInfo"` - TotalCapacity int64 `xml:"totalCapacity"` - PersistentCapacity int64 `xml:"persistentCapacity"` - AvailablePersistentCapacity int64 `xml:"availablePersistentCapacity"` - VolatileCapacity int64 `xml:"volatileCapacity"` - AvailableVolatileCapacity int64 `xml:"availableVolatileCapacity"` - BlockCapacity int64 `xml:"blockCapacity"` - RegionInfo []NvdimmRegionInfo `xml:"regionInfo,omitempty"` - RepresentationString string `xml:"representationString"` -} - -func init() { - t["NvdimmDimmInfo"] = reflect.TypeOf((*NvdimmDimmInfo)(nil)).Elem() -} - -type NvdimmGuid struct { - DynamicData - - Uuid string `xml:"uuid"` -} - -func init() { - t["NvdimmGuid"] = reflect.TypeOf((*NvdimmGuid)(nil)).Elem() -} - -type NvdimmHealthInfo struct { - DynamicData - - HealthStatus string `xml:"healthStatus"` - HealthInformation string `xml:"healthInformation"` - StateFlagInfo []string `xml:"stateFlagInfo,omitempty"` - DimmTemperature int32 `xml:"dimmTemperature"` - DimmTemperatureThreshold int32 `xml:"dimmTemperatureThreshold"` - SpareBlocksPercentage int32 `xml:"spareBlocksPercentage"` - SpareBlockThreshold int32 `xml:"spareBlockThreshold"` - DimmLifespanPercentage int32 `xml:"dimmLifespanPercentage"` - EsTemperature int32 `xml:"esTemperature,omitempty"` - EsTemperatureThreshold int32 `xml:"esTemperatureThreshold,omitempty"` - EsLifespanPercentage int32 `xml:"esLifespanPercentage,omitempty"` -} - -func init() { - t["NvdimmHealthInfo"] = reflect.TypeOf((*NvdimmHealthInfo)(nil)).Elem() -} - -type NvdimmInterleaveSetInfo struct { - DynamicData - - SetId int32 `xml:"setId"` - RangeType string `xml:"rangeType"` - BaseAddress int64 `xml:"baseAddress"` - Size int64 `xml:"size"` - AvailableSize int64 `xml:"availableSize"` - DeviceList []int32 `xml:"deviceList,omitempty"` - State string `xml:"state"` -} - -func init() { - t["NvdimmInterleaveSetInfo"] = reflect.TypeOf((*NvdimmInterleaveSetInfo)(nil)).Elem() -} - -type NvdimmNamespaceCreateSpec struct { - DynamicData - - FriendlyName string `xml:"friendlyName,omitempty"` - BlockSize int64 `xml:"blockSize"` - BlockCount int64 `xml:"blockCount"` - Type string `xml:"type"` - LocationID int32 `xml:"locationID"` -} - -func init() { - t["NvdimmNamespaceCreateSpec"] = reflect.TypeOf((*NvdimmNamespaceCreateSpec)(nil)).Elem() -} - -type NvdimmNamespaceDeleteSpec struct { - DynamicData - - Uuid string `xml:"uuid"` -} - -func init() { - t["NvdimmNamespaceDeleteSpec"] = reflect.TypeOf((*NvdimmNamespaceDeleteSpec)(nil)).Elem() -} - -type NvdimmNamespaceDetails struct { - DynamicData - - Uuid string `xml:"uuid"` - FriendlyName string `xml:"friendlyName"` - Size int64 `xml:"size"` - Type string `xml:"type"` - NamespaceHealthStatus string `xml:"namespaceHealthStatus"` - InterleavesetID int32 `xml:"interleavesetID"` - State string `xml:"state"` -} - -func init() { - t["NvdimmNamespaceDetails"] = reflect.TypeOf((*NvdimmNamespaceDetails)(nil)).Elem() -} - -type NvdimmNamespaceInfo struct { - DynamicData - - Uuid string `xml:"uuid"` - FriendlyName string `xml:"friendlyName"` - BlockSize int64 `xml:"blockSize"` - BlockCount int64 `xml:"blockCount"` - Type string `xml:"type"` - NamespaceHealthStatus string `xml:"namespaceHealthStatus"` - LocationID int32 `xml:"locationID"` - State string `xml:"state"` -} - -func init() { - t["NvdimmNamespaceInfo"] = reflect.TypeOf((*NvdimmNamespaceInfo)(nil)).Elem() -} - -type NvdimmPMemNamespaceCreateSpec struct { - DynamicData - - FriendlyName string `xml:"friendlyName,omitempty"` - Size int64 `xml:"size"` - InterleavesetID int32 `xml:"interleavesetID"` -} - -func init() { - t["NvdimmPMemNamespaceCreateSpec"] = reflect.TypeOf((*NvdimmPMemNamespaceCreateSpec)(nil)).Elem() -} - -type NvdimmRegionInfo struct { - DynamicData - - RegionId int32 `xml:"regionId"` - SetId int32 `xml:"setId"` - RangeType string `xml:"rangeType"` - StartAddr int64 `xml:"startAddr"` - Size int64 `xml:"size"` - Offset int64 `xml:"offset"` -} - -func init() { - t["NvdimmRegionInfo"] = reflect.TypeOf((*NvdimmRegionInfo)(nil)).Elem() -} - -type NvdimmSummary struct { - DynamicData - - NumDimms int32 `xml:"numDimms"` - HealthStatus string `xml:"healthStatus"` - TotalCapacity int64 `xml:"totalCapacity"` - PersistentCapacity int64 `xml:"persistentCapacity"` - BlockCapacity int64 `xml:"blockCapacity"` - AvailableCapacity int64 `xml:"availableCapacity"` - NumInterleavesets int32 `xml:"numInterleavesets"` - NumNamespaces int32 `xml:"numNamespaces"` -} - -func init() { - t["NvdimmSummary"] = reflect.TypeOf((*NvdimmSummary)(nil)).Elem() -} - -type NvdimmSystemInfo struct { - DynamicData - - Summary *NvdimmSummary `xml:"summary,omitempty"` - Dimms []int32 `xml:"dimms,omitempty"` - DimmInfo []NvdimmDimmInfo `xml:"dimmInfo,omitempty"` - InterleaveSet []int32 `xml:"interleaveSet,omitempty"` - ISetInfo []NvdimmInterleaveSetInfo `xml:"iSetInfo,omitempty"` - Namespace []NvdimmGuid `xml:"namespace,omitempty"` - NsInfo []NvdimmNamespaceInfo `xml:"nsInfo,omitempty"` - NsDetails []NvdimmNamespaceDetails `xml:"nsDetails,omitempty"` -} - -func init() { - t["NvdimmSystemInfo"] = reflect.TypeOf((*NvdimmSystemInfo)(nil)).Elem() -} - -type ObjectContent struct { - DynamicData - - Obj ManagedObjectReference `xml:"obj"` - PropSet []DynamicProperty `xml:"propSet,omitempty"` - MissingSet []MissingProperty `xml:"missingSet,omitempty"` -} - -func init() { - t["ObjectContent"] = reflect.TypeOf((*ObjectContent)(nil)).Elem() -} - -type ObjectSpec struct { - DynamicData - - Obj ManagedObjectReference `xml:"obj"` - Skip *bool `xml:"skip"` - SelectSet []BaseSelectionSpec `xml:"selectSet,omitempty,typeattr"` -} - -func init() { - t["ObjectSpec"] = reflect.TypeOf((*ObjectSpec)(nil)).Elem() -} - -type ObjectUpdate struct { - DynamicData - - Kind ObjectUpdateKind `xml:"kind"` - Obj ManagedObjectReference `xml:"obj"` - ChangeSet []PropertyChange `xml:"changeSet,omitempty"` - MissingSet []MissingProperty `xml:"missingSet,omitempty"` -} - -func init() { - t["ObjectUpdate"] = reflect.TypeOf((*ObjectUpdate)(nil)).Elem() -} - -type OnceTaskScheduler struct { - TaskScheduler - - RunAt *time.Time `xml:"runAt"` -} - -func init() { - t["OnceTaskScheduler"] = reflect.TypeOf((*OnceTaskScheduler)(nil)).Elem() -} - -type OpaqueNetworkCapability struct { - DynamicData - - NetworkReservationSupported bool `xml:"networkReservationSupported"` -} - -func init() { - t["OpaqueNetworkCapability"] = reflect.TypeOf((*OpaqueNetworkCapability)(nil)).Elem() -} - -type OpaqueNetworkSummary struct { - NetworkSummary - - OpaqueNetworkId string `xml:"opaqueNetworkId"` - OpaqueNetworkType string `xml:"opaqueNetworkType"` -} - -func init() { - t["OpaqueNetworkSummary"] = reflect.TypeOf((*OpaqueNetworkSummary)(nil)).Elem() -} - -type OpaqueNetworkTargetInfo struct { - VirtualMachineTargetInfo - - Network OpaqueNetworkSummary `xml:"network"` - NetworkReservationSupported *bool `xml:"networkReservationSupported"` -} - -func init() { - t["OpaqueNetworkTargetInfo"] = reflect.TypeOf((*OpaqueNetworkTargetInfo)(nil)).Elem() -} - -type OpaqueSwitchProfile struct { - ApplyProfile -} - -func init() { - t["OpaqueSwitchProfile"] = reflect.TypeOf((*OpaqueSwitchProfile)(nil)).Elem() -} - -type OpenInventoryViewFolder OpenInventoryViewFolderRequestType - -func init() { - t["OpenInventoryViewFolder"] = reflect.TypeOf((*OpenInventoryViewFolder)(nil)).Elem() -} - -type OpenInventoryViewFolderRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity"` -} - -func init() { - t["OpenInventoryViewFolderRequestType"] = reflect.TypeOf((*OpenInventoryViewFolderRequestType)(nil)).Elem() -} - -type OpenInventoryViewFolderResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type OperationDisabledByGuest struct { - GuestOperationsFault -} - -func init() { - t["OperationDisabledByGuest"] = reflect.TypeOf((*OperationDisabledByGuest)(nil)).Elem() -} - -type OperationDisabledByGuestFault OperationDisabledByGuest - -func init() { - t["OperationDisabledByGuestFault"] = reflect.TypeOf((*OperationDisabledByGuestFault)(nil)).Elem() -} - -type OperationDisallowedOnHost struct { - RuntimeFault -} - -func init() { - t["OperationDisallowedOnHost"] = reflect.TypeOf((*OperationDisallowedOnHost)(nil)).Elem() -} - -type OperationDisallowedOnHostFault OperationDisallowedOnHost - -func init() { - t["OperationDisallowedOnHostFault"] = reflect.TypeOf((*OperationDisallowedOnHostFault)(nil)).Elem() -} - -type OperationNotSupportedByGuest struct { - GuestOperationsFault -} - -func init() { - t["OperationNotSupportedByGuest"] = reflect.TypeOf((*OperationNotSupportedByGuest)(nil)).Elem() -} - -type OperationNotSupportedByGuestFault OperationNotSupportedByGuest - -func init() { - t["OperationNotSupportedByGuestFault"] = reflect.TypeOf((*OperationNotSupportedByGuestFault)(nil)).Elem() -} - -type OptionDef struct { - ElementDescription - - OptionType BaseOptionType `xml:"optionType,typeattr"` -} - -func init() { - t["OptionDef"] = reflect.TypeOf((*OptionDef)(nil)).Elem() -} - -type OptionProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["OptionProfile"] = reflect.TypeOf((*OptionProfile)(nil)).Elem() -} - -type OptionType struct { - DynamicData - - ValueIsReadonly *bool `xml:"valueIsReadonly"` -} - -func init() { - t["OptionType"] = reflect.TypeOf((*OptionType)(nil)).Elem() -} - -type OptionValue struct { - DynamicData - - Key string `xml:"key"` - Value AnyType `xml:"value,typeattr"` -} - -func init() { - t["OptionValue"] = reflect.TypeOf((*OptionValue)(nil)).Elem() -} - -type OrAlarmExpression struct { - AlarmExpression - - Expression []BaseAlarmExpression `xml:"expression,typeattr"` -} - -func init() { - t["OrAlarmExpression"] = reflect.TypeOf((*OrAlarmExpression)(nil)).Elem() -} - -type OutOfBounds struct { - VimFault - - ArgumentName string `xml:"argumentName"` -} - -func init() { - t["OutOfBounds"] = reflect.TypeOf((*OutOfBounds)(nil)).Elem() -} - -type OutOfBoundsFault OutOfBounds - -func init() { - t["OutOfBoundsFault"] = reflect.TypeOf((*OutOfBoundsFault)(nil)).Elem() -} - -type OutOfSyncDvsHost struct { - DvsEvent - - HostOutOfSync []DvsOutOfSyncHostArgument `xml:"hostOutOfSync"` -} - -func init() { - t["OutOfSyncDvsHost"] = reflect.TypeOf((*OutOfSyncDvsHost)(nil)).Elem() -} - -type OverwriteCustomizationSpec OverwriteCustomizationSpecRequestType - -func init() { - t["OverwriteCustomizationSpec"] = reflect.TypeOf((*OverwriteCustomizationSpec)(nil)).Elem() -} - -type OverwriteCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Item CustomizationSpecItem `xml:"item"` -} - -func init() { - t["OverwriteCustomizationSpecRequestType"] = reflect.TypeOf((*OverwriteCustomizationSpecRequestType)(nil)).Elem() -} - -type OverwriteCustomizationSpecResponse struct { -} - -type OvfAttribute struct { - OvfInvalidPackage - - ElementName string `xml:"elementName"` - AttributeName string `xml:"attributeName"` -} - -func init() { - t["OvfAttribute"] = reflect.TypeOf((*OvfAttribute)(nil)).Elem() -} - -type OvfAttributeFault BaseOvfAttribute - -func init() { - t["OvfAttributeFault"] = reflect.TypeOf((*OvfAttributeFault)(nil)).Elem() -} - -type OvfConnectedDevice struct { - OvfHardwareExport -} - -func init() { - t["OvfConnectedDevice"] = reflect.TypeOf((*OvfConnectedDevice)(nil)).Elem() -} - -type OvfConnectedDeviceFault BaseOvfConnectedDevice - -func init() { - t["OvfConnectedDeviceFault"] = reflect.TypeOf((*OvfConnectedDeviceFault)(nil)).Elem() -} - -type OvfConnectedDeviceFloppy struct { - OvfConnectedDevice - - Filename string `xml:"filename"` -} - -func init() { - t["OvfConnectedDeviceFloppy"] = reflect.TypeOf((*OvfConnectedDeviceFloppy)(nil)).Elem() -} - -type OvfConnectedDeviceFloppyFault OvfConnectedDeviceFloppy - -func init() { - t["OvfConnectedDeviceFloppyFault"] = reflect.TypeOf((*OvfConnectedDeviceFloppyFault)(nil)).Elem() -} - -type OvfConnectedDeviceIso struct { - OvfConnectedDevice - - Filename string `xml:"filename"` -} - -func init() { - t["OvfConnectedDeviceIso"] = reflect.TypeOf((*OvfConnectedDeviceIso)(nil)).Elem() -} - -type OvfConnectedDeviceIsoFault OvfConnectedDeviceIso - -func init() { - t["OvfConnectedDeviceIsoFault"] = reflect.TypeOf((*OvfConnectedDeviceIsoFault)(nil)).Elem() -} - -type OvfConstraint struct { - OvfInvalidPackage - - Name string `xml:"name"` -} - -func init() { - t["OvfConstraint"] = reflect.TypeOf((*OvfConstraint)(nil)).Elem() -} - -type OvfConstraintFault BaseOvfConstraint - -func init() { - t["OvfConstraintFault"] = reflect.TypeOf((*OvfConstraintFault)(nil)).Elem() -} - -type OvfConsumerCallbackFault struct { - OvfFault - - ExtensionKey string `xml:"extensionKey"` - ExtensionName string `xml:"extensionName"` -} - -func init() { - t["OvfConsumerCallbackFault"] = reflect.TypeOf((*OvfConsumerCallbackFault)(nil)).Elem() -} - -type OvfConsumerCallbackFaultFault BaseOvfConsumerCallbackFault - -func init() { - t["OvfConsumerCallbackFaultFault"] = reflect.TypeOf((*OvfConsumerCallbackFaultFault)(nil)).Elem() -} - -type OvfConsumerCommunicationError struct { - OvfConsumerCallbackFault - - Description string `xml:"description"` -} - -func init() { - t["OvfConsumerCommunicationError"] = reflect.TypeOf((*OvfConsumerCommunicationError)(nil)).Elem() -} - -type OvfConsumerCommunicationErrorFault OvfConsumerCommunicationError - -func init() { - t["OvfConsumerCommunicationErrorFault"] = reflect.TypeOf((*OvfConsumerCommunicationErrorFault)(nil)).Elem() -} - -type OvfConsumerFault struct { - OvfConsumerCallbackFault - - ErrorKey string `xml:"errorKey"` - Message string `xml:"message"` - Params []KeyValue `xml:"params,omitempty"` -} - -func init() { - t["OvfConsumerFault"] = reflect.TypeOf((*OvfConsumerFault)(nil)).Elem() -} - -type OvfConsumerFaultFault OvfConsumerFault - -func init() { - t["OvfConsumerFaultFault"] = reflect.TypeOf((*OvfConsumerFaultFault)(nil)).Elem() -} - -type OvfConsumerInvalidSection struct { - OvfConsumerCallbackFault - - LineNumber int32 `xml:"lineNumber"` - Description string `xml:"description"` -} - -func init() { - t["OvfConsumerInvalidSection"] = reflect.TypeOf((*OvfConsumerInvalidSection)(nil)).Elem() -} - -type OvfConsumerInvalidSectionFault OvfConsumerInvalidSection - -func init() { - t["OvfConsumerInvalidSectionFault"] = reflect.TypeOf((*OvfConsumerInvalidSectionFault)(nil)).Elem() -} - -type OvfConsumerOstNode struct { - DynamicData - - Id string `xml:"id"` - Type string `xml:"type"` - Section []OvfConsumerOvfSection `xml:"section,omitempty"` - Child []OvfConsumerOstNode `xml:"child,omitempty"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["OvfConsumerOstNode"] = reflect.TypeOf((*OvfConsumerOstNode)(nil)).Elem() -} - -type OvfConsumerOvfSection struct { - DynamicData - - LineNumber int32 `xml:"lineNumber"` - Xml string `xml:"xml"` -} - -func init() { - t["OvfConsumerOvfSection"] = reflect.TypeOf((*OvfConsumerOvfSection)(nil)).Elem() -} - -type OvfConsumerPowerOnFault struct { - InvalidState - - ExtensionKey string `xml:"extensionKey"` - ExtensionName string `xml:"extensionName"` - Description string `xml:"description"` -} - -func init() { - t["OvfConsumerPowerOnFault"] = reflect.TypeOf((*OvfConsumerPowerOnFault)(nil)).Elem() -} - -type OvfConsumerPowerOnFaultFault OvfConsumerPowerOnFault - -func init() { - t["OvfConsumerPowerOnFaultFault"] = reflect.TypeOf((*OvfConsumerPowerOnFaultFault)(nil)).Elem() -} - -type OvfConsumerUndeclaredSection struct { - OvfConsumerCallbackFault - - QualifiedSectionType string `xml:"qualifiedSectionType"` -} - -func init() { - t["OvfConsumerUndeclaredSection"] = reflect.TypeOf((*OvfConsumerUndeclaredSection)(nil)).Elem() -} - -type OvfConsumerUndeclaredSectionFault OvfConsumerUndeclaredSection - -func init() { - t["OvfConsumerUndeclaredSectionFault"] = reflect.TypeOf((*OvfConsumerUndeclaredSectionFault)(nil)).Elem() -} - -type OvfConsumerUndefinedPrefix struct { - OvfConsumerCallbackFault - - Prefix string `xml:"prefix"` -} - -func init() { - t["OvfConsumerUndefinedPrefix"] = reflect.TypeOf((*OvfConsumerUndefinedPrefix)(nil)).Elem() -} - -type OvfConsumerUndefinedPrefixFault OvfConsumerUndefinedPrefix - -func init() { - t["OvfConsumerUndefinedPrefixFault"] = reflect.TypeOf((*OvfConsumerUndefinedPrefixFault)(nil)).Elem() -} - -type OvfConsumerValidationFault struct { - VmConfigFault - - ExtensionKey string `xml:"extensionKey"` - ExtensionName string `xml:"extensionName"` - Message string `xml:"message"` -} - -func init() { - t["OvfConsumerValidationFault"] = reflect.TypeOf((*OvfConsumerValidationFault)(nil)).Elem() -} - -type OvfConsumerValidationFaultFault OvfConsumerValidationFault - -func init() { - t["OvfConsumerValidationFaultFault"] = reflect.TypeOf((*OvfConsumerValidationFaultFault)(nil)).Elem() -} - -type OvfCpuCompatibility struct { - OvfImport - - RegisterName string `xml:"registerName"` - Level int32 `xml:"level"` - RegisterValue string `xml:"registerValue"` - DesiredRegisterValue string `xml:"desiredRegisterValue"` -} - -func init() { - t["OvfCpuCompatibility"] = reflect.TypeOf((*OvfCpuCompatibility)(nil)).Elem() -} - -type OvfCpuCompatibilityCheckNotSupported struct { - OvfImport -} - -func init() { - t["OvfCpuCompatibilityCheckNotSupported"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupported)(nil)).Elem() -} - -type OvfCpuCompatibilityCheckNotSupportedFault OvfCpuCompatibilityCheckNotSupported - -func init() { - t["OvfCpuCompatibilityCheckNotSupportedFault"] = reflect.TypeOf((*OvfCpuCompatibilityCheckNotSupportedFault)(nil)).Elem() -} - -type OvfCpuCompatibilityFault OvfCpuCompatibility - -func init() { - t["OvfCpuCompatibilityFault"] = reflect.TypeOf((*OvfCpuCompatibilityFault)(nil)).Elem() -} - -type OvfCreateDescriptorParams struct { - DynamicData - - OvfFiles []OvfFile `xml:"ovfFiles,omitempty"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` - IncludeImageFiles *bool `xml:"includeImageFiles"` - ExportOption []string `xml:"exportOption,omitempty"` - Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` -} - -func init() { - t["OvfCreateDescriptorParams"] = reflect.TypeOf((*OvfCreateDescriptorParams)(nil)).Elem() -} - -type OvfCreateDescriptorResult struct { - DynamicData - - OvfDescriptor string `xml:"ovfDescriptor"` - Error []LocalizedMethodFault `xml:"error,omitempty"` - Warning []LocalizedMethodFault `xml:"warning,omitempty"` - IncludeImageFiles *bool `xml:"includeImageFiles"` -} - -func init() { - t["OvfCreateDescriptorResult"] = reflect.TypeOf((*OvfCreateDescriptorResult)(nil)).Elem() -} - -type OvfCreateImportSpecParams struct { - OvfManagerCommonParams - - EntityName string `xml:"entityName"` - HostSystem *ManagedObjectReference `xml:"hostSystem,omitempty"` - NetworkMapping []OvfNetworkMapping `xml:"networkMapping,omitempty"` - IpAllocationPolicy string `xml:"ipAllocationPolicy,omitempty"` - IpProtocol string `xml:"ipProtocol,omitempty"` - PropertyMapping []KeyValue `xml:"propertyMapping,omitempty"` - ResourceMapping []OvfResourceMap `xml:"resourceMapping,omitempty"` - DiskProvisioning string `xml:"diskProvisioning,omitempty"` - InstantiationOst *OvfConsumerOstNode `xml:"instantiationOst,omitempty"` -} - -func init() { - t["OvfCreateImportSpecParams"] = reflect.TypeOf((*OvfCreateImportSpecParams)(nil)).Elem() -} - -type OvfCreateImportSpecResult struct { - DynamicData - - ImportSpec BaseImportSpec `xml:"importSpec,omitempty,typeattr"` - FileItem []OvfFileItem `xml:"fileItem,omitempty"` - Warning []LocalizedMethodFault `xml:"warning,omitempty"` - Error []LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["OvfCreateImportSpecResult"] = reflect.TypeOf((*OvfCreateImportSpecResult)(nil)).Elem() -} - -type OvfDeploymentOption struct { - DynamicData - - Key string `xml:"key"` - Label string `xml:"label"` - Description string `xml:"description"` -} - -func init() { - t["OvfDeploymentOption"] = reflect.TypeOf((*OvfDeploymentOption)(nil)).Elem() -} - -type OvfDiskMappingNotFound struct { - OvfSystemFault - - DiskName string `xml:"diskName"` - VmName string `xml:"vmName"` -} - -func init() { - t["OvfDiskMappingNotFound"] = reflect.TypeOf((*OvfDiskMappingNotFound)(nil)).Elem() -} - -type OvfDiskMappingNotFoundFault OvfDiskMappingNotFound - -func init() { - t["OvfDiskMappingNotFoundFault"] = reflect.TypeOf((*OvfDiskMappingNotFoundFault)(nil)).Elem() -} - -type OvfDiskOrderConstraint struct { - OvfConstraint -} - -func init() { - t["OvfDiskOrderConstraint"] = reflect.TypeOf((*OvfDiskOrderConstraint)(nil)).Elem() -} - -type OvfDiskOrderConstraintFault OvfDiskOrderConstraint - -func init() { - t["OvfDiskOrderConstraintFault"] = reflect.TypeOf((*OvfDiskOrderConstraintFault)(nil)).Elem() -} - -type OvfDuplicateElement struct { - OvfElement -} - -func init() { - t["OvfDuplicateElement"] = reflect.TypeOf((*OvfDuplicateElement)(nil)).Elem() -} - -type OvfDuplicateElementFault OvfDuplicateElement - -func init() { - t["OvfDuplicateElementFault"] = reflect.TypeOf((*OvfDuplicateElementFault)(nil)).Elem() -} - -type OvfDuplicatedElementBoundary struct { - OvfElement - - Boundary string `xml:"boundary"` -} - -func init() { - t["OvfDuplicatedElementBoundary"] = reflect.TypeOf((*OvfDuplicatedElementBoundary)(nil)).Elem() -} - -type OvfDuplicatedElementBoundaryFault OvfDuplicatedElementBoundary - -func init() { - t["OvfDuplicatedElementBoundaryFault"] = reflect.TypeOf((*OvfDuplicatedElementBoundaryFault)(nil)).Elem() -} - -type OvfDuplicatedPropertyIdExport struct { - OvfExport - - Fqid string `xml:"fqid"` -} - -func init() { - t["OvfDuplicatedPropertyIdExport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExport)(nil)).Elem() -} - -type OvfDuplicatedPropertyIdExportFault OvfDuplicatedPropertyIdExport - -func init() { - t["OvfDuplicatedPropertyIdExportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdExportFault)(nil)).Elem() -} - -type OvfDuplicatedPropertyIdImport struct { - OvfExport -} - -func init() { - t["OvfDuplicatedPropertyIdImport"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImport)(nil)).Elem() -} - -type OvfDuplicatedPropertyIdImportFault OvfDuplicatedPropertyIdImport - -func init() { - t["OvfDuplicatedPropertyIdImportFault"] = reflect.TypeOf((*OvfDuplicatedPropertyIdImportFault)(nil)).Elem() -} - -type OvfElement struct { - OvfInvalidPackage - - Name string `xml:"name"` -} - -func init() { - t["OvfElement"] = reflect.TypeOf((*OvfElement)(nil)).Elem() -} - -type OvfElementFault BaseOvfElement - -func init() { - t["OvfElementFault"] = reflect.TypeOf((*OvfElementFault)(nil)).Elem() -} - -type OvfElementInvalidValue struct { - OvfElement - - Value string `xml:"value"` -} - -func init() { - t["OvfElementInvalidValue"] = reflect.TypeOf((*OvfElementInvalidValue)(nil)).Elem() -} - -type OvfElementInvalidValueFault OvfElementInvalidValue - -func init() { - t["OvfElementInvalidValueFault"] = reflect.TypeOf((*OvfElementInvalidValueFault)(nil)).Elem() -} - -type OvfExport struct { - OvfFault -} - -func init() { - t["OvfExport"] = reflect.TypeOf((*OvfExport)(nil)).Elem() -} - -type OvfExportFailed struct { - OvfExport -} - -func init() { - t["OvfExportFailed"] = reflect.TypeOf((*OvfExportFailed)(nil)).Elem() -} - -type OvfExportFailedFault OvfExportFailed - -func init() { - t["OvfExportFailedFault"] = reflect.TypeOf((*OvfExportFailedFault)(nil)).Elem() -} - -type OvfExportFault BaseOvfExport - -func init() { - t["OvfExportFault"] = reflect.TypeOf((*OvfExportFault)(nil)).Elem() -} - -type OvfFault struct { - VimFault -} - -func init() { - t["OvfFault"] = reflect.TypeOf((*OvfFault)(nil)).Elem() -} - -type OvfFaultFault BaseOvfFault - -func init() { - t["OvfFaultFault"] = reflect.TypeOf((*OvfFaultFault)(nil)).Elem() -} - -type OvfFile struct { - DynamicData - - DeviceId string `xml:"deviceId"` - Path string `xml:"path"` - CompressionMethod string `xml:"compressionMethod,omitempty"` - ChunkSize int64 `xml:"chunkSize,omitempty"` - Size int64 `xml:"size"` - Capacity int64 `xml:"capacity,omitempty"` - PopulatedSize int64 `xml:"populatedSize,omitempty"` -} - -func init() { - t["OvfFile"] = reflect.TypeOf((*OvfFile)(nil)).Elem() -} - -type OvfFileItem struct { - DynamicData - - DeviceId string `xml:"deviceId"` - Path string `xml:"path"` - CompressionMethod string `xml:"compressionMethod,omitempty"` - ChunkSize int64 `xml:"chunkSize,omitempty"` - Size int64 `xml:"size,omitempty"` - CimType int32 `xml:"cimType"` - Create bool `xml:"create"` -} - -func init() { - t["OvfFileItem"] = reflect.TypeOf((*OvfFileItem)(nil)).Elem() -} - -type OvfHardwareCheck struct { - OvfImport -} - -func init() { - t["OvfHardwareCheck"] = reflect.TypeOf((*OvfHardwareCheck)(nil)).Elem() -} - -type OvfHardwareCheckFault OvfHardwareCheck - -func init() { - t["OvfHardwareCheckFault"] = reflect.TypeOf((*OvfHardwareCheckFault)(nil)).Elem() -} - -type OvfHardwareExport struct { - OvfExport - - Device BaseVirtualDevice `xml:"device,omitempty,typeattr"` - VmPath string `xml:"vmPath"` -} - -func init() { - t["OvfHardwareExport"] = reflect.TypeOf((*OvfHardwareExport)(nil)).Elem() -} - -type OvfHardwareExportFault BaseOvfHardwareExport - -func init() { - t["OvfHardwareExportFault"] = reflect.TypeOf((*OvfHardwareExportFault)(nil)).Elem() -} - -type OvfHostResourceConstraint struct { - OvfConstraint - - Value string `xml:"value"` -} - -func init() { - t["OvfHostResourceConstraint"] = reflect.TypeOf((*OvfHostResourceConstraint)(nil)).Elem() -} - -type OvfHostResourceConstraintFault OvfHostResourceConstraint - -func init() { - t["OvfHostResourceConstraintFault"] = reflect.TypeOf((*OvfHostResourceConstraintFault)(nil)).Elem() -} - -type OvfHostValueNotParsed struct { - OvfSystemFault - - Property string `xml:"property"` - Value string `xml:"value"` -} - -func init() { - t["OvfHostValueNotParsed"] = reflect.TypeOf((*OvfHostValueNotParsed)(nil)).Elem() -} - -type OvfHostValueNotParsedFault OvfHostValueNotParsed - -func init() { - t["OvfHostValueNotParsedFault"] = reflect.TypeOf((*OvfHostValueNotParsedFault)(nil)).Elem() -} - -type OvfImport struct { - OvfFault -} - -func init() { - t["OvfImport"] = reflect.TypeOf((*OvfImport)(nil)).Elem() -} - -type OvfImportFailed struct { - OvfImport -} - -func init() { - t["OvfImportFailed"] = reflect.TypeOf((*OvfImportFailed)(nil)).Elem() -} - -type OvfImportFailedFault OvfImportFailed - -func init() { - t["OvfImportFailedFault"] = reflect.TypeOf((*OvfImportFailedFault)(nil)).Elem() -} - -type OvfImportFault BaseOvfImport - -func init() { - t["OvfImportFault"] = reflect.TypeOf((*OvfImportFault)(nil)).Elem() -} - -type OvfInternalError struct { - OvfSystemFault -} - -func init() { - t["OvfInternalError"] = reflect.TypeOf((*OvfInternalError)(nil)).Elem() -} - -type OvfInternalErrorFault OvfInternalError - -func init() { - t["OvfInternalErrorFault"] = reflect.TypeOf((*OvfInternalErrorFault)(nil)).Elem() -} - -type OvfInvalidPackage struct { - OvfFault - - LineNumber int32 `xml:"lineNumber"` -} - -func init() { - t["OvfInvalidPackage"] = reflect.TypeOf((*OvfInvalidPackage)(nil)).Elem() -} - -type OvfInvalidPackageFault BaseOvfInvalidPackage - -func init() { - t["OvfInvalidPackageFault"] = reflect.TypeOf((*OvfInvalidPackageFault)(nil)).Elem() -} - -type OvfInvalidValue struct { - OvfAttribute - - Value string `xml:"value"` -} - -func init() { - t["OvfInvalidValue"] = reflect.TypeOf((*OvfInvalidValue)(nil)).Elem() -} - -type OvfInvalidValueConfiguration struct { - OvfInvalidValue -} - -func init() { - t["OvfInvalidValueConfiguration"] = reflect.TypeOf((*OvfInvalidValueConfiguration)(nil)).Elem() -} - -type OvfInvalidValueConfigurationFault OvfInvalidValueConfiguration - -func init() { - t["OvfInvalidValueConfigurationFault"] = reflect.TypeOf((*OvfInvalidValueConfigurationFault)(nil)).Elem() -} - -type OvfInvalidValueEmpty struct { - OvfInvalidValue -} - -func init() { - t["OvfInvalidValueEmpty"] = reflect.TypeOf((*OvfInvalidValueEmpty)(nil)).Elem() -} - -type OvfInvalidValueEmptyFault OvfInvalidValueEmpty - -func init() { - t["OvfInvalidValueEmptyFault"] = reflect.TypeOf((*OvfInvalidValueEmptyFault)(nil)).Elem() -} - -type OvfInvalidValueFault BaseOvfInvalidValue - -func init() { - t["OvfInvalidValueFault"] = reflect.TypeOf((*OvfInvalidValueFault)(nil)).Elem() -} - -type OvfInvalidValueFormatMalformed struct { - OvfInvalidValue -} - -func init() { - t["OvfInvalidValueFormatMalformed"] = reflect.TypeOf((*OvfInvalidValueFormatMalformed)(nil)).Elem() -} - -type OvfInvalidValueFormatMalformedFault OvfInvalidValueFormatMalformed - -func init() { - t["OvfInvalidValueFormatMalformedFault"] = reflect.TypeOf((*OvfInvalidValueFormatMalformedFault)(nil)).Elem() -} - -type OvfInvalidValueReference struct { - OvfInvalidValue -} - -func init() { - t["OvfInvalidValueReference"] = reflect.TypeOf((*OvfInvalidValueReference)(nil)).Elem() -} - -type OvfInvalidValueReferenceFault OvfInvalidValueReference - -func init() { - t["OvfInvalidValueReferenceFault"] = reflect.TypeOf((*OvfInvalidValueReferenceFault)(nil)).Elem() -} - -type OvfInvalidVmName struct { - OvfUnsupportedPackage - - Name string `xml:"name"` -} - -func init() { - t["OvfInvalidVmName"] = reflect.TypeOf((*OvfInvalidVmName)(nil)).Elem() -} - -type OvfInvalidVmNameFault OvfInvalidVmName - -func init() { - t["OvfInvalidVmNameFault"] = reflect.TypeOf((*OvfInvalidVmNameFault)(nil)).Elem() -} - -type OvfManagerCommonParams struct { - DynamicData - - Locale string `xml:"locale"` - DeploymentOption string `xml:"deploymentOption"` - MsgBundle []KeyValue `xml:"msgBundle,omitempty"` - ImportOption []string `xml:"importOption,omitempty"` -} - -func init() { - t["OvfManagerCommonParams"] = reflect.TypeOf((*OvfManagerCommonParams)(nil)).Elem() -} - -type OvfMappedOsId struct { - OvfImport - - OvfId int32 `xml:"ovfId"` - OvfDescription string `xml:"ovfDescription"` - TargetDescription string `xml:"targetDescription"` -} - -func init() { - t["OvfMappedOsId"] = reflect.TypeOf((*OvfMappedOsId)(nil)).Elem() -} - -type OvfMappedOsIdFault OvfMappedOsId - -func init() { - t["OvfMappedOsIdFault"] = reflect.TypeOf((*OvfMappedOsIdFault)(nil)).Elem() -} - -type OvfMissingAttribute struct { - OvfAttribute -} - -func init() { - t["OvfMissingAttribute"] = reflect.TypeOf((*OvfMissingAttribute)(nil)).Elem() -} - -type OvfMissingAttributeFault OvfMissingAttribute - -func init() { - t["OvfMissingAttributeFault"] = reflect.TypeOf((*OvfMissingAttributeFault)(nil)).Elem() -} - -type OvfMissingElement struct { - OvfElement -} - -func init() { - t["OvfMissingElement"] = reflect.TypeOf((*OvfMissingElement)(nil)).Elem() -} - -type OvfMissingElementFault BaseOvfMissingElement - -func init() { - t["OvfMissingElementFault"] = reflect.TypeOf((*OvfMissingElementFault)(nil)).Elem() -} - -type OvfMissingElementNormalBoundary struct { - OvfMissingElement - - Boundary string `xml:"boundary"` -} - -func init() { - t["OvfMissingElementNormalBoundary"] = reflect.TypeOf((*OvfMissingElementNormalBoundary)(nil)).Elem() -} - -type OvfMissingElementNormalBoundaryFault OvfMissingElementNormalBoundary - -func init() { - t["OvfMissingElementNormalBoundaryFault"] = reflect.TypeOf((*OvfMissingElementNormalBoundaryFault)(nil)).Elem() -} - -type OvfMissingHardware struct { - OvfImport - - Name string `xml:"name"` - ResourceType int32 `xml:"resourceType"` -} - -func init() { - t["OvfMissingHardware"] = reflect.TypeOf((*OvfMissingHardware)(nil)).Elem() -} - -type OvfMissingHardwareFault OvfMissingHardware - -func init() { - t["OvfMissingHardwareFault"] = reflect.TypeOf((*OvfMissingHardwareFault)(nil)).Elem() -} - -type OvfNetworkInfo struct { - DynamicData - - Name string `xml:"name"` - Description string `xml:"description"` -} - -func init() { - t["OvfNetworkInfo"] = reflect.TypeOf((*OvfNetworkInfo)(nil)).Elem() -} - -type OvfNetworkMapping struct { - DynamicData - - Name string `xml:"name"` - Network ManagedObjectReference `xml:"network"` -} - -func init() { - t["OvfNetworkMapping"] = reflect.TypeOf((*OvfNetworkMapping)(nil)).Elem() -} - -type OvfNetworkMappingNotSupported struct { - OvfImport -} - -func init() { - t["OvfNetworkMappingNotSupported"] = reflect.TypeOf((*OvfNetworkMappingNotSupported)(nil)).Elem() -} - -type OvfNetworkMappingNotSupportedFault OvfNetworkMappingNotSupported - -func init() { - t["OvfNetworkMappingNotSupportedFault"] = reflect.TypeOf((*OvfNetworkMappingNotSupportedFault)(nil)).Elem() -} - -type OvfNoHostNic struct { - OvfUnsupportedPackage -} - -func init() { - t["OvfNoHostNic"] = reflect.TypeOf((*OvfNoHostNic)(nil)).Elem() -} - -type OvfNoHostNicFault OvfNoHostNic - -func init() { - t["OvfNoHostNicFault"] = reflect.TypeOf((*OvfNoHostNicFault)(nil)).Elem() -} - -type OvfNoSpaceOnController struct { - OvfUnsupportedElement - - Parent string `xml:"parent"` -} - -func init() { - t["OvfNoSpaceOnController"] = reflect.TypeOf((*OvfNoSpaceOnController)(nil)).Elem() -} - -type OvfNoSpaceOnControllerFault OvfNoSpaceOnController - -func init() { - t["OvfNoSpaceOnControllerFault"] = reflect.TypeOf((*OvfNoSpaceOnControllerFault)(nil)).Elem() -} - -type OvfNoSupportedHardwareFamily struct { - OvfUnsupportedPackage - - Version string `xml:"version"` -} - -func init() { - t["OvfNoSupportedHardwareFamily"] = reflect.TypeOf((*OvfNoSupportedHardwareFamily)(nil)).Elem() -} - -type OvfNoSupportedHardwareFamilyFault OvfNoSupportedHardwareFamily - -func init() { - t["OvfNoSupportedHardwareFamilyFault"] = reflect.TypeOf((*OvfNoSupportedHardwareFamilyFault)(nil)).Elem() -} - -type OvfOptionInfo struct { - DynamicData - - Option string `xml:"option"` - Description LocalizableMessage `xml:"description"` -} - -func init() { - t["OvfOptionInfo"] = reflect.TypeOf((*OvfOptionInfo)(nil)).Elem() -} - -type OvfParseDescriptorParams struct { - OvfManagerCommonParams -} - -func init() { - t["OvfParseDescriptorParams"] = reflect.TypeOf((*OvfParseDescriptorParams)(nil)).Elem() -} - -type OvfParseDescriptorResult struct { - DynamicData - - Eula []string `xml:"eula,omitempty"` - Network []OvfNetworkInfo `xml:"network,omitempty"` - IpAllocationScheme []string `xml:"ipAllocationScheme,omitempty"` - IpProtocols []string `xml:"ipProtocols,omitempty"` - Property []VAppPropertyInfo `xml:"property,omitempty"` - ProductInfo *VAppProductInfo `xml:"productInfo,omitempty"` - Annotation string `xml:"annotation"` - ApproximateDownloadSize int64 `xml:"approximateDownloadSize,omitempty"` - ApproximateFlatDeploymentSize int64 `xml:"approximateFlatDeploymentSize,omitempty"` - ApproximateSparseDeploymentSize int64 `xml:"approximateSparseDeploymentSize,omitempty"` - DefaultEntityName string `xml:"defaultEntityName"` - VirtualApp bool `xml:"virtualApp"` - DeploymentOption []OvfDeploymentOption `xml:"deploymentOption,omitempty"` - DefaultDeploymentOption string `xml:"defaultDeploymentOption"` - EntityName []KeyValue `xml:"entityName,omitempty"` - AnnotatedOst *OvfConsumerOstNode `xml:"annotatedOst,omitempty"` - Error []LocalizedMethodFault `xml:"error,omitempty"` - Warning []LocalizedMethodFault `xml:"warning,omitempty"` -} - -func init() { - t["OvfParseDescriptorResult"] = reflect.TypeOf((*OvfParseDescriptorResult)(nil)).Elem() -} - -type OvfProperty struct { - OvfInvalidPackage - - Type string `xml:"type"` - Value string `xml:"value"` -} - -func init() { - t["OvfProperty"] = reflect.TypeOf((*OvfProperty)(nil)).Elem() -} - -type OvfPropertyExport struct { - OvfExport - - Type string `xml:"type"` - Value string `xml:"value"` -} - -func init() { - t["OvfPropertyExport"] = reflect.TypeOf((*OvfPropertyExport)(nil)).Elem() -} - -type OvfPropertyExportFault OvfPropertyExport - -func init() { - t["OvfPropertyExportFault"] = reflect.TypeOf((*OvfPropertyExportFault)(nil)).Elem() -} - -type OvfPropertyFault BaseOvfProperty - -func init() { - t["OvfPropertyFault"] = reflect.TypeOf((*OvfPropertyFault)(nil)).Elem() -} - -type OvfPropertyNetwork struct { - OvfProperty -} - -func init() { - t["OvfPropertyNetwork"] = reflect.TypeOf((*OvfPropertyNetwork)(nil)).Elem() -} - -type OvfPropertyNetworkExport struct { - OvfExport - - Network string `xml:"network"` -} - -func init() { - t["OvfPropertyNetworkExport"] = reflect.TypeOf((*OvfPropertyNetworkExport)(nil)).Elem() -} - -type OvfPropertyNetworkExportFault OvfPropertyNetworkExport - -func init() { - t["OvfPropertyNetworkExportFault"] = reflect.TypeOf((*OvfPropertyNetworkExportFault)(nil)).Elem() -} - -type OvfPropertyNetworkFault OvfPropertyNetwork - -func init() { - t["OvfPropertyNetworkFault"] = reflect.TypeOf((*OvfPropertyNetworkFault)(nil)).Elem() -} - -type OvfPropertyQualifier struct { - OvfProperty - - Qualifier string `xml:"qualifier"` -} - -func init() { - t["OvfPropertyQualifier"] = reflect.TypeOf((*OvfPropertyQualifier)(nil)).Elem() -} - -type OvfPropertyQualifierDuplicate struct { - OvfProperty - - Qualifier string `xml:"qualifier"` -} - -func init() { - t["OvfPropertyQualifierDuplicate"] = reflect.TypeOf((*OvfPropertyQualifierDuplicate)(nil)).Elem() -} - -type OvfPropertyQualifierDuplicateFault OvfPropertyQualifierDuplicate - -func init() { - t["OvfPropertyQualifierDuplicateFault"] = reflect.TypeOf((*OvfPropertyQualifierDuplicateFault)(nil)).Elem() -} - -type OvfPropertyQualifierFault OvfPropertyQualifier - -func init() { - t["OvfPropertyQualifierFault"] = reflect.TypeOf((*OvfPropertyQualifierFault)(nil)).Elem() -} - -type OvfPropertyQualifierIgnored struct { - OvfProperty - - Qualifier string `xml:"qualifier"` -} - -func init() { - t["OvfPropertyQualifierIgnored"] = reflect.TypeOf((*OvfPropertyQualifierIgnored)(nil)).Elem() -} - -type OvfPropertyQualifierIgnoredFault OvfPropertyQualifierIgnored - -func init() { - t["OvfPropertyQualifierIgnoredFault"] = reflect.TypeOf((*OvfPropertyQualifierIgnoredFault)(nil)).Elem() -} - -type OvfPropertyType struct { - OvfProperty -} - -func init() { - t["OvfPropertyType"] = reflect.TypeOf((*OvfPropertyType)(nil)).Elem() -} - -type OvfPropertyTypeFault OvfPropertyType - -func init() { - t["OvfPropertyTypeFault"] = reflect.TypeOf((*OvfPropertyTypeFault)(nil)).Elem() -} - -type OvfPropertyValue struct { - OvfProperty -} - -func init() { - t["OvfPropertyValue"] = reflect.TypeOf((*OvfPropertyValue)(nil)).Elem() -} - -type OvfPropertyValueFault OvfPropertyValue - -func init() { - t["OvfPropertyValueFault"] = reflect.TypeOf((*OvfPropertyValueFault)(nil)).Elem() -} - -type OvfResourceMap struct { - DynamicData - - Source string `xml:"source"` - Parent *ManagedObjectReference `xml:"parent,omitempty"` - ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["OvfResourceMap"] = reflect.TypeOf((*OvfResourceMap)(nil)).Elem() -} - -type OvfSystemFault struct { - OvfFault -} - -func init() { - t["OvfSystemFault"] = reflect.TypeOf((*OvfSystemFault)(nil)).Elem() -} - -type OvfSystemFaultFault BaseOvfSystemFault - -func init() { - t["OvfSystemFaultFault"] = reflect.TypeOf((*OvfSystemFaultFault)(nil)).Elem() -} - -type OvfToXmlUnsupportedElement struct { - OvfSystemFault - - Name string `xml:"name,omitempty"` -} - -func init() { - t["OvfToXmlUnsupportedElement"] = reflect.TypeOf((*OvfToXmlUnsupportedElement)(nil)).Elem() -} - -type OvfToXmlUnsupportedElementFault OvfToXmlUnsupportedElement - -func init() { - t["OvfToXmlUnsupportedElementFault"] = reflect.TypeOf((*OvfToXmlUnsupportedElementFault)(nil)).Elem() -} - -type OvfUnableToExportDisk struct { - OvfHardwareExport - - DiskName string `xml:"diskName"` -} - -func init() { - t["OvfUnableToExportDisk"] = reflect.TypeOf((*OvfUnableToExportDisk)(nil)).Elem() -} - -type OvfUnableToExportDiskFault OvfUnableToExportDisk - -func init() { - t["OvfUnableToExportDiskFault"] = reflect.TypeOf((*OvfUnableToExportDiskFault)(nil)).Elem() -} - -type OvfUnexpectedElement struct { - OvfElement -} - -func init() { - t["OvfUnexpectedElement"] = reflect.TypeOf((*OvfUnexpectedElement)(nil)).Elem() -} - -type OvfUnexpectedElementFault OvfUnexpectedElement - -func init() { - t["OvfUnexpectedElementFault"] = reflect.TypeOf((*OvfUnexpectedElementFault)(nil)).Elem() -} - -type OvfUnknownDevice struct { - OvfSystemFault - - Device BaseVirtualDevice `xml:"device,omitempty,typeattr"` - VmName string `xml:"vmName"` -} - -func init() { - t["OvfUnknownDevice"] = reflect.TypeOf((*OvfUnknownDevice)(nil)).Elem() -} - -type OvfUnknownDeviceBacking struct { - OvfHardwareExport - - Backing BaseVirtualDeviceBackingInfo `xml:"backing,typeattr"` -} - -func init() { - t["OvfUnknownDeviceBacking"] = reflect.TypeOf((*OvfUnknownDeviceBacking)(nil)).Elem() -} - -type OvfUnknownDeviceBackingFault OvfUnknownDeviceBacking - -func init() { - t["OvfUnknownDeviceBackingFault"] = reflect.TypeOf((*OvfUnknownDeviceBackingFault)(nil)).Elem() -} - -type OvfUnknownDeviceFault OvfUnknownDevice - -func init() { - t["OvfUnknownDeviceFault"] = reflect.TypeOf((*OvfUnknownDeviceFault)(nil)).Elem() -} - -type OvfUnknownEntity struct { - OvfSystemFault - - LineNumber int32 `xml:"lineNumber"` -} - -func init() { - t["OvfUnknownEntity"] = reflect.TypeOf((*OvfUnknownEntity)(nil)).Elem() -} - -type OvfUnknownEntityFault OvfUnknownEntity - -func init() { - t["OvfUnknownEntityFault"] = reflect.TypeOf((*OvfUnknownEntityFault)(nil)).Elem() -} - -type OvfUnsupportedAttribute struct { - OvfUnsupportedPackage - - ElementName string `xml:"elementName"` - AttributeName string `xml:"attributeName"` -} - -func init() { - t["OvfUnsupportedAttribute"] = reflect.TypeOf((*OvfUnsupportedAttribute)(nil)).Elem() -} - -type OvfUnsupportedAttributeFault BaseOvfUnsupportedAttribute - -func init() { - t["OvfUnsupportedAttributeFault"] = reflect.TypeOf((*OvfUnsupportedAttributeFault)(nil)).Elem() -} - -type OvfUnsupportedAttributeValue struct { - OvfUnsupportedAttribute - - Value string `xml:"value"` -} - -func init() { - t["OvfUnsupportedAttributeValue"] = reflect.TypeOf((*OvfUnsupportedAttributeValue)(nil)).Elem() -} - -type OvfUnsupportedAttributeValueFault OvfUnsupportedAttributeValue - -func init() { - t["OvfUnsupportedAttributeValueFault"] = reflect.TypeOf((*OvfUnsupportedAttributeValueFault)(nil)).Elem() -} - -type OvfUnsupportedDeviceBackingInfo struct { - OvfSystemFault - - ElementName string `xml:"elementName,omitempty"` - InstanceId string `xml:"instanceId,omitempty"` - DeviceName string `xml:"deviceName"` - BackingName string `xml:"backingName,omitempty"` -} - -func init() { - t["OvfUnsupportedDeviceBackingInfo"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfo)(nil)).Elem() -} - -type OvfUnsupportedDeviceBackingInfoFault OvfUnsupportedDeviceBackingInfo - -func init() { - t["OvfUnsupportedDeviceBackingInfoFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingInfoFault)(nil)).Elem() -} - -type OvfUnsupportedDeviceBackingOption struct { - OvfSystemFault - - ElementName string `xml:"elementName,omitempty"` - InstanceId string `xml:"instanceId,omitempty"` - DeviceName string `xml:"deviceName"` - BackingName string `xml:"backingName,omitempty"` -} - -func init() { - t["OvfUnsupportedDeviceBackingOption"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOption)(nil)).Elem() -} - -type OvfUnsupportedDeviceBackingOptionFault OvfUnsupportedDeviceBackingOption - -func init() { - t["OvfUnsupportedDeviceBackingOptionFault"] = reflect.TypeOf((*OvfUnsupportedDeviceBackingOptionFault)(nil)).Elem() -} - -type OvfUnsupportedDeviceExport struct { - OvfHardwareExport -} - -func init() { - t["OvfUnsupportedDeviceExport"] = reflect.TypeOf((*OvfUnsupportedDeviceExport)(nil)).Elem() -} - -type OvfUnsupportedDeviceExportFault OvfUnsupportedDeviceExport - -func init() { - t["OvfUnsupportedDeviceExportFault"] = reflect.TypeOf((*OvfUnsupportedDeviceExportFault)(nil)).Elem() -} - -type OvfUnsupportedDiskProvisioning struct { - OvfImport - - DiskProvisioning string `xml:"diskProvisioning"` - SupportedDiskProvisioning string `xml:"supportedDiskProvisioning"` -} - -func init() { - t["OvfUnsupportedDiskProvisioning"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioning)(nil)).Elem() -} - -type OvfUnsupportedDiskProvisioningFault OvfUnsupportedDiskProvisioning - -func init() { - t["OvfUnsupportedDiskProvisioningFault"] = reflect.TypeOf((*OvfUnsupportedDiskProvisioningFault)(nil)).Elem() -} - -type OvfUnsupportedElement struct { - OvfUnsupportedPackage - - Name string `xml:"name"` -} - -func init() { - t["OvfUnsupportedElement"] = reflect.TypeOf((*OvfUnsupportedElement)(nil)).Elem() -} - -type OvfUnsupportedElementFault BaseOvfUnsupportedElement - -func init() { - t["OvfUnsupportedElementFault"] = reflect.TypeOf((*OvfUnsupportedElementFault)(nil)).Elem() -} - -type OvfUnsupportedElementValue struct { - OvfUnsupportedElement - - Value string `xml:"value"` -} - -func init() { - t["OvfUnsupportedElementValue"] = reflect.TypeOf((*OvfUnsupportedElementValue)(nil)).Elem() -} - -type OvfUnsupportedElementValueFault OvfUnsupportedElementValue - -func init() { - t["OvfUnsupportedElementValueFault"] = reflect.TypeOf((*OvfUnsupportedElementValueFault)(nil)).Elem() -} - -type OvfUnsupportedPackage struct { - OvfFault - - LineNumber int32 `xml:"lineNumber,omitempty"` -} - -func init() { - t["OvfUnsupportedPackage"] = reflect.TypeOf((*OvfUnsupportedPackage)(nil)).Elem() -} - -type OvfUnsupportedPackageFault BaseOvfUnsupportedPackage - -func init() { - t["OvfUnsupportedPackageFault"] = reflect.TypeOf((*OvfUnsupportedPackageFault)(nil)).Elem() -} - -type OvfUnsupportedSection struct { - OvfUnsupportedElement - - Info string `xml:"info"` -} - -func init() { - t["OvfUnsupportedSection"] = reflect.TypeOf((*OvfUnsupportedSection)(nil)).Elem() -} - -type OvfUnsupportedSectionFault OvfUnsupportedSection - -func init() { - t["OvfUnsupportedSectionFault"] = reflect.TypeOf((*OvfUnsupportedSectionFault)(nil)).Elem() -} - -type OvfUnsupportedSubType struct { - OvfUnsupportedPackage - - ElementName string `xml:"elementName"` - InstanceId string `xml:"instanceId"` - DeviceType int32 `xml:"deviceType"` - DeviceSubType string `xml:"deviceSubType"` -} - -func init() { - t["OvfUnsupportedSubType"] = reflect.TypeOf((*OvfUnsupportedSubType)(nil)).Elem() -} - -type OvfUnsupportedSubTypeFault OvfUnsupportedSubType - -func init() { - t["OvfUnsupportedSubTypeFault"] = reflect.TypeOf((*OvfUnsupportedSubTypeFault)(nil)).Elem() -} - -type OvfUnsupportedType struct { - OvfUnsupportedPackage - - Name string `xml:"name"` - InstanceId string `xml:"instanceId"` - DeviceType int32 `xml:"deviceType"` -} - -func init() { - t["OvfUnsupportedType"] = reflect.TypeOf((*OvfUnsupportedType)(nil)).Elem() -} - -type OvfUnsupportedTypeFault OvfUnsupportedType - -func init() { - t["OvfUnsupportedTypeFault"] = reflect.TypeOf((*OvfUnsupportedTypeFault)(nil)).Elem() -} - -type OvfValidateHostParams struct { - OvfManagerCommonParams -} - -func init() { - t["OvfValidateHostParams"] = reflect.TypeOf((*OvfValidateHostParams)(nil)).Elem() -} - -type OvfValidateHostResult struct { - DynamicData - - DownloadSize int64 `xml:"downloadSize,omitempty"` - FlatDeploymentSize int64 `xml:"flatDeploymentSize,omitempty"` - SparseDeploymentSize int64 `xml:"sparseDeploymentSize,omitempty"` - Error []LocalizedMethodFault `xml:"error,omitempty"` - Warning []LocalizedMethodFault `xml:"warning,omitempty"` - SupportedDiskProvisioning []string `xml:"supportedDiskProvisioning,omitempty"` -} - -func init() { - t["OvfValidateHostResult"] = reflect.TypeOf((*OvfValidateHostResult)(nil)).Elem() -} - -type OvfWrongElement struct { - OvfElement -} - -func init() { - t["OvfWrongElement"] = reflect.TypeOf((*OvfWrongElement)(nil)).Elem() -} - -type OvfWrongElementFault OvfWrongElement - -func init() { - t["OvfWrongElementFault"] = reflect.TypeOf((*OvfWrongElementFault)(nil)).Elem() -} - -type OvfWrongNamespace struct { - OvfInvalidPackage - - NamespaceName string `xml:"namespaceName"` -} - -func init() { - t["OvfWrongNamespace"] = reflect.TypeOf((*OvfWrongNamespace)(nil)).Elem() -} - -type OvfWrongNamespaceFault OvfWrongNamespace - -func init() { - t["OvfWrongNamespaceFault"] = reflect.TypeOf((*OvfWrongNamespaceFault)(nil)).Elem() -} - -type OvfXmlFormat struct { - OvfInvalidPackage - - Description string `xml:"description"` -} - -func init() { - t["OvfXmlFormat"] = reflect.TypeOf((*OvfXmlFormat)(nil)).Elem() -} - -type OvfXmlFormatFault OvfXmlFormat - -func init() { - t["OvfXmlFormatFault"] = reflect.TypeOf((*OvfXmlFormatFault)(nil)).Elem() -} - -type PMemDatastoreInfo struct { - DatastoreInfo - - Pmem HostPMemVolume `xml:"pmem"` -} - -func init() { - t["PMemDatastoreInfo"] = reflect.TypeOf((*PMemDatastoreInfo)(nil)).Elem() -} - -type ParaVirtualSCSIController struct { - VirtualSCSIController -} - -func init() { - t["ParaVirtualSCSIController"] = reflect.TypeOf((*ParaVirtualSCSIController)(nil)).Elem() -} - -type ParaVirtualSCSIControllerOption struct { - VirtualSCSIControllerOption -} - -func init() { - t["ParaVirtualSCSIControllerOption"] = reflect.TypeOf((*ParaVirtualSCSIControllerOption)(nil)).Elem() -} - -type ParseDescriptor ParseDescriptorRequestType - -func init() { - t["ParseDescriptor"] = reflect.TypeOf((*ParseDescriptor)(nil)).Elem() -} - -type ParseDescriptorRequestType struct { - This ManagedObjectReference `xml:"_this"` - OvfDescriptor string `xml:"ovfDescriptor"` - Pdp OvfParseDescriptorParams `xml:"pdp"` -} - -func init() { - t["ParseDescriptorRequestType"] = reflect.TypeOf((*ParseDescriptorRequestType)(nil)).Elem() -} - -type ParseDescriptorResponse struct { - Returnval OvfParseDescriptorResult `xml:"returnval"` -} - -type PassiveNodeDeploymentSpec struct { - NodeDeploymentSpec - - FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"` -} - -func init() { - t["PassiveNodeDeploymentSpec"] = reflect.TypeOf((*PassiveNodeDeploymentSpec)(nil)).Elem() -} - -type PassiveNodeNetworkSpec struct { - NodeNetworkSpec - - FailoverIpSettings *CustomizationIPSettings `xml:"failoverIpSettings,omitempty"` -} - -func init() { - t["PassiveNodeNetworkSpec"] = reflect.TypeOf((*PassiveNodeNetworkSpec)(nil)).Elem() -} - -type PasswordExpired struct { - InvalidLogin -} - -func init() { - t["PasswordExpired"] = reflect.TypeOf((*PasswordExpired)(nil)).Elem() -} - -type PasswordExpiredFault PasswordExpired - -func init() { - t["PasswordExpiredFault"] = reflect.TypeOf((*PasswordExpiredFault)(nil)).Elem() -} - -type PasswordField struct { - DynamicData - - Value string `xml:"value"` -} - -func init() { - t["PasswordField"] = reflect.TypeOf((*PasswordField)(nil)).Elem() -} - -type PatchAlreadyInstalled struct { - PatchNotApplicable -} - -func init() { - t["PatchAlreadyInstalled"] = reflect.TypeOf((*PatchAlreadyInstalled)(nil)).Elem() -} - -type PatchAlreadyInstalledFault PatchAlreadyInstalled - -func init() { - t["PatchAlreadyInstalledFault"] = reflect.TypeOf((*PatchAlreadyInstalledFault)(nil)).Elem() -} - -type PatchBinariesNotFound struct { - VimFault - - PatchID string `xml:"patchID"` - Binary []string `xml:"binary,omitempty"` -} - -func init() { - t["PatchBinariesNotFound"] = reflect.TypeOf((*PatchBinariesNotFound)(nil)).Elem() -} - -type PatchBinariesNotFoundFault PatchBinariesNotFound - -func init() { - t["PatchBinariesNotFoundFault"] = reflect.TypeOf((*PatchBinariesNotFoundFault)(nil)).Elem() -} - -type PatchInstallFailed struct { - PlatformConfigFault - - RolledBack bool `xml:"rolledBack"` -} - -func init() { - t["PatchInstallFailed"] = reflect.TypeOf((*PatchInstallFailed)(nil)).Elem() -} - -type PatchInstallFailedFault PatchInstallFailed - -func init() { - t["PatchInstallFailedFault"] = reflect.TypeOf((*PatchInstallFailedFault)(nil)).Elem() -} - -type PatchIntegrityError struct { - PlatformConfigFault -} - -func init() { - t["PatchIntegrityError"] = reflect.TypeOf((*PatchIntegrityError)(nil)).Elem() -} - -type PatchIntegrityErrorFault PatchIntegrityError - -func init() { - t["PatchIntegrityErrorFault"] = reflect.TypeOf((*PatchIntegrityErrorFault)(nil)).Elem() -} - -type PatchMetadataCorrupted struct { - PatchMetadataInvalid -} - -func init() { - t["PatchMetadataCorrupted"] = reflect.TypeOf((*PatchMetadataCorrupted)(nil)).Elem() -} - -type PatchMetadataCorruptedFault PatchMetadataCorrupted - -func init() { - t["PatchMetadataCorruptedFault"] = reflect.TypeOf((*PatchMetadataCorruptedFault)(nil)).Elem() -} - -type PatchMetadataInvalid struct { - VimFault - - PatchID string `xml:"patchID"` - MetaData []string `xml:"metaData,omitempty"` -} - -func init() { - t["PatchMetadataInvalid"] = reflect.TypeOf((*PatchMetadataInvalid)(nil)).Elem() -} - -type PatchMetadataInvalidFault BasePatchMetadataInvalid - -func init() { - t["PatchMetadataInvalidFault"] = reflect.TypeOf((*PatchMetadataInvalidFault)(nil)).Elem() -} - -type PatchMetadataNotFound struct { - PatchMetadataInvalid -} - -func init() { - t["PatchMetadataNotFound"] = reflect.TypeOf((*PatchMetadataNotFound)(nil)).Elem() -} - -type PatchMetadataNotFoundFault PatchMetadataNotFound - -func init() { - t["PatchMetadataNotFoundFault"] = reflect.TypeOf((*PatchMetadataNotFoundFault)(nil)).Elem() -} - -type PatchMissingDependencies struct { - PatchNotApplicable - - PrerequisitePatch []string `xml:"prerequisitePatch,omitempty"` - PrerequisiteLib []string `xml:"prerequisiteLib,omitempty"` -} - -func init() { - t["PatchMissingDependencies"] = reflect.TypeOf((*PatchMissingDependencies)(nil)).Elem() -} - -type PatchMissingDependenciesFault PatchMissingDependencies - -func init() { - t["PatchMissingDependenciesFault"] = reflect.TypeOf((*PatchMissingDependenciesFault)(nil)).Elem() -} - -type PatchNotApplicable struct { - VimFault - - PatchID string `xml:"patchID"` -} - -func init() { - t["PatchNotApplicable"] = reflect.TypeOf((*PatchNotApplicable)(nil)).Elem() -} - -type PatchNotApplicableFault BasePatchNotApplicable - -func init() { - t["PatchNotApplicableFault"] = reflect.TypeOf((*PatchNotApplicableFault)(nil)).Elem() -} - -type PatchSuperseded struct { - PatchNotApplicable - - Supersede []string `xml:"supersede,omitempty"` -} - -func init() { - t["PatchSuperseded"] = reflect.TypeOf((*PatchSuperseded)(nil)).Elem() -} - -type PatchSupersededFault PatchSuperseded - -func init() { - t["PatchSupersededFault"] = reflect.TypeOf((*PatchSupersededFault)(nil)).Elem() -} - -type PerfCompositeMetric struct { - DynamicData - - Entity BasePerfEntityMetricBase `xml:"entity,omitempty,typeattr"` - ChildEntity []BasePerfEntityMetricBase `xml:"childEntity,omitempty,typeattr"` -} - -func init() { - t["PerfCompositeMetric"] = reflect.TypeOf((*PerfCompositeMetric)(nil)).Elem() -} - -type PerfCounterInfo struct { - DynamicData - - Key int32 `xml:"key"` - NameInfo BaseElementDescription `xml:"nameInfo,typeattr"` - GroupInfo BaseElementDescription `xml:"groupInfo,typeattr"` - UnitInfo BaseElementDescription `xml:"unitInfo,typeattr"` - RollupType PerfSummaryType `xml:"rollupType"` - StatsType PerfStatsType `xml:"statsType"` - Level int32 `xml:"level,omitempty"` - PerDeviceLevel int32 `xml:"perDeviceLevel,omitempty"` - AssociatedCounterId []int32 `xml:"associatedCounterId,omitempty"` -} - -func init() { - t["PerfCounterInfo"] = reflect.TypeOf((*PerfCounterInfo)(nil)).Elem() -} - -type PerfEntityMetric struct { - PerfEntityMetricBase - - SampleInfo []PerfSampleInfo `xml:"sampleInfo,omitempty"` - Value []BasePerfMetricSeries `xml:"value,omitempty,typeattr"` -} - -func init() { - t["PerfEntityMetric"] = reflect.TypeOf((*PerfEntityMetric)(nil)).Elem() -} - -type PerfEntityMetricBase struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["PerfEntityMetricBase"] = reflect.TypeOf((*PerfEntityMetricBase)(nil)).Elem() -} - -type PerfEntityMetricCSV struct { - PerfEntityMetricBase - - SampleInfoCSV string `xml:"sampleInfoCSV"` - Value []PerfMetricSeriesCSV `xml:"value,omitempty"` -} - -func init() { - t["PerfEntityMetricCSV"] = reflect.TypeOf((*PerfEntityMetricCSV)(nil)).Elem() -} - -type PerfInterval struct { - DynamicData - - Key int32 `xml:"key"` - SamplingPeriod int32 `xml:"samplingPeriod"` - Name string `xml:"name"` - Length int32 `xml:"length"` - Level int32 `xml:"level,omitempty"` - Enabled bool `xml:"enabled"` -} - -func init() { - t["PerfInterval"] = reflect.TypeOf((*PerfInterval)(nil)).Elem() -} - -type PerfMetricId struct { - DynamicData - - CounterId int32 `xml:"counterId"` - Instance string `xml:"instance"` -} - -func init() { - t["PerfMetricId"] = reflect.TypeOf((*PerfMetricId)(nil)).Elem() -} - -type PerfMetricIntSeries struct { - PerfMetricSeries - - Value []int64 `xml:"value,omitempty"` -} - -func init() { - t["PerfMetricIntSeries"] = reflect.TypeOf((*PerfMetricIntSeries)(nil)).Elem() -} - -type PerfMetricSeries struct { - DynamicData - - Id PerfMetricId `xml:"id"` -} - -func init() { - t["PerfMetricSeries"] = reflect.TypeOf((*PerfMetricSeries)(nil)).Elem() -} - -type PerfMetricSeriesCSV struct { - PerfMetricSeries - - Value string `xml:"value,omitempty"` -} - -func init() { - t["PerfMetricSeriesCSV"] = reflect.TypeOf((*PerfMetricSeriesCSV)(nil)).Elem() -} - -type PerfProviderSummary struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - CurrentSupported bool `xml:"currentSupported"` - SummarySupported bool `xml:"summarySupported"` - RefreshRate int32 `xml:"refreshRate,omitempty"` -} - -func init() { - t["PerfProviderSummary"] = reflect.TypeOf((*PerfProviderSummary)(nil)).Elem() -} - -type PerfQuerySpec struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - StartTime *time.Time `xml:"startTime"` - EndTime *time.Time `xml:"endTime"` - MaxSample int32 `xml:"maxSample,omitempty"` - MetricId []PerfMetricId `xml:"metricId,omitempty"` - IntervalId int32 `xml:"intervalId,omitempty"` - Format string `xml:"format,omitempty"` -} - -func init() { - t["PerfQuerySpec"] = reflect.TypeOf((*PerfQuerySpec)(nil)).Elem() -} - -type PerfSampleInfo struct { - DynamicData - - Timestamp time.Time `xml:"timestamp"` - Interval int32 `xml:"interval"` -} - -func init() { - t["PerfSampleInfo"] = reflect.TypeOf((*PerfSampleInfo)(nil)).Elem() -} - -type PerformDvsProductSpecOperationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Operation string `xml:"operation"` - ProductSpec *DistributedVirtualSwitchProductSpec `xml:"productSpec,omitempty"` -} - -func init() { - t["PerformDvsProductSpecOperationRequestType"] = reflect.TypeOf((*PerformDvsProductSpecOperationRequestType)(nil)).Elem() -} - -type PerformDvsProductSpecOperation_Task PerformDvsProductSpecOperationRequestType - -func init() { - t["PerformDvsProductSpecOperation_Task"] = reflect.TypeOf((*PerformDvsProductSpecOperation_Task)(nil)).Elem() -} - -type PerformDvsProductSpecOperation_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PerformVsanUpgradePreflightCheck PerformVsanUpgradePreflightCheckRequestType - -func init() { - t["PerformVsanUpgradePreflightCheck"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheck)(nil)).Elem() -} - -type PerformVsanUpgradePreflightCheckRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster ManagedObjectReference `xml:"cluster"` - DowngradeFormat *bool `xml:"downgradeFormat"` -} - -func init() { - t["PerformVsanUpgradePreflightCheckRequestType"] = reflect.TypeOf((*PerformVsanUpgradePreflightCheckRequestType)(nil)).Elem() -} - -type PerformVsanUpgradePreflightCheckResponse struct { - Returnval VsanUpgradeSystemPreflightCheckResult `xml:"returnval"` -} - -type PerformVsanUpgradeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster ManagedObjectReference `xml:"cluster"` - PerformObjectUpgrade *bool `xml:"performObjectUpgrade"` - DowngradeFormat *bool `xml:"downgradeFormat"` - AllowReducedRedundancy *bool `xml:"allowReducedRedundancy"` - ExcludeHosts []ManagedObjectReference `xml:"excludeHosts,omitempty"` -} - -func init() { - t["PerformVsanUpgradeRequestType"] = reflect.TypeOf((*PerformVsanUpgradeRequestType)(nil)).Elem() -} - -type PerformVsanUpgrade_Task PerformVsanUpgradeRequestType - -func init() { - t["PerformVsanUpgrade_Task"] = reflect.TypeOf((*PerformVsanUpgrade_Task)(nil)).Elem() -} - -type PerformVsanUpgrade_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PerformanceDescription struct { - DynamicData - - CounterType []BaseElementDescription `xml:"counterType,typeattr"` - StatsType []BaseElementDescription `xml:"statsType,typeattr"` -} - -func init() { - t["PerformanceDescription"] = reflect.TypeOf((*PerformanceDescription)(nil)).Elem() -} - -type PerformanceManagerCounterLevelMapping struct { - DynamicData - - CounterId int32 `xml:"counterId"` - AggregateLevel int32 `xml:"aggregateLevel,omitempty"` - PerDeviceLevel int32 `xml:"perDeviceLevel,omitempty"` -} - -func init() { - t["PerformanceManagerCounterLevelMapping"] = reflect.TypeOf((*PerformanceManagerCounterLevelMapping)(nil)).Elem() -} - -type PerformanceStatisticsDescription struct { - DynamicData - - Intervals []PerfInterval `xml:"intervals,omitempty"` -} - -func init() { - t["PerformanceStatisticsDescription"] = reflect.TypeOf((*PerformanceStatisticsDescription)(nil)).Elem() -} - -type Permission struct { - DynamicData - - Entity *ManagedObjectReference `xml:"entity,omitempty"` - Principal string `xml:"principal"` - Group bool `xml:"group"` - RoleId int32 `xml:"roleId"` - Propagate bool `xml:"propagate"` -} - -func init() { - t["Permission"] = reflect.TypeOf((*Permission)(nil)).Elem() -} - -type PermissionAddedEvent struct { - PermissionEvent - - Role RoleEventArgument `xml:"role"` - Propagate bool `xml:"propagate"` -} - -func init() { - t["PermissionAddedEvent"] = reflect.TypeOf((*PermissionAddedEvent)(nil)).Elem() -} - -type PermissionEvent struct { - AuthorizationEvent - - Entity ManagedEntityEventArgument `xml:"entity"` - Principal string `xml:"principal"` - Group bool `xml:"group"` -} - -func init() { - t["PermissionEvent"] = reflect.TypeOf((*PermissionEvent)(nil)).Elem() -} - -type PermissionProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["PermissionProfile"] = reflect.TypeOf((*PermissionProfile)(nil)).Elem() -} - -type PermissionRemovedEvent struct { - PermissionEvent -} - -func init() { - t["PermissionRemovedEvent"] = reflect.TypeOf((*PermissionRemovedEvent)(nil)).Elem() -} - -type PermissionUpdatedEvent struct { - PermissionEvent - - Role RoleEventArgument `xml:"role"` - Propagate bool `xml:"propagate"` - PrevRole *RoleEventArgument `xml:"prevRole,omitempty"` - PrevPropagate *bool `xml:"prevPropagate"` -} - -func init() { - t["PermissionUpdatedEvent"] = reflect.TypeOf((*PermissionUpdatedEvent)(nil)).Elem() -} - -type PhysCompatRDMNotSupported struct { - RDMNotSupported -} - -func init() { - t["PhysCompatRDMNotSupported"] = reflect.TypeOf((*PhysCompatRDMNotSupported)(nil)).Elem() -} - -type PhysCompatRDMNotSupportedFault PhysCompatRDMNotSupported - -func init() { - t["PhysCompatRDMNotSupportedFault"] = reflect.TypeOf((*PhysCompatRDMNotSupportedFault)(nil)).Elem() -} - -type PhysicalNic struct { - DynamicData - - Key string `xml:"key,omitempty"` - Device string `xml:"device"` - Pci string `xml:"pci"` - Driver string `xml:"driver,omitempty"` - DriverVersion string `xml:"driverVersion,omitempty"` - FirmwareVersion string `xml:"firmwareVersion,omitempty"` - LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` - ValidLinkSpecification []PhysicalNicLinkInfo `xml:"validLinkSpecification,omitempty"` - Spec PhysicalNicSpec `xml:"spec"` - WakeOnLanSupported bool `xml:"wakeOnLanSupported"` - Mac string `xml:"mac"` - FcoeConfiguration *FcoeConfig `xml:"fcoeConfiguration,omitempty"` - VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` - VmDirectPathGen2SupportedMode string `xml:"vmDirectPathGen2SupportedMode,omitempty"` - ResourcePoolSchedulerAllowed *bool `xml:"resourcePoolSchedulerAllowed"` - ResourcePoolSchedulerDisallowedReason []string `xml:"resourcePoolSchedulerDisallowedReason,omitempty"` - AutoNegotiateSupported *bool `xml:"autoNegotiateSupported"` - EnhancedNetworkingStackSupported *bool `xml:"enhancedNetworkingStackSupported"` - EnsInterruptSupported *bool `xml:"ensInterruptSupported"` - RdmaDevice string `xml:"rdmaDevice,omitempty"` - DpuId string `xml:"dpuId,omitempty"` -} - -func init() { - t["PhysicalNic"] = reflect.TypeOf((*PhysicalNic)(nil)).Elem() -} - -type PhysicalNicCdpDeviceCapability struct { - DynamicData - - Router bool `xml:"router"` - TransparentBridge bool `xml:"transparentBridge"` - SourceRouteBridge bool `xml:"sourceRouteBridge"` - NetworkSwitch bool `xml:"networkSwitch"` - Host bool `xml:"host"` - IgmpEnabled bool `xml:"igmpEnabled"` - Repeater bool `xml:"repeater"` -} - -func init() { - t["PhysicalNicCdpDeviceCapability"] = reflect.TypeOf((*PhysicalNicCdpDeviceCapability)(nil)).Elem() -} - -type PhysicalNicCdpInfo struct { - DynamicData - - CdpVersion int32 `xml:"cdpVersion,omitempty"` - Timeout int32 `xml:"timeout,omitempty"` - Ttl int32 `xml:"ttl,omitempty"` - Samples int32 `xml:"samples,omitempty"` - DevId string `xml:"devId,omitempty"` - Address string `xml:"address,omitempty"` - PortId string `xml:"portId,omitempty"` - DeviceCapability *PhysicalNicCdpDeviceCapability `xml:"deviceCapability,omitempty"` - SoftwareVersion string `xml:"softwareVersion,omitempty"` - HardwarePlatform string `xml:"hardwarePlatform,omitempty"` - IpPrefix string `xml:"ipPrefix,omitempty"` - IpPrefixLen int32 `xml:"ipPrefixLen,omitempty"` - Vlan int32 `xml:"vlan,omitempty"` - FullDuplex *bool `xml:"fullDuplex"` - Mtu int32 `xml:"mtu,omitempty"` - SystemName string `xml:"systemName,omitempty"` - SystemOID string `xml:"systemOID,omitempty"` - MgmtAddr string `xml:"mgmtAddr,omitempty"` - Location string `xml:"location,omitempty"` -} - -func init() { - t["PhysicalNicCdpInfo"] = reflect.TypeOf((*PhysicalNicCdpInfo)(nil)).Elem() -} - -type PhysicalNicConfig struct { - DynamicData - - Device string `xml:"device"` - Spec PhysicalNicSpec `xml:"spec"` -} - -func init() { - t["PhysicalNicConfig"] = reflect.TypeOf((*PhysicalNicConfig)(nil)).Elem() -} - -type PhysicalNicHint struct { - DynamicData - - VlanId int32 `xml:"vlanId,omitempty"` -} - -func init() { - t["PhysicalNicHint"] = reflect.TypeOf((*PhysicalNicHint)(nil)).Elem() -} - -type PhysicalNicHintInfo struct { - DynamicData - - Device string `xml:"device"` - Subnet []PhysicalNicIpHint `xml:"subnet,omitempty"` - Network []PhysicalNicNameHint `xml:"network,omitempty"` - ConnectedSwitchPort *PhysicalNicCdpInfo `xml:"connectedSwitchPort,omitempty"` - LldpInfo *LinkLayerDiscoveryProtocolInfo `xml:"lldpInfo,omitempty"` -} - -func init() { - t["PhysicalNicHintInfo"] = reflect.TypeOf((*PhysicalNicHintInfo)(nil)).Elem() -} - -type PhysicalNicIpHint struct { - PhysicalNicHint - - IpSubnet string `xml:"ipSubnet"` -} - -func init() { - t["PhysicalNicIpHint"] = reflect.TypeOf((*PhysicalNicIpHint)(nil)).Elem() -} - -type PhysicalNicLinkInfo struct { - DynamicData - - SpeedMb int32 `xml:"speedMb"` - Duplex bool `xml:"duplex"` -} - -func init() { - t["PhysicalNicLinkInfo"] = reflect.TypeOf((*PhysicalNicLinkInfo)(nil)).Elem() -} - -type PhysicalNicNameHint struct { - PhysicalNicHint - - Network string `xml:"network"` -} - -func init() { - t["PhysicalNicNameHint"] = reflect.TypeOf((*PhysicalNicNameHint)(nil)).Elem() -} - -type PhysicalNicProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["PhysicalNicProfile"] = reflect.TypeOf((*PhysicalNicProfile)(nil)).Elem() -} - -type PhysicalNicSpec struct { - DynamicData - - Ip *HostIpConfig `xml:"ip,omitempty"` - LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` - EnableEnhancedNetworkingStack *bool `xml:"enableEnhancedNetworkingStack"` - EnsInterruptEnabled *bool `xml:"ensInterruptEnabled"` -} - -func init() { - t["PhysicalNicSpec"] = reflect.TypeOf((*PhysicalNicSpec)(nil)).Elem() -} - -type PlaceVm PlaceVmRequestType - -func init() { - t["PlaceVm"] = reflect.TypeOf((*PlaceVm)(nil)).Elem() -} - -type PlaceVmRequestType struct { - This ManagedObjectReference `xml:"_this"` - PlacementSpec PlacementSpec `xml:"placementSpec"` -} - -func init() { - t["PlaceVmRequestType"] = reflect.TypeOf((*PlaceVmRequestType)(nil)).Elem() -} - -type PlaceVmResponse struct { - Returnval PlacementResult `xml:"returnval"` -} - -type PlacementAction struct { - ClusterAction - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - TargetHost *ManagedObjectReference `xml:"targetHost,omitempty"` - RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` -} - -func init() { - t["PlacementAction"] = reflect.TypeOf((*PlacementAction)(nil)).Elem() -} - -type PlacementAffinityRule struct { - DynamicData - - RuleType string `xml:"ruleType"` - RuleScope string `xml:"ruleScope"` - Vms []ManagedObjectReference `xml:"vms,omitempty"` - Keys []string `xml:"keys,omitempty"` -} - -func init() { - t["PlacementAffinityRule"] = reflect.TypeOf((*PlacementAffinityRule)(nil)).Elem() -} - -type PlacementRankResult struct { - DynamicData - - Key string `xml:"key"` - Candidate ManagedObjectReference `xml:"candidate"` - ReservedSpaceMB int64 `xml:"reservedSpaceMB"` - UsedSpaceMB int64 `xml:"usedSpaceMB"` - TotalSpaceMB int64 `xml:"totalSpaceMB"` - Utilization float64 `xml:"utilization"` - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["PlacementRankResult"] = reflect.TypeOf((*PlacementRankResult)(nil)).Elem() -} - -type PlacementRankSpec struct { - DynamicData - - Specs []PlacementSpec `xml:"specs"` - Clusters []ManagedObjectReference `xml:"clusters"` - Rules []PlacementAffinityRule `xml:"rules,omitempty"` - PlacementRankByVm []StorageDrsPlacementRankVmSpec `xml:"placementRankByVm,omitempty"` -} - -func init() { - t["PlacementRankSpec"] = reflect.TypeOf((*PlacementRankSpec)(nil)).Elem() -} - -type PlacementResult struct { - DynamicData - - Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` - DrsFault *ClusterDrsFaults `xml:"drsFault,omitempty"` -} - -func init() { - t["PlacementResult"] = reflect.TypeOf((*PlacementResult)(nil)).Elem() -} - -type PlacementSpec struct { - DynamicData - - Priority VirtualMachineMovePriority `xml:"priority,omitempty"` - Vm *ManagedObjectReference `xml:"vm,omitempty"` - ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` - RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` - Datastores []ManagedObjectReference `xml:"datastores,omitempty"` - StoragePods []ManagedObjectReference `xml:"storagePods,omitempty"` - DisallowPrerequisiteMoves *bool `xml:"disallowPrerequisiteMoves"` - Rules []BaseClusterRuleInfo `xml:"rules,omitempty,typeattr"` - Key string `xml:"key,omitempty"` - PlacementType string `xml:"placementType,omitempty"` - CloneSpec *VirtualMachineCloneSpec `xml:"cloneSpec,omitempty"` - CloneName string `xml:"cloneName,omitempty"` -} - -func init() { - t["PlacementSpec"] = reflect.TypeOf((*PlacementSpec)(nil)).Elem() -} - -type PlatformConfigFault struct { - HostConfigFault - - Text string `xml:"text"` -} - -func init() { - t["PlatformConfigFault"] = reflect.TypeOf((*PlatformConfigFault)(nil)).Elem() -} - -type PlatformConfigFaultFault BasePlatformConfigFault - -func init() { - t["PlatformConfigFaultFault"] = reflect.TypeOf((*PlatformConfigFaultFault)(nil)).Elem() -} - -type PnicUplinkProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["PnicUplinkProfile"] = reflect.TypeOf((*PnicUplinkProfile)(nil)).Elem() -} - -type PodDiskLocator struct { - DynamicData - - DiskId int32 `xml:"diskId"` - DiskMoveType string `xml:"diskMoveType,omitempty"` - DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["PodDiskLocator"] = reflect.TypeOf((*PodDiskLocator)(nil)).Elem() -} - -type PodStorageDrsEntry struct { - DynamicData - - StorageDrsConfig StorageDrsConfigInfo `xml:"storageDrsConfig"` - Recommendation []ClusterRecommendation `xml:"recommendation,omitempty"` - DrsFault []ClusterDrsFaults `xml:"drsFault,omitempty"` - ActionHistory []ClusterActionHistory `xml:"actionHistory,omitempty"` -} - -func init() { - t["PodStorageDrsEntry"] = reflect.TypeOf((*PodStorageDrsEntry)(nil)).Elem() -} - -type PolicyOption struct { - DynamicData - - Id string `xml:"id"` - Parameter []KeyAnyValue `xml:"parameter,omitempty"` -} - -func init() { - t["PolicyOption"] = reflect.TypeOf((*PolicyOption)(nil)).Elem() -} - -type PortGroupProfile struct { - ApplyProfile - - Key string `xml:"key"` - Name string `xml:"name"` - Vlan VlanProfile `xml:"vlan"` - Vswitch VirtualSwitchSelectionProfile `xml:"vswitch"` - NetworkPolicy NetworkPolicyProfile `xml:"networkPolicy"` -} - -func init() { - t["PortGroupProfile"] = reflect.TypeOf((*PortGroupProfile)(nil)).Elem() -} - -type PosixUserSearchResult struct { - UserSearchResult - - Id int32 `xml:"id"` - ShellAccess *bool `xml:"shellAccess"` -} - -func init() { - t["PosixUserSearchResult"] = reflect.TypeOf((*PosixUserSearchResult)(nil)).Elem() -} - -type PostEvent PostEventRequestType - -func init() { - t["PostEvent"] = reflect.TypeOf((*PostEvent)(nil)).Elem() -} - -type PostEventRequestType struct { - This ManagedObjectReference `xml:"_this"` - EventToPost BaseEvent `xml:"eventToPost,typeattr"` - TaskInfo *TaskInfo `xml:"taskInfo,omitempty"` -} - -func init() { - t["PostEventRequestType"] = reflect.TypeOf((*PostEventRequestType)(nil)).Elem() -} - -type PostEventResponse struct { -} - -type PostHealthUpdates PostHealthUpdatesRequestType - -func init() { - t["PostHealthUpdates"] = reflect.TypeOf((*PostHealthUpdates)(nil)).Elem() -} - -type PostHealthUpdatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - Updates []HealthUpdate `xml:"updates,omitempty"` -} - -func init() { - t["PostHealthUpdatesRequestType"] = reflect.TypeOf((*PostHealthUpdatesRequestType)(nil)).Elem() -} - -type PostHealthUpdatesResponse struct { -} - -type PowerDownHostToStandByRequestType struct { - This ManagedObjectReference `xml:"_this"` - TimeoutSec int32 `xml:"timeoutSec"` - EvacuatePoweredOffVms *bool `xml:"evacuatePoweredOffVms"` -} - -func init() { - t["PowerDownHostToStandByRequestType"] = reflect.TypeOf((*PowerDownHostToStandByRequestType)(nil)).Elem() -} - -type PowerDownHostToStandBy_Task PowerDownHostToStandByRequestType - -func init() { - t["PowerDownHostToStandBy_Task"] = reflect.TypeOf((*PowerDownHostToStandBy_Task)(nil)).Elem() -} - -type PowerDownHostToStandBy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerOffVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` - Force bool `xml:"force"` -} - -func init() { - t["PowerOffVAppRequestType"] = reflect.TypeOf((*PowerOffVAppRequestType)(nil)).Elem() -} - -type PowerOffVApp_Task PowerOffVAppRequestType - -func init() { - t["PowerOffVApp_Task"] = reflect.TypeOf((*PowerOffVApp_Task)(nil)).Elem() -} - -type PowerOffVApp_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerOffVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["PowerOffVMRequestType"] = reflect.TypeOf((*PowerOffVMRequestType)(nil)).Elem() -} - -type PowerOffVM_Task PowerOffVMRequestType - -func init() { - t["PowerOffVM_Task"] = reflect.TypeOf((*PowerOffVM_Task)(nil)).Elem() -} - -type PowerOffVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerOnFtSecondaryFailed struct { - VmFaultToleranceIssue - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` - HostSelectionBy FtIssuesOnHostHostSelectionType `xml:"hostSelectionBy"` - HostErrors []LocalizedMethodFault `xml:"hostErrors,omitempty"` - RootCause LocalizedMethodFault `xml:"rootCause"` -} - -func init() { - t["PowerOnFtSecondaryFailed"] = reflect.TypeOf((*PowerOnFtSecondaryFailed)(nil)).Elem() -} - -type PowerOnFtSecondaryFailedFault PowerOnFtSecondaryFailed - -func init() { - t["PowerOnFtSecondaryFailedFault"] = reflect.TypeOf((*PowerOnFtSecondaryFailedFault)(nil)).Elem() -} - -type PowerOnFtSecondaryTimedout struct { - Timedout - - Vm ManagedObjectReference `xml:"vm"` - VmName string `xml:"vmName"` - Timeout int32 `xml:"timeout"` -} - -func init() { - t["PowerOnFtSecondaryTimedout"] = reflect.TypeOf((*PowerOnFtSecondaryTimedout)(nil)).Elem() -} - -type PowerOnFtSecondaryTimedoutFault PowerOnFtSecondaryTimedout - -func init() { - t["PowerOnFtSecondaryTimedoutFault"] = reflect.TypeOf((*PowerOnFtSecondaryTimedoutFault)(nil)).Elem() -} - -type PowerOnMultiVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm []ManagedObjectReference `xml:"vm"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["PowerOnMultiVMRequestType"] = reflect.TypeOf((*PowerOnMultiVMRequestType)(nil)).Elem() -} - -type PowerOnMultiVM_Task PowerOnMultiVMRequestType - -func init() { - t["PowerOnMultiVM_Task"] = reflect.TypeOf((*PowerOnMultiVM_Task)(nil)).Elem() -} - -type PowerOnMultiVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerOnVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["PowerOnVAppRequestType"] = reflect.TypeOf((*PowerOnVAppRequestType)(nil)).Elem() -} - -type PowerOnVApp_Task PowerOnVAppRequestType - -func init() { - t["PowerOnVApp_Task"] = reflect.TypeOf((*PowerOnVApp_Task)(nil)).Elem() -} - -type PowerOnVApp_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerOnVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["PowerOnVMRequestType"] = reflect.TypeOf((*PowerOnVMRequestType)(nil)).Elem() -} - -type PowerOnVM_Task PowerOnVMRequestType - -func init() { - t["PowerOnVM_Task"] = reflect.TypeOf((*PowerOnVM_Task)(nil)).Elem() -} - -type PowerOnVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PowerSystemCapability struct { - DynamicData - - AvailablePolicy []HostPowerPolicy `xml:"availablePolicy"` -} - -func init() { - t["PowerSystemCapability"] = reflect.TypeOf((*PowerSystemCapability)(nil)).Elem() -} - -type PowerSystemInfo struct { - DynamicData - - CurrentPolicy HostPowerPolicy `xml:"currentPolicy"` -} - -func init() { - t["PowerSystemInfo"] = reflect.TypeOf((*PowerSystemInfo)(nil)).Elem() -} - -type PowerUpHostFromStandByRequestType struct { - This ManagedObjectReference `xml:"_this"` - TimeoutSec int32 `xml:"timeoutSec"` -} - -func init() { - t["PowerUpHostFromStandByRequestType"] = reflect.TypeOf((*PowerUpHostFromStandByRequestType)(nil)).Elem() -} - -type PowerUpHostFromStandBy_Task PowerUpHostFromStandByRequestType - -func init() { - t["PowerUpHostFromStandBy_Task"] = reflect.TypeOf((*PowerUpHostFromStandBy_Task)(nil)).Elem() -} - -type PowerUpHostFromStandBy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PrepareCrypto PrepareCryptoRequestType - -func init() { - t["PrepareCrypto"] = reflect.TypeOf((*PrepareCrypto)(nil)).Elem() -} - -type PrepareCryptoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["PrepareCryptoRequestType"] = reflect.TypeOf((*PrepareCryptoRequestType)(nil)).Elem() -} - -type PrepareCryptoResponse struct { -} - -type PrivilegeAvailability struct { - DynamicData - - PrivId string `xml:"privId"` - IsGranted bool `xml:"isGranted"` -} - -func init() { - t["PrivilegeAvailability"] = reflect.TypeOf((*PrivilegeAvailability)(nil)).Elem() -} - -type PrivilegePolicyDef struct { - DynamicData - - CreatePrivilege string `xml:"createPrivilege"` - ReadPrivilege string `xml:"readPrivilege"` - UpdatePrivilege string `xml:"updatePrivilege"` - DeletePrivilege string `xml:"deletePrivilege"` -} - -func init() { - t["PrivilegePolicyDef"] = reflect.TypeOf((*PrivilegePolicyDef)(nil)).Elem() -} - -type ProductComponentInfo struct { - DynamicData - - Id string `xml:"id"` - Name string `xml:"name"` - Version string `xml:"version"` - Release int32 `xml:"release"` -} - -func init() { - t["ProductComponentInfo"] = reflect.TypeOf((*ProductComponentInfo)(nil)).Elem() -} - -type ProfileApplyProfileElement struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["ProfileApplyProfileElement"] = reflect.TypeOf((*ProfileApplyProfileElement)(nil)).Elem() -} - -type ProfileApplyProfileProperty struct { - DynamicData - - PropertyName string `xml:"propertyName"` - Array bool `xml:"array"` - Profile []BaseApplyProfile `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["ProfileApplyProfileProperty"] = reflect.TypeOf((*ProfileApplyProfileProperty)(nil)).Elem() -} - -type ProfileAssociatedEvent struct { - ProfileEvent -} - -func init() { - t["ProfileAssociatedEvent"] = reflect.TypeOf((*ProfileAssociatedEvent)(nil)).Elem() -} - -type ProfileChangedEvent struct { - ProfileEvent -} - -func init() { - t["ProfileChangedEvent"] = reflect.TypeOf((*ProfileChangedEvent)(nil)).Elem() -} - -type ProfileCompositeExpression struct { - ProfileExpression - - Operator string `xml:"operator"` - ExpressionName []string `xml:"expressionName"` -} - -func init() { - t["ProfileCompositeExpression"] = reflect.TypeOf((*ProfileCompositeExpression)(nil)).Elem() -} - -type ProfileCompositePolicyOptionMetadata struct { - ProfilePolicyOptionMetadata - - Option []string `xml:"option"` -} - -func init() { - t["ProfileCompositePolicyOptionMetadata"] = reflect.TypeOf((*ProfileCompositePolicyOptionMetadata)(nil)).Elem() -} - -type ProfileConfigInfo struct { - DynamicData - - Name string `xml:"name"` - Annotation string `xml:"annotation,omitempty"` - Enabled bool `xml:"enabled"` -} - -func init() { - t["ProfileConfigInfo"] = reflect.TypeOf((*ProfileConfigInfo)(nil)).Elem() -} - -type ProfileCreateSpec struct { - DynamicData - - Name string `xml:"name,omitempty"` - Annotation string `xml:"annotation,omitempty"` - Enabled *bool `xml:"enabled"` -} - -func init() { - t["ProfileCreateSpec"] = reflect.TypeOf((*ProfileCreateSpec)(nil)).Elem() -} - -type ProfileCreatedEvent struct { - ProfileEvent -} - -func init() { - t["ProfileCreatedEvent"] = reflect.TypeOf((*ProfileCreatedEvent)(nil)).Elem() -} - -type ProfileDeferredPolicyOptionParameter struct { - DynamicData - - InputPath ProfilePropertyPath `xml:"inputPath"` - Parameter []KeyAnyValue `xml:"parameter,omitempty"` -} - -func init() { - t["ProfileDeferredPolicyOptionParameter"] = reflect.TypeOf((*ProfileDeferredPolicyOptionParameter)(nil)).Elem() -} - -type ProfileDescription struct { - DynamicData - - Section []ProfileDescriptionSection `xml:"section"` -} - -func init() { - t["ProfileDescription"] = reflect.TypeOf((*ProfileDescription)(nil)).Elem() -} - -type ProfileDescriptionSection struct { - DynamicData - - Description ExtendedElementDescription `xml:"description"` - Message []LocalizableMessage `xml:"message,omitempty"` -} - -func init() { - t["ProfileDescriptionSection"] = reflect.TypeOf((*ProfileDescriptionSection)(nil)).Elem() -} - -type ProfileDissociatedEvent struct { - ProfileEvent -} - -func init() { - t["ProfileDissociatedEvent"] = reflect.TypeOf((*ProfileDissociatedEvent)(nil)).Elem() -} - -type ProfileEvent struct { - Event - - Profile ProfileEventArgument `xml:"profile"` -} - -func init() { - t["ProfileEvent"] = reflect.TypeOf((*ProfileEvent)(nil)).Elem() -} - -type ProfileEventArgument struct { - EventArgument - - Profile ManagedObjectReference `xml:"profile"` - Name string `xml:"name"` -} - -func init() { - t["ProfileEventArgument"] = reflect.TypeOf((*ProfileEventArgument)(nil)).Elem() -} - -type ProfileExecuteError struct { - DynamicData - - Path *ProfilePropertyPath `xml:"path,omitempty"` - Message LocalizableMessage `xml:"message"` -} - -func init() { - t["ProfileExecuteError"] = reflect.TypeOf((*ProfileExecuteError)(nil)).Elem() -} - -type ProfileExecuteResult struct { - DynamicData - - Status string `xml:"status"` - ConfigSpec *HostConfigSpec `xml:"configSpec,omitempty"` - InapplicablePath []string `xml:"inapplicablePath,omitempty"` - RequireInput []ProfileDeferredPolicyOptionParameter `xml:"requireInput,omitempty"` - Error []ProfileExecuteError `xml:"error,omitempty"` -} - -func init() { - t["ProfileExecuteResult"] = reflect.TypeOf((*ProfileExecuteResult)(nil)).Elem() -} - -type ProfileExpression struct { - DynamicData - - Id string `xml:"id"` - DisplayName string `xml:"displayName"` - Negated bool `xml:"negated"` -} - -func init() { - t["ProfileExpression"] = reflect.TypeOf((*ProfileExpression)(nil)).Elem() -} - -type ProfileExpressionMetadata struct { - DynamicData - - ExpressionId ExtendedElementDescription `xml:"expressionId"` - Parameter []ProfileParameterMetadata `xml:"parameter,omitempty"` -} - -func init() { - t["ProfileExpressionMetadata"] = reflect.TypeOf((*ProfileExpressionMetadata)(nil)).Elem() -} - -type ProfileMetadata struct { - DynamicData - - Key string `xml:"key"` - ProfileTypeName string `xml:"profileTypeName,omitempty"` - Description *ExtendedDescription `xml:"description,omitempty"` - SortSpec []ProfileMetadataProfileSortSpec `xml:"sortSpec,omitempty"` - ProfileCategory string `xml:"profileCategory,omitempty"` - ProfileComponent string `xml:"profileComponent,omitempty"` - OperationMessages []ProfileMetadataProfileOperationMessage `xml:"operationMessages,omitempty"` -} - -func init() { - t["ProfileMetadata"] = reflect.TypeOf((*ProfileMetadata)(nil)).Elem() -} - -type ProfileMetadataProfileOperationMessage struct { - DynamicData - - OperationName string `xml:"operationName"` - Message LocalizableMessage `xml:"message"` -} - -func init() { - t["ProfileMetadataProfileOperationMessage"] = reflect.TypeOf((*ProfileMetadataProfileOperationMessage)(nil)).Elem() -} - -type ProfileMetadataProfileSortSpec struct { - DynamicData - - PolicyId string `xml:"policyId"` - Parameter string `xml:"parameter"` -} - -func init() { - t["ProfileMetadataProfileSortSpec"] = reflect.TypeOf((*ProfileMetadataProfileSortSpec)(nil)).Elem() -} - -type ProfileParameterMetadata struct { - DynamicData - - Id ExtendedElementDescription `xml:"id"` - Type string `xml:"type"` - Optional bool `xml:"optional"` - DefaultValue AnyType `xml:"defaultValue,omitempty,typeattr"` - Hidden *bool `xml:"hidden"` - SecuritySensitive *bool `xml:"securitySensitive"` - ReadOnly *bool `xml:"readOnly"` - ParameterRelations []ProfileParameterMetadataParameterRelationMetadata `xml:"parameterRelations,omitempty"` -} - -func init() { - t["ProfileParameterMetadata"] = reflect.TypeOf((*ProfileParameterMetadata)(nil)).Elem() -} - -type ProfileParameterMetadataParameterRelationMetadata struct { - DynamicData - - RelationTypes []string `xml:"relationTypes,omitempty"` - Values []AnyType `xml:"values,omitempty,typeattr"` - Path *ProfilePropertyPath `xml:"path,omitempty"` - MinCount int32 `xml:"minCount"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["ProfileParameterMetadataParameterRelationMetadata"] = reflect.TypeOf((*ProfileParameterMetadataParameterRelationMetadata)(nil)).Elem() -} - -type ProfilePolicy struct { - DynamicData - - Id string `xml:"id"` - PolicyOption BasePolicyOption `xml:"policyOption,typeattr"` -} - -func init() { - t["ProfilePolicy"] = reflect.TypeOf((*ProfilePolicy)(nil)).Elem() -} - -type ProfilePolicyMetadata struct { - DynamicData - - Id ExtendedElementDescription `xml:"id"` - PossibleOption []BaseProfilePolicyOptionMetadata `xml:"possibleOption,typeattr"` -} - -func init() { - t["ProfilePolicyMetadata"] = reflect.TypeOf((*ProfilePolicyMetadata)(nil)).Elem() -} - -type ProfilePolicyOptionMetadata struct { - DynamicData - - Id ExtendedElementDescription `xml:"id"` - Parameter []ProfileParameterMetadata `xml:"parameter,omitempty"` -} - -func init() { - t["ProfilePolicyOptionMetadata"] = reflect.TypeOf((*ProfilePolicyOptionMetadata)(nil)).Elem() -} - -type ProfileProfileStructure struct { - DynamicData - - ProfileTypeName string `xml:"profileTypeName"` - Child []ProfileProfileStructureProperty `xml:"child,omitempty"` -} - -func init() { - t["ProfileProfileStructure"] = reflect.TypeOf((*ProfileProfileStructure)(nil)).Elem() -} - -type ProfileProfileStructureProperty struct { - DynamicData - - PropertyName string `xml:"propertyName"` - Array bool `xml:"array"` - Element ProfileProfileStructure `xml:"element"` -} - -func init() { - t["ProfileProfileStructureProperty"] = reflect.TypeOf((*ProfileProfileStructureProperty)(nil)).Elem() -} - -type ProfilePropertyPath struct { - DynamicData - - ProfilePath string `xml:"profilePath"` - PolicyId string `xml:"policyId,omitempty"` - ParameterId string `xml:"parameterId,omitempty"` - PolicyOptionId string `xml:"policyOptionId,omitempty"` -} - -func init() { - t["ProfilePropertyPath"] = reflect.TypeOf((*ProfilePropertyPath)(nil)).Elem() -} - -type ProfileReferenceHostChangedEvent struct { - ProfileEvent - - ReferenceHost *ManagedObjectReference `xml:"referenceHost,omitempty"` - ReferenceHostName string `xml:"referenceHostName,omitempty"` - PrevReferenceHostName string `xml:"prevReferenceHostName,omitempty"` -} - -func init() { - t["ProfileReferenceHostChangedEvent"] = reflect.TypeOf((*ProfileReferenceHostChangedEvent)(nil)).Elem() -} - -type ProfileRemovedEvent struct { - ProfileEvent -} - -func init() { - t["ProfileRemovedEvent"] = reflect.TypeOf((*ProfileRemovedEvent)(nil)).Elem() -} - -type ProfileSerializedCreateSpec struct { - ProfileCreateSpec - - ProfileConfigString string `xml:"profileConfigString"` -} - -func init() { - t["ProfileSerializedCreateSpec"] = reflect.TypeOf((*ProfileSerializedCreateSpec)(nil)).Elem() -} - -type ProfileSimpleExpression struct { - ProfileExpression - - ExpressionType string `xml:"expressionType"` - Parameter []KeyAnyValue `xml:"parameter,omitempty"` -} - -func init() { - t["ProfileSimpleExpression"] = reflect.TypeOf((*ProfileSimpleExpression)(nil)).Elem() -} - -type ProfileUpdateFailed struct { - VimFault - - Failure []ProfileUpdateFailedUpdateFailure `xml:"failure"` - Warnings []ProfileUpdateFailedUpdateFailure `xml:"warnings,omitempty"` -} - -func init() { - t["ProfileUpdateFailed"] = reflect.TypeOf((*ProfileUpdateFailed)(nil)).Elem() -} - -type ProfileUpdateFailedFault ProfileUpdateFailed - -func init() { - t["ProfileUpdateFailedFault"] = reflect.TypeOf((*ProfileUpdateFailedFault)(nil)).Elem() -} - -type ProfileUpdateFailedUpdateFailure struct { - DynamicData - - ProfilePath ProfilePropertyPath `xml:"profilePath"` - ErrMsg LocalizableMessage `xml:"errMsg"` -} - -func init() { - t["ProfileUpdateFailedUpdateFailure"] = reflect.TypeOf((*ProfileUpdateFailedUpdateFailure)(nil)).Elem() -} - -type PromoteDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` - Unlink bool `xml:"unlink"` - Disks []VirtualDisk `xml:"disks,omitempty"` -} - -func init() { - t["PromoteDisksRequestType"] = reflect.TypeOf((*PromoteDisksRequestType)(nil)).Elem() -} - -type PromoteDisks_Task PromoteDisksRequestType - -func init() { - t["PromoteDisks_Task"] = reflect.TypeOf((*PromoteDisks_Task)(nil)).Elem() -} - -type PromoteDisks_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type PropertyChange struct { - DynamicData - - Name string `xml:"name"` - Op PropertyChangeOp `xml:"op"` - Val AnyType `xml:"val,typeattr"` -} - -func init() { - t["PropertyChange"] = reflect.TypeOf((*PropertyChange)(nil)).Elem() -} - -type PropertyFilterSpec struct { - DynamicData - - PropSet []PropertySpec `xml:"propSet"` - ObjectSet []ObjectSpec `xml:"objectSet"` - ReportMissingObjectsInResults *bool `xml:"reportMissingObjectsInResults"` -} - -func init() { - t["PropertyFilterSpec"] = reflect.TypeOf((*PropertyFilterSpec)(nil)).Elem() -} - -type PropertyFilterUpdate struct { - DynamicData - - Filter ManagedObjectReference `xml:"filter"` - ObjectSet []ObjectUpdate `xml:"objectSet,omitempty"` - MissingSet []MissingObject `xml:"missingSet,omitempty"` -} - -func init() { - t["PropertyFilterUpdate"] = reflect.TypeOf((*PropertyFilterUpdate)(nil)).Elem() -} - -type PropertySpec struct { - DynamicData - - Type string `xml:"type"` - All *bool `xml:"all"` - PathSet []string `xml:"pathSet,omitempty"` -} - -func init() { - t["PropertySpec"] = reflect.TypeOf((*PropertySpec)(nil)).Elem() -} - -type PutUsbScanCodes PutUsbScanCodesRequestType - -func init() { - t["PutUsbScanCodes"] = reflect.TypeOf((*PutUsbScanCodes)(nil)).Elem() -} - -type PutUsbScanCodesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec UsbScanCodeSpec `xml:"spec"` -} - -func init() { - t["PutUsbScanCodesRequestType"] = reflect.TypeOf((*PutUsbScanCodesRequestType)(nil)).Elem() -} - -type PutUsbScanCodesResponse struct { - Returnval int32 `xml:"returnval"` -} - -type QuarantineModeFault struct { - VmConfigFault - - VmName string `xml:"vmName"` - FaultType string `xml:"faultType"` -} - -func init() { - t["QuarantineModeFault"] = reflect.TypeOf((*QuarantineModeFault)(nil)).Elem() -} - -type QuarantineModeFaultFault QuarantineModeFault - -func init() { - t["QuarantineModeFaultFault"] = reflect.TypeOf((*QuarantineModeFaultFault)(nil)).Elem() -} - -type QueryAnswerFileStatus QueryAnswerFileStatusRequestType - -func init() { - t["QueryAnswerFileStatus"] = reflect.TypeOf((*QueryAnswerFileStatus)(nil)).Elem() -} - -type QueryAnswerFileStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["QueryAnswerFileStatusRequestType"] = reflect.TypeOf((*QueryAnswerFileStatusRequestType)(nil)).Elem() -} - -type QueryAnswerFileStatusResponse struct { - Returnval []AnswerFileStatusResult `xml:"returnval,omitempty"` -} - -type QueryAssignedLicenses QueryAssignedLicensesRequestType - -func init() { - t["QueryAssignedLicenses"] = reflect.TypeOf((*QueryAssignedLicenses)(nil)).Elem() -} - -type QueryAssignedLicensesRequestType struct { - This ManagedObjectReference `xml:"_this"` - EntityId string `xml:"entityId,omitempty"` -} - -func init() { - t["QueryAssignedLicensesRequestType"] = reflect.TypeOf((*QueryAssignedLicensesRequestType)(nil)).Elem() -} - -type QueryAssignedLicensesResponse struct { - Returnval []LicenseAssignmentManagerLicenseAssignment `xml:"returnval,omitempty"` -} - -type QueryAvailableDisksForVmfs QueryAvailableDisksForVmfsRequestType - -func init() { - t["QueryAvailableDisksForVmfs"] = reflect.TypeOf((*QueryAvailableDisksForVmfs)(nil)).Elem() -} - -type QueryAvailableDisksForVmfsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["QueryAvailableDisksForVmfsRequestType"] = reflect.TypeOf((*QueryAvailableDisksForVmfsRequestType)(nil)).Elem() -} - -type QueryAvailableDisksForVmfsResponse struct { - Returnval []HostScsiDisk `xml:"returnval,omitempty"` -} - -type QueryAvailableDvsSpec QueryAvailableDvsSpecRequestType - -func init() { - t["QueryAvailableDvsSpec"] = reflect.TypeOf((*QueryAvailableDvsSpec)(nil)).Elem() -} - -type QueryAvailableDvsSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Recommended *bool `xml:"recommended"` -} - -func init() { - t["QueryAvailableDvsSpecRequestType"] = reflect.TypeOf((*QueryAvailableDvsSpecRequestType)(nil)).Elem() -} - -type QueryAvailableDvsSpecResponse struct { - Returnval []DistributedVirtualSwitchProductSpec `xml:"returnval,omitempty"` -} - -type QueryAvailablePartition QueryAvailablePartitionRequestType - -func init() { - t["QueryAvailablePartition"] = reflect.TypeOf((*QueryAvailablePartition)(nil)).Elem() -} - -type QueryAvailablePartitionRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryAvailablePartitionRequestType"] = reflect.TypeOf((*QueryAvailablePartitionRequestType)(nil)).Elem() -} - -type QueryAvailablePartitionResponse struct { - Returnval []HostDiagnosticPartition `xml:"returnval,omitempty"` -} - -type QueryAvailablePerfMetric QueryAvailablePerfMetricRequestType - -func init() { - t["QueryAvailablePerfMetric"] = reflect.TypeOf((*QueryAvailablePerfMetric)(nil)).Elem() -} - -type QueryAvailablePerfMetricRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - BeginTime *time.Time `xml:"beginTime"` - EndTime *time.Time `xml:"endTime"` - IntervalId int32 `xml:"intervalId,omitempty"` -} - -func init() { - t["QueryAvailablePerfMetricRequestType"] = reflect.TypeOf((*QueryAvailablePerfMetricRequestType)(nil)).Elem() -} - -type QueryAvailablePerfMetricResponse struct { - Returnval []PerfMetricId `xml:"returnval,omitempty"` -} - -type QueryAvailableSsds QueryAvailableSsdsRequestType - -func init() { - t["QueryAvailableSsds"] = reflect.TypeOf((*QueryAvailableSsds)(nil)).Elem() -} - -type QueryAvailableSsdsRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsPath string `xml:"vffsPath,omitempty"` -} - -func init() { - t["QueryAvailableSsdsRequestType"] = reflect.TypeOf((*QueryAvailableSsdsRequestType)(nil)).Elem() -} - -type QueryAvailableSsdsResponse struct { - Returnval []HostScsiDisk `xml:"returnval,omitempty"` -} - -type QueryAvailableTimeZones QueryAvailableTimeZonesRequestType - -func init() { - t["QueryAvailableTimeZones"] = reflect.TypeOf((*QueryAvailableTimeZones)(nil)).Elem() -} - -type QueryAvailableTimeZonesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryAvailableTimeZonesRequestType"] = reflect.TypeOf((*QueryAvailableTimeZonesRequestType)(nil)).Elem() -} - -type QueryAvailableTimeZonesResponse struct { - Returnval []HostDateTimeSystemTimeZone `xml:"returnval,omitempty"` -} - -type QueryBootDevices QueryBootDevicesRequestType - -func init() { - t["QueryBootDevices"] = reflect.TypeOf((*QueryBootDevices)(nil)).Elem() -} - -type QueryBootDevicesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryBootDevicesRequestType"] = reflect.TypeOf((*QueryBootDevicesRequestType)(nil)).Elem() -} - -type QueryBootDevicesResponse struct { - Returnval *HostBootDeviceInfo `xml:"returnval,omitempty"` -} - -type QueryBoundVnics QueryBoundVnicsRequestType - -func init() { - t["QueryBoundVnics"] = reflect.TypeOf((*QueryBoundVnics)(nil)).Elem() -} - -type QueryBoundVnicsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaName string `xml:"iScsiHbaName"` -} - -func init() { - t["QueryBoundVnicsRequestType"] = reflect.TypeOf((*QueryBoundVnicsRequestType)(nil)).Elem() -} - -type QueryBoundVnicsResponse struct { - Returnval []IscsiPortInfo `xml:"returnval,omitempty"` -} - -type QueryCandidateNics QueryCandidateNicsRequestType - -func init() { - t["QueryCandidateNics"] = reflect.TypeOf((*QueryCandidateNics)(nil)).Elem() -} - -type QueryCandidateNicsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaName string `xml:"iScsiHbaName"` -} - -func init() { - t["QueryCandidateNicsRequestType"] = reflect.TypeOf((*QueryCandidateNicsRequestType)(nil)).Elem() -} - -type QueryCandidateNicsResponse struct { - Returnval []IscsiPortInfo `xml:"returnval,omitempty"` -} - -type QueryChangedDiskAreas QueryChangedDiskAreasRequestType - -func init() { - t["QueryChangedDiskAreas"] = reflect.TypeOf((*QueryChangedDiskAreas)(nil)).Elem() -} - -type QueryChangedDiskAreasRequestType struct { - This ManagedObjectReference `xml:"_this"` - Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` - DeviceKey int32 `xml:"deviceKey"` - StartOffset int64 `xml:"startOffset"` - ChangeId string `xml:"changeId"` -} - -func init() { - t["QueryChangedDiskAreasRequestType"] = reflect.TypeOf((*QueryChangedDiskAreasRequestType)(nil)).Elem() -} - -type QueryChangedDiskAreasResponse struct { - Returnval DiskChangeInfo `xml:"returnval"` -} - -type QueryCmmds QueryCmmdsRequestType - -func init() { - t["QueryCmmds"] = reflect.TypeOf((*QueryCmmds)(nil)).Elem() -} - -type QueryCmmdsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Queries []HostVsanInternalSystemCmmdsQuery `xml:"queries"` -} - -func init() { - t["QueryCmmdsRequestType"] = reflect.TypeOf((*QueryCmmdsRequestType)(nil)).Elem() -} - -type QueryCmmdsResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryCompatibleHostForExistingDvs QueryCompatibleHostForExistingDvsRequestType - -func init() { - t["QueryCompatibleHostForExistingDvs"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvs)(nil)).Elem() -} - -type QueryCompatibleHostForExistingDvsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Container ManagedObjectReference `xml:"container"` - Recursive bool `xml:"recursive"` - Dvs ManagedObjectReference `xml:"dvs"` -} - -func init() { - t["QueryCompatibleHostForExistingDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForExistingDvsRequestType)(nil)).Elem() -} - -type QueryCompatibleHostForExistingDvsResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryCompatibleHostForNewDvs QueryCompatibleHostForNewDvsRequestType - -func init() { - t["QueryCompatibleHostForNewDvs"] = reflect.TypeOf((*QueryCompatibleHostForNewDvs)(nil)).Elem() -} - -type QueryCompatibleHostForNewDvsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Container ManagedObjectReference `xml:"container"` - Recursive bool `xml:"recursive"` - SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` -} - -func init() { - t["QueryCompatibleHostForNewDvsRequestType"] = reflect.TypeOf((*QueryCompatibleHostForNewDvsRequestType)(nil)).Elem() -} - -type QueryCompatibleHostForNewDvsResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryCompatibleVmnicsFromHosts QueryCompatibleVmnicsFromHostsRequestType - -func init() { - t["QueryCompatibleVmnicsFromHosts"] = reflect.TypeOf((*QueryCompatibleVmnicsFromHosts)(nil)).Elem() -} - -type QueryCompatibleVmnicsFromHostsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` - Dvs ManagedObjectReference `xml:"dvs"` -} - -func init() { - t["QueryCompatibleVmnicsFromHostsRequestType"] = reflect.TypeOf((*QueryCompatibleVmnicsFromHostsRequestType)(nil)).Elem() -} - -type QueryCompatibleVmnicsFromHostsResponse struct { - Returnval []DVSManagerPhysicalNicsList `xml:"returnval,omitempty"` -} - -type QueryComplianceStatus QueryComplianceStatusRequestType - -func init() { - t["QueryComplianceStatus"] = reflect.TypeOf((*QueryComplianceStatus)(nil)).Elem() -} - -type QueryComplianceStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Profile []ManagedObjectReference `xml:"profile,omitempty"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["QueryComplianceStatusRequestType"] = reflect.TypeOf((*QueryComplianceStatusRequestType)(nil)).Elem() -} - -type QueryComplianceStatusResponse struct { - Returnval []ComplianceResult `xml:"returnval,omitempty"` -} - -type QueryConfigOption QueryConfigOptionRequestType - -func init() { - t["QueryConfigOption"] = reflect.TypeOf((*QueryConfigOption)(nil)).Elem() -} - -type QueryConfigOptionDescriptor QueryConfigOptionDescriptorRequestType - -func init() { - t["QueryConfigOptionDescriptor"] = reflect.TypeOf((*QueryConfigOptionDescriptor)(nil)).Elem() -} - -type QueryConfigOptionDescriptorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryConfigOptionDescriptorRequestType"] = reflect.TypeOf((*QueryConfigOptionDescriptorRequestType)(nil)).Elem() -} - -type QueryConfigOptionDescriptorResponse struct { - Returnval []VirtualMachineConfigOptionDescriptor `xml:"returnval,omitempty"` -} - -type QueryConfigOptionEx QueryConfigOptionExRequestType - -func init() { - t["QueryConfigOptionEx"] = reflect.TypeOf((*QueryConfigOptionEx)(nil)).Elem() -} - -type QueryConfigOptionExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec *EnvironmentBrowserConfigOptionQuerySpec `xml:"spec,omitempty"` -} - -func init() { - t["QueryConfigOptionExRequestType"] = reflect.TypeOf((*QueryConfigOptionExRequestType)(nil)).Elem() -} - -type QueryConfigOptionExResponse struct { - Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"` -} - -type QueryConfigOptionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key string `xml:"key,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryConfigOptionRequestType"] = reflect.TypeOf((*QueryConfigOptionRequestType)(nil)).Elem() -} - -type QueryConfigOptionResponse struct { - Returnval *VirtualMachineConfigOption `xml:"returnval,omitempty"` -} - -type QueryConfigTarget QueryConfigTargetRequestType - -func init() { - t["QueryConfigTarget"] = reflect.TypeOf((*QueryConfigTarget)(nil)).Elem() -} - -type QueryConfigTargetRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryConfigTargetRequestType"] = reflect.TypeOf((*QueryConfigTargetRequestType)(nil)).Elem() -} - -type QueryConfigTargetResponse struct { - Returnval *ConfigTarget `xml:"returnval,omitempty"` -} - -type QueryConfiguredModuleOptionString QueryConfiguredModuleOptionStringRequestType - -func init() { - t["QueryConfiguredModuleOptionString"] = reflect.TypeOf((*QueryConfiguredModuleOptionString)(nil)).Elem() -} - -type QueryConfiguredModuleOptionStringRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` -} - -func init() { - t["QueryConfiguredModuleOptionStringRequestType"] = reflect.TypeOf((*QueryConfiguredModuleOptionStringRequestType)(nil)).Elem() -} - -type QueryConfiguredModuleOptionStringResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryConnectionInfo QueryConnectionInfoRequestType - -func init() { - t["QueryConnectionInfo"] = reflect.TypeOf((*QueryConnectionInfo)(nil)).Elem() -} - -type QueryConnectionInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hostname string `xml:"hostname"` - Port int32 `xml:"port"` - Username string `xml:"username"` - Password string `xml:"password"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` -} - -func init() { - t["QueryConnectionInfoRequestType"] = reflect.TypeOf((*QueryConnectionInfoRequestType)(nil)).Elem() -} - -type QueryConnectionInfoResponse struct { - Returnval HostConnectInfo `xml:"returnval"` -} - -type QueryConnectionInfoViaSpec QueryConnectionInfoViaSpecRequestType - -func init() { - t["QueryConnectionInfoViaSpec"] = reflect.TypeOf((*QueryConnectionInfoViaSpec)(nil)).Elem() -} - -type QueryConnectionInfoViaSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostConnectSpec `xml:"spec"` -} - -func init() { - t["QueryConnectionInfoViaSpecRequestType"] = reflect.TypeOf((*QueryConnectionInfoViaSpecRequestType)(nil)).Elem() -} - -type QueryConnectionInfoViaSpecResponse struct { - Returnval HostConnectInfo `xml:"returnval"` -} - -type QueryConnections QueryConnectionsRequestType - -func init() { - t["QueryConnections"] = reflect.TypeOf((*QueryConnections)(nil)).Elem() -} - -type QueryConnectionsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryConnectionsRequestType"] = reflect.TypeOf((*QueryConnectionsRequestType)(nil)).Elem() -} - -type QueryConnectionsResponse struct { - Returnval []BaseVirtualMachineConnection `xml:"returnval,omitempty,typeattr"` -} - -type QueryCryptoKeyStatus QueryCryptoKeyStatusRequestType - -func init() { - t["QueryCryptoKeyStatus"] = reflect.TypeOf((*QueryCryptoKeyStatus)(nil)).Elem() -} - -type QueryCryptoKeyStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - KeyIds []CryptoKeyId `xml:"keyIds,omitempty"` - CheckKeyBitMap int32 `xml:"checkKeyBitMap"` -} - -func init() { - t["QueryCryptoKeyStatusRequestType"] = reflect.TypeOf((*QueryCryptoKeyStatusRequestType)(nil)).Elem() -} - -type QueryCryptoKeyStatusResponse struct { - Returnval []CryptoManagerKmipCryptoKeyStatus `xml:"returnval,omitempty"` -} - -type QueryDatastorePerformanceSummary QueryDatastorePerformanceSummaryRequestType - -func init() { - t["QueryDatastorePerformanceSummary"] = reflect.TypeOf((*QueryDatastorePerformanceSummary)(nil)).Elem() -} - -type QueryDatastorePerformanceSummaryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["QueryDatastorePerformanceSummaryRequestType"] = reflect.TypeOf((*QueryDatastorePerformanceSummaryRequestType)(nil)).Elem() -} - -type QueryDatastorePerformanceSummaryResponse struct { - Returnval []StoragePerformanceSummary `xml:"returnval,omitempty"` -} - -type QueryDateTime QueryDateTimeRequestType - -func init() { - t["QueryDateTime"] = reflect.TypeOf((*QueryDateTime)(nil)).Elem() -} - -type QueryDateTimeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryDateTimeRequestType"] = reflect.TypeOf((*QueryDateTimeRequestType)(nil)).Elem() -} - -type QueryDateTimeResponse struct { - Returnval time.Time `xml:"returnval"` -} - -type QueryDescriptions QueryDescriptionsRequestType - -func init() { - t["QueryDescriptions"] = reflect.TypeOf((*QueryDescriptions)(nil)).Elem() -} - -type QueryDescriptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryDescriptionsRequestType"] = reflect.TypeOf((*QueryDescriptionsRequestType)(nil)).Elem() -} - -type QueryDescriptionsResponse struct { - Returnval []DiagnosticManagerLogDescriptor `xml:"returnval,omitempty"` -} - -type QueryDisksForVsan QueryDisksForVsanRequestType - -func init() { - t["QueryDisksForVsan"] = reflect.TypeOf((*QueryDisksForVsan)(nil)).Elem() -} - -type QueryDisksForVsanRequestType struct { - This ManagedObjectReference `xml:"_this"` - CanonicalName []string `xml:"canonicalName,omitempty"` -} - -func init() { - t["QueryDisksForVsanRequestType"] = reflect.TypeOf((*QueryDisksForVsanRequestType)(nil)).Elem() -} - -type QueryDisksForVsanResponse struct { - Returnval []VsanHostDiskResult `xml:"returnval,omitempty"` -} - -type QueryDisksUsingFilter QueryDisksUsingFilterRequestType - -func init() { - t["QueryDisksUsingFilter"] = reflect.TypeOf((*QueryDisksUsingFilter)(nil)).Elem() -} - -type QueryDisksUsingFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - CompRes ManagedObjectReference `xml:"compRes"` -} - -func init() { - t["QueryDisksUsingFilterRequestType"] = reflect.TypeOf((*QueryDisksUsingFilterRequestType)(nil)).Elem() -} - -type QueryDisksUsingFilterResponse struct { - Returnval []VirtualDiskId `xml:"returnval"` -} - -type QueryDvsByUuid QueryDvsByUuidRequestType - -func init() { - t["QueryDvsByUuid"] = reflect.TypeOf((*QueryDvsByUuid)(nil)).Elem() -} - -type QueryDvsByUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuid string `xml:"uuid"` -} - -func init() { - t["QueryDvsByUuidRequestType"] = reflect.TypeOf((*QueryDvsByUuidRequestType)(nil)).Elem() -} - -type QueryDvsByUuidResponse struct { - Returnval *ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryDvsCheckCompatibility QueryDvsCheckCompatibilityRequestType - -func init() { - t["QueryDvsCheckCompatibility"] = reflect.TypeOf((*QueryDvsCheckCompatibility)(nil)).Elem() -} - -type QueryDvsCheckCompatibilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - HostContainer DistributedVirtualSwitchManagerHostContainer `xml:"hostContainer"` - DvsProductSpec *DistributedVirtualSwitchManagerDvsProductSpec `xml:"dvsProductSpec,omitempty"` - HostFilterSpec []BaseDistributedVirtualSwitchManagerHostDvsFilterSpec `xml:"hostFilterSpec,omitempty,typeattr"` -} - -func init() { - t["QueryDvsCheckCompatibilityRequestType"] = reflect.TypeOf((*QueryDvsCheckCompatibilityRequestType)(nil)).Elem() -} - -type QueryDvsCheckCompatibilityResponse struct { - Returnval []DistributedVirtualSwitchManagerCompatibilityResult `xml:"returnval,omitempty"` -} - -type QueryDvsCompatibleHostSpec QueryDvsCompatibleHostSpecRequestType - -func init() { - t["QueryDvsCompatibleHostSpec"] = reflect.TypeOf((*QueryDvsCompatibleHostSpec)(nil)).Elem() -} - -type QueryDvsCompatibleHostSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` -} - -func init() { - t["QueryDvsCompatibleHostSpecRequestType"] = reflect.TypeOf((*QueryDvsCompatibleHostSpecRequestType)(nil)).Elem() -} - -type QueryDvsCompatibleHostSpecResponse struct { - Returnval []DistributedVirtualSwitchHostProductSpec `xml:"returnval,omitempty"` -} - -type QueryDvsConfigTarget QueryDvsConfigTargetRequestType - -func init() { - t["QueryDvsConfigTarget"] = reflect.TypeOf((*QueryDvsConfigTarget)(nil)).Elem() -} - -type QueryDvsConfigTargetRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Dvs *ManagedObjectReference `xml:"dvs,omitempty"` -} - -func init() { - t["QueryDvsConfigTargetRequestType"] = reflect.TypeOf((*QueryDvsConfigTargetRequestType)(nil)).Elem() -} - -type QueryDvsConfigTargetResponse struct { - Returnval DVSManagerDvsConfigTarget `xml:"returnval"` -} - -type QueryDvsFeatureCapability QueryDvsFeatureCapabilityRequestType - -func init() { - t["QueryDvsFeatureCapability"] = reflect.TypeOf((*QueryDvsFeatureCapability)(nil)).Elem() -} - -type QueryDvsFeatureCapabilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - SwitchProductSpec *DistributedVirtualSwitchProductSpec `xml:"switchProductSpec,omitempty"` -} - -func init() { - t["QueryDvsFeatureCapabilityRequestType"] = reflect.TypeOf((*QueryDvsFeatureCapabilityRequestType)(nil)).Elem() -} - -type QueryDvsFeatureCapabilityResponse struct { - Returnval BaseDVSFeatureCapability `xml:"returnval,omitempty,typeattr"` -} - -type QueryEvents QueryEventsRequestType - -func init() { - t["QueryEvents"] = reflect.TypeOf((*QueryEvents)(nil)).Elem() -} - -type QueryEventsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Filter EventFilterSpec `xml:"filter"` -} - -func init() { - t["QueryEventsRequestType"] = reflect.TypeOf((*QueryEventsRequestType)(nil)).Elem() -} - -type QueryEventsResponse struct { - Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` -} - -type QueryExpressionMetadata QueryExpressionMetadataRequestType - -func init() { - t["QueryExpressionMetadata"] = reflect.TypeOf((*QueryExpressionMetadata)(nil)).Elem() -} - -type QueryExpressionMetadataRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExpressionName []string `xml:"expressionName,omitempty"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` -} - -func init() { - t["QueryExpressionMetadataRequestType"] = reflect.TypeOf((*QueryExpressionMetadataRequestType)(nil)).Elem() -} - -type QueryExpressionMetadataResponse struct { - Returnval []ProfileExpressionMetadata `xml:"returnval,omitempty"` -} - -type QueryExtensionIpAllocationUsage QueryExtensionIpAllocationUsageRequestType - -func init() { - t["QueryExtensionIpAllocationUsage"] = reflect.TypeOf((*QueryExtensionIpAllocationUsage)(nil)).Elem() -} - -type QueryExtensionIpAllocationUsageRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKeys []string `xml:"extensionKeys,omitempty"` -} - -func init() { - t["QueryExtensionIpAllocationUsageRequestType"] = reflect.TypeOf((*QueryExtensionIpAllocationUsageRequestType)(nil)).Elem() -} - -type QueryExtensionIpAllocationUsageResponse struct { - Returnval []ExtensionManagerIpAllocationUsage `xml:"returnval,omitempty"` -} - -type QueryFaultToleranceCompatibility QueryFaultToleranceCompatibilityRequestType - -func init() { - t["QueryFaultToleranceCompatibility"] = reflect.TypeOf((*QueryFaultToleranceCompatibility)(nil)).Elem() -} - -type QueryFaultToleranceCompatibilityEx QueryFaultToleranceCompatibilityExRequestType - -func init() { - t["QueryFaultToleranceCompatibilityEx"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityEx)(nil)).Elem() -} - -type QueryFaultToleranceCompatibilityExRequestType struct { - This ManagedObjectReference `xml:"_this"` - ForLegacyFt *bool `xml:"forLegacyFt"` -} - -func init() { - t["QueryFaultToleranceCompatibilityExRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityExRequestType)(nil)).Elem() -} - -type QueryFaultToleranceCompatibilityExResponse struct { - Returnval []LocalizedMethodFault `xml:"returnval,omitempty"` -} - -type QueryFaultToleranceCompatibilityRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryFaultToleranceCompatibilityRequestType"] = reflect.TypeOf((*QueryFaultToleranceCompatibilityRequestType)(nil)).Elem() -} - -type QueryFaultToleranceCompatibilityResponse struct { - Returnval []LocalizedMethodFault `xml:"returnval,omitempty"` -} - -type QueryFilterEntities QueryFilterEntitiesRequestType - -func init() { - t["QueryFilterEntities"] = reflect.TypeOf((*QueryFilterEntities)(nil)).Elem() -} - -type QueryFilterEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` -} - -func init() { - t["QueryFilterEntitiesRequestType"] = reflect.TypeOf((*QueryFilterEntitiesRequestType)(nil)).Elem() -} - -type QueryFilterEntitiesResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryFilterInfoIds QueryFilterInfoIdsRequestType - -func init() { - t["QueryFilterInfoIds"] = reflect.TypeOf((*QueryFilterInfoIds)(nil)).Elem() -} - -type QueryFilterInfoIdsRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` -} - -func init() { - t["QueryFilterInfoIdsRequestType"] = reflect.TypeOf((*QueryFilterInfoIdsRequestType)(nil)).Elem() -} - -type QueryFilterInfoIdsResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryFilterList QueryFilterListRequestType - -func init() { - t["QueryFilterList"] = reflect.TypeOf((*QueryFilterList)(nil)).Elem() -} - -type QueryFilterListRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` -} - -func init() { - t["QueryFilterListRequestType"] = reflect.TypeOf((*QueryFilterListRequestType)(nil)).Elem() -} - -type QueryFilterListResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryFilterName QueryFilterNameRequestType - -func init() { - t["QueryFilterName"] = reflect.TypeOf((*QueryFilterName)(nil)).Elem() -} - -type QueryFilterNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` -} - -func init() { - t["QueryFilterNameRequestType"] = reflect.TypeOf((*QueryFilterNameRequestType)(nil)).Elem() -} - -type QueryFilterNameResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryFirmwareConfigUploadURL QueryFirmwareConfigUploadURLRequestType - -func init() { - t["QueryFirmwareConfigUploadURL"] = reflect.TypeOf((*QueryFirmwareConfigUploadURL)(nil)).Elem() -} - -type QueryFirmwareConfigUploadURLRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryFirmwareConfigUploadURLRequestType"] = reflect.TypeOf((*QueryFirmwareConfigUploadURLRequestType)(nil)).Elem() -} - -type QueryFirmwareConfigUploadURLResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryHealthUpdateInfos QueryHealthUpdateInfosRequestType - -func init() { - t["QueryHealthUpdateInfos"] = reflect.TypeOf((*QueryHealthUpdateInfos)(nil)).Elem() -} - -type QueryHealthUpdateInfosRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` -} - -func init() { - t["QueryHealthUpdateInfosRequestType"] = reflect.TypeOf((*QueryHealthUpdateInfosRequestType)(nil)).Elem() -} - -type QueryHealthUpdateInfosResponse struct { - Returnval []HealthUpdateInfo `xml:"returnval,omitempty"` -} - -type QueryHealthUpdates QueryHealthUpdatesRequestType - -func init() { - t["QueryHealthUpdates"] = reflect.TypeOf((*QueryHealthUpdates)(nil)).Elem() -} - -type QueryHealthUpdatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` -} - -func init() { - t["QueryHealthUpdatesRequestType"] = reflect.TypeOf((*QueryHealthUpdatesRequestType)(nil)).Elem() -} - -type QueryHealthUpdatesResponse struct { - Returnval []HealthUpdate `xml:"returnval,omitempty"` -} - -type QueryHostConnectionInfo QueryHostConnectionInfoRequestType - -func init() { - t["QueryHostConnectionInfo"] = reflect.TypeOf((*QueryHostConnectionInfo)(nil)).Elem() -} - -type QueryHostConnectionInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryHostConnectionInfoRequestType"] = reflect.TypeOf((*QueryHostConnectionInfoRequestType)(nil)).Elem() -} - -type QueryHostConnectionInfoResponse struct { - Returnval HostConnectInfo `xml:"returnval"` -} - -type QueryHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["QueryHostPatchRequestType"] = reflect.TypeOf((*QueryHostPatchRequestType)(nil)).Elem() -} - -type QueryHostPatch_Task QueryHostPatchRequestType - -func init() { - t["QueryHostPatch_Task"] = reflect.TypeOf((*QueryHostPatch_Task)(nil)).Elem() -} - -type QueryHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type QueryHostProfileMetadata QueryHostProfileMetadataRequestType - -func init() { - t["QueryHostProfileMetadata"] = reflect.TypeOf((*QueryHostProfileMetadata)(nil)).Elem() -} - -type QueryHostProfileMetadataRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProfileName []string `xml:"profileName,omitempty"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` -} - -func init() { - t["QueryHostProfileMetadataRequestType"] = reflect.TypeOf((*QueryHostProfileMetadataRequestType)(nil)).Elem() -} - -type QueryHostProfileMetadataResponse struct { - Returnval []ProfileMetadata `xml:"returnval,omitempty"` -} - -type QueryHostStatus QueryHostStatusRequestType - -func init() { - t["QueryHostStatus"] = reflect.TypeOf((*QueryHostStatus)(nil)).Elem() -} - -type QueryHostStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryHostStatusRequestType"] = reflect.TypeOf((*QueryHostStatusRequestType)(nil)).Elem() -} - -type QueryHostStatusResponse struct { - Returnval VsanHostClusterStatus `xml:"returnval"` -} - -type QueryHostsWithAttachedLun QueryHostsWithAttachedLunRequestType - -func init() { - t["QueryHostsWithAttachedLun"] = reflect.TypeOf((*QueryHostsWithAttachedLun)(nil)).Elem() -} - -type QueryHostsWithAttachedLunRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid string `xml:"lunUuid"` -} - -func init() { - t["QueryHostsWithAttachedLunRequestType"] = reflect.TypeOf((*QueryHostsWithAttachedLunRequestType)(nil)).Elem() -} - -type QueryHostsWithAttachedLunResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryIORMConfigOption QueryIORMConfigOptionRequestType - -func init() { - t["QueryIORMConfigOption"] = reflect.TypeOf((*QueryIORMConfigOption)(nil)).Elem() -} - -type QueryIORMConfigOptionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["QueryIORMConfigOptionRequestType"] = reflect.TypeOf((*QueryIORMConfigOptionRequestType)(nil)).Elem() -} - -type QueryIORMConfigOptionResponse struct { - Returnval StorageIORMConfigOption `xml:"returnval"` -} - -type QueryIPAllocations QueryIPAllocationsRequestType - -func init() { - t["QueryIPAllocations"] = reflect.TypeOf((*QueryIPAllocations)(nil)).Elem() -} - -type QueryIPAllocationsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - PoolId int32 `xml:"poolId"` - ExtensionKey string `xml:"extensionKey"` -} - -func init() { - t["QueryIPAllocationsRequestType"] = reflect.TypeOf((*QueryIPAllocationsRequestType)(nil)).Elem() -} - -type QueryIPAllocationsResponse struct { - Returnval []IpPoolManagerIpAllocation `xml:"returnval"` -} - -type QueryIoFilterInfo QueryIoFilterInfoRequestType - -func init() { - t["QueryIoFilterInfo"] = reflect.TypeOf((*QueryIoFilterInfo)(nil)).Elem() -} - -type QueryIoFilterInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - CompRes ManagedObjectReference `xml:"compRes"` -} - -func init() { - t["QueryIoFilterInfoRequestType"] = reflect.TypeOf((*QueryIoFilterInfoRequestType)(nil)).Elem() -} - -type QueryIoFilterInfoResponse struct { - Returnval []ClusterIoFilterInfo `xml:"returnval,omitempty"` -} - -type QueryIoFilterIssues QueryIoFilterIssuesRequestType - -func init() { - t["QueryIoFilterIssues"] = reflect.TypeOf((*QueryIoFilterIssues)(nil)).Elem() -} - -type QueryIoFilterIssuesRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - CompRes ManagedObjectReference `xml:"compRes"` -} - -func init() { - t["QueryIoFilterIssuesRequestType"] = reflect.TypeOf((*QueryIoFilterIssuesRequestType)(nil)).Elem() -} - -type QueryIoFilterIssuesResponse struct { - Returnval IoFilterQueryIssueResult `xml:"returnval"` -} - -type QueryIpPools QueryIpPoolsRequestType - -func init() { - t["QueryIpPools"] = reflect.TypeOf((*QueryIpPools)(nil)).Elem() -} - -type QueryIpPoolsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` -} - -func init() { - t["QueryIpPoolsRequestType"] = reflect.TypeOf((*QueryIpPoolsRequestType)(nil)).Elem() -} - -type QueryIpPoolsResponse struct { - Returnval []IpPool `xml:"returnval,omitempty"` -} - -type QueryLicenseSourceAvailability QueryLicenseSourceAvailabilityRequestType - -func init() { - t["QueryLicenseSourceAvailability"] = reflect.TypeOf((*QueryLicenseSourceAvailability)(nil)).Elem() -} - -type QueryLicenseSourceAvailabilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryLicenseSourceAvailabilityRequestType"] = reflect.TypeOf((*QueryLicenseSourceAvailabilityRequestType)(nil)).Elem() -} - -type QueryLicenseSourceAvailabilityResponse struct { - Returnval []LicenseAvailabilityInfo `xml:"returnval,omitempty"` -} - -type QueryLicenseUsage QueryLicenseUsageRequestType - -func init() { - t["QueryLicenseUsage"] = reflect.TypeOf((*QueryLicenseUsage)(nil)).Elem() -} - -type QueryLicenseUsageRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryLicenseUsageRequestType"] = reflect.TypeOf((*QueryLicenseUsageRequestType)(nil)).Elem() -} - -type QueryLicenseUsageResponse struct { - Returnval LicenseUsageInfo `xml:"returnval"` -} - -type QueryLockdownExceptions QueryLockdownExceptionsRequestType - -func init() { - t["QueryLockdownExceptions"] = reflect.TypeOf((*QueryLockdownExceptions)(nil)).Elem() -} - -type QueryLockdownExceptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryLockdownExceptionsRequestType"] = reflect.TypeOf((*QueryLockdownExceptionsRequestType)(nil)).Elem() -} - -type QueryLockdownExceptionsResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryManagedBy QueryManagedByRequestType - -func init() { - t["QueryManagedBy"] = reflect.TypeOf((*QueryManagedBy)(nil)).Elem() -} - -type QueryManagedByRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` -} - -func init() { - t["QueryManagedByRequestType"] = reflect.TypeOf((*QueryManagedByRequestType)(nil)).Elem() -} - -type QueryManagedByResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryMaxQueueDepth QueryMaxQueueDepthRequestType - -func init() { - t["QueryMaxQueueDepth"] = reflect.TypeOf((*QueryMaxQueueDepth)(nil)).Elem() -} - -type QueryMaxQueueDepthRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["QueryMaxQueueDepthRequestType"] = reflect.TypeOf((*QueryMaxQueueDepthRequestType)(nil)).Elem() -} - -type QueryMaxQueueDepthResponse struct { - Returnval int64 `xml:"returnval"` -} - -type QueryMemoryOverhead QueryMemoryOverheadRequestType - -func init() { - t["QueryMemoryOverhead"] = reflect.TypeOf((*QueryMemoryOverhead)(nil)).Elem() -} - -type QueryMemoryOverheadEx QueryMemoryOverheadExRequestType - -func init() { - t["QueryMemoryOverheadEx"] = reflect.TypeOf((*QueryMemoryOverheadEx)(nil)).Elem() -} - -type QueryMemoryOverheadExRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmConfigInfo VirtualMachineConfigInfo `xml:"vmConfigInfo"` -} - -func init() { - t["QueryMemoryOverheadExRequestType"] = reflect.TypeOf((*QueryMemoryOverheadExRequestType)(nil)).Elem() -} - -type QueryMemoryOverheadExResponse struct { - Returnval int64 `xml:"returnval"` -} - -type QueryMemoryOverheadRequestType struct { - This ManagedObjectReference `xml:"_this"` - MemorySize int64 `xml:"memorySize"` - VideoRamSize int32 `xml:"videoRamSize,omitempty"` - NumVcpus int32 `xml:"numVcpus"` -} - -func init() { - t["QueryMemoryOverheadRequestType"] = reflect.TypeOf((*QueryMemoryOverheadRequestType)(nil)).Elem() -} - -type QueryMemoryOverheadResponse struct { - Returnval int64 `xml:"returnval"` -} - -type QueryMigrationDependencies QueryMigrationDependenciesRequestType - -func init() { - t["QueryMigrationDependencies"] = reflect.TypeOf((*QueryMigrationDependencies)(nil)).Elem() -} - -type QueryMigrationDependenciesRequestType struct { - This ManagedObjectReference `xml:"_this"` - PnicDevice []string `xml:"pnicDevice"` -} - -func init() { - t["QueryMigrationDependenciesRequestType"] = reflect.TypeOf((*QueryMigrationDependenciesRequestType)(nil)).Elem() -} - -type QueryMigrationDependenciesResponse struct { - Returnval IscsiMigrationDependency `xml:"returnval"` -} - -type QueryModules QueryModulesRequestType - -func init() { - t["QueryModules"] = reflect.TypeOf((*QueryModules)(nil)).Elem() -} - -type QueryModulesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryModulesRequestType"] = reflect.TypeOf((*QueryModulesRequestType)(nil)).Elem() -} - -type QueryModulesResponse struct { - Returnval []KernelModuleInfo `xml:"returnval,omitempty"` -} - -type QueryMonitoredEntities QueryMonitoredEntitiesRequestType - -func init() { - t["QueryMonitoredEntities"] = reflect.TypeOf((*QueryMonitoredEntities)(nil)).Elem() -} - -type QueryMonitoredEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` -} - -func init() { - t["QueryMonitoredEntitiesRequestType"] = reflect.TypeOf((*QueryMonitoredEntitiesRequestType)(nil)).Elem() -} - -type QueryMonitoredEntitiesResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryNFSUser QueryNFSUserRequestType - -func init() { - t["QueryNFSUser"] = reflect.TypeOf((*QueryNFSUser)(nil)).Elem() -} - -type QueryNFSUserRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryNFSUserRequestType"] = reflect.TypeOf((*QueryNFSUserRequestType)(nil)).Elem() -} - -type QueryNFSUserResponse struct { - Returnval *HostNasVolumeUserInfo `xml:"returnval,omitempty"` -} - -type QueryNetConfig QueryNetConfigRequestType - -func init() { - t["QueryNetConfig"] = reflect.TypeOf((*QueryNetConfig)(nil)).Elem() -} - -type QueryNetConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - NicType string `xml:"nicType"` -} - -func init() { - t["QueryNetConfigRequestType"] = reflect.TypeOf((*QueryNetConfigRequestType)(nil)).Elem() -} - -type QueryNetConfigResponse struct { - Returnval *VirtualNicManagerNetConfig `xml:"returnval,omitempty"` -} - -type QueryNetworkHint QueryNetworkHintRequestType - -func init() { - t["QueryNetworkHint"] = reflect.TypeOf((*QueryNetworkHint)(nil)).Elem() -} - -type QueryNetworkHintRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device []string `xml:"device,omitempty"` -} - -func init() { - t["QueryNetworkHintRequestType"] = reflect.TypeOf((*QueryNetworkHintRequestType)(nil)).Elem() -} - -type QueryNetworkHintResponse struct { - Returnval []PhysicalNicHintInfo `xml:"returnval,omitempty"` -} - -type QueryObjectsOnPhysicalVsanDisk QueryObjectsOnPhysicalVsanDiskRequestType - -func init() { - t["QueryObjectsOnPhysicalVsanDisk"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDisk)(nil)).Elem() -} - -type QueryObjectsOnPhysicalVsanDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Disks []string `xml:"disks"` -} - -func init() { - t["QueryObjectsOnPhysicalVsanDiskRequestType"] = reflect.TypeOf((*QueryObjectsOnPhysicalVsanDiskRequestType)(nil)).Elem() -} - -type QueryObjectsOnPhysicalVsanDiskResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryOptions QueryOptionsRequestType - -func init() { - t["QueryOptions"] = reflect.TypeOf((*QueryOptions)(nil)).Elem() -} - -type QueryOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name,omitempty"` -} - -func init() { - t["QueryOptionsRequestType"] = reflect.TypeOf((*QueryOptionsRequestType)(nil)).Elem() -} - -type QueryOptionsResponse struct { - Returnval []BaseOptionValue `xml:"returnval,omitempty,typeattr"` -} - -type QueryPartitionCreateDesc QueryPartitionCreateDescRequestType - -func init() { - t["QueryPartitionCreateDesc"] = reflect.TypeOf((*QueryPartitionCreateDesc)(nil)).Elem() -} - -type QueryPartitionCreateDescRequestType struct { - This ManagedObjectReference `xml:"_this"` - DiskUuid string `xml:"diskUuid"` - DiagnosticType string `xml:"diagnosticType"` -} - -func init() { - t["QueryPartitionCreateDescRequestType"] = reflect.TypeOf((*QueryPartitionCreateDescRequestType)(nil)).Elem() -} - -type QueryPartitionCreateDescResponse struct { - Returnval HostDiagnosticPartitionCreateDescription `xml:"returnval"` -} - -type QueryPartitionCreateOptions QueryPartitionCreateOptionsRequestType - -func init() { - t["QueryPartitionCreateOptions"] = reflect.TypeOf((*QueryPartitionCreateOptions)(nil)).Elem() -} - -type QueryPartitionCreateOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - StorageType string `xml:"storageType"` - DiagnosticType string `xml:"diagnosticType"` -} - -func init() { - t["QueryPartitionCreateOptionsRequestType"] = reflect.TypeOf((*QueryPartitionCreateOptionsRequestType)(nil)).Elem() -} - -type QueryPartitionCreateOptionsResponse struct { - Returnval []HostDiagnosticPartitionCreateOption `xml:"returnval,omitempty"` -} - -type QueryPathSelectionPolicyOptions QueryPathSelectionPolicyOptionsRequestType - -func init() { - t["QueryPathSelectionPolicyOptions"] = reflect.TypeOf((*QueryPathSelectionPolicyOptions)(nil)).Elem() -} - -type QueryPathSelectionPolicyOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryPathSelectionPolicyOptionsRequestType"] = reflect.TypeOf((*QueryPathSelectionPolicyOptionsRequestType)(nil)).Elem() -} - -type QueryPathSelectionPolicyOptionsResponse struct { - Returnval []HostPathSelectionPolicyOption `xml:"returnval,omitempty"` -} - -type QueryPerf QueryPerfRequestType - -func init() { - t["QueryPerf"] = reflect.TypeOf((*QueryPerf)(nil)).Elem() -} - -type QueryPerfComposite QueryPerfCompositeRequestType - -func init() { - t["QueryPerfComposite"] = reflect.TypeOf((*QueryPerfComposite)(nil)).Elem() -} - -type QueryPerfCompositeRequestType struct { - This ManagedObjectReference `xml:"_this"` - QuerySpec PerfQuerySpec `xml:"querySpec"` -} - -func init() { - t["QueryPerfCompositeRequestType"] = reflect.TypeOf((*QueryPerfCompositeRequestType)(nil)).Elem() -} - -type QueryPerfCompositeResponse struct { - Returnval PerfCompositeMetric `xml:"returnval"` -} - -type QueryPerfCounter QueryPerfCounterRequestType - -func init() { - t["QueryPerfCounter"] = reflect.TypeOf((*QueryPerfCounter)(nil)).Elem() -} - -type QueryPerfCounterByLevel QueryPerfCounterByLevelRequestType - -func init() { - t["QueryPerfCounterByLevel"] = reflect.TypeOf((*QueryPerfCounterByLevel)(nil)).Elem() -} - -type QueryPerfCounterByLevelRequestType struct { - This ManagedObjectReference `xml:"_this"` - Level int32 `xml:"level"` -} - -func init() { - t["QueryPerfCounterByLevelRequestType"] = reflect.TypeOf((*QueryPerfCounterByLevelRequestType)(nil)).Elem() -} - -type QueryPerfCounterByLevelResponse struct { - Returnval []PerfCounterInfo `xml:"returnval"` -} - -type QueryPerfCounterRequestType struct { - This ManagedObjectReference `xml:"_this"` - CounterId []int32 `xml:"counterId"` -} - -func init() { - t["QueryPerfCounterRequestType"] = reflect.TypeOf((*QueryPerfCounterRequestType)(nil)).Elem() -} - -type QueryPerfCounterResponse struct { - Returnval []PerfCounterInfo `xml:"returnval,omitempty"` -} - -type QueryPerfProviderSummary QueryPerfProviderSummaryRequestType - -func init() { - t["QueryPerfProviderSummary"] = reflect.TypeOf((*QueryPerfProviderSummary)(nil)).Elem() -} - -type QueryPerfProviderSummaryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["QueryPerfProviderSummaryRequestType"] = reflect.TypeOf((*QueryPerfProviderSummaryRequestType)(nil)).Elem() -} - -type QueryPerfProviderSummaryResponse struct { - Returnval PerfProviderSummary `xml:"returnval"` -} - -type QueryPerfRequestType struct { - This ManagedObjectReference `xml:"_this"` - QuerySpec []PerfQuerySpec `xml:"querySpec"` -} - -func init() { - t["QueryPerfRequestType"] = reflect.TypeOf((*QueryPerfRequestType)(nil)).Elem() -} - -type QueryPerfResponse struct { - Returnval []BasePerfEntityMetricBase `xml:"returnval,omitempty,typeattr"` -} - -type QueryPhysicalVsanDisks QueryPhysicalVsanDisksRequestType - -func init() { - t["QueryPhysicalVsanDisks"] = reflect.TypeOf((*QueryPhysicalVsanDisks)(nil)).Elem() -} - -type QueryPhysicalVsanDisksRequestType struct { - This ManagedObjectReference `xml:"_this"` - Props []string `xml:"props,omitempty"` -} - -func init() { - t["QueryPhysicalVsanDisksRequestType"] = reflect.TypeOf((*QueryPhysicalVsanDisksRequestType)(nil)).Elem() -} - -type QueryPhysicalVsanDisksResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryPnicStatus QueryPnicStatusRequestType - -func init() { - t["QueryPnicStatus"] = reflect.TypeOf((*QueryPnicStatus)(nil)).Elem() -} - -type QueryPnicStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - PnicDevice string `xml:"pnicDevice"` -} - -func init() { - t["QueryPnicStatusRequestType"] = reflect.TypeOf((*QueryPnicStatusRequestType)(nil)).Elem() -} - -type QueryPnicStatusResponse struct { - Returnval IscsiStatus `xml:"returnval"` -} - -type QueryPolicyMetadata QueryPolicyMetadataRequestType - -func init() { - t["QueryPolicyMetadata"] = reflect.TypeOf((*QueryPolicyMetadata)(nil)).Elem() -} - -type QueryPolicyMetadataRequestType struct { - This ManagedObjectReference `xml:"_this"` - PolicyName []string `xml:"policyName,omitempty"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` -} - -func init() { - t["QueryPolicyMetadataRequestType"] = reflect.TypeOf((*QueryPolicyMetadataRequestType)(nil)).Elem() -} - -type QueryPolicyMetadataResponse struct { - Returnval []ProfilePolicyMetadata `xml:"returnval,omitempty"` -} - -type QueryProductLockerLocation QueryProductLockerLocationRequestType - -func init() { - t["QueryProductLockerLocation"] = reflect.TypeOf((*QueryProductLockerLocation)(nil)).Elem() -} - -type QueryProductLockerLocationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryProductLockerLocationRequestType"] = reflect.TypeOf((*QueryProductLockerLocationRequestType)(nil)).Elem() -} - -type QueryProductLockerLocationResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryProfileStructure QueryProfileStructureRequestType - -func init() { - t["QueryProfileStructure"] = reflect.TypeOf((*QueryProfileStructure)(nil)).Elem() -} - -type QueryProfileStructureRequestType struct { - This ManagedObjectReference `xml:"_this"` - Profile *ManagedObjectReference `xml:"profile,omitempty"` -} - -func init() { - t["QueryProfileStructureRequestType"] = reflect.TypeOf((*QueryProfileStructureRequestType)(nil)).Elem() -} - -type QueryProfileStructureResponse struct { - Returnval ProfileProfileStructure `xml:"returnval"` -} - -type QueryProviderList QueryProviderListRequestType - -func init() { - t["QueryProviderList"] = reflect.TypeOf((*QueryProviderList)(nil)).Elem() -} - -type QueryProviderListRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryProviderListRequestType"] = reflect.TypeOf((*QueryProviderListRequestType)(nil)).Elem() -} - -type QueryProviderListResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryProviderName QueryProviderNameRequestType - -func init() { - t["QueryProviderName"] = reflect.TypeOf((*QueryProviderName)(nil)).Elem() -} - -type QueryProviderNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["QueryProviderNameRequestType"] = reflect.TypeOf((*QueryProviderNameRequestType)(nil)).Elem() -} - -type QueryProviderNameResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryResourceConfigOption QueryResourceConfigOptionRequestType - -func init() { - t["QueryResourceConfigOption"] = reflect.TypeOf((*QueryResourceConfigOption)(nil)).Elem() -} - -type QueryResourceConfigOptionRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryResourceConfigOptionRequestType"] = reflect.TypeOf((*QueryResourceConfigOptionRequestType)(nil)).Elem() -} - -type QueryResourceConfigOptionResponse struct { - Returnval ResourceConfigOption `xml:"returnval"` -} - -type QueryServiceList QueryServiceListRequestType - -func init() { - t["QueryServiceList"] = reflect.TypeOf((*QueryServiceList)(nil)).Elem() -} - -type QueryServiceListRequestType struct { - This ManagedObjectReference `xml:"_this"` - ServiceName string `xml:"serviceName,omitempty"` - Location []string `xml:"location,omitempty"` -} - -func init() { - t["QueryServiceListRequestType"] = reflect.TypeOf((*QueryServiceListRequestType)(nil)).Elem() -} - -type QueryServiceListResponse struct { - Returnval []ServiceManagerServiceInfo `xml:"returnval,omitempty"` -} - -type QueryStorageArrayTypePolicyOptions QueryStorageArrayTypePolicyOptionsRequestType - -func init() { - t["QueryStorageArrayTypePolicyOptions"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptions)(nil)).Elem() -} - -type QueryStorageArrayTypePolicyOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryStorageArrayTypePolicyOptionsRequestType"] = reflect.TypeOf((*QueryStorageArrayTypePolicyOptionsRequestType)(nil)).Elem() -} - -type QueryStorageArrayTypePolicyOptionsResponse struct { - Returnval []HostStorageArrayTypePolicyOption `xml:"returnval,omitempty"` -} - -type QuerySupportedFeatures QuerySupportedFeaturesRequestType - -func init() { - t["QuerySupportedFeatures"] = reflect.TypeOf((*QuerySupportedFeatures)(nil)).Elem() -} - -type QuerySupportedFeaturesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QuerySupportedFeaturesRequestType"] = reflect.TypeOf((*QuerySupportedFeaturesRequestType)(nil)).Elem() -} - -type QuerySupportedFeaturesResponse struct { - Returnval []LicenseFeatureInfo `xml:"returnval,omitempty"` -} - -type QuerySupportedNetworkOffloadSpec QuerySupportedNetworkOffloadSpecRequestType - -func init() { - t["QuerySupportedNetworkOffloadSpec"] = reflect.TypeOf((*QuerySupportedNetworkOffloadSpec)(nil)).Elem() -} - -type QuerySupportedNetworkOffloadSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - SwitchProductSpec DistributedVirtualSwitchProductSpec `xml:"switchProductSpec"` -} - -func init() { - t["QuerySupportedNetworkOffloadSpecRequestType"] = reflect.TypeOf((*QuerySupportedNetworkOffloadSpecRequestType)(nil)).Elem() -} - -type QuerySupportedNetworkOffloadSpecResponse struct { - Returnval []DistributedVirtualSwitchNetworkOffloadSpec `xml:"returnval,omitempty"` -} - -type QuerySyncingVsanObjects QuerySyncingVsanObjectsRequestType - -func init() { - t["QuerySyncingVsanObjects"] = reflect.TypeOf((*QuerySyncingVsanObjects)(nil)).Elem() -} - -type QuerySyncingVsanObjectsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids,omitempty"` -} - -func init() { - t["QuerySyncingVsanObjectsRequestType"] = reflect.TypeOf((*QuerySyncingVsanObjectsRequestType)(nil)).Elem() -} - -type QuerySyncingVsanObjectsResponse struct { - Returnval string `xml:"returnval"` -} - -type QuerySystemUsers QuerySystemUsersRequestType - -func init() { - t["QuerySystemUsers"] = reflect.TypeOf((*QuerySystemUsers)(nil)).Elem() -} - -type QuerySystemUsersRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QuerySystemUsersRequestType"] = reflect.TypeOf((*QuerySystemUsersRequestType)(nil)).Elem() -} - -type QuerySystemUsersResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryTargetCapabilities QueryTargetCapabilitiesRequestType - -func init() { - t["QueryTargetCapabilities"] = reflect.TypeOf((*QueryTargetCapabilities)(nil)).Elem() -} - -type QueryTargetCapabilitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["QueryTargetCapabilitiesRequestType"] = reflect.TypeOf((*QueryTargetCapabilitiesRequestType)(nil)).Elem() -} - -type QueryTargetCapabilitiesResponse struct { - Returnval *HostCapability `xml:"returnval,omitempty"` -} - -type QueryTpmAttestationReport QueryTpmAttestationReportRequestType - -func init() { - t["QueryTpmAttestationReport"] = reflect.TypeOf((*QueryTpmAttestationReport)(nil)).Elem() -} - -type QueryTpmAttestationReportRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryTpmAttestationReportRequestType"] = reflect.TypeOf((*QueryTpmAttestationReportRequestType)(nil)).Elem() -} - -type QueryTpmAttestationReportResponse struct { - Returnval *HostTpmAttestationReport `xml:"returnval,omitempty"` -} - -type QueryUnmonitoredHosts QueryUnmonitoredHostsRequestType - -func init() { - t["QueryUnmonitoredHosts"] = reflect.TypeOf((*QueryUnmonitoredHosts)(nil)).Elem() -} - -type QueryUnmonitoredHostsRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - Cluster ManagedObjectReference `xml:"cluster"` -} - -func init() { - t["QueryUnmonitoredHostsRequestType"] = reflect.TypeOf((*QueryUnmonitoredHostsRequestType)(nil)).Elem() -} - -type QueryUnmonitoredHostsResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type QueryUnownedFiles QueryUnownedFilesRequestType - -func init() { - t["QueryUnownedFiles"] = reflect.TypeOf((*QueryUnownedFiles)(nil)).Elem() -} - -type QueryUnownedFilesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryUnownedFilesRequestType"] = reflect.TypeOf((*QueryUnownedFilesRequestType)(nil)).Elem() -} - -type QueryUnownedFilesResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryUnresolvedVmfsVolume QueryUnresolvedVmfsVolumeRequestType - -func init() { - t["QueryUnresolvedVmfsVolume"] = reflect.TypeOf((*QueryUnresolvedVmfsVolume)(nil)).Elem() -} - -type QueryUnresolvedVmfsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumeRequestType)(nil)).Elem() -} - -type QueryUnresolvedVmfsVolumeResponse struct { - Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"` -} - -type QueryUnresolvedVmfsVolumes QueryUnresolvedVmfsVolumesRequestType - -func init() { - t["QueryUnresolvedVmfsVolumes"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumes)(nil)).Elem() -} - -type QueryUnresolvedVmfsVolumesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*QueryUnresolvedVmfsVolumesRequestType)(nil)).Elem() -} - -type QueryUnresolvedVmfsVolumesResponse struct { - Returnval []HostUnresolvedVmfsVolume `xml:"returnval,omitempty"` -} - -type QueryUsedVlanIdInDvs QueryUsedVlanIdInDvsRequestType - -func init() { - t["QueryUsedVlanIdInDvs"] = reflect.TypeOf((*QueryUsedVlanIdInDvs)(nil)).Elem() -} - -type QueryUsedVlanIdInDvsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryUsedVlanIdInDvsRequestType"] = reflect.TypeOf((*QueryUsedVlanIdInDvsRequestType)(nil)).Elem() -} - -type QueryUsedVlanIdInDvsResponse struct { - Returnval []int32 `xml:"returnval,omitempty"` -} - -type QueryVMotionCompatibility QueryVMotionCompatibilityRequestType - -func init() { - t["QueryVMotionCompatibility"] = reflect.TypeOf((*QueryVMotionCompatibility)(nil)).Elem() -} - -type QueryVMotionCompatibilityExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm []ManagedObjectReference `xml:"vm"` - Host []ManagedObjectReference `xml:"host"` -} - -func init() { - t["QueryVMotionCompatibilityExRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityExRequestType)(nil)).Elem() -} - -type QueryVMotionCompatibilityEx_Task QueryVMotionCompatibilityExRequestType - -func init() { - t["QueryVMotionCompatibilityEx_Task"] = reflect.TypeOf((*QueryVMotionCompatibilityEx_Task)(nil)).Elem() -} - -type QueryVMotionCompatibilityEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type QueryVMotionCompatibilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Host []ManagedObjectReference `xml:"host"` - Compatibility []string `xml:"compatibility,omitempty"` -} - -func init() { - t["QueryVMotionCompatibilityRequestType"] = reflect.TypeOf((*QueryVMotionCompatibilityRequestType)(nil)).Elem() -} - -type QueryVMotionCompatibilityResponse struct { - Returnval []HostVMotionCompatibility `xml:"returnval,omitempty"` -} - -type QueryVirtualDiskFragmentation QueryVirtualDiskFragmentationRequestType - -func init() { - t["QueryVirtualDiskFragmentation"] = reflect.TypeOf((*QueryVirtualDiskFragmentation)(nil)).Elem() -} - -type QueryVirtualDiskFragmentationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["QueryVirtualDiskFragmentationRequestType"] = reflect.TypeOf((*QueryVirtualDiskFragmentationRequestType)(nil)).Elem() -} - -type QueryVirtualDiskFragmentationResponse struct { - Returnval int32 `xml:"returnval"` -} - -type QueryVirtualDiskGeometry QueryVirtualDiskGeometryRequestType - -func init() { - t["QueryVirtualDiskGeometry"] = reflect.TypeOf((*QueryVirtualDiskGeometry)(nil)).Elem() -} - -type QueryVirtualDiskGeometryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["QueryVirtualDiskGeometryRequestType"] = reflect.TypeOf((*QueryVirtualDiskGeometryRequestType)(nil)).Elem() -} - -type QueryVirtualDiskGeometryResponse struct { - Returnval HostDiskDimensionsChs `xml:"returnval"` -} - -type QueryVirtualDiskUuid QueryVirtualDiskUuidRequestType - -func init() { - t["QueryVirtualDiskUuid"] = reflect.TypeOf((*QueryVirtualDiskUuid)(nil)).Elem() -} - -type QueryVirtualDiskUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["QueryVirtualDiskUuidRequestType"] = reflect.TypeOf((*QueryVirtualDiskUuidRequestType)(nil)).Elem() -} - -type QueryVirtualDiskUuidResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryVmfsConfigOption QueryVmfsConfigOptionRequestType - -func init() { - t["QueryVmfsConfigOption"] = reflect.TypeOf((*QueryVmfsConfigOption)(nil)).Elem() -} - -type QueryVmfsConfigOptionRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["QueryVmfsConfigOptionRequestType"] = reflect.TypeOf((*QueryVmfsConfigOptionRequestType)(nil)).Elem() -} - -type QueryVmfsConfigOptionResponse struct { - Returnval []VmfsConfigOption `xml:"returnval,omitempty"` -} - -type QueryVmfsDatastoreCreateOptions QueryVmfsDatastoreCreateOptionsRequestType - -func init() { - t["QueryVmfsDatastoreCreateOptions"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptions)(nil)).Elem() -} - -type QueryVmfsDatastoreCreateOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - DevicePath string `xml:"devicePath"` - VmfsMajorVersion int32 `xml:"vmfsMajorVersion,omitempty"` -} - -func init() { - t["QueryVmfsDatastoreCreateOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreCreateOptionsRequestType)(nil)).Elem() -} - -type QueryVmfsDatastoreCreateOptionsResponse struct { - Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` -} - -type QueryVmfsDatastoreExpandOptions QueryVmfsDatastoreExpandOptionsRequestType - -func init() { - t["QueryVmfsDatastoreExpandOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptions)(nil)).Elem() -} - -type QueryVmfsDatastoreExpandOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["QueryVmfsDatastoreExpandOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExpandOptionsRequestType)(nil)).Elem() -} - -type QueryVmfsDatastoreExpandOptionsResponse struct { - Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` -} - -type QueryVmfsDatastoreExtendOptions QueryVmfsDatastoreExtendOptionsRequestType - -func init() { - t["QueryVmfsDatastoreExtendOptions"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptions)(nil)).Elem() -} - -type QueryVmfsDatastoreExtendOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - DevicePath string `xml:"devicePath"` - SuppressExpandCandidates *bool `xml:"suppressExpandCandidates"` -} - -func init() { - t["QueryVmfsDatastoreExtendOptionsRequestType"] = reflect.TypeOf((*QueryVmfsDatastoreExtendOptionsRequestType)(nil)).Elem() -} - -type QueryVmfsDatastoreExtendOptionsResponse struct { - Returnval []VmfsDatastoreOption `xml:"returnval,omitempty"` -} - -type QueryVnicStatus QueryVnicStatusRequestType - -func init() { - t["QueryVnicStatus"] = reflect.TypeOf((*QueryVnicStatus)(nil)).Elem() -} - -type QueryVnicStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - VnicDevice string `xml:"vnicDevice"` -} - -func init() { - t["QueryVnicStatusRequestType"] = reflect.TypeOf((*QueryVnicStatusRequestType)(nil)).Elem() -} - -type QueryVnicStatusResponse struct { - Returnval IscsiStatus `xml:"returnval"` -} - -type QueryVsanObjectUuidsByFilter QueryVsanObjectUuidsByFilterRequestType - -func init() { - t["QueryVsanObjectUuidsByFilter"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilter)(nil)).Elem() -} - -type QueryVsanObjectUuidsByFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids,omitempty"` - Limit *int32 `xml:"limit"` - Version int32 `xml:"version,omitempty"` -} - -func init() { - t["QueryVsanObjectUuidsByFilterRequestType"] = reflect.TypeOf((*QueryVsanObjectUuidsByFilterRequestType)(nil)).Elem() -} - -type QueryVsanObjectUuidsByFilterResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type QueryVsanObjects QueryVsanObjectsRequestType - -func init() { - t["QueryVsanObjects"] = reflect.TypeOf((*QueryVsanObjects)(nil)).Elem() -} - -type QueryVsanObjectsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids,omitempty"` -} - -func init() { - t["QueryVsanObjectsRequestType"] = reflect.TypeOf((*QueryVsanObjectsRequestType)(nil)).Elem() -} - -type QueryVsanObjectsResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryVsanStatistics QueryVsanStatisticsRequestType - -func init() { - t["QueryVsanStatistics"] = reflect.TypeOf((*QueryVsanStatistics)(nil)).Elem() -} - -type QueryVsanStatisticsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Labels []string `xml:"labels"` -} - -func init() { - t["QueryVsanStatisticsRequestType"] = reflect.TypeOf((*QueryVsanStatisticsRequestType)(nil)).Elem() -} - -type QueryVsanStatisticsResponse struct { - Returnval string `xml:"returnval"` -} - -type QueryVsanUpgradeStatus QueryVsanUpgradeStatusRequestType - -func init() { - t["QueryVsanUpgradeStatus"] = reflect.TypeOf((*QueryVsanUpgradeStatus)(nil)).Elem() -} - -type QueryVsanUpgradeStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster ManagedObjectReference `xml:"cluster"` -} - -func init() { - t["QueryVsanUpgradeStatusRequestType"] = reflect.TypeOf((*QueryVsanUpgradeStatusRequestType)(nil)).Elem() -} - -type QueryVsanUpgradeStatusResponse struct { - Returnval VsanUpgradeSystemUpgradeStatus `xml:"returnval"` -} - -type QuestionPending struct { - InvalidState - - Text string `xml:"text"` -} - -func init() { - t["QuestionPending"] = reflect.TypeOf((*QuestionPending)(nil)).Elem() -} - -type QuestionPendingFault QuestionPending - -func init() { - t["QuestionPendingFault"] = reflect.TypeOf((*QuestionPendingFault)(nil)).Elem() -} - -type QuiesceDatastoreIOForHAFailed struct { - ResourceInUse - - Host ManagedObjectReference `xml:"host"` - HostName string `xml:"hostName"` - Ds ManagedObjectReference `xml:"ds"` - DsName string `xml:"dsName"` -} - -func init() { - t["QuiesceDatastoreIOForHAFailed"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailed)(nil)).Elem() -} - -type QuiesceDatastoreIOForHAFailedFault QuiesceDatastoreIOForHAFailed - -func init() { - t["QuiesceDatastoreIOForHAFailedFault"] = reflect.TypeOf((*QuiesceDatastoreIOForHAFailedFault)(nil)).Elem() -} - -type RDMConversionNotSupported struct { - MigrationFault - - Device string `xml:"device"` -} - -func init() { - t["RDMConversionNotSupported"] = reflect.TypeOf((*RDMConversionNotSupported)(nil)).Elem() -} - -type RDMConversionNotSupportedFault RDMConversionNotSupported - -func init() { - t["RDMConversionNotSupportedFault"] = reflect.TypeOf((*RDMConversionNotSupportedFault)(nil)).Elem() -} - -type RDMNotPreserved struct { - MigrationFault - - Device string `xml:"device"` -} - -func init() { - t["RDMNotPreserved"] = reflect.TypeOf((*RDMNotPreserved)(nil)).Elem() -} - -type RDMNotPreservedFault RDMNotPreserved - -func init() { - t["RDMNotPreservedFault"] = reflect.TypeOf((*RDMNotPreservedFault)(nil)).Elem() -} - -type RDMNotSupported struct { - DeviceNotSupported -} - -func init() { - t["RDMNotSupported"] = reflect.TypeOf((*RDMNotSupported)(nil)).Elem() -} - -type RDMNotSupportedFault BaseRDMNotSupported - -func init() { - t["RDMNotSupportedFault"] = reflect.TypeOf((*RDMNotSupportedFault)(nil)).Elem() -} - -type RDMNotSupportedOnDatastore struct { - VmConfigFault - - Device string `xml:"device"` - Datastore ManagedObjectReference `xml:"datastore"` - DatastoreName string `xml:"datastoreName"` -} - -func init() { - t["RDMNotSupportedOnDatastore"] = reflect.TypeOf((*RDMNotSupportedOnDatastore)(nil)).Elem() -} - -type RDMNotSupportedOnDatastoreFault RDMNotSupportedOnDatastore - -func init() { - t["RDMNotSupportedOnDatastoreFault"] = reflect.TypeOf((*RDMNotSupportedOnDatastoreFault)(nil)).Elem() -} - -type RDMPointsToInaccessibleDisk struct { - CannotAccessVmDisk -} - -func init() { - t["RDMPointsToInaccessibleDisk"] = reflect.TypeOf((*RDMPointsToInaccessibleDisk)(nil)).Elem() -} - -type RDMPointsToInaccessibleDiskFault RDMPointsToInaccessibleDisk - -func init() { - t["RDMPointsToInaccessibleDiskFault"] = reflect.TypeOf((*RDMPointsToInaccessibleDiskFault)(nil)).Elem() -} - -type RawDiskNotSupported struct { - DeviceNotSupported -} - -func init() { - t["RawDiskNotSupported"] = reflect.TypeOf((*RawDiskNotSupported)(nil)).Elem() -} - -type RawDiskNotSupportedFault RawDiskNotSupported - -func init() { - t["RawDiskNotSupportedFault"] = reflect.TypeOf((*RawDiskNotSupportedFault)(nil)).Elem() -} - -type ReadEnvironmentVariableInGuest ReadEnvironmentVariableInGuestRequestType - -func init() { - t["ReadEnvironmentVariableInGuest"] = reflect.TypeOf((*ReadEnvironmentVariableInGuest)(nil)).Elem() -} - -type ReadEnvironmentVariableInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Names []string `xml:"names,omitempty"` -} - -func init() { - t["ReadEnvironmentVariableInGuestRequestType"] = reflect.TypeOf((*ReadEnvironmentVariableInGuestRequestType)(nil)).Elem() -} - -type ReadEnvironmentVariableInGuestResponse struct { - Returnval []string `xml:"returnval,omitempty"` -} - -type ReadHostResourcePoolTreeFailed struct { - HostConnectFault -} - -func init() { - t["ReadHostResourcePoolTreeFailed"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailed)(nil)).Elem() -} - -type ReadHostResourcePoolTreeFailedFault ReadHostResourcePoolTreeFailed - -func init() { - t["ReadHostResourcePoolTreeFailedFault"] = reflect.TypeOf((*ReadHostResourcePoolTreeFailedFault)(nil)).Elem() -} - -type ReadNextEvents ReadNextEventsRequestType - -func init() { - t["ReadNextEvents"] = reflect.TypeOf((*ReadNextEvents)(nil)).Elem() -} - -type ReadNextEventsRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["ReadNextEventsRequestType"] = reflect.TypeOf((*ReadNextEventsRequestType)(nil)).Elem() -} - -type ReadNextEventsResponse struct { - Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` -} - -type ReadNextTasks ReadNextTasksRequestType - -func init() { - t["ReadNextTasks"] = reflect.TypeOf((*ReadNextTasks)(nil)).Elem() -} - -type ReadNextTasksRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["ReadNextTasksRequestType"] = reflect.TypeOf((*ReadNextTasksRequestType)(nil)).Elem() -} - -type ReadNextTasksResponse struct { - Returnval []TaskInfo `xml:"returnval,omitempty"` -} - -type ReadOnlyDisksWithLegacyDestination struct { - MigrationFault - - RoDiskCount int32 `xml:"roDiskCount"` - TimeoutDanger bool `xml:"timeoutDanger"` -} - -func init() { - t["ReadOnlyDisksWithLegacyDestination"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestination)(nil)).Elem() -} - -type ReadOnlyDisksWithLegacyDestinationFault ReadOnlyDisksWithLegacyDestination - -func init() { - t["ReadOnlyDisksWithLegacyDestinationFault"] = reflect.TypeOf((*ReadOnlyDisksWithLegacyDestinationFault)(nil)).Elem() -} - -type ReadPreviousEvents ReadPreviousEventsRequestType - -func init() { - t["ReadPreviousEvents"] = reflect.TypeOf((*ReadPreviousEvents)(nil)).Elem() -} - -type ReadPreviousEventsRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["ReadPreviousEventsRequestType"] = reflect.TypeOf((*ReadPreviousEventsRequestType)(nil)).Elem() -} - -type ReadPreviousEventsResponse struct { - Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` -} - -type ReadPreviousTasks ReadPreviousTasksRequestType - -func init() { - t["ReadPreviousTasks"] = reflect.TypeOf((*ReadPreviousTasks)(nil)).Elem() -} - -type ReadPreviousTasksRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["ReadPreviousTasksRequestType"] = reflect.TypeOf((*ReadPreviousTasksRequestType)(nil)).Elem() -} - -type ReadPreviousTasksResponse struct { - Returnval []TaskInfo `xml:"returnval,omitempty"` -} - -type RebootGuest RebootGuestRequestType - -func init() { - t["RebootGuest"] = reflect.TypeOf((*RebootGuest)(nil)).Elem() -} - -type RebootGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RebootGuestRequestType"] = reflect.TypeOf((*RebootGuestRequestType)(nil)).Elem() -} - -type RebootGuestResponse struct { -} - -type RebootHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Force bool `xml:"force"` -} - -func init() { - t["RebootHostRequestType"] = reflect.TypeOf((*RebootHostRequestType)(nil)).Elem() -} - -type RebootHost_Task RebootHostRequestType - -func init() { - t["RebootHost_Task"] = reflect.TypeOf((*RebootHost_Task)(nil)).Elem() -} - -type RebootHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RebootRequired struct { - VimFault - - Patch string `xml:"patch,omitempty"` -} - -func init() { - t["RebootRequired"] = reflect.TypeOf((*RebootRequired)(nil)).Elem() -} - -type RebootRequiredFault RebootRequired - -func init() { - t["RebootRequiredFault"] = reflect.TypeOf((*RebootRequiredFault)(nil)).Elem() -} - -type RecommendDatastores RecommendDatastoresRequestType - -func init() { - t["RecommendDatastores"] = reflect.TypeOf((*RecommendDatastores)(nil)).Elem() -} - -type RecommendDatastoresRequestType struct { - This ManagedObjectReference `xml:"_this"` - StorageSpec StoragePlacementSpec `xml:"storageSpec"` -} - -func init() { - t["RecommendDatastoresRequestType"] = reflect.TypeOf((*RecommendDatastoresRequestType)(nil)).Elem() -} - -type RecommendDatastoresResponse struct { - Returnval StoragePlacementResult `xml:"returnval"` -} - -type RecommendHostsForVm RecommendHostsForVmRequestType - -func init() { - t["RecommendHostsForVm"] = reflect.TypeOf((*RecommendHostsForVm)(nil)).Elem() -} - -type RecommendHostsForVmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` -} - -func init() { - t["RecommendHostsForVmRequestType"] = reflect.TypeOf((*RecommendHostsForVmRequestType)(nil)).Elem() -} - -type RecommendHostsForVmResponse struct { - Returnval []ClusterHostRecommendation `xml:"returnval,omitempty"` -} - -type RecommissionVsanNodeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RecommissionVsanNodeRequestType"] = reflect.TypeOf((*RecommissionVsanNodeRequestType)(nil)).Elem() -} - -type RecommissionVsanNode_Task RecommissionVsanNodeRequestType - -func init() { - t["RecommissionVsanNode_Task"] = reflect.TypeOf((*RecommissionVsanNode_Task)(nil)).Elem() -} - -type RecommissionVsanNode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconcileDatastoreInventoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["ReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ReconcileDatastoreInventoryRequestType)(nil)).Elem() -} - -type ReconcileDatastoreInventory_Task ReconcileDatastoreInventoryRequestType - -func init() { - t["ReconcileDatastoreInventory_Task"] = reflect.TypeOf((*ReconcileDatastoreInventory_Task)(nil)).Elem() -} - -type ReconcileDatastoreInventory_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VirtualMachineConfigSpec `xml:"spec"` -} - -func init() { - t["ReconfigVMRequestType"] = reflect.TypeOf((*ReconfigVMRequestType)(nil)).Elem() -} - -type ReconfigVM_Task ReconfigVMRequestType - -func init() { - t["ReconfigVM_Task"] = reflect.TypeOf((*ReconfigVM_Task)(nil)).Elem() -} - -type ReconfigVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigurationSatisfiable ReconfigurationSatisfiableRequestType - -func init() { - t["ReconfigurationSatisfiable"] = reflect.TypeOf((*ReconfigurationSatisfiable)(nil)).Elem() -} - -type ReconfigurationSatisfiableRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pcbs []VsanPolicyChangeBatch `xml:"pcbs"` - IgnoreSatisfiability *bool `xml:"ignoreSatisfiability"` -} - -func init() { - t["ReconfigurationSatisfiableRequestType"] = reflect.TypeOf((*ReconfigurationSatisfiableRequestType)(nil)).Elem() -} - -type ReconfigurationSatisfiableResponse struct { - Returnval []VsanPolicySatisfiability `xml:"returnval"` -} - -type ReconfigureAlarm ReconfigureAlarmRequestType - -func init() { - t["ReconfigureAlarm"] = reflect.TypeOf((*ReconfigureAlarm)(nil)).Elem() -} - -type ReconfigureAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseAlarmSpec `xml:"spec,typeattr"` -} - -func init() { - t["ReconfigureAlarmRequestType"] = reflect.TypeOf((*ReconfigureAlarmRequestType)(nil)).Elem() -} - -type ReconfigureAlarmResponse struct { -} - -type ReconfigureAutostart ReconfigureAutostartRequestType - -func init() { - t["ReconfigureAutostart"] = reflect.TypeOf((*ReconfigureAutostart)(nil)).Elem() -} - -type ReconfigureAutostartRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostAutoStartManagerConfig `xml:"spec"` -} - -func init() { - t["ReconfigureAutostartRequestType"] = reflect.TypeOf((*ReconfigureAutostartRequestType)(nil)).Elem() -} - -type ReconfigureAutostartResponse struct { -} - -type ReconfigureClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec ClusterConfigSpec `xml:"spec"` - Modify bool `xml:"modify"` -} - -func init() { - t["ReconfigureClusterRequestType"] = reflect.TypeOf((*ReconfigureClusterRequestType)(nil)).Elem() -} - -type ReconfigureCluster_Task ReconfigureClusterRequestType - -func init() { - t["ReconfigureCluster_Task"] = reflect.TypeOf((*ReconfigureCluster_Task)(nil)).Elem() -} - -type ReconfigureCluster_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureComputeResourceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseComputeResourceConfigSpec `xml:"spec,typeattr"` - Modify bool `xml:"modify"` -} - -func init() { - t["ReconfigureComputeResourceRequestType"] = reflect.TypeOf((*ReconfigureComputeResourceRequestType)(nil)).Elem() -} - -type ReconfigureComputeResource_Task ReconfigureComputeResourceRequestType - -func init() { - t["ReconfigureComputeResource_Task"] = reflect.TypeOf((*ReconfigureComputeResource_Task)(nil)).Elem() -} - -type ReconfigureComputeResource_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureDVPortRequestType struct { - This ManagedObjectReference `xml:"_this"` - Port []DVPortConfigSpec `xml:"port"` -} - -func init() { - t["ReconfigureDVPortRequestType"] = reflect.TypeOf((*ReconfigureDVPortRequestType)(nil)).Elem() -} - -type ReconfigureDVPort_Task ReconfigureDVPortRequestType - -func init() { - t["ReconfigureDVPort_Task"] = reflect.TypeOf((*ReconfigureDVPort_Task)(nil)).Elem() -} - -type ReconfigureDVPort_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureDVPortgroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec DVPortgroupConfigSpec `xml:"spec"` -} - -func init() { - t["ReconfigureDVPortgroupRequestType"] = reflect.TypeOf((*ReconfigureDVPortgroupRequestType)(nil)).Elem() -} - -type ReconfigureDVPortgroup_Task ReconfigureDVPortgroupRequestType - -func init() { - t["ReconfigureDVPortgroup_Task"] = reflect.TypeOf((*ReconfigureDVPortgroup_Task)(nil)).Elem() -} - -type ReconfigureDVPortgroup_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureDatacenterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec DatacenterConfigSpec `xml:"spec"` - Modify bool `xml:"modify"` -} - -func init() { - t["ReconfigureDatacenterRequestType"] = reflect.TypeOf((*ReconfigureDatacenterRequestType)(nil)).Elem() -} - -type ReconfigureDatacenter_Task ReconfigureDatacenterRequestType - -func init() { - t["ReconfigureDatacenter_Task"] = reflect.TypeOf((*ReconfigureDatacenter_Task)(nil)).Elem() -} - -type ReconfigureDatacenter_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureDomObject ReconfigureDomObjectRequestType - -func init() { - t["ReconfigureDomObject"] = reflect.TypeOf((*ReconfigureDomObject)(nil)).Elem() -} - -type ReconfigureDomObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuid string `xml:"uuid"` - Policy string `xml:"policy"` -} - -func init() { - t["ReconfigureDomObjectRequestType"] = reflect.TypeOf((*ReconfigureDomObjectRequestType)(nil)).Elem() -} - -type ReconfigureDomObjectResponse struct { -} - -type ReconfigureDvsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseDVSConfigSpec `xml:"spec,typeattr"` -} - -func init() { - t["ReconfigureDvsRequestType"] = reflect.TypeOf((*ReconfigureDvsRequestType)(nil)).Elem() -} - -type ReconfigureDvs_Task ReconfigureDvsRequestType - -func init() { - t["ReconfigureDvs_Task"] = reflect.TypeOf((*ReconfigureDvs_Task)(nil)).Elem() -} - -type ReconfigureDvs_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureHostForDASRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ReconfigureHostForDASRequestType"] = reflect.TypeOf((*ReconfigureHostForDASRequestType)(nil)).Elem() -} - -type ReconfigureHostForDAS_Task ReconfigureHostForDASRequestType - -func init() { - t["ReconfigureHostForDAS_Task"] = reflect.TypeOf((*ReconfigureHostForDAS_Task)(nil)).Elem() -} - -type ReconfigureHostForDAS_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReconfigureScheduledTask ReconfigureScheduledTaskRequestType - -func init() { - t["ReconfigureScheduledTask"] = reflect.TypeOf((*ReconfigureScheduledTask)(nil)).Elem() -} - -type ReconfigureScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec BaseScheduledTaskSpec `xml:"spec,typeattr"` -} - -func init() { - t["ReconfigureScheduledTaskRequestType"] = reflect.TypeOf((*ReconfigureScheduledTaskRequestType)(nil)).Elem() -} - -type ReconfigureScheduledTaskResponse struct { -} - -type ReconfigureServiceConsoleReservation ReconfigureServiceConsoleReservationRequestType - -func init() { - t["ReconfigureServiceConsoleReservation"] = reflect.TypeOf((*ReconfigureServiceConsoleReservation)(nil)).Elem() -} - -type ReconfigureServiceConsoleReservationRequestType struct { - This ManagedObjectReference `xml:"_this"` - CfgBytes int64 `xml:"cfgBytes"` -} - -func init() { - t["ReconfigureServiceConsoleReservationRequestType"] = reflect.TypeOf((*ReconfigureServiceConsoleReservationRequestType)(nil)).Elem() -} - -type ReconfigureServiceConsoleReservationResponse struct { -} - -type ReconfigureSnmpAgent ReconfigureSnmpAgentRequestType - -func init() { - t["ReconfigureSnmpAgent"] = reflect.TypeOf((*ReconfigureSnmpAgent)(nil)).Elem() -} - -type ReconfigureSnmpAgentRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec HostSnmpConfigSpec `xml:"spec"` -} - -func init() { - t["ReconfigureSnmpAgentRequestType"] = reflect.TypeOf((*ReconfigureSnmpAgentRequestType)(nil)).Elem() -} - -type ReconfigureSnmpAgentResponse struct { -} - -type ReconfigureVirtualMachineReservation ReconfigureVirtualMachineReservationRequestType - -func init() { - t["ReconfigureVirtualMachineReservation"] = reflect.TypeOf((*ReconfigureVirtualMachineReservation)(nil)).Elem() -} - -type ReconfigureVirtualMachineReservationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VirtualMachineMemoryReservationSpec `xml:"spec"` -} - -func init() { - t["ReconfigureVirtualMachineReservationRequestType"] = reflect.TypeOf((*ReconfigureVirtualMachineReservationRequestType)(nil)).Elem() -} - -type ReconfigureVirtualMachineReservationResponse struct { -} - -type ReconnectHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - CnxSpec *HostConnectSpec `xml:"cnxSpec,omitempty"` - ReconnectSpec *HostSystemReconnectSpec `xml:"reconnectSpec,omitempty"` -} - -func init() { - t["ReconnectHostRequestType"] = reflect.TypeOf((*ReconnectHostRequestType)(nil)).Elem() -} - -type ReconnectHost_Task ReconnectHostRequestType - -func init() { - t["ReconnectHost_Task"] = reflect.TypeOf((*ReconnectHost_Task)(nil)).Elem() -} - -type ReconnectHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RecordReplayDisabled struct { - VimFault -} - -func init() { - t["RecordReplayDisabled"] = reflect.TypeOf((*RecordReplayDisabled)(nil)).Elem() -} - -type RecordReplayDisabledFault RecordReplayDisabled - -func init() { - t["RecordReplayDisabledFault"] = reflect.TypeOf((*RecordReplayDisabledFault)(nil)).Elem() -} - -type RecoveryEvent struct { - DvsEvent - - HostName string `xml:"hostName"` - PortKey string `xml:"portKey"` - DvsUuid string `xml:"dvsUuid,omitempty"` - Vnic string `xml:"vnic,omitempty"` -} - -func init() { - t["RecoveryEvent"] = reflect.TypeOf((*RecoveryEvent)(nil)).Elem() -} - -type RectifyDvsHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` -} - -func init() { - t["RectifyDvsHostRequestType"] = reflect.TypeOf((*RectifyDvsHostRequestType)(nil)).Elem() -} - -type RectifyDvsHost_Task RectifyDvsHostRequestType - -func init() { - t["RectifyDvsHost_Task"] = reflect.TypeOf((*RectifyDvsHost_Task)(nil)).Elem() -} - -type RectifyDvsHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RectifyDvsOnHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["RectifyDvsOnHostRequestType"] = reflect.TypeOf((*RectifyDvsOnHostRequestType)(nil)).Elem() -} - -type RectifyDvsOnHost_Task RectifyDvsOnHostRequestType - -func init() { - t["RectifyDvsOnHost_Task"] = reflect.TypeOf((*RectifyDvsOnHost_Task)(nil)).Elem() -} - -type RectifyDvsOnHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RecurrentTaskScheduler struct { - TaskScheduler - - Interval int32 `xml:"interval"` -} - -func init() { - t["RecurrentTaskScheduler"] = reflect.TypeOf((*RecurrentTaskScheduler)(nil)).Elem() -} - -type Refresh RefreshRequestType - -func init() { - t["Refresh"] = reflect.TypeOf((*Refresh)(nil)).Elem() -} - -type RefreshDVPortState RefreshDVPortStateRequestType - -func init() { - t["RefreshDVPortState"] = reflect.TypeOf((*RefreshDVPortState)(nil)).Elem() -} - -type RefreshDVPortStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - PortKeys []string `xml:"portKeys,omitempty"` -} - -func init() { - t["RefreshDVPortStateRequestType"] = reflect.TypeOf((*RefreshDVPortStateRequestType)(nil)).Elem() -} - -type RefreshDVPortStateResponse struct { -} - -type RefreshDatastore RefreshDatastoreRequestType - -func init() { - t["RefreshDatastore"] = reflect.TypeOf((*RefreshDatastore)(nil)).Elem() -} - -type RefreshDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshDatastoreRequestType"] = reflect.TypeOf((*RefreshDatastoreRequestType)(nil)).Elem() -} - -type RefreshDatastoreResponse struct { -} - -type RefreshDatastoreStorageInfo RefreshDatastoreStorageInfoRequestType - -func init() { - t["RefreshDatastoreStorageInfo"] = reflect.TypeOf((*RefreshDatastoreStorageInfo)(nil)).Elem() -} - -type RefreshDatastoreStorageInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshDatastoreStorageInfoRequestType"] = reflect.TypeOf((*RefreshDatastoreStorageInfoRequestType)(nil)).Elem() -} - -type RefreshDatastoreStorageInfoResponse struct { -} - -type RefreshDateTimeSystem RefreshDateTimeSystemRequestType - -func init() { - t["RefreshDateTimeSystem"] = reflect.TypeOf((*RefreshDateTimeSystem)(nil)).Elem() -} - -type RefreshDateTimeSystemRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshDateTimeSystemRequestType"] = reflect.TypeOf((*RefreshDateTimeSystemRequestType)(nil)).Elem() -} - -type RefreshDateTimeSystemResponse struct { -} - -type RefreshFirewall RefreshFirewallRequestType - -func init() { - t["RefreshFirewall"] = reflect.TypeOf((*RefreshFirewall)(nil)).Elem() -} - -type RefreshFirewallRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshFirewallRequestType"] = reflect.TypeOf((*RefreshFirewallRequestType)(nil)).Elem() -} - -type RefreshFirewallResponse struct { -} - -type RefreshGraphicsManager RefreshGraphicsManagerRequestType - -func init() { - t["RefreshGraphicsManager"] = reflect.TypeOf((*RefreshGraphicsManager)(nil)).Elem() -} - -type RefreshGraphicsManagerRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshGraphicsManagerRequestType"] = reflect.TypeOf((*RefreshGraphicsManagerRequestType)(nil)).Elem() -} - -type RefreshGraphicsManagerResponse struct { -} - -type RefreshHealthStatusSystem RefreshHealthStatusSystemRequestType - -func init() { - t["RefreshHealthStatusSystem"] = reflect.TypeOf((*RefreshHealthStatusSystem)(nil)).Elem() -} - -type RefreshHealthStatusSystemRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshHealthStatusSystemRequestType"] = reflect.TypeOf((*RefreshHealthStatusSystemRequestType)(nil)).Elem() -} - -type RefreshHealthStatusSystemResponse struct { -} - -type RefreshNetworkSystem RefreshNetworkSystemRequestType - -func init() { - t["RefreshNetworkSystem"] = reflect.TypeOf((*RefreshNetworkSystem)(nil)).Elem() -} - -type RefreshNetworkSystemRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshNetworkSystemRequestType"] = reflect.TypeOf((*RefreshNetworkSystemRequestType)(nil)).Elem() -} - -type RefreshNetworkSystemResponse struct { -} - -type RefreshRecommendation RefreshRecommendationRequestType - -func init() { - t["RefreshRecommendation"] = reflect.TypeOf((*RefreshRecommendation)(nil)).Elem() -} - -type RefreshRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshRecommendationRequestType"] = reflect.TypeOf((*RefreshRecommendationRequestType)(nil)).Elem() -} - -type RefreshRecommendationResponse struct { -} - -type RefreshRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshRequestType"] = reflect.TypeOf((*RefreshRequestType)(nil)).Elem() -} - -type RefreshResponse struct { -} - -type RefreshRuntime RefreshRuntimeRequestType - -func init() { - t["RefreshRuntime"] = reflect.TypeOf((*RefreshRuntime)(nil)).Elem() -} - -type RefreshRuntimeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshRuntimeRequestType"] = reflect.TypeOf((*RefreshRuntimeRequestType)(nil)).Elem() -} - -type RefreshRuntimeResponse struct { -} - -type RefreshServices RefreshServicesRequestType - -func init() { - t["RefreshServices"] = reflect.TypeOf((*RefreshServices)(nil)).Elem() -} - -type RefreshServicesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshServicesRequestType"] = reflect.TypeOf((*RefreshServicesRequestType)(nil)).Elem() -} - -type RefreshServicesResponse struct { -} - -type RefreshStorageDrsRecommendation RefreshStorageDrsRecommendationRequestType - -func init() { - t["RefreshStorageDrsRecommendation"] = reflect.TypeOf((*RefreshStorageDrsRecommendation)(nil)).Elem() -} - -type RefreshStorageDrsRecommendationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pod ManagedObjectReference `xml:"pod"` -} - -func init() { - t["RefreshStorageDrsRecommendationRequestType"] = reflect.TypeOf((*RefreshStorageDrsRecommendationRequestType)(nil)).Elem() -} - -type RefreshStorageDrsRecommendationResponse struct { -} - -type RefreshStorageDrsRecommendationsForPodRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pod ManagedObjectReference `xml:"pod"` -} - -func init() { - t["RefreshStorageDrsRecommendationsForPodRequestType"] = reflect.TypeOf((*RefreshStorageDrsRecommendationsForPodRequestType)(nil)).Elem() -} - -type RefreshStorageDrsRecommendationsForPod_Task RefreshStorageDrsRecommendationsForPodRequestType - -func init() { - t["RefreshStorageDrsRecommendationsForPod_Task"] = reflect.TypeOf((*RefreshStorageDrsRecommendationsForPod_Task)(nil)).Elem() -} - -type RefreshStorageDrsRecommendationsForPod_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RefreshStorageInfo RefreshStorageInfoRequestType - -func init() { - t["RefreshStorageInfo"] = reflect.TypeOf((*RefreshStorageInfo)(nil)).Elem() -} - -type RefreshStorageInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshStorageInfoRequestType"] = reflect.TypeOf((*RefreshStorageInfoRequestType)(nil)).Elem() -} - -type RefreshStorageInfoResponse struct { -} - -type RefreshStorageSystem RefreshStorageSystemRequestType - -func init() { - t["RefreshStorageSystem"] = reflect.TypeOf((*RefreshStorageSystem)(nil)).Elem() -} - -type RefreshStorageSystemRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RefreshStorageSystemRequestType"] = reflect.TypeOf((*RefreshStorageSystemRequestType)(nil)).Elem() -} - -type RefreshStorageSystemResponse struct { -} - -type RegisterChildVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Path string `xml:"path"` - Name string `xml:"name,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["RegisterChildVMRequestType"] = reflect.TypeOf((*RegisterChildVMRequestType)(nil)).Elem() -} - -type RegisterChildVM_Task RegisterChildVMRequestType - -func init() { - t["RegisterChildVM_Task"] = reflect.TypeOf((*RegisterChildVM_Task)(nil)).Elem() -} - -type RegisterChildVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RegisterDisk RegisterDiskRequestType - -func init() { - t["RegisterDisk"] = reflect.TypeOf((*RegisterDisk)(nil)).Elem() -} - -type RegisterDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Path string `xml:"path"` - Name string `xml:"name,omitempty"` -} - -func init() { - t["RegisterDiskRequestType"] = reflect.TypeOf((*RegisterDiskRequestType)(nil)).Elem() -} - -type RegisterDiskResponse struct { - Returnval VStorageObject `xml:"returnval"` -} - -type RegisterExtension RegisterExtensionRequestType - -func init() { - t["RegisterExtension"] = reflect.TypeOf((*RegisterExtension)(nil)).Elem() -} - -type RegisterExtensionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Extension Extension `xml:"extension"` -} - -func init() { - t["RegisterExtensionRequestType"] = reflect.TypeOf((*RegisterExtensionRequestType)(nil)).Elem() -} - -type RegisterExtensionResponse struct { -} - -type RegisterHealthUpdateProvider RegisterHealthUpdateProviderRequestType - -func init() { - t["RegisterHealthUpdateProvider"] = reflect.TypeOf((*RegisterHealthUpdateProvider)(nil)).Elem() -} - -type RegisterHealthUpdateProviderRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - HealthUpdateInfo []HealthUpdateInfo `xml:"healthUpdateInfo,omitempty"` -} - -func init() { - t["RegisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*RegisterHealthUpdateProviderRequestType)(nil)).Elem() -} - -type RegisterHealthUpdateProviderResponse struct { - Returnval string `xml:"returnval"` -} - -type RegisterKmipServer RegisterKmipServerRequestType - -func init() { - t["RegisterKmipServer"] = reflect.TypeOf((*RegisterKmipServer)(nil)).Elem() -} - -type RegisterKmipServerRequestType struct { - This ManagedObjectReference `xml:"_this"` - Server KmipServerSpec `xml:"server"` -} - -func init() { - t["RegisterKmipServerRequestType"] = reflect.TypeOf((*RegisterKmipServerRequestType)(nil)).Elem() -} - -type RegisterKmipServerResponse struct { -} - -type RegisterKmsCluster RegisterKmsClusterRequestType - -func init() { - t["RegisterKmsCluster"] = reflect.TypeOf((*RegisterKmsCluster)(nil)).Elem() -} - -type RegisterKmsClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - ClusterId KeyProviderId `xml:"clusterId"` - ManagementType string `xml:"managementType,omitempty"` -} - -func init() { - t["RegisterKmsClusterRequestType"] = reflect.TypeOf((*RegisterKmsClusterRequestType)(nil)).Elem() -} - -type RegisterKmsClusterResponse struct { -} - -type RegisterVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Path string `xml:"path"` - Name string `xml:"name,omitempty"` - AsTemplate bool `xml:"asTemplate"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["RegisterVMRequestType"] = reflect.TypeOf((*RegisterVMRequestType)(nil)).Elem() -} - -type RegisterVM_Task RegisterVMRequestType - -func init() { - t["RegisterVM_Task"] = reflect.TypeOf((*RegisterVM_Task)(nil)).Elem() -} - -type RegisterVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type Relation struct { - DynamicData - - Constraint string `xml:"constraint,omitempty"` - Name string `xml:"name"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["Relation"] = reflect.TypeOf((*Relation)(nil)).Elem() -} - -type ReleaseCredentialsInGuest ReleaseCredentialsInGuestRequestType - -func init() { - t["ReleaseCredentialsInGuest"] = reflect.TypeOf((*ReleaseCredentialsInGuest)(nil)).Elem() -} - -type ReleaseCredentialsInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` -} - -func init() { - t["ReleaseCredentialsInGuestRequestType"] = reflect.TypeOf((*ReleaseCredentialsInGuestRequestType)(nil)).Elem() -} - -type ReleaseCredentialsInGuestResponse struct { -} - -type ReleaseIpAllocation ReleaseIpAllocationRequestType - -func init() { - t["ReleaseIpAllocation"] = reflect.TypeOf((*ReleaseIpAllocation)(nil)).Elem() -} - -type ReleaseIpAllocationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - PoolId int32 `xml:"poolId"` - AllocationId string `xml:"allocationId"` -} - -func init() { - t["ReleaseIpAllocationRequestType"] = reflect.TypeOf((*ReleaseIpAllocationRequestType)(nil)).Elem() -} - -type ReleaseIpAllocationResponse struct { -} - -type ReleaseManagedSnapshot ReleaseManagedSnapshotRequestType - -func init() { - t["ReleaseManagedSnapshot"] = reflect.TypeOf((*ReleaseManagedSnapshot)(nil)).Elem() -} - -type ReleaseManagedSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vdisk string `xml:"vdisk"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["ReleaseManagedSnapshotRequestType"] = reflect.TypeOf((*ReleaseManagedSnapshotRequestType)(nil)).Elem() -} - -type ReleaseManagedSnapshotResponse struct { -} - -type Reload ReloadRequestType - -func init() { - t["Reload"] = reflect.TypeOf((*Reload)(nil)).Elem() -} - -type ReloadRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ReloadRequestType"] = reflect.TypeOf((*ReloadRequestType)(nil)).Elem() -} - -type ReloadResponse struct { -} - -type RelocateVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VirtualMachineRelocateSpec `xml:"spec"` - Priority VirtualMachineMovePriority `xml:"priority,omitempty"` -} - -func init() { - t["RelocateVMRequestType"] = reflect.TypeOf((*RelocateVMRequestType)(nil)).Elem() -} - -type RelocateVM_Task RelocateVMRequestType - -func init() { - t["RelocateVM_Task"] = reflect.TypeOf((*RelocateVM_Task)(nil)).Elem() -} - -type RelocateVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RelocateVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Spec VslmRelocateSpec `xml:"spec"` -} - -func init() { - t["RelocateVStorageObjectRequestType"] = reflect.TypeOf((*RelocateVStorageObjectRequestType)(nil)).Elem() -} - -type RelocateVStorageObject_Task RelocateVStorageObjectRequestType - -func init() { - t["RelocateVStorageObject_Task"] = reflect.TypeOf((*RelocateVStorageObject_Task)(nil)).Elem() -} - -type RelocateVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoteDeviceNotSupported struct { - DeviceNotSupported -} - -func init() { - t["RemoteDeviceNotSupported"] = reflect.TypeOf((*RemoteDeviceNotSupported)(nil)).Elem() -} - -type RemoteDeviceNotSupportedFault RemoteDeviceNotSupported - -func init() { - t["RemoteDeviceNotSupportedFault"] = reflect.TypeOf((*RemoteDeviceNotSupportedFault)(nil)).Elem() -} - -type RemoteTSMEnabledEvent struct { - HostEvent -} - -func init() { - t["RemoteTSMEnabledEvent"] = reflect.TypeOf((*RemoteTSMEnabledEvent)(nil)).Elem() -} - -type RemoveAlarm RemoveAlarmRequestType - -func init() { - t["RemoveAlarm"] = reflect.TypeOf((*RemoveAlarm)(nil)).Elem() -} - -type RemoveAlarmRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RemoveAlarmRequestType"] = reflect.TypeOf((*RemoveAlarmRequestType)(nil)).Elem() -} - -type RemoveAlarmResponse struct { -} - -type RemoveAllSnapshotsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Consolidate *bool `xml:"consolidate"` -} - -func init() { - t["RemoveAllSnapshotsRequestType"] = reflect.TypeOf((*RemoveAllSnapshotsRequestType)(nil)).Elem() -} - -type RemoveAllSnapshots_Task RemoveAllSnapshotsRequestType - -func init() { - t["RemoveAllSnapshots_Task"] = reflect.TypeOf((*RemoveAllSnapshots_Task)(nil)).Elem() -} - -type RemoveAllSnapshots_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoveAssignedLicense RemoveAssignedLicenseRequestType - -func init() { - t["RemoveAssignedLicense"] = reflect.TypeOf((*RemoveAssignedLicense)(nil)).Elem() -} - -type RemoveAssignedLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - EntityId string `xml:"entityId"` -} - -func init() { - t["RemoveAssignedLicenseRequestType"] = reflect.TypeOf((*RemoveAssignedLicenseRequestType)(nil)).Elem() -} - -type RemoveAssignedLicenseResponse struct { -} - -type RemoveAuthorizationRole RemoveAuthorizationRoleRequestType - -func init() { - t["RemoveAuthorizationRole"] = reflect.TypeOf((*RemoveAuthorizationRole)(nil)).Elem() -} - -type RemoveAuthorizationRoleRequestType struct { - This ManagedObjectReference `xml:"_this"` - RoleId int32 `xml:"roleId"` - FailIfUsed bool `xml:"failIfUsed"` -} - -func init() { - t["RemoveAuthorizationRoleRequestType"] = reflect.TypeOf((*RemoveAuthorizationRoleRequestType)(nil)).Elem() -} - -type RemoveAuthorizationRoleResponse struct { -} - -type RemoveCustomFieldDef RemoveCustomFieldDefRequestType - -func init() { - t["RemoveCustomFieldDef"] = reflect.TypeOf((*RemoveCustomFieldDef)(nil)).Elem() -} - -type RemoveCustomFieldDefRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key int32 `xml:"key"` -} - -func init() { - t["RemoveCustomFieldDefRequestType"] = reflect.TypeOf((*RemoveCustomFieldDefRequestType)(nil)).Elem() -} - -type RemoveCustomFieldDefResponse struct { -} - -type RemoveDatastore RemoveDatastoreRequestType - -func init() { - t["RemoveDatastore"] = reflect.TypeOf((*RemoveDatastore)(nil)).Elem() -} - -type RemoveDatastoreExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore []ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RemoveDatastoreExRequestType"] = reflect.TypeOf((*RemoveDatastoreExRequestType)(nil)).Elem() -} - -type RemoveDatastoreEx_Task RemoveDatastoreExRequestType - -func init() { - t["RemoveDatastoreEx_Task"] = reflect.TypeOf((*RemoveDatastoreEx_Task)(nil)).Elem() -} - -type RemoveDatastoreEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoveDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RemoveDatastoreRequestType"] = reflect.TypeOf((*RemoveDatastoreRequestType)(nil)).Elem() -} - -type RemoveDatastoreResponse struct { -} - -type RemoveDiskMappingRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mapping []VsanHostDiskMapping `xml:"mapping"` - MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` - Timeout int32 `xml:"timeout,omitempty"` -} - -func init() { - t["RemoveDiskMappingRequestType"] = reflect.TypeOf((*RemoveDiskMappingRequestType)(nil)).Elem() -} - -type RemoveDiskMapping_Task RemoveDiskMappingRequestType - -func init() { - t["RemoveDiskMapping_Task"] = reflect.TypeOf((*RemoveDiskMapping_Task)(nil)).Elem() -} - -type RemoveDiskMapping_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoveDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Disk []HostScsiDisk `xml:"disk"` - MaintenanceSpec *HostMaintenanceSpec `xml:"maintenanceSpec,omitempty"` - Timeout int32 `xml:"timeout,omitempty"` -} - -func init() { - t["RemoveDiskRequestType"] = reflect.TypeOf((*RemoveDiskRequestType)(nil)).Elem() -} - -type RemoveDisk_Task RemoveDiskRequestType - -func init() { - t["RemoveDisk_Task"] = reflect.TypeOf((*RemoveDisk_Task)(nil)).Elem() -} - -type RemoveDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoveEntityPermission RemoveEntityPermissionRequestType - -func init() { - t["RemoveEntityPermission"] = reflect.TypeOf((*RemoveEntityPermission)(nil)).Elem() -} - -type RemoveEntityPermissionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - User string `xml:"user"` - IsGroup bool `xml:"isGroup"` -} - -func init() { - t["RemoveEntityPermissionRequestType"] = reflect.TypeOf((*RemoveEntityPermissionRequestType)(nil)).Elem() -} - -type RemoveEntityPermissionResponse struct { -} - -type RemoveFailed struct { - VimFault -} - -func init() { - t["RemoveFailed"] = reflect.TypeOf((*RemoveFailed)(nil)).Elem() -} - -type RemoveFailedFault RemoveFailed - -func init() { - t["RemoveFailedFault"] = reflect.TypeOf((*RemoveFailedFault)(nil)).Elem() -} - -type RemoveFilter RemoveFilterRequestType - -func init() { - t["RemoveFilter"] = reflect.TypeOf((*RemoveFilter)(nil)).Elem() -} - -type RemoveFilterEntities RemoveFilterEntitiesRequestType - -func init() { - t["RemoveFilterEntities"] = reflect.TypeOf((*RemoveFilterEntities)(nil)).Elem() -} - -type RemoveFilterEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - Entities []ManagedObjectReference `xml:"entities,omitempty"` -} - -func init() { - t["RemoveFilterEntitiesRequestType"] = reflect.TypeOf((*RemoveFilterEntitiesRequestType)(nil)).Elem() -} - -type RemoveFilterEntitiesResponse struct { -} - -type RemoveFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` -} - -func init() { - t["RemoveFilterRequestType"] = reflect.TypeOf((*RemoveFilterRequestType)(nil)).Elem() -} - -type RemoveFilterResponse struct { -} - -type RemoveGroup RemoveGroupRequestType - -func init() { - t["RemoveGroup"] = reflect.TypeOf((*RemoveGroup)(nil)).Elem() -} - -type RemoveGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - GroupName string `xml:"groupName"` -} - -func init() { - t["RemoveGroupRequestType"] = reflect.TypeOf((*RemoveGroupRequestType)(nil)).Elem() -} - -type RemoveGroupResponse struct { -} - -type RemoveGuestAlias RemoveGuestAliasRequestType - -func init() { - t["RemoveGuestAlias"] = reflect.TypeOf((*RemoveGuestAlias)(nil)).Elem() -} - -type RemoveGuestAliasByCert RemoveGuestAliasByCertRequestType - -func init() { - t["RemoveGuestAliasByCert"] = reflect.TypeOf((*RemoveGuestAliasByCert)(nil)).Elem() -} - -type RemoveGuestAliasByCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Username string `xml:"username"` - Base64Cert string `xml:"base64Cert"` -} - -func init() { - t["RemoveGuestAliasByCertRequestType"] = reflect.TypeOf((*RemoveGuestAliasByCertRequestType)(nil)).Elem() -} - -type RemoveGuestAliasByCertResponse struct { -} - -type RemoveGuestAliasRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Username string `xml:"username"` - Base64Cert string `xml:"base64Cert"` - Subject BaseGuestAuthSubject `xml:"subject,typeattr"` -} - -func init() { - t["RemoveGuestAliasRequestType"] = reflect.TypeOf((*RemoveGuestAliasRequestType)(nil)).Elem() -} - -type RemoveGuestAliasResponse struct { -} - -type RemoveInternetScsiSendTargets RemoveInternetScsiSendTargetsRequestType - -func init() { - t["RemoveInternetScsiSendTargets"] = reflect.TypeOf((*RemoveInternetScsiSendTargets)(nil)).Elem() -} - -type RemoveInternetScsiSendTargetsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - Targets []HostInternetScsiHbaSendTarget `xml:"targets"` - Force *bool `xml:"force"` -} - -func init() { - t["RemoveInternetScsiSendTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiSendTargetsRequestType)(nil)).Elem() -} - -type RemoveInternetScsiSendTargetsResponse struct { -} - -type RemoveInternetScsiStaticTargets RemoveInternetScsiStaticTargetsRequestType - -func init() { - t["RemoveInternetScsiStaticTargets"] = reflect.TypeOf((*RemoveInternetScsiStaticTargets)(nil)).Elem() -} - -type RemoveInternetScsiStaticTargetsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - Targets []HostInternetScsiHbaStaticTarget `xml:"targets"` -} - -func init() { - t["RemoveInternetScsiStaticTargetsRequestType"] = reflect.TypeOf((*RemoveInternetScsiStaticTargetsRequestType)(nil)).Elem() -} - -type RemoveInternetScsiStaticTargetsResponse struct { -} - -type RemoveKey RemoveKeyRequestType - -func init() { - t["RemoveKey"] = reflect.TypeOf((*RemoveKey)(nil)).Elem() -} - -type RemoveKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key CryptoKeyId `xml:"key"` - Force bool `xml:"force"` -} - -func init() { - t["RemoveKeyRequestType"] = reflect.TypeOf((*RemoveKeyRequestType)(nil)).Elem() -} - -type RemoveKeyResponse struct { -} - -type RemoveKeys RemoveKeysRequestType - -func init() { - t["RemoveKeys"] = reflect.TypeOf((*RemoveKeys)(nil)).Elem() -} - -type RemoveKeysRequestType struct { - This ManagedObjectReference `xml:"_this"` - Keys []CryptoKeyId `xml:"keys,omitempty"` - Force bool `xml:"force"` -} - -func init() { - t["RemoveKeysRequestType"] = reflect.TypeOf((*RemoveKeysRequestType)(nil)).Elem() -} - -type RemoveKeysResponse struct { - Returnval []CryptoKeyResult `xml:"returnval,omitempty"` -} - -type RemoveKmipServer RemoveKmipServerRequestType - -func init() { - t["RemoveKmipServer"] = reflect.TypeOf((*RemoveKmipServer)(nil)).Elem() -} - -type RemoveKmipServerRequestType struct { - This ManagedObjectReference `xml:"_this"` - ClusterId KeyProviderId `xml:"clusterId"` - ServerName string `xml:"serverName"` -} - -func init() { - t["RemoveKmipServerRequestType"] = reflect.TypeOf((*RemoveKmipServerRequestType)(nil)).Elem() -} - -type RemoveKmipServerResponse struct { -} - -type RemoveLicense RemoveLicenseRequestType - -func init() { - t["RemoveLicense"] = reflect.TypeOf((*RemoveLicense)(nil)).Elem() -} - -type RemoveLicenseLabel RemoveLicenseLabelRequestType - -func init() { - t["RemoveLicenseLabel"] = reflect.TypeOf((*RemoveLicenseLabel)(nil)).Elem() -} - -type RemoveLicenseLabelRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` - LabelKey string `xml:"labelKey"` -} - -func init() { - t["RemoveLicenseLabelRequestType"] = reflect.TypeOf((*RemoveLicenseLabelRequestType)(nil)).Elem() -} - -type RemoveLicenseLabelResponse struct { -} - -type RemoveLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` -} - -func init() { - t["RemoveLicenseRequestType"] = reflect.TypeOf((*RemoveLicenseRequestType)(nil)).Elem() -} - -type RemoveLicenseResponse struct { -} - -type RemoveMonitoredEntities RemoveMonitoredEntitiesRequestType - -func init() { - t["RemoveMonitoredEntities"] = reflect.TypeOf((*RemoveMonitoredEntities)(nil)).Elem() -} - -type RemoveMonitoredEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` - Entities []ManagedObjectReference `xml:"entities,omitempty"` -} - -func init() { - t["RemoveMonitoredEntitiesRequestType"] = reflect.TypeOf((*RemoveMonitoredEntitiesRequestType)(nil)).Elem() -} - -type RemoveMonitoredEntitiesResponse struct { -} - -type RemoveNetworkResourcePool RemoveNetworkResourcePoolRequestType - -func init() { - t["RemoveNetworkResourcePool"] = reflect.TypeOf((*RemoveNetworkResourcePool)(nil)).Elem() -} - -type RemoveNetworkResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key []string `xml:"key"` -} - -func init() { - t["RemoveNetworkResourcePoolRequestType"] = reflect.TypeOf((*RemoveNetworkResourcePoolRequestType)(nil)).Elem() -} - -type RemoveNetworkResourcePoolResponse struct { -} - -type RemoveNvmeOverRdmaAdapter RemoveNvmeOverRdmaAdapterRequestType - -func init() { - t["RemoveNvmeOverRdmaAdapter"] = reflect.TypeOf((*RemoveNvmeOverRdmaAdapter)(nil)).Elem() -} - -type RemoveNvmeOverRdmaAdapterRequestType struct { - This ManagedObjectReference `xml:"_this"` - HbaDeviceName string `xml:"hbaDeviceName"` -} - -func init() { - t["RemoveNvmeOverRdmaAdapterRequestType"] = reflect.TypeOf((*RemoveNvmeOverRdmaAdapterRequestType)(nil)).Elem() -} - -type RemoveNvmeOverRdmaAdapterResponse struct { -} - -type RemovePerfInterval RemovePerfIntervalRequestType - -func init() { - t["RemovePerfInterval"] = reflect.TypeOf((*RemovePerfInterval)(nil)).Elem() -} - -type RemovePerfIntervalRequestType struct { - This ManagedObjectReference `xml:"_this"` - SamplePeriod int32 `xml:"samplePeriod"` -} - -func init() { - t["RemovePerfIntervalRequestType"] = reflect.TypeOf((*RemovePerfIntervalRequestType)(nil)).Elem() -} - -type RemovePerfIntervalResponse struct { -} - -type RemovePortGroup RemovePortGroupRequestType - -func init() { - t["RemovePortGroup"] = reflect.TypeOf((*RemovePortGroup)(nil)).Elem() -} - -type RemovePortGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - PgName string `xml:"pgName"` -} - -func init() { - t["RemovePortGroupRequestType"] = reflect.TypeOf((*RemovePortGroupRequestType)(nil)).Elem() -} - -type RemovePortGroupResponse struct { -} - -type RemoveScheduledTask RemoveScheduledTaskRequestType - -func init() { - t["RemoveScheduledTask"] = reflect.TypeOf((*RemoveScheduledTask)(nil)).Elem() -} - -type RemoveScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RemoveScheduledTaskRequestType"] = reflect.TypeOf((*RemoveScheduledTaskRequestType)(nil)).Elem() -} - -type RemoveScheduledTaskResponse struct { -} - -type RemoveServiceConsoleVirtualNic RemoveServiceConsoleVirtualNicRequestType - -func init() { - t["RemoveServiceConsoleVirtualNic"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNic)(nil)).Elem() -} - -type RemoveServiceConsoleVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` -} - -func init() { - t["RemoveServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RemoveServiceConsoleVirtualNicRequestType)(nil)).Elem() -} - -type RemoveServiceConsoleVirtualNicResponse struct { -} - -type RemoveSmartCardTrustAnchor RemoveSmartCardTrustAnchorRequestType - -func init() { - t["RemoveSmartCardTrustAnchor"] = reflect.TypeOf((*RemoveSmartCardTrustAnchor)(nil)).Elem() -} - -type RemoveSmartCardTrustAnchorByFingerprint RemoveSmartCardTrustAnchorByFingerprintRequestType - -func init() { - t["RemoveSmartCardTrustAnchorByFingerprint"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprint)(nil)).Elem() -} - -type RemoveSmartCardTrustAnchorByFingerprintRequestType struct { - This ManagedObjectReference `xml:"_this"` - Fingerprint string `xml:"fingerprint"` - Digest string `xml:"digest"` -} - -func init() { - t["RemoveSmartCardTrustAnchorByFingerprintRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorByFingerprintRequestType)(nil)).Elem() -} - -type RemoveSmartCardTrustAnchorByFingerprintResponse struct { -} - -type RemoveSmartCardTrustAnchorRequestType struct { - This ManagedObjectReference `xml:"_this"` - Issuer string `xml:"issuer"` - Serial string `xml:"serial"` -} - -func init() { - t["RemoveSmartCardTrustAnchorRequestType"] = reflect.TypeOf((*RemoveSmartCardTrustAnchorRequestType)(nil)).Elem() -} - -type RemoveSmartCardTrustAnchorResponse struct { -} - -type RemoveSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - RemoveChildren bool `xml:"removeChildren"` - Consolidate *bool `xml:"consolidate"` -} - -func init() { - t["RemoveSnapshotRequestType"] = reflect.TypeOf((*RemoveSnapshotRequestType)(nil)).Elem() -} - -type RemoveSnapshot_Task RemoveSnapshotRequestType - -func init() { - t["RemoveSnapshot_Task"] = reflect.TypeOf((*RemoveSnapshot_Task)(nil)).Elem() -} - -type RemoveSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RemoveSoftwareAdapter RemoveSoftwareAdapterRequestType - -func init() { - t["RemoveSoftwareAdapter"] = reflect.TypeOf((*RemoveSoftwareAdapter)(nil)).Elem() -} - -type RemoveSoftwareAdapterRequestType struct { - This ManagedObjectReference `xml:"_this"` - HbaDeviceName string `xml:"hbaDeviceName"` -} - -func init() { - t["RemoveSoftwareAdapterRequestType"] = reflect.TypeOf((*RemoveSoftwareAdapterRequestType)(nil)).Elem() -} - -type RemoveSoftwareAdapterResponse struct { -} - -type RemoveUser RemoveUserRequestType - -func init() { - t["RemoveUser"] = reflect.TypeOf((*RemoveUser)(nil)).Elem() -} - -type RemoveUserRequestType struct { - This ManagedObjectReference `xml:"_this"` - UserName string `xml:"userName"` -} - -func init() { - t["RemoveUserRequestType"] = reflect.TypeOf((*RemoveUserRequestType)(nil)).Elem() -} - -type RemoveUserResponse struct { -} - -type RemoveVirtualNic RemoveVirtualNicRequestType - -func init() { - t["RemoveVirtualNic"] = reflect.TypeOf((*RemoveVirtualNic)(nil)).Elem() -} - -type RemoveVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` -} - -func init() { - t["RemoveVirtualNicRequestType"] = reflect.TypeOf((*RemoveVirtualNicRequestType)(nil)).Elem() -} - -type RemoveVirtualNicResponse struct { -} - -type RemoveVirtualSwitch RemoveVirtualSwitchRequestType - -func init() { - t["RemoveVirtualSwitch"] = reflect.TypeOf((*RemoveVirtualSwitch)(nil)).Elem() -} - -type RemoveVirtualSwitchRequestType struct { - This ManagedObjectReference `xml:"_this"` - VswitchName string `xml:"vswitchName"` -} - -func init() { - t["RemoveVirtualSwitchRequestType"] = reflect.TypeOf((*RemoveVirtualSwitchRequestType)(nil)).Elem() -} - -type RemoveVirtualSwitchResponse struct { -} - -type RenameCustomFieldDef RenameCustomFieldDefRequestType - -func init() { - t["RenameCustomFieldDef"] = reflect.TypeOf((*RenameCustomFieldDef)(nil)).Elem() -} - -type RenameCustomFieldDefRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key int32 `xml:"key"` - Name string `xml:"name"` -} - -func init() { - t["RenameCustomFieldDefRequestType"] = reflect.TypeOf((*RenameCustomFieldDefRequestType)(nil)).Elem() -} - -type RenameCustomFieldDefResponse struct { -} - -type RenameCustomizationSpec RenameCustomizationSpecRequestType - -func init() { - t["RenameCustomizationSpec"] = reflect.TypeOf((*RenameCustomizationSpec)(nil)).Elem() -} - -type RenameCustomizationSpecRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - NewName string `xml:"newName"` -} - -func init() { - t["RenameCustomizationSpecRequestType"] = reflect.TypeOf((*RenameCustomizationSpecRequestType)(nil)).Elem() -} - -type RenameCustomizationSpecResponse struct { -} - -type RenameDatastore RenameDatastoreRequestType - -func init() { - t["RenameDatastore"] = reflect.TypeOf((*RenameDatastore)(nil)).Elem() -} - -type RenameDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - NewName string `xml:"newName"` -} - -func init() { - t["RenameDatastoreRequestType"] = reflect.TypeOf((*RenameDatastoreRequestType)(nil)).Elem() -} - -type RenameDatastoreResponse struct { -} - -type RenameRequestType struct { - This ManagedObjectReference `xml:"_this"` - NewName string `xml:"newName"` -} - -func init() { - t["RenameRequestType"] = reflect.TypeOf((*RenameRequestType)(nil)).Elem() -} - -type RenameSnapshot RenameSnapshotRequestType - -func init() { - t["RenameSnapshot"] = reflect.TypeOf((*RenameSnapshot)(nil)).Elem() -} - -type RenameSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["RenameSnapshotRequestType"] = reflect.TypeOf((*RenameSnapshotRequestType)(nil)).Elem() -} - -type RenameSnapshotResponse struct { -} - -type RenameVStorageObject RenameVStorageObjectRequestType - -func init() { - t["RenameVStorageObject"] = reflect.TypeOf((*RenameVStorageObject)(nil)).Elem() -} - -type RenameVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Name string `xml:"name"` -} - -func init() { - t["RenameVStorageObjectRequestType"] = reflect.TypeOf((*RenameVStorageObjectRequestType)(nil)).Elem() -} - -type RenameVStorageObjectResponse struct { -} - -type Rename_Task RenameRequestType - -func init() { - t["Rename_Task"] = reflect.TypeOf((*Rename_Task)(nil)).Elem() -} - -type Rename_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ReplaceCACertificatesAndCRLs ReplaceCACertificatesAndCRLsRequestType - -func init() { - t["ReplaceCACertificatesAndCRLs"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLs)(nil)).Elem() -} - -type ReplaceCACertificatesAndCRLsRequestType struct { - This ManagedObjectReference `xml:"_this"` - CaCert []string `xml:"caCert"` - CaCrl []string `xml:"caCrl,omitempty"` -} - -func init() { - t["ReplaceCACertificatesAndCRLsRequestType"] = reflect.TypeOf((*ReplaceCACertificatesAndCRLsRequestType)(nil)).Elem() -} - -type ReplaceCACertificatesAndCRLsResponse struct { -} - -type ReplaceSmartCardTrustAnchors ReplaceSmartCardTrustAnchorsRequestType - -func init() { - t["ReplaceSmartCardTrustAnchors"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchors)(nil)).Elem() -} - -type ReplaceSmartCardTrustAnchorsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Certs []string `xml:"certs,omitempty"` -} - -func init() { - t["ReplaceSmartCardTrustAnchorsRequestType"] = reflect.TypeOf((*ReplaceSmartCardTrustAnchorsRequestType)(nil)).Elem() -} - -type ReplaceSmartCardTrustAnchorsResponse struct { -} - -type ReplicationConfigFault struct { - ReplicationFault -} - -func init() { - t["ReplicationConfigFault"] = reflect.TypeOf((*ReplicationConfigFault)(nil)).Elem() -} - -type ReplicationConfigFaultFault BaseReplicationConfigFault - -func init() { - t["ReplicationConfigFaultFault"] = reflect.TypeOf((*ReplicationConfigFaultFault)(nil)).Elem() -} - -type ReplicationConfigSpec struct { - DynamicData - - Generation int64 `xml:"generation"` - VmReplicationId string `xml:"vmReplicationId"` - Destination string `xml:"destination"` - Port int32 `xml:"port"` - Rpo int64 `xml:"rpo"` - QuiesceGuestEnabled bool `xml:"quiesceGuestEnabled"` - Paused bool `xml:"paused"` - OppUpdatesEnabled bool `xml:"oppUpdatesEnabled"` - NetCompressionEnabled *bool `xml:"netCompressionEnabled"` - NetEncryptionEnabled *bool `xml:"netEncryptionEnabled"` - EncryptionDestination string `xml:"encryptionDestination,omitempty"` - EncryptionPort int32 `xml:"encryptionPort,omitempty"` - RemoteCertificateThumbprint string `xml:"remoteCertificateThumbprint,omitempty"` - DataSetsReplicationEnabled *bool `xml:"dataSetsReplicationEnabled"` - Disk []ReplicationInfoDiskSettings `xml:"disk,omitempty"` -} - -func init() { - t["ReplicationConfigSpec"] = reflect.TypeOf((*ReplicationConfigSpec)(nil)).Elem() -} - -type ReplicationDiskConfigFault struct { - ReplicationConfigFault - - Reason string `xml:"reason,omitempty"` - VmRef *ManagedObjectReference `xml:"vmRef,omitempty"` - Key int32 `xml:"key,omitempty"` -} - -func init() { - t["ReplicationDiskConfigFault"] = reflect.TypeOf((*ReplicationDiskConfigFault)(nil)).Elem() -} - -type ReplicationDiskConfigFaultFault ReplicationDiskConfigFault - -func init() { - t["ReplicationDiskConfigFaultFault"] = reflect.TypeOf((*ReplicationDiskConfigFaultFault)(nil)).Elem() -} - -type ReplicationFault struct { - VimFault -} - -func init() { - t["ReplicationFault"] = reflect.TypeOf((*ReplicationFault)(nil)).Elem() -} - -type ReplicationFaultFault BaseReplicationFault - -func init() { - t["ReplicationFaultFault"] = reflect.TypeOf((*ReplicationFaultFault)(nil)).Elem() -} - -type ReplicationGroupId struct { - DynamicData - - FaultDomainId FaultDomainId `xml:"faultDomainId"` - DeviceGroupId DeviceGroupId `xml:"deviceGroupId"` -} - -func init() { - t["ReplicationGroupId"] = reflect.TypeOf((*ReplicationGroupId)(nil)).Elem() -} - -type ReplicationIncompatibleWithFT struct { - ReplicationFault -} - -func init() { - t["ReplicationIncompatibleWithFT"] = reflect.TypeOf((*ReplicationIncompatibleWithFT)(nil)).Elem() -} - -type ReplicationIncompatibleWithFTFault ReplicationIncompatibleWithFT - -func init() { - t["ReplicationIncompatibleWithFTFault"] = reflect.TypeOf((*ReplicationIncompatibleWithFTFault)(nil)).Elem() -} - -type ReplicationInfoDiskSettings struct { - DynamicData - - Key int32 `xml:"key"` - DiskReplicationId string `xml:"diskReplicationId"` -} - -func init() { - t["ReplicationInfoDiskSettings"] = reflect.TypeOf((*ReplicationInfoDiskSettings)(nil)).Elem() -} - -type ReplicationInvalidOptions struct { - ReplicationFault - - Options string `xml:"options"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["ReplicationInvalidOptions"] = reflect.TypeOf((*ReplicationInvalidOptions)(nil)).Elem() -} - -type ReplicationInvalidOptionsFault ReplicationInvalidOptions - -func init() { - t["ReplicationInvalidOptionsFault"] = reflect.TypeOf((*ReplicationInvalidOptionsFault)(nil)).Elem() -} - -type ReplicationNotSupportedOnHost struct { - ReplicationFault -} - -func init() { - t["ReplicationNotSupportedOnHost"] = reflect.TypeOf((*ReplicationNotSupportedOnHost)(nil)).Elem() -} - -type ReplicationNotSupportedOnHostFault ReplicationNotSupportedOnHost - -func init() { - t["ReplicationNotSupportedOnHostFault"] = reflect.TypeOf((*ReplicationNotSupportedOnHostFault)(nil)).Elem() -} - -type ReplicationSpec struct { - DynamicData - - ReplicationGroupId ReplicationGroupId `xml:"replicationGroupId"` -} - -func init() { - t["ReplicationSpec"] = reflect.TypeOf((*ReplicationSpec)(nil)).Elem() -} - -type ReplicationVmConfigFault struct { - ReplicationConfigFault - - Reason string `xml:"reason,omitempty"` - VmRef *ManagedObjectReference `xml:"vmRef,omitempty"` -} - -func init() { - t["ReplicationVmConfigFault"] = reflect.TypeOf((*ReplicationVmConfigFault)(nil)).Elem() -} - -type ReplicationVmConfigFaultFault ReplicationVmConfigFault - -func init() { - t["ReplicationVmConfigFaultFault"] = reflect.TypeOf((*ReplicationVmConfigFaultFault)(nil)).Elem() -} - -type ReplicationVmFault struct { - ReplicationFault - - Reason string `xml:"reason"` - State string `xml:"state,omitempty"` - InstanceId string `xml:"instanceId,omitempty"` - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["ReplicationVmFault"] = reflect.TypeOf((*ReplicationVmFault)(nil)).Elem() -} - -type ReplicationVmFaultFault BaseReplicationVmFault - -func init() { - t["ReplicationVmFaultFault"] = reflect.TypeOf((*ReplicationVmFaultFault)(nil)).Elem() -} - -type ReplicationVmInProgressFault struct { - ReplicationVmFault - - RequestedActivity string `xml:"requestedActivity"` - InProgressActivity string `xml:"inProgressActivity"` -} - -func init() { - t["ReplicationVmInProgressFault"] = reflect.TypeOf((*ReplicationVmInProgressFault)(nil)).Elem() -} - -type ReplicationVmInProgressFaultFault ReplicationVmInProgressFault - -func init() { - t["ReplicationVmInProgressFaultFault"] = reflect.TypeOf((*ReplicationVmInProgressFaultFault)(nil)).Elem() -} - -type ReplicationVmProgressInfo struct { - DynamicData - - Progress int32 `xml:"progress"` - BytesTransferred int64 `xml:"bytesTransferred"` - BytesToTransfer int64 `xml:"bytesToTransfer"` - ChecksumTotalBytes int64 `xml:"checksumTotalBytes,omitempty"` - ChecksumComparedBytes int64 `xml:"checksumComparedBytes,omitempty"` -} - -func init() { - t["ReplicationVmProgressInfo"] = reflect.TypeOf((*ReplicationVmProgressInfo)(nil)).Elem() -} - -type RequestCanceled struct { - RuntimeFault -} - -func init() { - t["RequestCanceled"] = reflect.TypeOf((*RequestCanceled)(nil)).Elem() -} - -type RequestCanceledFault RequestCanceled - -func init() { - t["RequestCanceledFault"] = reflect.TypeOf((*RequestCanceledFault)(nil)).Elem() -} - -type RescanAllHba RescanAllHbaRequestType - -func init() { - t["RescanAllHba"] = reflect.TypeOf((*RescanAllHba)(nil)).Elem() -} - -type RescanAllHbaRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RescanAllHbaRequestType"] = reflect.TypeOf((*RescanAllHbaRequestType)(nil)).Elem() -} - -type RescanAllHbaResponse struct { -} - -type RescanHba RescanHbaRequestType - -func init() { - t["RescanHba"] = reflect.TypeOf((*RescanHba)(nil)).Elem() -} - -type RescanHbaRequestType struct { - This ManagedObjectReference `xml:"_this"` - HbaDevice string `xml:"hbaDevice"` -} - -func init() { - t["RescanHbaRequestType"] = reflect.TypeOf((*RescanHbaRequestType)(nil)).Elem() -} - -type RescanHbaResponse struct { -} - -type RescanVffs RescanVffsRequestType - -func init() { - t["RescanVffs"] = reflect.TypeOf((*RescanVffs)(nil)).Elem() -} - -type RescanVffsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RescanVffsRequestType"] = reflect.TypeOf((*RescanVffsRequestType)(nil)).Elem() -} - -type RescanVffsResponse struct { -} - -type RescanVmfs RescanVmfsRequestType - -func init() { - t["RescanVmfs"] = reflect.TypeOf((*RescanVmfs)(nil)).Elem() -} - -type RescanVmfsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RescanVmfsRequestType"] = reflect.TypeOf((*RescanVmfsRequestType)(nil)).Elem() -} - -type RescanVmfsResponse struct { -} - -type ResetCollector ResetCollectorRequestType - -func init() { - t["ResetCollector"] = reflect.TypeOf((*ResetCollector)(nil)).Elem() -} - -type ResetCollectorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ResetCollectorRequestType"] = reflect.TypeOf((*ResetCollectorRequestType)(nil)).Elem() -} - -type ResetCollectorResponse struct { -} - -type ResetCounterLevelMapping ResetCounterLevelMappingRequestType - -func init() { - t["ResetCounterLevelMapping"] = reflect.TypeOf((*ResetCounterLevelMapping)(nil)).Elem() -} - -type ResetCounterLevelMappingRequestType struct { - This ManagedObjectReference `xml:"_this"` - Counters []int32 `xml:"counters"` -} - -func init() { - t["ResetCounterLevelMappingRequestType"] = reflect.TypeOf((*ResetCounterLevelMappingRequestType)(nil)).Elem() -} - -type ResetCounterLevelMappingResponse struct { -} - -type ResetEntityPermissions ResetEntityPermissionsRequestType - -func init() { - t["ResetEntityPermissions"] = reflect.TypeOf((*ResetEntityPermissions)(nil)).Elem() -} - -type ResetEntityPermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Permission []Permission `xml:"permission,omitempty"` -} - -func init() { - t["ResetEntityPermissionsRequestType"] = reflect.TypeOf((*ResetEntityPermissionsRequestType)(nil)).Elem() -} - -type ResetEntityPermissionsResponse struct { -} - -type ResetFirmwareToFactoryDefaults ResetFirmwareToFactoryDefaultsRequestType - -func init() { - t["ResetFirmwareToFactoryDefaults"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaults)(nil)).Elem() -} - -type ResetFirmwareToFactoryDefaultsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ResetFirmwareToFactoryDefaultsRequestType"] = reflect.TypeOf((*ResetFirmwareToFactoryDefaultsRequestType)(nil)).Elem() -} - -type ResetFirmwareToFactoryDefaultsResponse struct { -} - -type ResetGuestInformation ResetGuestInformationRequestType - -func init() { - t["ResetGuestInformation"] = reflect.TypeOf((*ResetGuestInformation)(nil)).Elem() -} - -type ResetGuestInformationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ResetGuestInformationRequestType"] = reflect.TypeOf((*ResetGuestInformationRequestType)(nil)).Elem() -} - -type ResetGuestInformationResponse struct { -} - -type ResetListView ResetListViewRequestType - -func init() { - t["ResetListView"] = reflect.TypeOf((*ResetListView)(nil)).Elem() -} - -type ResetListViewFromView ResetListViewFromViewRequestType - -func init() { - t["ResetListViewFromView"] = reflect.TypeOf((*ResetListViewFromView)(nil)).Elem() -} - -type ResetListViewFromViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - View ManagedObjectReference `xml:"view"` -} - -func init() { - t["ResetListViewFromViewRequestType"] = reflect.TypeOf((*ResetListViewFromViewRequestType)(nil)).Elem() -} - -type ResetListViewFromViewResponse struct { -} - -type ResetListViewRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj []ManagedObjectReference `xml:"obj,omitempty"` -} - -func init() { - t["ResetListViewRequestType"] = reflect.TypeOf((*ResetListViewRequestType)(nil)).Elem() -} - -type ResetListViewResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type ResetSystemHealthInfo ResetSystemHealthInfoRequestType - -func init() { - t["ResetSystemHealthInfo"] = reflect.TypeOf((*ResetSystemHealthInfo)(nil)).Elem() -} - -type ResetSystemHealthInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ResetSystemHealthInfoRequestType"] = reflect.TypeOf((*ResetSystemHealthInfoRequestType)(nil)).Elem() -} - -type ResetSystemHealthInfoResponse struct { -} - -type ResetVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ResetVMRequestType"] = reflect.TypeOf((*ResetVMRequestType)(nil)).Elem() -} - -type ResetVM_Task ResetVMRequestType - -func init() { - t["ResetVM_Task"] = reflect.TypeOf((*ResetVM_Task)(nil)).Elem() -} - -type ResetVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ResignatureUnresolvedVmfsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - ResolutionSpec HostUnresolvedVmfsResignatureSpec `xml:"resolutionSpec"` -} - -func init() { - t["ResignatureUnresolvedVmfsVolumeRequestType"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolumeRequestType)(nil)).Elem() -} - -type ResignatureUnresolvedVmfsVolume_Task ResignatureUnresolvedVmfsVolumeRequestType - -func init() { - t["ResignatureUnresolvedVmfsVolume_Task"] = reflect.TypeOf((*ResignatureUnresolvedVmfsVolume_Task)(nil)).Elem() -} - -type ResignatureUnresolvedVmfsVolume_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ResolveInstallationErrorsOnClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - Cluster ManagedObjectReference `xml:"cluster"` -} - -func init() { - t["ResolveInstallationErrorsOnClusterRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnClusterRequestType)(nil)).Elem() -} - -type ResolveInstallationErrorsOnCluster_Task ResolveInstallationErrorsOnClusterRequestType - -func init() { - t["ResolveInstallationErrorsOnCluster_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnCluster_Task)(nil)).Elem() -} - -type ResolveInstallationErrorsOnCluster_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ResolveInstallationErrorsOnHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["ResolveInstallationErrorsOnHostRequestType"] = reflect.TypeOf((*ResolveInstallationErrorsOnHostRequestType)(nil)).Elem() -} - -type ResolveInstallationErrorsOnHost_Task ResolveInstallationErrorsOnHostRequestType - -func init() { - t["ResolveInstallationErrorsOnHost_Task"] = reflect.TypeOf((*ResolveInstallationErrorsOnHost_Task)(nil)).Elem() -} - -type ResolveInstallationErrorsOnHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ResolveMultipleUnresolvedVmfsVolumes ResolveMultipleUnresolvedVmfsVolumesRequestType - -func init() { - t["ResolveMultipleUnresolvedVmfsVolumes"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumes)(nil)).Elem() -} - -type ResolveMultipleUnresolvedVmfsVolumesExRequestType struct { - This ManagedObjectReference `xml:"_this"` - ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"` -} - -func init() { - t["ResolveMultipleUnresolvedVmfsVolumesExRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesExRequestType)(nil)).Elem() -} - -type ResolveMultipleUnresolvedVmfsVolumesEx_Task ResolveMultipleUnresolvedVmfsVolumesExRequestType - -func init() { - t["ResolveMultipleUnresolvedVmfsVolumesEx_Task"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesEx_Task)(nil)).Elem() -} - -type ResolveMultipleUnresolvedVmfsVolumesEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ResolveMultipleUnresolvedVmfsVolumesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ResolutionSpec []HostUnresolvedVmfsResolutionSpec `xml:"resolutionSpec"` -} - -func init() { - t["ResolveMultipleUnresolvedVmfsVolumesRequestType"] = reflect.TypeOf((*ResolveMultipleUnresolvedVmfsVolumesRequestType)(nil)).Elem() -} - -type ResolveMultipleUnresolvedVmfsVolumesResponse struct { - Returnval []HostUnresolvedVmfsResolutionResult `xml:"returnval,omitempty"` -} - -type ResourceAllocationInfo struct { - DynamicData - - Reservation *int64 `xml:"reservation"` - ExpandableReservation *bool `xml:"expandableReservation"` - Limit *int64 `xml:"limit"` - Shares *SharesInfo `xml:"shares,omitempty"` - OverheadLimit *int64 `xml:"overheadLimit"` -} - -func init() { - t["ResourceAllocationInfo"] = reflect.TypeOf((*ResourceAllocationInfo)(nil)).Elem() -} - -type ResourceAllocationOption struct { - DynamicData - - SharesOption SharesOption `xml:"sharesOption"` -} - -func init() { - t["ResourceAllocationOption"] = reflect.TypeOf((*ResourceAllocationOption)(nil)).Elem() -} - -type ResourceConfigOption struct { - DynamicData - - CpuAllocationOption ResourceAllocationOption `xml:"cpuAllocationOption"` - MemoryAllocationOption ResourceAllocationOption `xml:"memoryAllocationOption"` -} - -func init() { - t["ResourceConfigOption"] = reflect.TypeOf((*ResourceConfigOption)(nil)).Elem() -} - -type ResourceConfigSpec struct { - DynamicData - - Entity *ManagedObjectReference `xml:"entity,omitempty"` - ChangeVersion string `xml:"changeVersion,omitempty"` - LastModified *time.Time `xml:"lastModified"` - CpuAllocation ResourceAllocationInfo `xml:"cpuAllocation"` - MemoryAllocation ResourceAllocationInfo `xml:"memoryAllocation"` - ScaleDescendantsShares string `xml:"scaleDescendantsShares,omitempty"` -} - -func init() { - t["ResourceConfigSpec"] = reflect.TypeOf((*ResourceConfigSpec)(nil)).Elem() -} - -type ResourceInUse struct { - VimFault - - Type string `xml:"type,omitempty"` - Name string `xml:"name,omitempty"` -} - -func init() { - t["ResourceInUse"] = reflect.TypeOf((*ResourceInUse)(nil)).Elem() -} - -type ResourceInUseFault BaseResourceInUse - -func init() { - t["ResourceInUseFault"] = reflect.TypeOf((*ResourceInUseFault)(nil)).Elem() -} - -type ResourceNotAvailable struct { - VimFault - - ContainerType string `xml:"containerType,omitempty"` - ContainerName string `xml:"containerName,omitempty"` - Type string `xml:"type,omitempty"` -} - -func init() { - t["ResourceNotAvailable"] = reflect.TypeOf((*ResourceNotAvailable)(nil)).Elem() -} - -type ResourceNotAvailableFault ResourceNotAvailable - -func init() { - t["ResourceNotAvailableFault"] = reflect.TypeOf((*ResourceNotAvailableFault)(nil)).Elem() -} - -type ResourcePoolCreatedEvent struct { - ResourcePoolEvent - - Parent ResourcePoolEventArgument `xml:"parent"` -} - -func init() { - t["ResourcePoolCreatedEvent"] = reflect.TypeOf((*ResourcePoolCreatedEvent)(nil)).Elem() -} - -type ResourcePoolDestroyedEvent struct { - ResourcePoolEvent -} - -func init() { - t["ResourcePoolDestroyedEvent"] = reflect.TypeOf((*ResourcePoolDestroyedEvent)(nil)).Elem() -} - -type ResourcePoolEvent struct { - Event - - ResourcePool ResourcePoolEventArgument `xml:"resourcePool"` -} - -func init() { - t["ResourcePoolEvent"] = reflect.TypeOf((*ResourcePoolEvent)(nil)).Elem() -} - -type ResourcePoolEventArgument struct { - EntityEventArgument - - ResourcePool ManagedObjectReference `xml:"resourcePool"` -} - -func init() { - t["ResourcePoolEventArgument"] = reflect.TypeOf((*ResourcePoolEventArgument)(nil)).Elem() -} - -type ResourcePoolMovedEvent struct { - ResourcePoolEvent - - OldParent ResourcePoolEventArgument `xml:"oldParent"` - NewParent ResourcePoolEventArgument `xml:"newParent"` -} - -func init() { - t["ResourcePoolMovedEvent"] = reflect.TypeOf((*ResourcePoolMovedEvent)(nil)).Elem() -} - -type ResourcePoolQuickStats struct { - DynamicData - - OverallCpuUsage int64 `xml:"overallCpuUsage,omitempty"` - OverallCpuDemand int64 `xml:"overallCpuDemand,omitempty"` - GuestMemoryUsage int64 `xml:"guestMemoryUsage,omitempty"` - HostMemoryUsage int64 `xml:"hostMemoryUsage,omitempty"` - DistributedCpuEntitlement int64 `xml:"distributedCpuEntitlement,omitempty"` - DistributedMemoryEntitlement int64 `xml:"distributedMemoryEntitlement,omitempty"` - StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"` - StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"` - PrivateMemory int64 `xml:"privateMemory,omitempty"` - SharedMemory int64 `xml:"sharedMemory,omitempty"` - SwappedMemory int64 `xml:"swappedMemory,omitempty"` - BalloonedMemory int64 `xml:"balloonedMemory,omitempty"` - OverheadMemory int64 `xml:"overheadMemory,omitempty"` - ConsumedOverheadMemory int64 `xml:"consumedOverheadMemory,omitempty"` - CompressedMemory int64 `xml:"compressedMemory,omitempty"` -} - -func init() { - t["ResourcePoolQuickStats"] = reflect.TypeOf((*ResourcePoolQuickStats)(nil)).Elem() -} - -type ResourcePoolReconfiguredEvent struct { - ResourcePoolEvent - - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["ResourcePoolReconfiguredEvent"] = reflect.TypeOf((*ResourcePoolReconfiguredEvent)(nil)).Elem() -} - -type ResourcePoolResourceUsage struct { - DynamicData - - ReservationUsed int64 `xml:"reservationUsed"` - ReservationUsedForVm int64 `xml:"reservationUsedForVm"` - UnreservedForPool int64 `xml:"unreservedForPool"` - UnreservedForVm int64 `xml:"unreservedForVm"` - OverallUsage int64 `xml:"overallUsage"` - MaxUsage int64 `xml:"maxUsage"` -} - -func init() { - t["ResourcePoolResourceUsage"] = reflect.TypeOf((*ResourcePoolResourceUsage)(nil)).Elem() -} - -type ResourcePoolRuntimeInfo struct { - DynamicData - - Memory ResourcePoolResourceUsage `xml:"memory"` - Cpu ResourcePoolResourceUsage `xml:"cpu"` - OverallStatus ManagedEntityStatus `xml:"overallStatus"` - SharesScalable string `xml:"sharesScalable,omitempty"` -} - -func init() { - t["ResourcePoolRuntimeInfo"] = reflect.TypeOf((*ResourcePoolRuntimeInfo)(nil)).Elem() -} - -type ResourcePoolSummary struct { - DynamicData - - Name string `xml:"name"` - Config ResourceConfigSpec `xml:"config"` - Runtime ResourcePoolRuntimeInfo `xml:"runtime"` - QuickStats *ResourcePoolQuickStats `xml:"quickStats,omitempty"` - ConfiguredMemoryMB int32 `xml:"configuredMemoryMB,omitempty"` -} - -func init() { - t["ResourcePoolSummary"] = reflect.TypeOf((*ResourcePoolSummary)(nil)).Elem() -} - -type ResourceViolatedEvent struct { - ResourcePoolEvent -} - -func init() { - t["ResourceViolatedEvent"] = reflect.TypeOf((*ResourceViolatedEvent)(nil)).Elem() -} - -type RestartService RestartServiceRequestType - -func init() { - t["RestartService"] = reflect.TypeOf((*RestartService)(nil)).Elem() -} - -type RestartServiceConsoleVirtualNic RestartServiceConsoleVirtualNicRequestType - -func init() { - t["RestartServiceConsoleVirtualNic"] = reflect.TypeOf((*RestartServiceConsoleVirtualNic)(nil)).Elem() -} - -type RestartServiceConsoleVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` -} - -func init() { - t["RestartServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*RestartServiceConsoleVirtualNicRequestType)(nil)).Elem() -} - -type RestartServiceConsoleVirtualNicResponse struct { -} - -type RestartServiceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["RestartServiceRequestType"] = reflect.TypeOf((*RestartServiceRequestType)(nil)).Elem() -} - -type RestartServiceResponse struct { -} - -type RestoreFirmwareConfiguration RestoreFirmwareConfigurationRequestType - -func init() { - t["RestoreFirmwareConfiguration"] = reflect.TypeOf((*RestoreFirmwareConfiguration)(nil)).Elem() -} - -type RestoreFirmwareConfigurationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Force bool `xml:"force"` -} - -func init() { - t["RestoreFirmwareConfigurationRequestType"] = reflect.TypeOf((*RestoreFirmwareConfigurationRequestType)(nil)).Elem() -} - -type RestoreFirmwareConfigurationResponse struct { -} - -type RestrictedByAdministrator struct { - RuntimeFault - - Details string `xml:"details"` -} - -func init() { - t["RestrictedByAdministrator"] = reflect.TypeOf((*RestrictedByAdministrator)(nil)).Elem() -} - -type RestrictedByAdministratorFault RestrictedByAdministrator - -func init() { - t["RestrictedByAdministratorFault"] = reflect.TypeOf((*RestrictedByAdministratorFault)(nil)).Elem() -} - -type RestrictedVersion struct { - SecurityError -} - -func init() { - t["RestrictedVersion"] = reflect.TypeOf((*RestrictedVersion)(nil)).Elem() -} - -type RestrictedVersionFault RestrictedVersion - -func init() { - t["RestrictedVersionFault"] = reflect.TypeOf((*RestrictedVersionFault)(nil)).Elem() -} - -type RetrieveAllPermissions RetrieveAllPermissionsRequestType - -func init() { - t["RetrieveAllPermissions"] = reflect.TypeOf((*RetrieveAllPermissions)(nil)).Elem() -} - -type RetrieveAllPermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveAllPermissionsRequestType"] = reflect.TypeOf((*RetrieveAllPermissionsRequestType)(nil)).Elem() -} - -type RetrieveAllPermissionsResponse struct { - Returnval []Permission `xml:"returnval,omitempty"` -} - -type RetrieveAnswerFile RetrieveAnswerFileRequestType - -func init() { - t["RetrieveAnswerFile"] = reflect.TypeOf((*RetrieveAnswerFile)(nil)).Elem() -} - -type RetrieveAnswerFileForProfile RetrieveAnswerFileForProfileRequestType - -func init() { - t["RetrieveAnswerFileForProfile"] = reflect.TypeOf((*RetrieveAnswerFileForProfile)(nil)).Elem() -} - -type RetrieveAnswerFileForProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - ApplyProfile HostApplyProfile `xml:"applyProfile"` -} - -func init() { - t["RetrieveAnswerFileForProfileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileForProfileRequestType)(nil)).Elem() -} - -type RetrieveAnswerFileForProfileResponse struct { - Returnval *AnswerFile `xml:"returnval,omitempty"` -} - -type RetrieveAnswerFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["RetrieveAnswerFileRequestType"] = reflect.TypeOf((*RetrieveAnswerFileRequestType)(nil)).Elem() -} - -type RetrieveAnswerFileResponse struct { - Returnval *AnswerFile `xml:"returnval,omitempty"` -} - -type RetrieveArgumentDescription RetrieveArgumentDescriptionRequestType - -func init() { - t["RetrieveArgumentDescription"] = reflect.TypeOf((*RetrieveArgumentDescription)(nil)).Elem() -} - -type RetrieveArgumentDescriptionRequestType struct { - This ManagedObjectReference `xml:"_this"` - EventTypeId string `xml:"eventTypeId"` -} - -func init() { - t["RetrieveArgumentDescriptionRequestType"] = reflect.TypeOf((*RetrieveArgumentDescriptionRequestType)(nil)).Elem() -} - -type RetrieveArgumentDescriptionResponse struct { - Returnval []EventArgDesc `xml:"returnval,omitempty"` -} - -type RetrieveClientCert RetrieveClientCertRequestType - -func init() { - t["RetrieveClientCert"] = reflect.TypeOf((*RetrieveClientCert)(nil)).Elem() -} - -type RetrieveClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` -} - -func init() { - t["RetrieveClientCertRequestType"] = reflect.TypeOf((*RetrieveClientCertRequestType)(nil)).Elem() -} - -type RetrieveClientCertResponse struct { - Returnval string `xml:"returnval"` -} - -type RetrieveClientCsr RetrieveClientCsrRequestType - -func init() { - t["RetrieveClientCsr"] = reflect.TypeOf((*RetrieveClientCsr)(nil)).Elem() -} - -type RetrieveClientCsrRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` -} - -func init() { - t["RetrieveClientCsrRequestType"] = reflect.TypeOf((*RetrieveClientCsrRequestType)(nil)).Elem() -} - -type RetrieveClientCsrResponse struct { - Returnval string `xml:"returnval"` -} - -type RetrieveDasAdvancedRuntimeInfo RetrieveDasAdvancedRuntimeInfoRequestType - -func init() { - t["RetrieveDasAdvancedRuntimeInfo"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfo)(nil)).Elem() -} - -type RetrieveDasAdvancedRuntimeInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveDasAdvancedRuntimeInfoRequestType"] = reflect.TypeOf((*RetrieveDasAdvancedRuntimeInfoRequestType)(nil)).Elem() -} - -type RetrieveDasAdvancedRuntimeInfoResponse struct { - Returnval BaseClusterDasAdvancedRuntimeInfo `xml:"returnval,omitempty,typeattr"` -} - -type RetrieveDescription RetrieveDescriptionRequestType - -func init() { - t["RetrieveDescription"] = reflect.TypeOf((*RetrieveDescription)(nil)).Elem() -} - -type RetrieveDescriptionRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveDescriptionRequestType"] = reflect.TypeOf((*RetrieveDescriptionRequestType)(nil)).Elem() -} - -type RetrieveDescriptionResponse struct { - Returnval *ProfileDescription `xml:"returnval,omitempty"` -} - -type RetrieveDiskPartitionInfo RetrieveDiskPartitionInfoRequestType - -func init() { - t["RetrieveDiskPartitionInfo"] = reflect.TypeOf((*RetrieveDiskPartitionInfo)(nil)).Elem() -} - -type RetrieveDiskPartitionInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - DevicePath []string `xml:"devicePath"` -} - -func init() { - t["RetrieveDiskPartitionInfoRequestType"] = reflect.TypeOf((*RetrieveDiskPartitionInfoRequestType)(nil)).Elem() -} - -type RetrieveDiskPartitionInfoResponse struct { - Returnval []HostDiskPartitionInfo `xml:"returnval,omitempty"` -} - -type RetrieveDynamicPassthroughInfo RetrieveDynamicPassthroughInfoRequestType - -func init() { - t["RetrieveDynamicPassthroughInfo"] = reflect.TypeOf((*RetrieveDynamicPassthroughInfo)(nil)).Elem() -} - -type RetrieveDynamicPassthroughInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveDynamicPassthroughInfoRequestType"] = reflect.TypeOf((*RetrieveDynamicPassthroughInfoRequestType)(nil)).Elem() -} - -type RetrieveDynamicPassthroughInfoResponse struct { - Returnval []VirtualMachineDynamicPassthroughInfo `xml:"returnval,omitempty"` -} - -type RetrieveEntityPermissions RetrieveEntityPermissionsRequestType - -func init() { - t["RetrieveEntityPermissions"] = reflect.TypeOf((*RetrieveEntityPermissions)(nil)).Elem() -} - -type RetrieveEntityPermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Inherited bool `xml:"inherited"` -} - -func init() { - t["RetrieveEntityPermissionsRequestType"] = reflect.TypeOf((*RetrieveEntityPermissionsRequestType)(nil)).Elem() -} - -type RetrieveEntityPermissionsResponse struct { - Returnval []Permission `xml:"returnval,omitempty"` -} - -type RetrieveEntityScheduledTask RetrieveEntityScheduledTaskRequestType - -func init() { - t["RetrieveEntityScheduledTask"] = reflect.TypeOf((*RetrieveEntityScheduledTask)(nil)).Elem() -} - -type RetrieveEntityScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["RetrieveEntityScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveEntityScheduledTaskRequestType)(nil)).Elem() -} - -type RetrieveEntityScheduledTaskResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type RetrieveFreeEpcMemory RetrieveFreeEpcMemoryRequestType - -func init() { - t["RetrieveFreeEpcMemory"] = reflect.TypeOf((*RetrieveFreeEpcMemory)(nil)).Elem() -} - -type RetrieveFreeEpcMemoryRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveFreeEpcMemoryRequestType"] = reflect.TypeOf((*RetrieveFreeEpcMemoryRequestType)(nil)).Elem() -} - -type RetrieveFreeEpcMemoryResponse struct { - Returnval int64 `xml:"returnval"` -} - -type RetrieveHardwareUptime RetrieveHardwareUptimeRequestType - -func init() { - t["RetrieveHardwareUptime"] = reflect.TypeOf((*RetrieveHardwareUptime)(nil)).Elem() -} - -type RetrieveHardwareUptimeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveHardwareUptimeRequestType"] = reflect.TypeOf((*RetrieveHardwareUptimeRequestType)(nil)).Elem() -} - -type RetrieveHardwareUptimeResponse struct { - Returnval int64 `xml:"returnval"` -} - -type RetrieveHostAccessControlEntries RetrieveHostAccessControlEntriesRequestType - -func init() { - t["RetrieveHostAccessControlEntries"] = reflect.TypeOf((*RetrieveHostAccessControlEntries)(nil)).Elem() -} - -type RetrieveHostAccessControlEntriesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveHostAccessControlEntriesRequestType"] = reflect.TypeOf((*RetrieveHostAccessControlEntriesRequestType)(nil)).Elem() -} - -type RetrieveHostAccessControlEntriesResponse struct { - Returnval []HostAccessControlEntry `xml:"returnval,omitempty"` -} - -type RetrieveHostCustomizations RetrieveHostCustomizationsRequestType - -func init() { - t["RetrieveHostCustomizations"] = reflect.TypeOf((*RetrieveHostCustomizations)(nil)).Elem() -} - -type RetrieveHostCustomizationsForProfile RetrieveHostCustomizationsForProfileRequestType - -func init() { - t["RetrieveHostCustomizationsForProfile"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfile)(nil)).Elem() -} - -type RetrieveHostCustomizationsForProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` - ApplyProfile HostApplyProfile `xml:"applyProfile"` -} - -func init() { - t["RetrieveHostCustomizationsForProfileRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsForProfileRequestType)(nil)).Elem() -} - -type RetrieveHostCustomizationsForProfileResponse struct { - Returnval []StructuredCustomizations `xml:"returnval,omitempty"` -} - -type RetrieveHostCustomizationsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` -} - -func init() { - t["RetrieveHostCustomizationsRequestType"] = reflect.TypeOf((*RetrieveHostCustomizationsRequestType)(nil)).Elem() -} - -type RetrieveHostCustomizationsResponse struct { - Returnval []StructuredCustomizations `xml:"returnval,omitempty"` -} - -type RetrieveHostSpecification RetrieveHostSpecificationRequestType - -func init() { - t["RetrieveHostSpecification"] = reflect.TypeOf((*RetrieveHostSpecification)(nil)).Elem() -} - -type RetrieveHostSpecificationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - FromHost bool `xml:"fromHost"` -} - -func init() { - t["RetrieveHostSpecificationRequestType"] = reflect.TypeOf((*RetrieveHostSpecificationRequestType)(nil)).Elem() -} - -type RetrieveHostSpecificationResponse struct { - Returnval HostSpecification `xml:"returnval"` -} - -type RetrieveKmipServerCert RetrieveKmipServerCertRequestType - -func init() { - t["RetrieveKmipServerCert"] = reflect.TypeOf((*RetrieveKmipServerCert)(nil)).Elem() -} - -type RetrieveKmipServerCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - KeyProvider KeyProviderId `xml:"keyProvider"` - Server KmipServerInfo `xml:"server"` -} - -func init() { - t["RetrieveKmipServerCertRequestType"] = reflect.TypeOf((*RetrieveKmipServerCertRequestType)(nil)).Elem() -} - -type RetrieveKmipServerCertResponse struct { - Returnval CryptoManagerKmipServerCertInfo `xml:"returnval"` -} - -type RetrieveKmipServersStatusRequestType struct { - This ManagedObjectReference `xml:"_this"` - Clusters []KmipClusterInfo `xml:"clusters,omitempty"` -} - -func init() { - t["RetrieveKmipServersStatusRequestType"] = reflect.TypeOf((*RetrieveKmipServersStatusRequestType)(nil)).Elem() -} - -type RetrieveKmipServersStatus_Task RetrieveKmipServersStatusRequestType - -func init() { - t["RetrieveKmipServersStatus_Task"] = reflect.TypeOf((*RetrieveKmipServersStatus_Task)(nil)).Elem() -} - -type RetrieveKmipServersStatus_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RetrieveObjectScheduledTask RetrieveObjectScheduledTaskRequestType - -func init() { - t["RetrieveObjectScheduledTask"] = reflect.TypeOf((*RetrieveObjectScheduledTask)(nil)).Elem() -} - -type RetrieveObjectScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Obj *ManagedObjectReference `xml:"obj,omitempty"` -} - -func init() { - t["RetrieveObjectScheduledTaskRequestType"] = reflect.TypeOf((*RetrieveObjectScheduledTaskRequestType)(nil)).Elem() -} - -type RetrieveObjectScheduledTaskResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type RetrieveOptions struct { - DynamicData - - MaxObjects int32 `xml:"maxObjects,omitempty"` -} - -func init() { - t["RetrieveOptions"] = reflect.TypeOf((*RetrieveOptions)(nil)).Elem() -} - -type RetrieveProductComponents RetrieveProductComponentsRequestType - -func init() { - t["RetrieveProductComponents"] = reflect.TypeOf((*RetrieveProductComponents)(nil)).Elem() -} - -type RetrieveProductComponentsRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveProductComponentsRequestType"] = reflect.TypeOf((*RetrieveProductComponentsRequestType)(nil)).Elem() -} - -type RetrieveProductComponentsResponse struct { - Returnval []ProductComponentInfo `xml:"returnval,omitempty"` -} - -type RetrieveProperties RetrievePropertiesRequestType - -func init() { - t["RetrieveProperties"] = reflect.TypeOf((*RetrieveProperties)(nil)).Elem() -} - -type RetrievePropertiesEx RetrievePropertiesExRequestType - -func init() { - t["RetrievePropertiesEx"] = reflect.TypeOf((*RetrievePropertiesEx)(nil)).Elem() -} - -type RetrievePropertiesExRequestType struct { - This ManagedObjectReference `xml:"_this"` - SpecSet []PropertyFilterSpec `xml:"specSet"` - Options RetrieveOptions `xml:"options"` -} - -func init() { - t["RetrievePropertiesExRequestType"] = reflect.TypeOf((*RetrievePropertiesExRequestType)(nil)).Elem() -} - -type RetrievePropertiesExResponse struct { - Returnval *RetrieveResult `xml:"returnval,omitempty"` -} - -type RetrievePropertiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - SpecSet []PropertyFilterSpec `xml:"specSet"` -} - -func init() { - t["RetrievePropertiesRequestType"] = reflect.TypeOf((*RetrievePropertiesRequestType)(nil)).Elem() -} - -type RetrievePropertiesResponse struct { - Returnval []ObjectContent `xml:"returnval,omitempty"` -} - -type RetrieveResult struct { - DynamicData - - Token string `xml:"token,omitempty"` - Objects []ObjectContent `xml:"objects"` -} - -func init() { - t["RetrieveResult"] = reflect.TypeOf((*RetrieveResult)(nil)).Elem() -} - -type RetrieveRolePermissions RetrieveRolePermissionsRequestType - -func init() { - t["RetrieveRolePermissions"] = reflect.TypeOf((*RetrieveRolePermissions)(nil)).Elem() -} - -type RetrieveRolePermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - RoleId int32 `xml:"roleId"` -} - -func init() { - t["RetrieveRolePermissionsRequestType"] = reflect.TypeOf((*RetrieveRolePermissionsRequestType)(nil)).Elem() -} - -type RetrieveRolePermissionsResponse struct { - Returnval []Permission `xml:"returnval,omitempty"` -} - -type RetrieveSelfSignedClientCert RetrieveSelfSignedClientCertRequestType - -func init() { - t["RetrieveSelfSignedClientCert"] = reflect.TypeOf((*RetrieveSelfSignedClientCert)(nil)).Elem() -} - -type RetrieveSelfSignedClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` -} - -func init() { - t["RetrieveSelfSignedClientCertRequestType"] = reflect.TypeOf((*RetrieveSelfSignedClientCertRequestType)(nil)).Elem() -} - -type RetrieveSelfSignedClientCertResponse struct { - Returnval string `xml:"returnval"` -} - -type RetrieveServiceContent RetrieveServiceContentRequestType - -func init() { - t["RetrieveServiceContent"] = reflect.TypeOf((*RetrieveServiceContent)(nil)).Elem() -} - -type RetrieveServiceContentRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveServiceContentRequestType"] = reflect.TypeOf((*RetrieveServiceContentRequestType)(nil)).Elem() -} - -type RetrieveServiceContentResponse struct { - Returnval ServiceContent `xml:"returnval"` -} - -type RetrieveServiceProviderEntities RetrieveServiceProviderEntitiesRequestType - -func init() { - t["RetrieveServiceProviderEntities"] = reflect.TypeOf((*RetrieveServiceProviderEntities)(nil)).Elem() -} - -type RetrieveServiceProviderEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveServiceProviderEntitiesRequestType"] = reflect.TypeOf((*RetrieveServiceProviderEntitiesRequestType)(nil)).Elem() -} - -type RetrieveServiceProviderEntitiesResponse struct { - Returnval []ManagedObjectReference `xml:"returnval,omitempty"` -} - -type RetrieveSnapshotDetails RetrieveSnapshotDetailsRequestType - -func init() { - t["RetrieveSnapshotDetails"] = reflect.TypeOf((*RetrieveSnapshotDetails)(nil)).Elem() -} - -type RetrieveSnapshotDetailsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` -} - -func init() { - t["RetrieveSnapshotDetailsRequestType"] = reflect.TypeOf((*RetrieveSnapshotDetailsRequestType)(nil)).Elem() -} - -type RetrieveSnapshotDetailsResponse struct { - Returnval VStorageObjectSnapshotDetails `xml:"returnval"` -} - -type RetrieveSnapshotInfo RetrieveSnapshotInfoRequestType - -func init() { - t["RetrieveSnapshotInfo"] = reflect.TypeOf((*RetrieveSnapshotInfo)(nil)).Elem() -} - -type RetrieveSnapshotInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RetrieveSnapshotInfoRequestType"] = reflect.TypeOf((*RetrieveSnapshotInfoRequestType)(nil)).Elem() -} - -type RetrieveSnapshotInfoResponse struct { - Returnval VStorageObjectSnapshotInfo `xml:"returnval"` -} - -type RetrieveUserGroups RetrieveUserGroupsRequestType - -func init() { - t["RetrieveUserGroups"] = reflect.TypeOf((*RetrieveUserGroups)(nil)).Elem() -} - -type RetrieveUserGroupsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Domain string `xml:"domain,omitempty"` - SearchStr string `xml:"searchStr"` - BelongsToGroup string `xml:"belongsToGroup,omitempty"` - BelongsToUser string `xml:"belongsToUser,omitempty"` - ExactMatch bool `xml:"exactMatch"` - FindUsers bool `xml:"findUsers"` - FindGroups bool `xml:"findGroups"` -} - -func init() { - t["RetrieveUserGroupsRequestType"] = reflect.TypeOf((*RetrieveUserGroupsRequestType)(nil)).Elem() -} - -type RetrieveUserGroupsResponse struct { - Returnval []BaseUserSearchResult `xml:"returnval,omitempty,typeattr"` -} - -type RetrieveVStorageInfrastructureObjectPolicy RetrieveVStorageInfrastructureObjectPolicyRequestType - -func init() { - t["RetrieveVStorageInfrastructureObjectPolicy"] = reflect.TypeOf((*RetrieveVStorageInfrastructureObjectPolicy)(nil)).Elem() -} - -type RetrieveVStorageInfrastructureObjectPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RetrieveVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*RetrieveVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem() -} - -type RetrieveVStorageInfrastructureObjectPolicyResponse struct { - Returnval []VslmInfrastructureObjectPolicy `xml:"returnval,omitempty"` -} - -type RetrieveVStorageObjSpec struct { - DynamicData - - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RetrieveVStorageObjSpec"] = reflect.TypeOf((*RetrieveVStorageObjSpec)(nil)).Elem() -} - -type RetrieveVStorageObject RetrieveVStorageObjectRequestType - -func init() { - t["RetrieveVStorageObject"] = reflect.TypeOf((*RetrieveVStorageObject)(nil)).Elem() -} - -type RetrieveVStorageObjectAssociations RetrieveVStorageObjectAssociationsRequestType - -func init() { - t["RetrieveVStorageObjectAssociations"] = reflect.TypeOf((*RetrieveVStorageObjectAssociations)(nil)).Elem() -} - -type RetrieveVStorageObjectAssociationsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Ids []RetrieveVStorageObjSpec `xml:"ids,omitempty"` -} - -func init() { - t["RetrieveVStorageObjectAssociationsRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectAssociationsRequestType)(nil)).Elem() -} - -type RetrieveVStorageObjectAssociationsResponse struct { - Returnval []VStorageObjectAssociations `xml:"returnval,omitempty"` -} - -type RetrieveVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - DiskInfoFlags []string `xml:"diskInfoFlags,omitempty"` -} - -func init() { - t["RetrieveVStorageObjectRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectRequestType)(nil)).Elem() -} - -type RetrieveVStorageObjectResponse struct { - Returnval VStorageObject `xml:"returnval"` -} - -type RetrieveVStorageObjectState RetrieveVStorageObjectStateRequestType - -func init() { - t["RetrieveVStorageObjectState"] = reflect.TypeOf((*RetrieveVStorageObjectState)(nil)).Elem() -} - -type RetrieveVStorageObjectStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["RetrieveVStorageObjectStateRequestType"] = reflect.TypeOf((*RetrieveVStorageObjectStateRequestType)(nil)).Elem() -} - -type RetrieveVStorageObjectStateResponse struct { - Returnval VStorageObjectStateInfo `xml:"returnval"` -} - -type RetrieveVendorDeviceGroupInfo RetrieveVendorDeviceGroupInfoRequestType - -func init() { - t["RetrieveVendorDeviceGroupInfo"] = reflect.TypeOf((*RetrieveVendorDeviceGroupInfo)(nil)).Elem() -} - -type RetrieveVendorDeviceGroupInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveVendorDeviceGroupInfoRequestType"] = reflect.TypeOf((*RetrieveVendorDeviceGroupInfoRequestType)(nil)).Elem() -} - -type RetrieveVendorDeviceGroupInfoResponse struct { - Returnval []VirtualMachineVendorDeviceGroupInfo `xml:"returnval,omitempty"` -} - -type RetrieveVgpuDeviceInfo RetrieveVgpuDeviceInfoRequestType - -func init() { - t["RetrieveVgpuDeviceInfo"] = reflect.TypeOf((*RetrieveVgpuDeviceInfo)(nil)).Elem() -} - -type RetrieveVgpuDeviceInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveVgpuDeviceInfoRequestType"] = reflect.TypeOf((*RetrieveVgpuDeviceInfoRequestType)(nil)).Elem() -} - -type RetrieveVgpuDeviceInfoResponse struct { - Returnval []VirtualMachineVgpuDeviceInfo `xml:"returnval,omitempty"` -} - -type RetrieveVgpuProfileInfo RetrieveVgpuProfileInfoRequestType - -func init() { - t["RetrieveVgpuProfileInfo"] = reflect.TypeOf((*RetrieveVgpuProfileInfo)(nil)).Elem() -} - -type RetrieveVgpuProfileInfoRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RetrieveVgpuProfileInfoRequestType"] = reflect.TypeOf((*RetrieveVgpuProfileInfoRequestType)(nil)).Elem() -} - -type RetrieveVgpuProfileInfoResponse struct { - Returnval []VirtualMachineVgpuProfileInfo `xml:"returnval,omitempty"` -} - -type RevertToCurrentSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - SuppressPowerOn *bool `xml:"suppressPowerOn"` -} - -func init() { - t["RevertToCurrentSnapshotRequestType"] = reflect.TypeOf((*RevertToCurrentSnapshotRequestType)(nil)).Elem() -} - -type RevertToCurrentSnapshot_Task RevertToCurrentSnapshotRequestType - -func init() { - t["RevertToCurrentSnapshot_Task"] = reflect.TypeOf((*RevertToCurrentSnapshot_Task)(nil)).Elem() -} - -type RevertToCurrentSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RevertToSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - SuppressPowerOn *bool `xml:"suppressPowerOn"` -} - -func init() { - t["RevertToSnapshotRequestType"] = reflect.TypeOf((*RevertToSnapshotRequestType)(nil)).Elem() -} - -type RevertToSnapshot_Task RevertToSnapshotRequestType - -func init() { - t["RevertToSnapshot_Task"] = reflect.TypeOf((*RevertToSnapshot_Task)(nil)).Elem() -} - -type RevertToSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RevertVStorageObjectRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` -} - -func init() { - t["RevertVStorageObjectRequestType"] = reflect.TypeOf((*RevertVStorageObjectRequestType)(nil)).Elem() -} - -type RevertVStorageObject_Task RevertVStorageObjectRequestType - -func init() { - t["RevertVStorageObject_Task"] = reflect.TypeOf((*RevertVStorageObject_Task)(nil)).Elem() -} - -type RevertVStorageObject_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type RewindCollector RewindCollectorRequestType - -func init() { - t["RewindCollector"] = reflect.TypeOf((*RewindCollector)(nil)).Elem() -} - -type RewindCollectorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RewindCollectorRequestType"] = reflect.TypeOf((*RewindCollectorRequestType)(nil)).Elem() -} - -type RewindCollectorResponse struct { -} - -type RoleAddedEvent struct { - RoleEvent - - PrivilegeList []string `xml:"privilegeList,omitempty"` -} - -func init() { - t["RoleAddedEvent"] = reflect.TypeOf((*RoleAddedEvent)(nil)).Elem() -} - -type RoleEvent struct { - AuthorizationEvent - - Role RoleEventArgument `xml:"role"` -} - -func init() { - t["RoleEvent"] = reflect.TypeOf((*RoleEvent)(nil)).Elem() -} - -type RoleEventArgument struct { - EventArgument - - RoleId int32 `xml:"roleId"` - Name string `xml:"name"` -} - -func init() { - t["RoleEventArgument"] = reflect.TypeOf((*RoleEventArgument)(nil)).Elem() -} - -type RoleRemovedEvent struct { - RoleEvent -} - -func init() { - t["RoleRemovedEvent"] = reflect.TypeOf((*RoleRemovedEvent)(nil)).Elem() -} - -type RoleUpdatedEvent struct { - RoleEvent - - PrivilegeList []string `xml:"privilegeList,omitempty"` - PrevRoleName string `xml:"prevRoleName,omitempty"` - PrivilegesAdded []string `xml:"privilegesAdded,omitempty"` - PrivilegesRemoved []string `xml:"privilegesRemoved,omitempty"` -} - -func init() { - t["RoleUpdatedEvent"] = reflect.TypeOf((*RoleUpdatedEvent)(nil)).Elem() -} - -type RollbackEvent struct { - DvsEvent - - HostName string `xml:"hostName"` - MethodName string `xml:"methodName,omitempty"` -} - -func init() { - t["RollbackEvent"] = reflect.TypeOf((*RollbackEvent)(nil)).Elem() -} - -type RollbackFailure struct { - DvsFault - - EntityName string `xml:"entityName"` - EntityType string `xml:"entityType"` -} - -func init() { - t["RollbackFailure"] = reflect.TypeOf((*RollbackFailure)(nil)).Elem() -} - -type RollbackFailureFault RollbackFailure - -func init() { - t["RollbackFailureFault"] = reflect.TypeOf((*RollbackFailureFault)(nil)).Elem() -} - -type RuleViolation struct { - VmConfigFault - - Host *ManagedObjectReference `xml:"host,omitempty"` - Rule BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` -} - -func init() { - t["RuleViolation"] = reflect.TypeOf((*RuleViolation)(nil)).Elem() -} - -type RuleViolationFault RuleViolation - -func init() { - t["RuleViolationFault"] = reflect.TypeOf((*RuleViolationFault)(nil)).Elem() -} - -type RunScheduledTask RunScheduledTaskRequestType - -func init() { - t["RunScheduledTask"] = reflect.TypeOf((*RunScheduledTask)(nil)).Elem() -} - -type RunScheduledTaskRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["RunScheduledTaskRequestType"] = reflect.TypeOf((*RunScheduledTaskRequestType)(nil)).Elem() -} - -type RunScheduledTaskResponse struct { -} - -type RunScriptAction struct { - Action - - Script string `xml:"script"` -} - -func init() { - t["RunScriptAction"] = reflect.TypeOf((*RunScriptAction)(nil)).Elem() -} - -type RunVsanPhysicalDiskDiagnostics RunVsanPhysicalDiskDiagnosticsRequestType - -func init() { - t["RunVsanPhysicalDiskDiagnostics"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnostics)(nil)).Elem() -} - -type RunVsanPhysicalDiskDiagnosticsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Disks []string `xml:"disks,omitempty"` -} - -func init() { - t["RunVsanPhysicalDiskDiagnosticsRequestType"] = reflect.TypeOf((*RunVsanPhysicalDiskDiagnosticsRequestType)(nil)).Elem() -} - -type RunVsanPhysicalDiskDiagnosticsResponse struct { - Returnval []HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult `xml:"returnval"` -} - -type RuntimeFault struct { - MethodFault -} - -func init() { - t["RuntimeFault"] = reflect.TypeOf((*RuntimeFault)(nil)).Elem() -} - -type RuntimeFaultFault BaseRuntimeFault - -func init() { - t["RuntimeFaultFault"] = reflect.TypeOf((*RuntimeFaultFault)(nil)).Elem() -} - -type SAMLTokenAuthentication struct { - GuestAuthentication - - Token string `xml:"token"` - Username string `xml:"username,omitempty"` -} - -func init() { - t["SAMLTokenAuthentication"] = reflect.TypeOf((*SAMLTokenAuthentication)(nil)).Elem() -} - -type SDDCBase struct { - DynamicData -} - -func init() { - t["SDDCBase"] = reflect.TypeOf((*SDDCBase)(nil)).Elem() -} - -type SSLDisabledFault struct { - HostConnectFault -} - -func init() { - t["SSLDisabledFault"] = reflect.TypeOf((*SSLDisabledFault)(nil)).Elem() -} - -type SSLDisabledFaultFault SSLDisabledFault - -func init() { - t["SSLDisabledFaultFault"] = reflect.TypeOf((*SSLDisabledFaultFault)(nil)).Elem() -} - -type SSLVerifyFault struct { - HostConnectFault - - SelfSigned bool `xml:"selfSigned"` - Thumbprint string `xml:"thumbprint"` -} - -func init() { - t["SSLVerifyFault"] = reflect.TypeOf((*SSLVerifyFault)(nil)).Elem() -} - -type SSLVerifyFaultFault SSLVerifyFault - -func init() { - t["SSLVerifyFaultFault"] = reflect.TypeOf((*SSLVerifyFaultFault)(nil)).Elem() -} - -type SSPIAuthentication struct { - GuestAuthentication - - SspiToken string `xml:"sspiToken"` -} - -func init() { - t["SSPIAuthentication"] = reflect.TypeOf((*SSPIAuthentication)(nil)).Elem() -} - -type SSPIChallenge struct { - VimFault - - Base64Token string `xml:"base64Token"` -} - -func init() { - t["SSPIChallenge"] = reflect.TypeOf((*SSPIChallenge)(nil)).Elem() -} - -type SSPIChallengeFault SSPIChallenge - -func init() { - t["SSPIChallengeFault"] = reflect.TypeOf((*SSPIChallengeFault)(nil)).Elem() -} - -type ScanHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - Repository HostPatchManagerLocator `xml:"repository"` - UpdateID []string `xml:"updateID,omitempty"` -} - -func init() { - t["ScanHostPatchRequestType"] = reflect.TypeOf((*ScanHostPatchRequestType)(nil)).Elem() -} - -type ScanHostPatchV2RequestType struct { - This ManagedObjectReference `xml:"_this"` - MetaUrls []string `xml:"metaUrls,omitempty"` - BundleUrls []string `xml:"bundleUrls,omitempty"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["ScanHostPatchV2RequestType"] = reflect.TypeOf((*ScanHostPatchV2RequestType)(nil)).Elem() -} - -type ScanHostPatchV2_Task ScanHostPatchV2RequestType - -func init() { - t["ScanHostPatchV2_Task"] = reflect.TypeOf((*ScanHostPatchV2_Task)(nil)).Elem() -} - -type ScanHostPatchV2_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ScanHostPatch_Task ScanHostPatchRequestType - -func init() { - t["ScanHostPatch_Task"] = reflect.TypeOf((*ScanHostPatch_Task)(nil)).Elem() -} - -type ScanHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ScheduleReconcileDatastoreInventory ScheduleReconcileDatastoreInventoryRequestType - -func init() { - t["ScheduleReconcileDatastoreInventory"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventory)(nil)).Elem() -} - -type ScheduleReconcileDatastoreInventoryRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` -} - -func init() { - t["ScheduleReconcileDatastoreInventoryRequestType"] = reflect.TypeOf((*ScheduleReconcileDatastoreInventoryRequestType)(nil)).Elem() -} - -type ScheduleReconcileDatastoreInventoryResponse struct { -} - -type ScheduledHardwareUpgradeInfo struct { - DynamicData - - UpgradePolicy string `xml:"upgradePolicy,omitempty"` - VersionKey string `xml:"versionKey,omitempty"` - ScheduledHardwareUpgradeStatus string `xml:"scheduledHardwareUpgradeStatus,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["ScheduledHardwareUpgradeInfo"] = reflect.TypeOf((*ScheduledHardwareUpgradeInfo)(nil)).Elem() -} - -type ScheduledTaskCompletedEvent struct { - ScheduledTaskEvent -} - -func init() { - t["ScheduledTaskCompletedEvent"] = reflect.TypeOf((*ScheduledTaskCompletedEvent)(nil)).Elem() -} - -type ScheduledTaskCreatedEvent struct { - ScheduledTaskEvent -} - -func init() { - t["ScheduledTaskCreatedEvent"] = reflect.TypeOf((*ScheduledTaskCreatedEvent)(nil)).Elem() -} - -type ScheduledTaskDescription struct { - DynamicData - - Action []BaseTypeDescription `xml:"action,typeattr"` - SchedulerInfo []ScheduledTaskDetail `xml:"schedulerInfo"` - State []BaseElementDescription `xml:"state,typeattr"` - DayOfWeek []BaseElementDescription `xml:"dayOfWeek,typeattr"` - WeekOfMonth []BaseElementDescription `xml:"weekOfMonth,typeattr"` -} - -func init() { - t["ScheduledTaskDescription"] = reflect.TypeOf((*ScheduledTaskDescription)(nil)).Elem() -} - -type ScheduledTaskDetail struct { - TypeDescription - - Frequency string `xml:"frequency"` -} - -func init() { - t["ScheduledTaskDetail"] = reflect.TypeOf((*ScheduledTaskDetail)(nil)).Elem() -} - -type ScheduledTaskEmailCompletedEvent struct { - ScheduledTaskEvent - - To string `xml:"to"` -} - -func init() { - t["ScheduledTaskEmailCompletedEvent"] = reflect.TypeOf((*ScheduledTaskEmailCompletedEvent)(nil)).Elem() -} - -type ScheduledTaskEmailFailedEvent struct { - ScheduledTaskEvent - - To string `xml:"to"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["ScheduledTaskEmailFailedEvent"] = reflect.TypeOf((*ScheduledTaskEmailFailedEvent)(nil)).Elem() -} - -type ScheduledTaskEvent struct { - Event - - ScheduledTask ScheduledTaskEventArgument `xml:"scheduledTask"` - Entity ManagedEntityEventArgument `xml:"entity"` -} - -func init() { - t["ScheduledTaskEvent"] = reflect.TypeOf((*ScheduledTaskEvent)(nil)).Elem() -} - -type ScheduledTaskEventArgument struct { - EntityEventArgument - - ScheduledTask ManagedObjectReference `xml:"scheduledTask"` -} - -func init() { - t["ScheduledTaskEventArgument"] = reflect.TypeOf((*ScheduledTaskEventArgument)(nil)).Elem() -} - -type ScheduledTaskFailedEvent struct { - ScheduledTaskEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["ScheduledTaskFailedEvent"] = reflect.TypeOf((*ScheduledTaskFailedEvent)(nil)).Elem() -} - -type ScheduledTaskInfo struct { - ScheduledTaskSpec - - ScheduledTask ManagedObjectReference `xml:"scheduledTask"` - Entity ManagedObjectReference `xml:"entity"` - LastModifiedTime time.Time `xml:"lastModifiedTime"` - LastModifiedUser string `xml:"lastModifiedUser"` - NextRunTime *time.Time `xml:"nextRunTime"` - PrevRunTime *time.Time `xml:"prevRunTime"` - State TaskInfoState `xml:"state"` - Error *LocalizedMethodFault `xml:"error,omitempty"` - Result AnyType `xml:"result,omitempty,typeattr"` - Progress int32 `xml:"progress,omitempty"` - ActiveTask *ManagedObjectReference `xml:"activeTask,omitempty"` - TaskObject *ManagedObjectReference `xml:"taskObject,omitempty"` -} - -func init() { - t["ScheduledTaskInfo"] = reflect.TypeOf((*ScheduledTaskInfo)(nil)).Elem() -} - -type ScheduledTaskReconfiguredEvent struct { - ScheduledTaskEvent - - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["ScheduledTaskReconfiguredEvent"] = reflect.TypeOf((*ScheduledTaskReconfiguredEvent)(nil)).Elem() -} - -type ScheduledTaskRemovedEvent struct { - ScheduledTaskEvent -} - -func init() { - t["ScheduledTaskRemovedEvent"] = reflect.TypeOf((*ScheduledTaskRemovedEvent)(nil)).Elem() -} - -type ScheduledTaskSpec struct { - DynamicData - - Name string `xml:"name"` - Description string `xml:"description"` - Enabled bool `xml:"enabled"` - Scheduler BaseTaskScheduler `xml:"scheduler,typeattr"` - Action BaseAction `xml:"action,typeattr"` - Notification string `xml:"notification,omitempty"` -} - -func init() { - t["ScheduledTaskSpec"] = reflect.TypeOf((*ScheduledTaskSpec)(nil)).Elem() -} - -type ScheduledTaskStartedEvent struct { - ScheduledTaskEvent -} - -func init() { - t["ScheduledTaskStartedEvent"] = reflect.TypeOf((*ScheduledTaskStartedEvent)(nil)).Elem() -} - -type ScsiLun struct { - HostDevice - - Key string `xml:"key,omitempty"` - Uuid string `xml:"uuid"` - Descriptor []ScsiLunDescriptor `xml:"descriptor,omitempty"` - CanonicalName string `xml:"canonicalName,omitempty"` - DisplayName string `xml:"displayName,omitempty"` - LunType string `xml:"lunType"` - Vendor string `xml:"vendor,omitempty"` - Model string `xml:"model,omitempty"` - Revision string `xml:"revision,omitempty"` - ScsiLevel int32 `xml:"scsiLevel,omitempty"` - SerialNumber string `xml:"serialNumber,omitempty"` - DurableName *ScsiLunDurableName `xml:"durableName,omitempty"` - AlternateName []ScsiLunDurableName `xml:"alternateName,omitempty"` - StandardInquiry []byte `xml:"standardInquiry,omitempty"` - QueueDepth int32 `xml:"queueDepth,omitempty"` - OperationalState []string `xml:"operationalState"` - Capabilities *ScsiLunCapabilities `xml:"capabilities,omitempty"` - VStorageSupport string `xml:"vStorageSupport,omitempty"` - ProtocolEndpoint *bool `xml:"protocolEndpoint"` - PerenniallyReserved *bool `xml:"perenniallyReserved"` - ClusteredVmdkSupported *bool `xml:"clusteredVmdkSupported"` -} - -func init() { - t["ScsiLun"] = reflect.TypeOf((*ScsiLun)(nil)).Elem() -} - -type ScsiLunCapabilities struct { - DynamicData - - UpdateDisplayNameSupported bool `xml:"updateDisplayNameSupported"` -} - -func init() { - t["ScsiLunCapabilities"] = reflect.TypeOf((*ScsiLunCapabilities)(nil)).Elem() -} - -type ScsiLunDescriptor struct { - DynamicData - - Quality string `xml:"quality"` - Id string `xml:"id"` -} - -func init() { - t["ScsiLunDescriptor"] = reflect.TypeOf((*ScsiLunDescriptor)(nil)).Elem() -} - -type ScsiLunDurableName struct { - DynamicData - - Namespace string `xml:"namespace"` - NamespaceId byte `xml:"namespaceId"` - Data []byte `xml:"data,omitempty"` -} - -func init() { - t["ScsiLunDurableName"] = reflect.TypeOf((*ScsiLunDurableName)(nil)).Elem() -} - -type SeSparseVirtualDiskSpec struct { - FileBackedVirtualDiskSpec - - GrainSizeKb int32 `xml:"grainSizeKb,omitempty"` -} - -func init() { - t["SeSparseVirtualDiskSpec"] = reflect.TypeOf((*SeSparseVirtualDiskSpec)(nil)).Elem() -} - -type SearchDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - DatastorePath string `xml:"datastorePath"` - SearchSpec *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"` -} - -func init() { - t["SearchDatastoreRequestType"] = reflect.TypeOf((*SearchDatastoreRequestType)(nil)).Elem() -} - -type SearchDatastoreSubFoldersRequestType struct { - This ManagedObjectReference `xml:"_this"` - DatastorePath string `xml:"datastorePath"` - SearchSpec *HostDatastoreBrowserSearchSpec `xml:"searchSpec,omitempty"` -} - -func init() { - t["SearchDatastoreSubFoldersRequestType"] = reflect.TypeOf((*SearchDatastoreSubFoldersRequestType)(nil)).Elem() -} - -type SearchDatastoreSubFolders_Task SearchDatastoreSubFoldersRequestType - -func init() { - t["SearchDatastoreSubFolders_Task"] = reflect.TypeOf((*SearchDatastoreSubFolders_Task)(nil)).Elem() -} - -type SearchDatastoreSubFolders_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SearchDatastore_Task SearchDatastoreRequestType - -func init() { - t["SearchDatastore_Task"] = reflect.TypeOf((*SearchDatastore_Task)(nil)).Elem() -} - -type SearchDatastore_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SecondaryVmAlreadyDisabled struct { - VmFaultToleranceIssue - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["SecondaryVmAlreadyDisabled"] = reflect.TypeOf((*SecondaryVmAlreadyDisabled)(nil)).Elem() -} - -type SecondaryVmAlreadyDisabledFault SecondaryVmAlreadyDisabled - -func init() { - t["SecondaryVmAlreadyDisabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyDisabledFault)(nil)).Elem() -} - -type SecondaryVmAlreadyEnabled struct { - VmFaultToleranceIssue - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["SecondaryVmAlreadyEnabled"] = reflect.TypeOf((*SecondaryVmAlreadyEnabled)(nil)).Elem() -} - -type SecondaryVmAlreadyEnabledFault SecondaryVmAlreadyEnabled - -func init() { - t["SecondaryVmAlreadyEnabledFault"] = reflect.TypeOf((*SecondaryVmAlreadyEnabledFault)(nil)).Elem() -} - -type SecondaryVmAlreadyRegistered struct { - VmFaultToleranceIssue - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["SecondaryVmAlreadyRegistered"] = reflect.TypeOf((*SecondaryVmAlreadyRegistered)(nil)).Elem() -} - -type SecondaryVmAlreadyRegisteredFault SecondaryVmAlreadyRegistered - -func init() { - t["SecondaryVmAlreadyRegisteredFault"] = reflect.TypeOf((*SecondaryVmAlreadyRegisteredFault)(nil)).Elem() -} - -type SecondaryVmNotRegistered struct { - VmFaultToleranceIssue - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["SecondaryVmNotRegistered"] = reflect.TypeOf((*SecondaryVmNotRegistered)(nil)).Elem() -} - -type SecondaryVmNotRegisteredFault SecondaryVmNotRegistered - -func init() { - t["SecondaryVmNotRegisteredFault"] = reflect.TypeOf((*SecondaryVmNotRegisteredFault)(nil)).Elem() -} - -type SecurityError struct { - RuntimeFault -} - -func init() { - t["SecurityError"] = reflect.TypeOf((*SecurityError)(nil)).Elem() -} - -type SecurityErrorFault BaseSecurityError - -func init() { - t["SecurityErrorFault"] = reflect.TypeOf((*SecurityErrorFault)(nil)).Elem() -} - -type SecurityProfile struct { - ApplyProfile - - Permission []PermissionProfile `xml:"permission,omitempty"` -} - -func init() { - t["SecurityProfile"] = reflect.TypeOf((*SecurityProfile)(nil)).Elem() -} - -type SelectActivePartition SelectActivePartitionRequestType - -func init() { - t["SelectActivePartition"] = reflect.TypeOf((*SelectActivePartition)(nil)).Elem() -} - -type SelectActivePartitionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Partition *HostScsiDiskPartition `xml:"partition,omitempty"` -} - -func init() { - t["SelectActivePartitionRequestType"] = reflect.TypeOf((*SelectActivePartitionRequestType)(nil)).Elem() -} - -type SelectActivePartitionResponse struct { -} - -type SelectVnic SelectVnicRequestType - -func init() { - t["SelectVnic"] = reflect.TypeOf((*SelectVnic)(nil)).Elem() -} - -type SelectVnicForNicType SelectVnicForNicTypeRequestType - -func init() { - t["SelectVnicForNicType"] = reflect.TypeOf((*SelectVnicForNicType)(nil)).Elem() -} - -type SelectVnicForNicTypeRequestType struct { - This ManagedObjectReference `xml:"_this"` - NicType string `xml:"nicType"` - Device string `xml:"device"` -} - -func init() { - t["SelectVnicForNicTypeRequestType"] = reflect.TypeOf((*SelectVnicForNicTypeRequestType)(nil)).Elem() -} - -type SelectVnicForNicTypeResponse struct { -} - -type SelectVnicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` -} - -func init() { - t["SelectVnicRequestType"] = reflect.TypeOf((*SelectVnicRequestType)(nil)).Elem() -} - -type SelectVnicResponse struct { -} - -type SelectionSet struct { - DynamicData -} - -func init() { - t["SelectionSet"] = reflect.TypeOf((*SelectionSet)(nil)).Elem() -} - -type SelectionSpec struct { - DynamicData - - Name string `xml:"name,omitempty"` -} - -func init() { - t["SelectionSpec"] = reflect.TypeOf((*SelectionSpec)(nil)).Elem() -} - -type SendEmailAction struct { - Action - - ToList string `xml:"toList"` - CcList string `xml:"ccList"` - Subject string `xml:"subject"` - Body string `xml:"body"` -} - -func init() { - t["SendEmailAction"] = reflect.TypeOf((*SendEmailAction)(nil)).Elem() -} - -type SendNMI SendNMIRequestType - -func init() { - t["SendNMI"] = reflect.TypeOf((*SendNMI)(nil)).Elem() -} - -type SendNMIRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["SendNMIRequestType"] = reflect.TypeOf((*SendNMIRequestType)(nil)).Elem() -} - -type SendNMIResponse struct { -} - -type SendSNMPAction struct { - Action -} - -func init() { - t["SendSNMPAction"] = reflect.TypeOf((*SendSNMPAction)(nil)).Elem() -} - -type SendTestNotification SendTestNotificationRequestType - -func init() { - t["SendTestNotification"] = reflect.TypeOf((*SendTestNotification)(nil)).Elem() -} - -type SendTestNotificationRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["SendTestNotificationRequestType"] = reflect.TypeOf((*SendTestNotificationRequestType)(nil)).Elem() -} - -type SendTestNotificationResponse struct { -} - -type ServerLicenseExpiredEvent struct { - LicenseEvent - - Product string `xml:"product"` -} - -func init() { - t["ServerLicenseExpiredEvent"] = reflect.TypeOf((*ServerLicenseExpiredEvent)(nil)).Elem() -} - -type ServerStartedSessionEvent struct { - SessionEvent -} - -func init() { - t["ServerStartedSessionEvent"] = reflect.TypeOf((*ServerStartedSessionEvent)(nil)).Elem() -} - -type ServiceConsolePortGroupProfile struct { - PortGroupProfile - - IpConfig IpAddressProfile `xml:"ipConfig"` -} - -func init() { - t["ServiceConsolePortGroupProfile"] = reflect.TypeOf((*ServiceConsolePortGroupProfile)(nil)).Elem() -} - -type ServiceConsoleReservationInfo struct { - DynamicData - - ServiceConsoleReservedCfg int64 `xml:"serviceConsoleReservedCfg"` - ServiceConsoleReserved int64 `xml:"serviceConsoleReserved"` - Unreserved int64 `xml:"unreserved"` -} - -func init() { - t["ServiceConsoleReservationInfo"] = reflect.TypeOf((*ServiceConsoleReservationInfo)(nil)).Elem() -} - -type ServiceContent struct { - DynamicData - - RootFolder ManagedObjectReference `xml:"rootFolder"` - PropertyCollector ManagedObjectReference `xml:"propertyCollector"` - ViewManager *ManagedObjectReference `xml:"viewManager,omitempty"` - About AboutInfo `xml:"about"` - Setting *ManagedObjectReference `xml:"setting,omitempty"` - UserDirectory *ManagedObjectReference `xml:"userDirectory,omitempty"` - SessionManager *ManagedObjectReference `xml:"sessionManager,omitempty"` - AuthorizationManager *ManagedObjectReference `xml:"authorizationManager,omitempty"` - ServiceManager *ManagedObjectReference `xml:"serviceManager,omitempty"` - PerfManager *ManagedObjectReference `xml:"perfManager,omitempty"` - ScheduledTaskManager *ManagedObjectReference `xml:"scheduledTaskManager,omitempty"` - AlarmManager *ManagedObjectReference `xml:"alarmManager,omitempty"` - EventManager *ManagedObjectReference `xml:"eventManager,omitempty"` - TaskManager *ManagedObjectReference `xml:"taskManager,omitempty"` - ExtensionManager *ManagedObjectReference `xml:"extensionManager,omitempty"` - CustomizationSpecManager *ManagedObjectReference `xml:"customizationSpecManager,omitempty"` - GuestCustomizationManager *ManagedObjectReference `xml:"guestCustomizationManager,omitempty"` - CustomFieldsManager *ManagedObjectReference `xml:"customFieldsManager,omitempty"` - AccountManager *ManagedObjectReference `xml:"accountManager,omitempty"` - DiagnosticManager *ManagedObjectReference `xml:"diagnosticManager,omitempty"` - LicenseManager *ManagedObjectReference `xml:"licenseManager,omitempty"` - SearchIndex *ManagedObjectReference `xml:"searchIndex,omitempty"` - FileManager *ManagedObjectReference `xml:"fileManager,omitempty"` - DatastoreNamespaceManager *ManagedObjectReference `xml:"datastoreNamespaceManager,omitempty"` - VirtualDiskManager *ManagedObjectReference `xml:"virtualDiskManager,omitempty"` - VirtualizationManager *ManagedObjectReference `xml:"virtualizationManager,omitempty"` - SnmpSystem *ManagedObjectReference `xml:"snmpSystem,omitempty"` - VmProvisioningChecker *ManagedObjectReference `xml:"vmProvisioningChecker,omitempty"` - VmCompatibilityChecker *ManagedObjectReference `xml:"vmCompatibilityChecker,omitempty"` - OvfManager *ManagedObjectReference `xml:"ovfManager,omitempty"` - IpPoolManager *ManagedObjectReference `xml:"ipPoolManager,omitempty"` - DvSwitchManager *ManagedObjectReference `xml:"dvSwitchManager,omitempty"` - HostProfileManager *ManagedObjectReference `xml:"hostProfileManager,omitempty"` - ClusterProfileManager *ManagedObjectReference `xml:"clusterProfileManager,omitempty"` - ComplianceManager *ManagedObjectReference `xml:"complianceManager,omitempty"` - LocalizationManager *ManagedObjectReference `xml:"localizationManager,omitempty"` - StorageResourceManager *ManagedObjectReference `xml:"storageResourceManager,omitempty"` - GuestOperationsManager *ManagedObjectReference `xml:"guestOperationsManager,omitempty"` - OverheadMemoryManager *ManagedObjectReference `xml:"overheadMemoryManager,omitempty"` - CertificateManager *ManagedObjectReference `xml:"certificateManager,omitempty"` - IoFilterManager *ManagedObjectReference `xml:"ioFilterManager,omitempty"` - VStorageObjectManager *ManagedObjectReference `xml:"vStorageObjectManager,omitempty"` - HostSpecManager *ManagedObjectReference `xml:"hostSpecManager,omitempty"` - CryptoManager *ManagedObjectReference `xml:"cryptoManager,omitempty"` - HealthUpdateManager *ManagedObjectReference `xml:"healthUpdateManager,omitempty"` - FailoverClusterConfigurator *ManagedObjectReference `xml:"failoverClusterConfigurator,omitempty"` - FailoverClusterManager *ManagedObjectReference `xml:"failoverClusterManager,omitempty"` - TenantManager *ManagedObjectReference `xml:"tenantManager,omitempty"` - SiteInfoManager *ManagedObjectReference `xml:"siteInfoManager,omitempty"` - StorageQueryManager *ManagedObjectReference `xml:"storageQueryManager,omitempty"` -} - -func init() { - t["ServiceContent"] = reflect.TypeOf((*ServiceContent)(nil)).Elem() -} - -type ServiceLocator struct { - DynamicData - - InstanceUuid string `xml:"instanceUuid"` - Url string `xml:"url"` - Credential BaseServiceLocatorCredential `xml:"credential,typeattr"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` -} - -func init() { - t["ServiceLocator"] = reflect.TypeOf((*ServiceLocator)(nil)).Elem() -} - -type ServiceLocatorCredential struct { - DynamicData -} - -func init() { - t["ServiceLocatorCredential"] = reflect.TypeOf((*ServiceLocatorCredential)(nil)).Elem() -} - -type ServiceLocatorNamePassword struct { - ServiceLocatorCredential - - Username string `xml:"username"` - Password string `xml:"password"` -} - -func init() { - t["ServiceLocatorNamePassword"] = reflect.TypeOf((*ServiceLocatorNamePassword)(nil)).Elem() -} - -type ServiceLocatorSAMLCredential struct { - ServiceLocatorCredential - - Token string `xml:"token,omitempty"` -} - -func init() { - t["ServiceLocatorSAMLCredential"] = reflect.TypeOf((*ServiceLocatorSAMLCredential)(nil)).Elem() -} - -type ServiceManagerServiceInfo struct { - DynamicData - - ServiceName string `xml:"serviceName"` - Location []string `xml:"location,omitempty"` - Service ManagedObjectReference `xml:"service"` - Description string `xml:"description"` -} - -func init() { - t["ServiceManagerServiceInfo"] = reflect.TypeOf((*ServiceManagerServiceInfo)(nil)).Elem() -} - -type ServiceProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["ServiceProfile"] = reflect.TypeOf((*ServiceProfile)(nil)).Elem() -} - -type SessionEvent struct { - Event -} - -func init() { - t["SessionEvent"] = reflect.TypeOf((*SessionEvent)(nil)).Elem() -} - -type SessionIsActive SessionIsActiveRequestType - -func init() { - t["SessionIsActive"] = reflect.TypeOf((*SessionIsActive)(nil)).Elem() -} - -type SessionIsActiveRequestType struct { - This ManagedObjectReference `xml:"_this"` - SessionID string `xml:"sessionID"` - UserName string `xml:"userName"` -} - -func init() { - t["SessionIsActiveRequestType"] = reflect.TypeOf((*SessionIsActiveRequestType)(nil)).Elem() -} - -type SessionIsActiveResponse struct { - Returnval bool `xml:"returnval"` -} - -type SessionManagerGenericServiceTicket struct { - DynamicData - - Id string `xml:"id"` - HostName string `xml:"hostName,omitempty"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - CertThumbprintList []VirtualMachineCertThumbprint `xml:"certThumbprintList,omitempty"` - TicketType string `xml:"ticketType,omitempty"` -} - -func init() { - t["SessionManagerGenericServiceTicket"] = reflect.TypeOf((*SessionManagerGenericServiceTicket)(nil)).Elem() -} - -type SessionManagerHttpServiceRequestSpec struct { - SessionManagerServiceRequestSpec - - Method string `xml:"method,omitempty"` - Url string `xml:"url"` -} - -func init() { - t["SessionManagerHttpServiceRequestSpec"] = reflect.TypeOf((*SessionManagerHttpServiceRequestSpec)(nil)).Elem() -} - -type SessionManagerLocalTicket struct { - DynamicData - - UserName string `xml:"userName"` - PasswordFilePath string `xml:"passwordFilePath"` -} - -func init() { - t["SessionManagerLocalTicket"] = reflect.TypeOf((*SessionManagerLocalTicket)(nil)).Elem() -} - -type SessionManagerServiceRequestSpec struct { - DynamicData -} - -func init() { - t["SessionManagerServiceRequestSpec"] = reflect.TypeOf((*SessionManagerServiceRequestSpec)(nil)).Elem() -} - -type SessionManagerVmomiServiceRequestSpec struct { - SessionManagerServiceRequestSpec - - Method string `xml:"method"` -} - -func init() { - t["SessionManagerVmomiServiceRequestSpec"] = reflect.TypeOf((*SessionManagerVmomiServiceRequestSpec)(nil)).Elem() -} - -type SessionTerminatedEvent struct { - SessionEvent - - SessionId string `xml:"sessionId"` - TerminatedUsername string `xml:"terminatedUsername"` -} - -func init() { - t["SessionTerminatedEvent"] = reflect.TypeOf((*SessionTerminatedEvent)(nil)).Elem() -} - -type SetCollectorPageSize SetCollectorPageSizeRequestType - -func init() { - t["SetCollectorPageSize"] = reflect.TypeOf((*SetCollectorPageSize)(nil)).Elem() -} - -type SetCollectorPageSizeRequestType struct { - This ManagedObjectReference `xml:"_this"` - MaxCount int32 `xml:"maxCount"` -} - -func init() { - t["SetCollectorPageSizeRequestType"] = reflect.TypeOf((*SetCollectorPageSizeRequestType)(nil)).Elem() -} - -type SetCollectorPageSizeResponse struct { -} - -type SetCryptoMode SetCryptoModeRequestType - -func init() { - t["SetCryptoMode"] = reflect.TypeOf((*SetCryptoMode)(nil)).Elem() -} - -type SetCryptoModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - CryptoMode string `xml:"cryptoMode"` -} - -func init() { - t["SetCryptoModeRequestType"] = reflect.TypeOf((*SetCryptoModeRequestType)(nil)).Elem() -} - -type SetCryptoModeResponse struct { -} - -type SetDefaultKmsCluster SetDefaultKmsClusterRequestType - -func init() { - t["SetDefaultKmsCluster"] = reflect.TypeOf((*SetDefaultKmsCluster)(nil)).Elem() -} - -type SetDefaultKmsClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` - ClusterId *KeyProviderId `xml:"clusterId,omitempty"` -} - -func init() { - t["SetDefaultKmsClusterRequestType"] = reflect.TypeOf((*SetDefaultKmsClusterRequestType)(nil)).Elem() -} - -type SetDefaultKmsClusterResponse struct { -} - -type SetDisplayTopology SetDisplayTopologyRequestType - -func init() { - t["SetDisplayTopology"] = reflect.TypeOf((*SetDisplayTopology)(nil)).Elem() -} - -type SetDisplayTopologyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Displays []VirtualMachineDisplayTopology `xml:"displays"` -} - -func init() { - t["SetDisplayTopologyRequestType"] = reflect.TypeOf((*SetDisplayTopologyRequestType)(nil)).Elem() -} - -type SetDisplayTopologyResponse struct { -} - -type SetEntityPermissions SetEntityPermissionsRequestType - -func init() { - t["SetEntityPermissions"] = reflect.TypeOf((*SetEntityPermissions)(nil)).Elem() -} - -type SetEntityPermissionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Permission []Permission `xml:"permission,omitempty"` -} - -func init() { - t["SetEntityPermissionsRequestType"] = reflect.TypeOf((*SetEntityPermissionsRequestType)(nil)).Elem() -} - -type SetEntityPermissionsResponse struct { -} - -type SetExtensionCertificate SetExtensionCertificateRequestType - -func init() { - t["SetExtensionCertificate"] = reflect.TypeOf((*SetExtensionCertificate)(nil)).Elem() -} - -type SetExtensionCertificateRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` - CertificatePem string `xml:"certificatePem,omitempty"` -} - -func init() { - t["SetExtensionCertificateRequestType"] = reflect.TypeOf((*SetExtensionCertificateRequestType)(nil)).Elem() -} - -type SetExtensionCertificateResponse struct { -} - -type SetField SetFieldRequestType - -func init() { - t["SetField"] = reflect.TypeOf((*SetField)(nil)).Elem() -} - -type SetFieldRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity ManagedObjectReference `xml:"entity"` - Key int32 `xml:"key"` - Value string `xml:"value"` -} - -func init() { - t["SetFieldRequestType"] = reflect.TypeOf((*SetFieldRequestType)(nil)).Elem() -} - -type SetFieldResponse struct { -} - -type SetLicenseEdition SetLicenseEditionRequestType - -func init() { - t["SetLicenseEdition"] = reflect.TypeOf((*SetLicenseEdition)(nil)).Elem() -} - -type SetLicenseEditionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` - FeatureKey string `xml:"featureKey,omitempty"` -} - -func init() { - t["SetLicenseEditionRequestType"] = reflect.TypeOf((*SetLicenseEditionRequestType)(nil)).Elem() -} - -type SetLicenseEditionResponse struct { -} - -type SetLocale SetLocaleRequestType - -func init() { - t["SetLocale"] = reflect.TypeOf((*SetLocale)(nil)).Elem() -} - -type SetLocaleRequestType struct { - This ManagedObjectReference `xml:"_this"` - Locale string `xml:"locale"` -} - -func init() { - t["SetLocaleRequestType"] = reflect.TypeOf((*SetLocaleRequestType)(nil)).Elem() -} - -type SetLocaleResponse struct { -} - -type SetMaxQueueDepth SetMaxQueueDepthRequestType - -func init() { - t["SetMaxQueueDepth"] = reflect.TypeOf((*SetMaxQueueDepth)(nil)).Elem() -} - -type SetMaxQueueDepthRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore ManagedObjectReference `xml:"datastore"` - MaxQdepth int64 `xml:"maxQdepth"` -} - -func init() { - t["SetMaxQueueDepthRequestType"] = reflect.TypeOf((*SetMaxQueueDepthRequestType)(nil)).Elem() -} - -type SetMaxQueueDepthResponse struct { -} - -type SetMultipathLunPolicy SetMultipathLunPolicyRequestType - -func init() { - t["SetMultipathLunPolicy"] = reflect.TypeOf((*SetMultipathLunPolicy)(nil)).Elem() -} - -type SetMultipathLunPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunId string `xml:"lunId"` - Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"` -} - -func init() { - t["SetMultipathLunPolicyRequestType"] = reflect.TypeOf((*SetMultipathLunPolicyRequestType)(nil)).Elem() -} - -type SetMultipathLunPolicyResponse struct { -} - -type SetNFSUser SetNFSUserRequestType - -func init() { - t["SetNFSUser"] = reflect.TypeOf((*SetNFSUser)(nil)).Elem() -} - -type SetNFSUserRequestType struct { - This ManagedObjectReference `xml:"_this"` - User string `xml:"user"` - Password string `xml:"password"` -} - -func init() { - t["SetNFSUserRequestType"] = reflect.TypeOf((*SetNFSUserRequestType)(nil)).Elem() -} - -type SetNFSUserResponse struct { -} - -type SetPublicKey SetPublicKeyRequestType - -func init() { - t["SetPublicKey"] = reflect.TypeOf((*SetPublicKey)(nil)).Elem() -} - -type SetPublicKeyRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` - PublicKey string `xml:"publicKey"` -} - -func init() { - t["SetPublicKeyRequestType"] = reflect.TypeOf((*SetPublicKeyRequestType)(nil)).Elem() -} - -type SetPublicKeyResponse struct { -} - -type SetRegistryValueInGuest SetRegistryValueInGuestRequestType - -func init() { - t["SetRegistryValueInGuest"] = reflect.TypeOf((*SetRegistryValueInGuest)(nil)).Elem() -} - -type SetRegistryValueInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Value GuestRegValueSpec `xml:"value"` -} - -func init() { - t["SetRegistryValueInGuestRequestType"] = reflect.TypeOf((*SetRegistryValueInGuestRequestType)(nil)).Elem() -} - -type SetRegistryValueInGuestResponse struct { -} - -type SetScreenResolution SetScreenResolutionRequestType - -func init() { - t["SetScreenResolution"] = reflect.TypeOf((*SetScreenResolution)(nil)).Elem() -} - -type SetScreenResolutionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Width int32 `xml:"width"` - Height int32 `xml:"height"` -} - -func init() { - t["SetScreenResolutionRequestType"] = reflect.TypeOf((*SetScreenResolutionRequestType)(nil)).Elem() -} - -type SetScreenResolutionResponse struct { -} - -type SetTaskDescription SetTaskDescriptionRequestType - -func init() { - t["SetTaskDescription"] = reflect.TypeOf((*SetTaskDescription)(nil)).Elem() -} - -type SetTaskDescriptionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Description LocalizableMessage `xml:"description"` -} - -func init() { - t["SetTaskDescriptionRequestType"] = reflect.TypeOf((*SetTaskDescriptionRequestType)(nil)).Elem() -} - -type SetTaskDescriptionResponse struct { -} - -type SetTaskState SetTaskStateRequestType - -func init() { - t["SetTaskState"] = reflect.TypeOf((*SetTaskState)(nil)).Elem() -} - -type SetTaskStateRequestType struct { - This ManagedObjectReference `xml:"_this"` - State TaskInfoState `xml:"state"` - Result AnyType `xml:"result,omitempty,typeattr"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["SetTaskStateRequestType"] = reflect.TypeOf((*SetTaskStateRequestType)(nil)).Elem() -} - -type SetTaskStateResponse struct { -} - -type SetVStorageObjectControlFlags SetVStorageObjectControlFlagsRequestType - -func init() { - t["SetVStorageObjectControlFlags"] = reflect.TypeOf((*SetVStorageObjectControlFlags)(nil)).Elem() -} - -type SetVStorageObjectControlFlagsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - ControlFlags []string `xml:"controlFlags,omitempty"` -} - -func init() { - t["SetVStorageObjectControlFlagsRequestType"] = reflect.TypeOf((*SetVStorageObjectControlFlagsRequestType)(nil)).Elem() -} - -type SetVStorageObjectControlFlagsResponse struct { -} - -type SetVirtualDiskUuid SetVirtualDiskUuidRequestType - -func init() { - t["SetVirtualDiskUuid"] = reflect.TypeOf((*SetVirtualDiskUuid)(nil)).Elem() -} - -type SetVirtualDiskUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Uuid string `xml:"uuid"` -} - -func init() { - t["SetVirtualDiskUuidRequestType"] = reflect.TypeOf((*SetVirtualDiskUuidRequestType)(nil)).Elem() -} - -type SetVirtualDiskUuidResponse struct { -} - -type SharedBusControllerNotSupported struct { - DeviceNotSupported -} - -func init() { - t["SharedBusControllerNotSupported"] = reflect.TypeOf((*SharedBusControllerNotSupported)(nil)).Elem() -} - -type SharedBusControllerNotSupportedFault SharedBusControllerNotSupported - -func init() { - t["SharedBusControllerNotSupportedFault"] = reflect.TypeOf((*SharedBusControllerNotSupportedFault)(nil)).Elem() -} - -type SharesInfo struct { - DynamicData - - Shares int32 `xml:"shares"` - Level SharesLevel `xml:"level"` -} - -func init() { - t["SharesInfo"] = reflect.TypeOf((*SharesInfo)(nil)).Elem() -} - -type SharesOption struct { - DynamicData - - SharesOption IntOption `xml:"sharesOption"` - DefaultLevel SharesLevel `xml:"defaultLevel"` -} - -func init() { - t["SharesOption"] = reflect.TypeOf((*SharesOption)(nil)).Elem() -} - -type ShrinkDiskFault struct { - VimFault - - DiskId int32 `xml:"diskId,omitempty"` -} - -func init() { - t["ShrinkDiskFault"] = reflect.TypeOf((*ShrinkDiskFault)(nil)).Elem() -} - -type ShrinkDiskFaultFault ShrinkDiskFault - -func init() { - t["ShrinkDiskFaultFault"] = reflect.TypeOf((*ShrinkDiskFaultFault)(nil)).Elem() -} - -type ShrinkVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` - Copy *bool `xml:"copy"` -} - -func init() { - t["ShrinkVirtualDiskRequestType"] = reflect.TypeOf((*ShrinkVirtualDiskRequestType)(nil)).Elem() -} - -type ShrinkVirtualDisk_Task ShrinkVirtualDiskRequestType - -func init() { - t["ShrinkVirtualDisk_Task"] = reflect.TypeOf((*ShrinkVirtualDisk_Task)(nil)).Elem() -} - -type ShrinkVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ShutdownGuest ShutdownGuestRequestType - -func init() { - t["ShutdownGuest"] = reflect.TypeOf((*ShutdownGuest)(nil)).Elem() -} - -type ShutdownGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["ShutdownGuestRequestType"] = reflect.TypeOf((*ShutdownGuestRequestType)(nil)).Elem() -} - -type ShutdownGuestResponse struct { -} - -type ShutdownHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Force bool `xml:"force"` -} - -func init() { - t["ShutdownHostRequestType"] = reflect.TypeOf((*ShutdownHostRequestType)(nil)).Elem() -} - -type ShutdownHost_Task ShutdownHostRequestType - -func init() { - t["ShutdownHost_Task"] = reflect.TypeOf((*ShutdownHost_Task)(nil)).Elem() -} - -type ShutdownHost_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SingleIp struct { - IpAddress - - Address string `xml:"address"` -} - -func init() { - t["SingleIp"] = reflect.TypeOf((*SingleIp)(nil)).Elem() -} - -type SingleMac struct { - MacAddress - - Address string `xml:"address"` -} - -func init() { - t["SingleMac"] = reflect.TypeOf((*SingleMac)(nil)).Elem() -} - -type SiteInfo struct { - DynamicData -} - -func init() { - t["SiteInfo"] = reflect.TypeOf((*SiteInfo)(nil)).Elem() -} - -type SnapshotCloneNotSupported struct { - SnapshotCopyNotSupported -} - -func init() { - t["SnapshotCloneNotSupported"] = reflect.TypeOf((*SnapshotCloneNotSupported)(nil)).Elem() -} - -type SnapshotCloneNotSupportedFault SnapshotCloneNotSupported - -func init() { - t["SnapshotCloneNotSupportedFault"] = reflect.TypeOf((*SnapshotCloneNotSupportedFault)(nil)).Elem() -} - -type SnapshotCopyNotSupported struct { - MigrationFault -} - -func init() { - t["SnapshotCopyNotSupported"] = reflect.TypeOf((*SnapshotCopyNotSupported)(nil)).Elem() -} - -type SnapshotCopyNotSupportedFault BaseSnapshotCopyNotSupported - -func init() { - t["SnapshotCopyNotSupportedFault"] = reflect.TypeOf((*SnapshotCopyNotSupportedFault)(nil)).Elem() -} - -type SnapshotDisabled struct { - SnapshotFault -} - -func init() { - t["SnapshotDisabled"] = reflect.TypeOf((*SnapshotDisabled)(nil)).Elem() -} - -type SnapshotDisabledFault SnapshotDisabled - -func init() { - t["SnapshotDisabledFault"] = reflect.TypeOf((*SnapshotDisabledFault)(nil)).Elem() -} - -type SnapshotFault struct { - VimFault -} - -func init() { - t["SnapshotFault"] = reflect.TypeOf((*SnapshotFault)(nil)).Elem() -} - -type SnapshotFaultFault BaseSnapshotFault - -func init() { - t["SnapshotFaultFault"] = reflect.TypeOf((*SnapshotFaultFault)(nil)).Elem() -} - -type SnapshotIncompatibleDeviceInVm struct { - SnapshotFault - - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["SnapshotIncompatibleDeviceInVm"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVm)(nil)).Elem() -} - -type SnapshotIncompatibleDeviceInVmFault SnapshotIncompatibleDeviceInVm - -func init() { - t["SnapshotIncompatibleDeviceInVmFault"] = reflect.TypeOf((*SnapshotIncompatibleDeviceInVmFault)(nil)).Elem() -} - -type SnapshotLocked struct { - SnapshotFault -} - -func init() { - t["SnapshotLocked"] = reflect.TypeOf((*SnapshotLocked)(nil)).Elem() -} - -type SnapshotLockedFault SnapshotLocked - -func init() { - t["SnapshotLockedFault"] = reflect.TypeOf((*SnapshotLockedFault)(nil)).Elem() -} - -type SnapshotMoveFromNonHomeNotSupported struct { - SnapshotCopyNotSupported -} - -func init() { - t["SnapshotMoveFromNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupported)(nil)).Elem() -} - -type SnapshotMoveFromNonHomeNotSupportedFault SnapshotMoveFromNonHomeNotSupported - -func init() { - t["SnapshotMoveFromNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveFromNonHomeNotSupportedFault)(nil)).Elem() -} - -type SnapshotMoveNotSupported struct { - SnapshotCopyNotSupported -} - -func init() { - t["SnapshotMoveNotSupported"] = reflect.TypeOf((*SnapshotMoveNotSupported)(nil)).Elem() -} - -type SnapshotMoveNotSupportedFault SnapshotMoveNotSupported - -func init() { - t["SnapshotMoveNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveNotSupportedFault)(nil)).Elem() -} - -type SnapshotMoveToNonHomeNotSupported struct { - SnapshotCopyNotSupported -} - -func init() { - t["SnapshotMoveToNonHomeNotSupported"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupported)(nil)).Elem() -} - -type SnapshotMoveToNonHomeNotSupportedFault SnapshotMoveToNonHomeNotSupported - -func init() { - t["SnapshotMoveToNonHomeNotSupportedFault"] = reflect.TypeOf((*SnapshotMoveToNonHomeNotSupportedFault)(nil)).Elem() -} - -type SnapshotNoChange struct { - SnapshotFault -} - -func init() { - t["SnapshotNoChange"] = reflect.TypeOf((*SnapshotNoChange)(nil)).Elem() -} - -type SnapshotNoChangeFault SnapshotNoChange - -func init() { - t["SnapshotNoChangeFault"] = reflect.TypeOf((*SnapshotNoChangeFault)(nil)).Elem() -} - -type SnapshotRevertIssue struct { - MigrationFault - - SnapshotName string `xml:"snapshotName,omitempty"` - Event []BaseEvent `xml:"event,omitempty,typeattr"` - Errors bool `xml:"errors"` -} - -func init() { - t["SnapshotRevertIssue"] = reflect.TypeOf((*SnapshotRevertIssue)(nil)).Elem() -} - -type SnapshotRevertIssueFault SnapshotRevertIssue - -func init() { - t["SnapshotRevertIssueFault"] = reflect.TypeOf((*SnapshotRevertIssueFault)(nil)).Elem() -} - -type SoftRuleVioCorrectionDisallowed struct { - VmConfigFault - - VmName string `xml:"vmName"` -} - -func init() { - t["SoftRuleVioCorrectionDisallowed"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowed)(nil)).Elem() -} - -type SoftRuleVioCorrectionDisallowedFault SoftRuleVioCorrectionDisallowed - -func init() { - t["SoftRuleVioCorrectionDisallowedFault"] = reflect.TypeOf((*SoftRuleVioCorrectionDisallowedFault)(nil)).Elem() -} - -type SoftRuleVioCorrectionImpact struct { - VmConfigFault - - VmName string `xml:"vmName"` -} - -func init() { - t["SoftRuleVioCorrectionImpact"] = reflect.TypeOf((*SoftRuleVioCorrectionImpact)(nil)).Elem() -} - -type SoftRuleVioCorrectionImpactFault SoftRuleVioCorrectionImpact - -func init() { - t["SoftRuleVioCorrectionImpactFault"] = reflect.TypeOf((*SoftRuleVioCorrectionImpactFault)(nil)).Elem() -} - -type SoftwarePackage struct { - DynamicData - - Name string `xml:"name"` - Version string `xml:"version"` - Type string `xml:"type"` - Vendor string `xml:"vendor"` - AcceptanceLevel string `xml:"acceptanceLevel"` - Summary string `xml:"summary"` - Description string `xml:"description"` - ReferenceURL []string `xml:"referenceURL,omitempty"` - CreationDate *time.Time `xml:"creationDate"` - Depends []Relation `xml:"depends,omitempty"` - Conflicts []Relation `xml:"conflicts,omitempty"` - Replaces []Relation `xml:"replaces,omitempty"` - Provides []string `xml:"provides,omitempty"` - MaintenanceModeRequired *bool `xml:"maintenanceModeRequired"` - HardwarePlatformsRequired []string `xml:"hardwarePlatformsRequired,omitempty"` - Capability SoftwarePackageCapability `xml:"capability"` - Tag []string `xml:"tag,omitempty"` - Payload []string `xml:"payload,omitempty"` -} - -func init() { - t["SoftwarePackage"] = reflect.TypeOf((*SoftwarePackage)(nil)).Elem() -} - -type SoftwarePackageCapability struct { - DynamicData - - LiveInstallAllowed *bool `xml:"liveInstallAllowed"` - LiveRemoveAllowed *bool `xml:"liveRemoveAllowed"` - StatelessReady *bool `xml:"statelessReady"` - Overlay *bool `xml:"overlay"` -} - -func init() { - t["SoftwarePackageCapability"] = reflect.TypeOf((*SoftwarePackageCapability)(nil)).Elem() -} - -type SolutionUserRequired struct { - SecurityError -} - -func init() { - t["SolutionUserRequired"] = reflect.TypeOf((*SolutionUserRequired)(nil)).Elem() -} - -type SolutionUserRequiredFault SolutionUserRequired - -func init() { - t["SolutionUserRequiredFault"] = reflect.TypeOf((*SolutionUserRequiredFault)(nil)).Elem() -} - -type SourceNodeSpec struct { - DynamicData - - ManagementVc ServiceLocator `xml:"managementVc"` - ActiveVc ManagedObjectReference `xml:"activeVc"` -} - -func init() { - t["SourceNodeSpec"] = reflect.TypeOf((*SourceNodeSpec)(nil)).Elem() -} - -type SsdDiskNotAvailable struct { - VimFault - - DevicePath string `xml:"devicePath"` -} - -func init() { - t["SsdDiskNotAvailable"] = reflect.TypeOf((*SsdDiskNotAvailable)(nil)).Elem() -} - -type SsdDiskNotAvailableFault SsdDiskNotAvailable - -func init() { - t["SsdDiskNotAvailableFault"] = reflect.TypeOf((*SsdDiskNotAvailableFault)(nil)).Elem() -} - -type StageHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - MetaUrls []string `xml:"metaUrls,omitempty"` - BundleUrls []string `xml:"bundleUrls,omitempty"` - VibUrls []string `xml:"vibUrls,omitempty"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["StageHostPatchRequestType"] = reflect.TypeOf((*StageHostPatchRequestType)(nil)).Elem() -} - -type StageHostPatch_Task StageHostPatchRequestType - -func init() { - t["StageHostPatch_Task"] = reflect.TypeOf((*StageHostPatch_Task)(nil)).Elem() -} - -type StageHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StampAllRulesWithUuidRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["StampAllRulesWithUuidRequestType"] = reflect.TypeOf((*StampAllRulesWithUuidRequestType)(nil)).Elem() -} - -type StampAllRulesWithUuid_Task StampAllRulesWithUuidRequestType - -func init() { - t["StampAllRulesWithUuid_Task"] = reflect.TypeOf((*StampAllRulesWithUuid_Task)(nil)).Elem() -} - -type StampAllRulesWithUuid_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StandbyGuest StandbyGuestRequestType - -func init() { - t["StandbyGuest"] = reflect.TypeOf((*StandbyGuest)(nil)).Elem() -} - -type StandbyGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["StandbyGuestRequestType"] = reflect.TypeOf((*StandbyGuestRequestType)(nil)).Elem() -} - -type StandbyGuestResponse struct { -} - -type StartGuestNetworkRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` -} - -func init() { - t["StartGuestNetworkRequestType"] = reflect.TypeOf((*StartGuestNetworkRequestType)(nil)).Elem() -} - -type StartGuestNetwork_Task StartGuestNetworkRequestType - -func init() { - t["StartGuestNetwork_Task"] = reflect.TypeOf((*StartGuestNetwork_Task)(nil)).Elem() -} - -type StartGuestNetwork_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StartProgramInGuest StartProgramInGuestRequestType - -func init() { - t["StartProgramInGuest"] = reflect.TypeOf((*StartProgramInGuest)(nil)).Elem() -} - -type StartProgramInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Spec BaseGuestProgramSpec `xml:"spec,typeattr"` -} - -func init() { - t["StartProgramInGuestRequestType"] = reflect.TypeOf((*StartProgramInGuestRequestType)(nil)).Elem() -} - -type StartProgramInGuestResponse struct { - Returnval int64 `xml:"returnval"` -} - -type StartRecordingRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["StartRecordingRequestType"] = reflect.TypeOf((*StartRecordingRequestType)(nil)).Elem() -} - -type StartRecording_Task StartRecordingRequestType - -func init() { - t["StartRecording_Task"] = reflect.TypeOf((*StartRecording_Task)(nil)).Elem() -} - -type StartRecording_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StartReplayingRequestType struct { - This ManagedObjectReference `xml:"_this"` - ReplaySnapshot ManagedObjectReference `xml:"replaySnapshot"` -} - -func init() { - t["StartReplayingRequestType"] = reflect.TypeOf((*StartReplayingRequestType)(nil)).Elem() -} - -type StartReplaying_Task StartReplayingRequestType - -func init() { - t["StartReplaying_Task"] = reflect.TypeOf((*StartReplaying_Task)(nil)).Elem() -} - -type StartReplaying_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StartService StartServiceRequestType - -func init() { - t["StartService"] = reflect.TypeOf((*StartService)(nil)).Elem() -} - -type StartServiceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["StartServiceRequestType"] = reflect.TypeOf((*StartServiceRequestType)(nil)).Elem() -} - -type StartServiceResponse struct { -} - -type StateAlarmExpression struct { - AlarmExpression - - Operator StateAlarmOperator `xml:"operator"` - Type string `xml:"type"` - StatePath string `xml:"statePath"` - Yellow string `xml:"yellow,omitempty"` - Red string `xml:"red,omitempty"` -} - -func init() { - t["StateAlarmExpression"] = reflect.TypeOf((*StateAlarmExpression)(nil)).Elem() -} - -type StaticRouteProfile struct { - ApplyProfile - - Key string `xml:"key,omitempty"` -} - -func init() { - t["StaticRouteProfile"] = reflect.TypeOf((*StaticRouteProfile)(nil)).Elem() -} - -type StopRecordingRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["StopRecordingRequestType"] = reflect.TypeOf((*StopRecordingRequestType)(nil)).Elem() -} - -type StopRecording_Task StopRecordingRequestType - -func init() { - t["StopRecording_Task"] = reflect.TypeOf((*StopRecording_Task)(nil)).Elem() -} - -type StopRecording_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StopReplayingRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["StopReplayingRequestType"] = reflect.TypeOf((*StopReplayingRequestType)(nil)).Elem() -} - -type StopReplaying_Task StopReplayingRequestType - -func init() { - t["StopReplaying_Task"] = reflect.TypeOf((*StopReplaying_Task)(nil)).Elem() -} - -type StopReplaying_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type StopService StopServiceRequestType - -func init() { - t["StopService"] = reflect.TypeOf((*StopService)(nil)).Elem() -} - -type StopServiceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["StopServiceRequestType"] = reflect.TypeOf((*StopServiceRequestType)(nil)).Elem() -} - -type StopServiceResponse struct { -} - -type StorageDrsAutomationConfig struct { - DynamicData - - SpaceLoadBalanceAutomationMode string `xml:"spaceLoadBalanceAutomationMode,omitempty"` - IoLoadBalanceAutomationMode string `xml:"ioLoadBalanceAutomationMode,omitempty"` - RuleEnforcementAutomationMode string `xml:"ruleEnforcementAutomationMode,omitempty"` - PolicyEnforcementAutomationMode string `xml:"policyEnforcementAutomationMode,omitempty"` - VmEvacuationAutomationMode string `xml:"vmEvacuationAutomationMode,omitempty"` -} - -func init() { - t["StorageDrsAutomationConfig"] = reflect.TypeOf((*StorageDrsAutomationConfig)(nil)).Elem() -} - -type StorageDrsCannotMoveDiskInMultiWriterMode struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveDiskInMultiWriterMode"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterMode)(nil)).Elem() -} - -type StorageDrsCannotMoveDiskInMultiWriterModeFault StorageDrsCannotMoveDiskInMultiWriterMode - -func init() { - t["StorageDrsCannotMoveDiskInMultiWriterModeFault"] = reflect.TypeOf((*StorageDrsCannotMoveDiskInMultiWriterModeFault)(nil)).Elem() -} - -type StorageDrsCannotMoveFTVm struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveFTVm"] = reflect.TypeOf((*StorageDrsCannotMoveFTVm)(nil)).Elem() -} - -type StorageDrsCannotMoveFTVmFault StorageDrsCannotMoveFTVm - -func init() { - t["StorageDrsCannotMoveFTVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveFTVmFault)(nil)).Elem() -} - -type StorageDrsCannotMoveIndependentDisk struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveIndependentDisk"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDisk)(nil)).Elem() -} - -type StorageDrsCannotMoveIndependentDiskFault StorageDrsCannotMoveIndependentDisk - -func init() { - t["StorageDrsCannotMoveIndependentDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveIndependentDiskFault)(nil)).Elem() -} - -type StorageDrsCannotMoveManuallyPlacedSwapFile struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveManuallyPlacedSwapFile"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFile)(nil)).Elem() -} - -type StorageDrsCannotMoveManuallyPlacedSwapFileFault StorageDrsCannotMoveManuallyPlacedSwapFile - -func init() { - t["StorageDrsCannotMoveManuallyPlacedSwapFileFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedSwapFileFault)(nil)).Elem() -} - -type StorageDrsCannotMoveManuallyPlacedVm struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveManuallyPlacedVm"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVm)(nil)).Elem() -} - -type StorageDrsCannotMoveManuallyPlacedVmFault StorageDrsCannotMoveManuallyPlacedVm - -func init() { - t["StorageDrsCannotMoveManuallyPlacedVmFault"] = reflect.TypeOf((*StorageDrsCannotMoveManuallyPlacedVmFault)(nil)).Elem() -} - -type StorageDrsCannotMoveSharedDisk struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveSharedDisk"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDisk)(nil)).Elem() -} - -type StorageDrsCannotMoveSharedDiskFault StorageDrsCannotMoveSharedDisk - -func init() { - t["StorageDrsCannotMoveSharedDiskFault"] = reflect.TypeOf((*StorageDrsCannotMoveSharedDiskFault)(nil)).Elem() -} - -type StorageDrsCannotMoveTemplate struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveTemplate"] = reflect.TypeOf((*StorageDrsCannotMoveTemplate)(nil)).Elem() -} - -type StorageDrsCannotMoveTemplateFault StorageDrsCannotMoveTemplate - -func init() { - t["StorageDrsCannotMoveTemplateFault"] = reflect.TypeOf((*StorageDrsCannotMoveTemplateFault)(nil)).Elem() -} - -type StorageDrsCannotMoveVmInUserFolder struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveVmInUserFolder"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolder)(nil)).Elem() -} - -type StorageDrsCannotMoveVmInUserFolderFault StorageDrsCannotMoveVmInUserFolder - -func init() { - t["StorageDrsCannotMoveVmInUserFolderFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmInUserFolderFault)(nil)).Elem() -} - -type StorageDrsCannotMoveVmWithMountedCDROM struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveVmWithMountedCDROM"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROM)(nil)).Elem() -} - -type StorageDrsCannotMoveVmWithMountedCDROMFault StorageDrsCannotMoveVmWithMountedCDROM - -func init() { - t["StorageDrsCannotMoveVmWithMountedCDROMFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithMountedCDROMFault)(nil)).Elem() -} - -type StorageDrsCannotMoveVmWithNoFilesInLayout struct { - VimFault -} - -func init() { - t["StorageDrsCannotMoveVmWithNoFilesInLayout"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayout)(nil)).Elem() -} - -type StorageDrsCannotMoveVmWithNoFilesInLayoutFault StorageDrsCannotMoveVmWithNoFilesInLayout - -func init() { - t["StorageDrsCannotMoveVmWithNoFilesInLayoutFault"] = reflect.TypeOf((*StorageDrsCannotMoveVmWithNoFilesInLayoutFault)(nil)).Elem() -} - -type StorageDrsConfigInfo struct { - DynamicData - - PodConfig StorageDrsPodConfigInfo `xml:"podConfig"` - VmConfig []StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"` -} - -func init() { - t["StorageDrsConfigInfo"] = reflect.TypeOf((*StorageDrsConfigInfo)(nil)).Elem() -} - -type StorageDrsConfigSpec struct { - DynamicData - - PodConfigSpec *StorageDrsPodConfigSpec `xml:"podConfigSpec,omitempty"` - VmConfigSpec []StorageDrsVmConfigSpec `xml:"vmConfigSpec,omitempty"` -} - -func init() { - t["StorageDrsConfigSpec"] = reflect.TypeOf((*StorageDrsConfigSpec)(nil)).Elem() -} - -type StorageDrsDatacentersCannotShareDatastore struct { - VimFault -} - -func init() { - t["StorageDrsDatacentersCannotShareDatastore"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastore)(nil)).Elem() -} - -type StorageDrsDatacentersCannotShareDatastoreFault StorageDrsDatacentersCannotShareDatastore - -func init() { - t["StorageDrsDatacentersCannotShareDatastoreFault"] = reflect.TypeOf((*StorageDrsDatacentersCannotShareDatastoreFault)(nil)).Elem() -} - -type StorageDrsDisabledOnVm struct { - VimFault -} - -func init() { - t["StorageDrsDisabledOnVm"] = reflect.TypeOf((*StorageDrsDisabledOnVm)(nil)).Elem() -} - -type StorageDrsDisabledOnVmFault StorageDrsDisabledOnVm - -func init() { - t["StorageDrsDisabledOnVmFault"] = reflect.TypeOf((*StorageDrsDisabledOnVmFault)(nil)).Elem() -} - -type StorageDrsHbrDiskNotMovable struct { - VimFault - - NonMovableDiskIds string `xml:"nonMovableDiskIds"` -} - -func init() { - t["StorageDrsHbrDiskNotMovable"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovable)(nil)).Elem() -} - -type StorageDrsHbrDiskNotMovableFault StorageDrsHbrDiskNotMovable - -func init() { - t["StorageDrsHbrDiskNotMovableFault"] = reflect.TypeOf((*StorageDrsHbrDiskNotMovableFault)(nil)).Elem() -} - -type StorageDrsHmsMoveInProgress struct { - VimFault -} - -func init() { - t["StorageDrsHmsMoveInProgress"] = reflect.TypeOf((*StorageDrsHmsMoveInProgress)(nil)).Elem() -} - -type StorageDrsHmsMoveInProgressFault StorageDrsHmsMoveInProgress - -func init() { - t["StorageDrsHmsMoveInProgressFault"] = reflect.TypeOf((*StorageDrsHmsMoveInProgressFault)(nil)).Elem() -} - -type StorageDrsHmsUnreachable struct { - VimFault -} - -func init() { - t["StorageDrsHmsUnreachable"] = reflect.TypeOf((*StorageDrsHmsUnreachable)(nil)).Elem() -} - -type StorageDrsHmsUnreachableFault StorageDrsHmsUnreachable - -func init() { - t["StorageDrsHmsUnreachableFault"] = reflect.TypeOf((*StorageDrsHmsUnreachableFault)(nil)).Elem() -} - -type StorageDrsIoLoadBalanceConfig struct { - DynamicData - - ReservablePercentThreshold int32 `xml:"reservablePercentThreshold,omitempty"` - ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` - ReservableThresholdMode string `xml:"reservableThresholdMode,omitempty"` - IoLatencyThreshold int32 `xml:"ioLatencyThreshold,omitempty"` - IoLoadImbalanceThreshold int32 `xml:"ioLoadImbalanceThreshold,omitempty"` -} - -func init() { - t["StorageDrsIoLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsIoLoadBalanceConfig)(nil)).Elem() -} - -type StorageDrsIolbDisabledInternally struct { - VimFault -} - -func init() { - t["StorageDrsIolbDisabledInternally"] = reflect.TypeOf((*StorageDrsIolbDisabledInternally)(nil)).Elem() -} - -type StorageDrsIolbDisabledInternallyFault StorageDrsIolbDisabledInternally - -func init() { - t["StorageDrsIolbDisabledInternallyFault"] = reflect.TypeOf((*StorageDrsIolbDisabledInternallyFault)(nil)).Elem() -} - -type StorageDrsOptionSpec struct { - ArrayUpdateSpec - - Option BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["StorageDrsOptionSpec"] = reflect.TypeOf((*StorageDrsOptionSpec)(nil)).Elem() -} - -type StorageDrsPlacementRankVmSpec struct { - DynamicData - - VmPlacementSpec PlacementSpec `xml:"vmPlacementSpec"` - VmClusters []ManagedObjectReference `xml:"vmClusters"` -} - -func init() { - t["StorageDrsPlacementRankVmSpec"] = reflect.TypeOf((*StorageDrsPlacementRankVmSpec)(nil)).Elem() -} - -type StorageDrsPodConfigInfo struct { - DynamicData - - Enabled bool `xml:"enabled"` - IoLoadBalanceEnabled bool `xml:"ioLoadBalanceEnabled"` - DefaultVmBehavior string `xml:"defaultVmBehavior"` - LoadBalanceInterval int32 `xml:"loadBalanceInterval,omitempty"` - DefaultIntraVmAffinity *bool `xml:"defaultIntraVmAffinity"` - SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"` - IoLoadBalanceConfig *StorageDrsIoLoadBalanceConfig `xml:"ioLoadBalanceConfig,omitempty"` - AutomationOverrides *StorageDrsAutomationConfig `xml:"automationOverrides,omitempty"` - Rule []BaseClusterRuleInfo `xml:"rule,omitempty,typeattr"` - Option []BaseOptionValue `xml:"option,omitempty,typeattr"` -} - -func init() { - t["StorageDrsPodConfigInfo"] = reflect.TypeOf((*StorageDrsPodConfigInfo)(nil)).Elem() -} - -type StorageDrsPodConfigSpec struct { - DynamicData - - Enabled *bool `xml:"enabled"` - IoLoadBalanceEnabled *bool `xml:"ioLoadBalanceEnabled"` - DefaultVmBehavior string `xml:"defaultVmBehavior,omitempty"` - LoadBalanceInterval int32 `xml:"loadBalanceInterval,omitempty"` - DefaultIntraVmAffinity *bool `xml:"defaultIntraVmAffinity"` - SpaceLoadBalanceConfig *StorageDrsSpaceLoadBalanceConfig `xml:"spaceLoadBalanceConfig,omitempty"` - IoLoadBalanceConfig *StorageDrsIoLoadBalanceConfig `xml:"ioLoadBalanceConfig,omitempty"` - AutomationOverrides *StorageDrsAutomationConfig `xml:"automationOverrides,omitempty"` - Rule []ClusterRuleSpec `xml:"rule,omitempty"` - Option []StorageDrsOptionSpec `xml:"option,omitempty"` -} - -func init() { - t["StorageDrsPodConfigSpec"] = reflect.TypeOf((*StorageDrsPodConfigSpec)(nil)).Elem() -} - -type StorageDrsPodSelectionSpec struct { - DynamicData - - InitialVmConfig []VmPodConfigForPlacement `xml:"initialVmConfig,omitempty"` - StoragePod *ManagedObjectReference `xml:"storagePod,omitempty"` -} - -func init() { - t["StorageDrsPodSelectionSpec"] = reflect.TypeOf((*StorageDrsPodSelectionSpec)(nil)).Elem() -} - -type StorageDrsRelocateDisabled struct { - VimFault -} - -func init() { - t["StorageDrsRelocateDisabled"] = reflect.TypeOf((*StorageDrsRelocateDisabled)(nil)).Elem() -} - -type StorageDrsRelocateDisabledFault StorageDrsRelocateDisabled - -func init() { - t["StorageDrsRelocateDisabledFault"] = reflect.TypeOf((*StorageDrsRelocateDisabledFault)(nil)).Elem() -} - -type StorageDrsSpaceLoadBalanceConfig struct { - DynamicData - - SpaceThresholdMode string `xml:"spaceThresholdMode,omitempty"` - SpaceUtilizationThreshold int32 `xml:"spaceUtilizationThreshold,omitempty"` - FreeSpaceThresholdGB int32 `xml:"freeSpaceThresholdGB,omitempty"` - MinSpaceUtilizationDifference int32 `xml:"minSpaceUtilizationDifference,omitempty"` -} - -func init() { - t["StorageDrsSpaceLoadBalanceConfig"] = reflect.TypeOf((*StorageDrsSpaceLoadBalanceConfig)(nil)).Elem() -} - -type StorageDrsStaleHmsCollection struct { - VimFault -} - -func init() { - t["StorageDrsStaleHmsCollection"] = reflect.TypeOf((*StorageDrsStaleHmsCollection)(nil)).Elem() -} - -type StorageDrsStaleHmsCollectionFault StorageDrsStaleHmsCollection - -func init() { - t["StorageDrsStaleHmsCollectionFault"] = reflect.TypeOf((*StorageDrsStaleHmsCollectionFault)(nil)).Elem() -} - -type StorageDrsUnableToMoveFiles struct { - VimFault -} - -func init() { - t["StorageDrsUnableToMoveFiles"] = reflect.TypeOf((*StorageDrsUnableToMoveFiles)(nil)).Elem() -} - -type StorageDrsUnableToMoveFilesFault StorageDrsUnableToMoveFiles - -func init() { - t["StorageDrsUnableToMoveFilesFault"] = reflect.TypeOf((*StorageDrsUnableToMoveFilesFault)(nil)).Elem() -} - -type StorageDrsVmConfigInfo struct { - DynamicData - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Enabled *bool `xml:"enabled"` - Behavior string `xml:"behavior,omitempty"` - IntraVmAffinity *bool `xml:"intraVmAffinity"` - IntraVmAntiAffinity *VirtualDiskAntiAffinityRuleSpec `xml:"intraVmAntiAffinity,omitempty"` - VirtualDiskRules []VirtualDiskRuleSpec `xml:"virtualDiskRules,omitempty"` -} - -func init() { - t["StorageDrsVmConfigInfo"] = reflect.TypeOf((*StorageDrsVmConfigInfo)(nil)).Elem() -} - -type StorageDrsVmConfigSpec struct { - ArrayUpdateSpec - - Info *StorageDrsVmConfigInfo `xml:"info,omitempty"` -} - -func init() { - t["StorageDrsVmConfigSpec"] = reflect.TypeOf((*StorageDrsVmConfigSpec)(nil)).Elem() -} - -type StorageIOAllocationInfo struct { - DynamicData - - Limit *int64 `xml:"limit"` - Shares *SharesInfo `xml:"shares,omitempty"` - Reservation *int32 `xml:"reservation"` -} - -func init() { - t["StorageIOAllocationInfo"] = reflect.TypeOf((*StorageIOAllocationInfo)(nil)).Elem() -} - -type StorageIOAllocationOption struct { - DynamicData - - LimitOption LongOption `xml:"limitOption"` - SharesOption SharesOption `xml:"sharesOption"` -} - -func init() { - t["StorageIOAllocationOption"] = reflect.TypeOf((*StorageIOAllocationOption)(nil)).Elem() -} - -type StorageIORMConfigOption struct { - DynamicData - - EnabledOption BoolOption `xml:"enabledOption"` - CongestionThresholdOption IntOption `xml:"congestionThresholdOption"` - StatsCollectionEnabledOption *BoolOption `xml:"statsCollectionEnabledOption,omitempty"` - ReservationEnabledOption *BoolOption `xml:"reservationEnabledOption,omitempty"` -} - -func init() { - t["StorageIORMConfigOption"] = reflect.TypeOf((*StorageIORMConfigOption)(nil)).Elem() -} - -type StorageIORMConfigSpec struct { - DynamicData - - Enabled *bool `xml:"enabled"` - CongestionThresholdMode string `xml:"congestionThresholdMode,omitempty"` - CongestionThreshold int32 `xml:"congestionThreshold,omitempty"` - PercentOfPeakThroughput int32 `xml:"percentOfPeakThroughput,omitempty"` - StatsCollectionEnabled *bool `xml:"statsCollectionEnabled"` - ReservationEnabled *bool `xml:"reservationEnabled"` - StatsAggregationDisabled *bool `xml:"statsAggregationDisabled"` - ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` -} - -func init() { - t["StorageIORMConfigSpec"] = reflect.TypeOf((*StorageIORMConfigSpec)(nil)).Elem() -} - -type StorageIORMInfo struct { - DynamicData - - Enabled bool `xml:"enabled"` - CongestionThresholdMode string `xml:"congestionThresholdMode,omitempty"` - CongestionThreshold int32 `xml:"congestionThreshold"` - PercentOfPeakThroughput int32 `xml:"percentOfPeakThroughput,omitempty"` - StatsCollectionEnabled *bool `xml:"statsCollectionEnabled"` - ReservationEnabled *bool `xml:"reservationEnabled"` - StatsAggregationDisabled *bool `xml:"statsAggregationDisabled"` - ReservableIopsThreshold int32 `xml:"reservableIopsThreshold,omitempty"` -} - -func init() { - t["StorageIORMInfo"] = reflect.TypeOf((*StorageIORMInfo)(nil)).Elem() -} - -type StorageMigrationAction struct { - ClusterAction - - Vm ManagedObjectReference `xml:"vm"` - RelocateSpec VirtualMachineRelocateSpec `xml:"relocateSpec"` - Source ManagedObjectReference `xml:"source"` - Destination ManagedObjectReference `xml:"destination"` - SizeTransferred int64 `xml:"sizeTransferred"` - SpaceUtilSrcBefore float32 `xml:"spaceUtilSrcBefore,omitempty"` - SpaceUtilDstBefore float32 `xml:"spaceUtilDstBefore,omitempty"` - SpaceUtilSrcAfter float32 `xml:"spaceUtilSrcAfter,omitempty"` - SpaceUtilDstAfter float32 `xml:"spaceUtilDstAfter,omitempty"` - IoLatencySrcBefore float32 `xml:"ioLatencySrcBefore,omitempty"` - IoLatencyDstBefore float32 `xml:"ioLatencyDstBefore,omitempty"` -} - -func init() { - t["StorageMigrationAction"] = reflect.TypeOf((*StorageMigrationAction)(nil)).Elem() -} - -type StoragePerformanceSummary struct { - DynamicData - - Interval int32 `xml:"interval"` - Percentile []int32 `xml:"percentile"` - DatastoreReadLatency []float64 `xml:"datastoreReadLatency"` - DatastoreWriteLatency []float64 `xml:"datastoreWriteLatency"` - DatastoreVmLatency []float64 `xml:"datastoreVmLatency"` - DatastoreReadIops []float64 `xml:"datastoreReadIops"` - DatastoreWriteIops []float64 `xml:"datastoreWriteIops"` - SiocActivityDuration int32 `xml:"siocActivityDuration"` -} - -func init() { - t["StoragePerformanceSummary"] = reflect.TypeOf((*StoragePerformanceSummary)(nil)).Elem() -} - -type StoragePlacementAction struct { - ClusterAction - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - RelocateSpec VirtualMachineRelocateSpec `xml:"relocateSpec"` - Destination ManagedObjectReference `xml:"destination"` - SpaceUtilBefore float32 `xml:"spaceUtilBefore,omitempty"` - SpaceDemandBefore float32 `xml:"spaceDemandBefore,omitempty"` - SpaceUtilAfter float32 `xml:"spaceUtilAfter,omitempty"` - SpaceDemandAfter float32 `xml:"spaceDemandAfter,omitempty"` - IoLatencyBefore float32 `xml:"ioLatencyBefore,omitempty"` -} - -func init() { - t["StoragePlacementAction"] = reflect.TypeOf((*StoragePlacementAction)(nil)).Elem() -} - -type StoragePlacementResult struct { - DynamicData - - Recommendations []ClusterRecommendation `xml:"recommendations,omitempty"` - DrsFault *ClusterDrsFaults `xml:"drsFault,omitempty"` - Task *ManagedObjectReference `xml:"task,omitempty"` -} - -func init() { - t["StoragePlacementResult"] = reflect.TypeOf((*StoragePlacementResult)(nil)).Elem() -} - -type StoragePlacementSpec struct { - DynamicData - - Type string `xml:"type"` - Priority VirtualMachineMovePriority `xml:"priority,omitempty"` - Vm *ManagedObjectReference `xml:"vm,omitempty"` - PodSelectionSpec StorageDrsPodSelectionSpec `xml:"podSelectionSpec"` - CloneSpec *VirtualMachineCloneSpec `xml:"cloneSpec,omitempty"` - CloneName string `xml:"cloneName,omitempty"` - ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` - RelocateSpec *VirtualMachineRelocateSpec `xml:"relocateSpec,omitempty"` - ResourcePool *ManagedObjectReference `xml:"resourcePool,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Folder *ManagedObjectReference `xml:"folder,omitempty"` - DisallowPrerequisiteMoves *bool `xml:"disallowPrerequisiteMoves"` - ResourceLeaseDurationSec int32 `xml:"resourceLeaseDurationSec,omitempty"` -} - -func init() { - t["StoragePlacementSpec"] = reflect.TypeOf((*StoragePlacementSpec)(nil)).Elem() -} - -type StoragePodSummary struct { - DynamicData - - Name string `xml:"name"` - Capacity int64 `xml:"capacity"` - FreeSpace int64 `xml:"freeSpace"` -} - -func init() { - t["StoragePodSummary"] = reflect.TypeOf((*StoragePodSummary)(nil)).Elem() -} - -type StorageProfile struct { - ApplyProfile - - NasStorage []NasStorageProfile `xml:"nasStorage,omitempty"` -} - -func init() { - t["StorageProfile"] = reflect.TypeOf((*StorageProfile)(nil)).Elem() -} - -type StorageRequirement struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - FreeSpaceRequiredInKb int64 `xml:"freeSpaceRequiredInKb"` -} - -func init() { - t["StorageRequirement"] = reflect.TypeOf((*StorageRequirement)(nil)).Elem() -} - -type StorageResourceManagerStorageProfileStatistics struct { - DynamicData - - ProfileId string `xml:"profileId"` - TotalSpaceMB int64 `xml:"totalSpaceMB"` - UsedSpaceMB int64 `xml:"usedSpaceMB"` -} - -func init() { - t["StorageResourceManagerStorageProfileStatistics"] = reflect.TypeOf((*StorageResourceManagerStorageProfileStatistics)(nil)).Elem() -} - -type StorageVMotionNotSupported struct { - MigrationFeatureNotSupported -} - -func init() { - t["StorageVMotionNotSupported"] = reflect.TypeOf((*StorageVMotionNotSupported)(nil)).Elem() -} - -type StorageVMotionNotSupportedFault StorageVMotionNotSupported - -func init() { - t["StorageVMotionNotSupportedFault"] = reflect.TypeOf((*StorageVMotionNotSupportedFault)(nil)).Elem() -} - -type StorageVmotionIncompatible struct { - VirtualHardwareCompatibilityIssue - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["StorageVmotionIncompatible"] = reflect.TypeOf((*StorageVmotionIncompatible)(nil)).Elem() -} - -type StorageVmotionIncompatibleFault StorageVmotionIncompatible - -func init() { - t["StorageVmotionIncompatibleFault"] = reflect.TypeOf((*StorageVmotionIncompatibleFault)(nil)).Elem() -} - -type StringExpression struct { - NegatableExpression - - Value string `xml:"value,omitempty"` -} - -func init() { - t["StringExpression"] = reflect.TypeOf((*StringExpression)(nil)).Elem() -} - -type StringOption struct { - OptionType - - DefaultValue string `xml:"defaultValue"` - ValidCharacters string `xml:"validCharacters,omitempty"` -} - -func init() { - t["StringOption"] = reflect.TypeOf((*StringOption)(nil)).Elem() -} - -type StringPolicy struct { - InheritablePolicy - - Value string `xml:"value,omitempty"` -} - -func init() { - t["StringPolicy"] = reflect.TypeOf((*StringPolicy)(nil)).Elem() -} - -type StructuredCustomizations struct { - HostProfilesEntityCustomizations - - Entity ManagedObjectReference `xml:"entity"` - Customizations *AnswerFile `xml:"customizations,omitempty"` -} - -func init() { - t["StructuredCustomizations"] = reflect.TypeOf((*StructuredCustomizations)(nil)).Elem() -} - -type SuspendVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["SuspendVAppRequestType"] = reflect.TypeOf((*SuspendVAppRequestType)(nil)).Elem() -} - -type SuspendVApp_Task SuspendVAppRequestType - -func init() { - t["SuspendVApp_Task"] = reflect.TypeOf((*SuspendVApp_Task)(nil)).Elem() -} - -type SuspendVApp_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SuspendVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["SuspendVMRequestType"] = reflect.TypeOf((*SuspendVMRequestType)(nil)).Elem() -} - -type SuspendVM_Task SuspendVMRequestType - -func init() { - t["SuspendVM_Task"] = reflect.TypeOf((*SuspendVM_Task)(nil)).Elem() -} - -type SuspendVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SuspendedRelocateNotSupported struct { - MigrationFault -} - -func init() { - t["SuspendedRelocateNotSupported"] = reflect.TypeOf((*SuspendedRelocateNotSupported)(nil)).Elem() -} - -type SuspendedRelocateNotSupportedFault SuspendedRelocateNotSupported - -func init() { - t["SuspendedRelocateNotSupportedFault"] = reflect.TypeOf((*SuspendedRelocateNotSupportedFault)(nil)).Elem() -} - -type SwapDatastoreNotWritableOnHost struct { - DatastoreNotWritableOnHost -} - -func init() { - t["SwapDatastoreNotWritableOnHost"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHost)(nil)).Elem() -} - -type SwapDatastoreNotWritableOnHostFault SwapDatastoreNotWritableOnHost - -func init() { - t["SwapDatastoreNotWritableOnHostFault"] = reflect.TypeOf((*SwapDatastoreNotWritableOnHostFault)(nil)).Elem() -} - -type SwapDatastoreUnset struct { - VimFault -} - -func init() { - t["SwapDatastoreUnset"] = reflect.TypeOf((*SwapDatastoreUnset)(nil)).Elem() -} - -type SwapDatastoreUnsetFault SwapDatastoreUnset - -func init() { - t["SwapDatastoreUnsetFault"] = reflect.TypeOf((*SwapDatastoreUnsetFault)(nil)).Elem() -} - -type SwapPlacementOverrideNotSupported struct { - InvalidVmConfig -} - -func init() { - t["SwapPlacementOverrideNotSupported"] = reflect.TypeOf((*SwapPlacementOverrideNotSupported)(nil)).Elem() -} - -type SwapPlacementOverrideNotSupportedFault SwapPlacementOverrideNotSupported - -func init() { - t["SwapPlacementOverrideNotSupportedFault"] = reflect.TypeOf((*SwapPlacementOverrideNotSupportedFault)(nil)).Elem() -} - -type SwitchIpUnset struct { - DvsFault -} - -func init() { - t["SwitchIpUnset"] = reflect.TypeOf((*SwitchIpUnset)(nil)).Elem() -} - -type SwitchIpUnsetFault SwitchIpUnset - -func init() { - t["SwitchIpUnsetFault"] = reflect.TypeOf((*SwitchIpUnsetFault)(nil)).Elem() -} - -type SwitchNotInUpgradeMode struct { - DvsFault -} - -func init() { - t["SwitchNotInUpgradeMode"] = reflect.TypeOf((*SwitchNotInUpgradeMode)(nil)).Elem() -} - -type SwitchNotInUpgradeModeFault SwitchNotInUpgradeMode - -func init() { - t["SwitchNotInUpgradeModeFault"] = reflect.TypeOf((*SwitchNotInUpgradeModeFault)(nil)).Elem() -} - -type SystemError struct { - RuntimeFault - - Reason string `xml:"reason"` -} - -func init() { - t["SystemError"] = reflect.TypeOf((*SystemError)(nil)).Elem() -} - -type SystemErrorFault SystemError - -func init() { - t["SystemErrorFault"] = reflect.TypeOf((*SystemErrorFault)(nil)).Elem() -} - -type SystemEventInfo struct { - DynamicData - - RecordId int64 `xml:"recordId"` - When string `xml:"when"` - SelType int64 `xml:"selType"` - Message string `xml:"message"` - SensorNumber int64 `xml:"sensorNumber"` -} - -func init() { - t["SystemEventInfo"] = reflect.TypeOf((*SystemEventInfo)(nil)).Elem() -} - -type Tag struct { - DynamicData - - Key string `xml:"key"` -} - -func init() { - t["Tag"] = reflect.TypeOf((*Tag)(nil)).Elem() -} - -type TaskDescription struct { - DynamicData - - MethodInfo []BaseElementDescription `xml:"methodInfo,typeattr"` - State []BaseElementDescription `xml:"state,typeattr"` - Reason []BaseTypeDescription `xml:"reason,typeattr"` -} - -func init() { - t["TaskDescription"] = reflect.TypeOf((*TaskDescription)(nil)).Elem() -} - -type TaskEvent struct { - Event - - Info TaskInfo `xml:"info"` -} - -func init() { - t["TaskEvent"] = reflect.TypeOf((*TaskEvent)(nil)).Elem() -} - -type TaskFilterSpec struct { - DynamicData - - Entity *TaskFilterSpecByEntity `xml:"entity,omitempty"` - Time *TaskFilterSpecByTime `xml:"time,omitempty"` - UserName *TaskFilterSpecByUsername `xml:"userName,omitempty"` - ActivationId []string `xml:"activationId,omitempty"` - State []TaskInfoState `xml:"state,omitempty"` - Alarm *ManagedObjectReference `xml:"alarm,omitempty"` - ScheduledTask *ManagedObjectReference `xml:"scheduledTask,omitempty"` - EventChainId []int32 `xml:"eventChainId,omitempty"` - Tag []string `xml:"tag,omitempty"` - ParentTaskKey []string `xml:"parentTaskKey,omitempty"` - RootTaskKey []string `xml:"rootTaskKey,omitempty"` -} - -func init() { - t["TaskFilterSpec"] = reflect.TypeOf((*TaskFilterSpec)(nil)).Elem() -} - -type TaskFilterSpecByEntity struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - Recursion TaskFilterSpecRecursionOption `xml:"recursion"` -} - -func init() { - t["TaskFilterSpecByEntity"] = reflect.TypeOf((*TaskFilterSpecByEntity)(nil)).Elem() -} - -type TaskFilterSpecByTime struct { - DynamicData - - TimeType TaskFilterSpecTimeOption `xml:"timeType"` - BeginTime *time.Time `xml:"beginTime"` - EndTime *time.Time `xml:"endTime"` -} - -func init() { - t["TaskFilterSpecByTime"] = reflect.TypeOf((*TaskFilterSpecByTime)(nil)).Elem() -} - -type TaskFilterSpecByUsername struct { - DynamicData - - SystemUser bool `xml:"systemUser"` - UserList []string `xml:"userList,omitempty"` -} - -func init() { - t["TaskFilterSpecByUsername"] = reflect.TypeOf((*TaskFilterSpecByUsername)(nil)).Elem() -} - -type TaskInProgress struct { - VimFault - - Task ManagedObjectReference `xml:"task"` -} - -func init() { - t["TaskInProgress"] = reflect.TypeOf((*TaskInProgress)(nil)).Elem() -} - -type TaskInProgressFault BaseTaskInProgress - -func init() { - t["TaskInProgressFault"] = reflect.TypeOf((*TaskInProgressFault)(nil)).Elem() -} - -type TaskInfo struct { - DynamicData - - Key string `xml:"key"` - Task ManagedObjectReference `xml:"task"` - Description *LocalizableMessage `xml:"description,omitempty"` - Name string `xml:"name,omitempty"` - DescriptionId string `xml:"descriptionId"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` - EntityName string `xml:"entityName,omitempty"` - Locked []ManagedObjectReference `xml:"locked,omitempty"` - State TaskInfoState `xml:"state"` - Cancelled bool `xml:"cancelled"` - Cancelable bool `xml:"cancelable"` - Error *LocalizedMethodFault `xml:"error,omitempty"` - Result AnyType `xml:"result,omitempty,typeattr"` - Progress int32 `xml:"progress,omitempty"` - Reason BaseTaskReason `xml:"reason,typeattr"` - QueueTime time.Time `xml:"queueTime"` - StartTime *time.Time `xml:"startTime"` - CompleteTime *time.Time `xml:"completeTime"` - EventChainId int32 `xml:"eventChainId"` - ChangeTag string `xml:"changeTag,omitempty"` - ParentTaskKey string `xml:"parentTaskKey,omitempty"` - RootTaskKey string `xml:"rootTaskKey,omitempty"` - ActivationId string `xml:"activationId,omitempty"` -} - -func init() { - t["TaskInfo"] = reflect.TypeOf((*TaskInfo)(nil)).Elem() -} - -type TaskReason struct { - DynamicData -} - -func init() { - t["TaskReason"] = reflect.TypeOf((*TaskReason)(nil)).Elem() -} - -type TaskReasonAlarm struct { - TaskReason - - AlarmName string `xml:"alarmName"` - Alarm ManagedObjectReference `xml:"alarm"` - EntityName string `xml:"entityName"` - Entity ManagedObjectReference `xml:"entity"` -} - -func init() { - t["TaskReasonAlarm"] = reflect.TypeOf((*TaskReasonAlarm)(nil)).Elem() -} - -type TaskReasonSchedule struct { - TaskReason - - Name string `xml:"name"` - ScheduledTask ManagedObjectReference `xml:"scheduledTask"` -} - -func init() { - t["TaskReasonSchedule"] = reflect.TypeOf((*TaskReasonSchedule)(nil)).Elem() -} - -type TaskReasonSystem struct { - TaskReason -} - -func init() { - t["TaskReasonSystem"] = reflect.TypeOf((*TaskReasonSystem)(nil)).Elem() -} - -type TaskReasonUser struct { - TaskReason - - UserName string `xml:"userName"` -} - -func init() { - t["TaskReasonUser"] = reflect.TypeOf((*TaskReasonUser)(nil)).Elem() -} - -type TaskScheduler struct { - DynamicData - - ActiveTime *time.Time `xml:"activeTime"` - ExpireTime *time.Time `xml:"expireTime"` -} - -func init() { - t["TaskScheduler"] = reflect.TypeOf((*TaskScheduler)(nil)).Elem() -} - -type TaskTimeoutEvent struct { - TaskEvent -} - -func init() { - t["TaskTimeoutEvent"] = reflect.TypeOf((*TaskTimeoutEvent)(nil)).Elem() -} - -type TeamingMatchEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["TeamingMatchEvent"] = reflect.TypeOf((*TeamingMatchEvent)(nil)).Elem() -} - -type TeamingMisMatchEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["TeamingMisMatchEvent"] = reflect.TypeOf((*TeamingMisMatchEvent)(nil)).Elem() -} - -type TemplateBeingUpgradedEvent struct { - TemplateUpgradeEvent -} - -func init() { - t["TemplateBeingUpgradedEvent"] = reflect.TypeOf((*TemplateBeingUpgradedEvent)(nil)).Elem() -} - -type TemplateConfigFileInfo struct { - VmConfigFileInfo -} - -func init() { - t["TemplateConfigFileInfo"] = reflect.TypeOf((*TemplateConfigFileInfo)(nil)).Elem() -} - -type TemplateConfigFileQuery struct { - VmConfigFileQuery -} - -func init() { - t["TemplateConfigFileQuery"] = reflect.TypeOf((*TemplateConfigFileQuery)(nil)).Elem() -} - -type TemplateUpgradeEvent struct { - Event - - LegacyTemplate string `xml:"legacyTemplate"` -} - -func init() { - t["TemplateUpgradeEvent"] = reflect.TypeOf((*TemplateUpgradeEvent)(nil)).Elem() -} - -type TemplateUpgradeFailedEvent struct { - TemplateUpgradeEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["TemplateUpgradeFailedEvent"] = reflect.TypeOf((*TemplateUpgradeFailedEvent)(nil)).Elem() -} - -type TemplateUpgradedEvent struct { - TemplateUpgradeEvent -} - -func init() { - t["TemplateUpgradedEvent"] = reflect.TypeOf((*TemplateUpgradedEvent)(nil)).Elem() -} - -type TerminateFaultTolerantVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm *ManagedObjectReference `xml:"vm,omitempty"` -} - -func init() { - t["TerminateFaultTolerantVMRequestType"] = reflect.TypeOf((*TerminateFaultTolerantVMRequestType)(nil)).Elem() -} - -type TerminateFaultTolerantVM_Task TerminateFaultTolerantVMRequestType - -func init() { - t["TerminateFaultTolerantVM_Task"] = reflect.TypeOf((*TerminateFaultTolerantVM_Task)(nil)).Elem() -} - -type TerminateFaultTolerantVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type TerminateProcessInGuest TerminateProcessInGuestRequestType - -func init() { - t["TerminateProcessInGuest"] = reflect.TypeOf((*TerminateProcessInGuest)(nil)).Elem() -} - -type TerminateProcessInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` - Pid int64 `xml:"pid"` -} - -func init() { - t["TerminateProcessInGuestRequestType"] = reflect.TypeOf((*TerminateProcessInGuestRequestType)(nil)).Elem() -} - -type TerminateProcessInGuestResponse struct { -} - -type TerminateSession TerminateSessionRequestType - -func init() { - t["TerminateSession"] = reflect.TypeOf((*TerminateSession)(nil)).Elem() -} - -type TerminateSessionRequestType struct { - This ManagedObjectReference `xml:"_this"` - SessionId []string `xml:"sessionId"` -} - -func init() { - t["TerminateSessionRequestType"] = reflect.TypeOf((*TerminateSessionRequestType)(nil)).Elem() -} - -type TerminateSessionResponse struct { -} - -type TerminateVM TerminateVMRequestType - -func init() { - t["TerminateVM"] = reflect.TypeOf((*TerminateVM)(nil)).Elem() -} - -type TerminateVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["TerminateVMRequestType"] = reflect.TypeOf((*TerminateVMRequestType)(nil)).Elem() -} - -type TerminateVMResponse struct { -} - -type TestTimeService TestTimeServiceRequestType - -func init() { - t["TestTimeService"] = reflect.TypeOf((*TestTimeService)(nil)).Elem() -} - -type TestTimeServiceRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["TestTimeServiceRequestType"] = reflect.TypeOf((*TestTimeServiceRequestType)(nil)).Elem() -} - -type TestTimeServiceResponse struct { - Returnval *HostDateTimeSystemServiceTestResult `xml:"returnval,omitempty"` -} - -type ThirdPartyLicenseAssignmentFailed struct { - RuntimeFault - - Host ManagedObjectReference `xml:"host"` - Module string `xml:"module"` - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["ThirdPartyLicenseAssignmentFailed"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailed)(nil)).Elem() -} - -type ThirdPartyLicenseAssignmentFailedFault ThirdPartyLicenseAssignmentFailed - -func init() { - t["ThirdPartyLicenseAssignmentFailedFault"] = reflect.TypeOf((*ThirdPartyLicenseAssignmentFailedFault)(nil)).Elem() -} - -type TicketedSessionAuthentication struct { - GuestAuthentication - - Ticket string `xml:"ticket"` -} - -func init() { - t["TicketedSessionAuthentication"] = reflect.TypeOf((*TicketedSessionAuthentication)(nil)).Elem() -} - -type TimedOutHostOperationEvent struct { - HostEvent -} - -func init() { - t["TimedOutHostOperationEvent"] = reflect.TypeOf((*TimedOutHostOperationEvent)(nil)).Elem() -} - -type Timedout struct { - VimFault -} - -func init() { - t["Timedout"] = reflect.TypeOf((*Timedout)(nil)).Elem() -} - -type TimedoutFault BaseTimedout - -func init() { - t["TimedoutFault"] = reflect.TypeOf((*TimedoutFault)(nil)).Elem() -} - -type TooManyConcurrentNativeClones struct { - FileFault -} - -func init() { - t["TooManyConcurrentNativeClones"] = reflect.TypeOf((*TooManyConcurrentNativeClones)(nil)).Elem() -} - -type TooManyConcurrentNativeClonesFault TooManyConcurrentNativeClones - -func init() { - t["TooManyConcurrentNativeClonesFault"] = reflect.TypeOf((*TooManyConcurrentNativeClonesFault)(nil)).Elem() -} - -type TooManyConsecutiveOverrides struct { - VimFault -} - -func init() { - t["TooManyConsecutiveOverrides"] = reflect.TypeOf((*TooManyConsecutiveOverrides)(nil)).Elem() -} - -type TooManyConsecutiveOverridesFault TooManyConsecutiveOverrides - -func init() { - t["TooManyConsecutiveOverridesFault"] = reflect.TypeOf((*TooManyConsecutiveOverridesFault)(nil)).Elem() -} - -type TooManyDevices struct { - InvalidVmConfig -} - -func init() { - t["TooManyDevices"] = reflect.TypeOf((*TooManyDevices)(nil)).Elem() -} - -type TooManyDevicesFault TooManyDevices - -func init() { - t["TooManyDevicesFault"] = reflect.TypeOf((*TooManyDevicesFault)(nil)).Elem() -} - -type TooManyDisksOnLegacyHost struct { - MigrationFault - - DiskCount int32 `xml:"diskCount"` - TimeoutDanger bool `xml:"timeoutDanger"` -} - -func init() { - t["TooManyDisksOnLegacyHost"] = reflect.TypeOf((*TooManyDisksOnLegacyHost)(nil)).Elem() -} - -type TooManyDisksOnLegacyHostFault TooManyDisksOnLegacyHost - -func init() { - t["TooManyDisksOnLegacyHostFault"] = reflect.TypeOf((*TooManyDisksOnLegacyHostFault)(nil)).Elem() -} - -type TooManyGuestLogons struct { - GuestOperationsFault -} - -func init() { - t["TooManyGuestLogons"] = reflect.TypeOf((*TooManyGuestLogons)(nil)).Elem() -} - -type TooManyGuestLogonsFault TooManyGuestLogons - -func init() { - t["TooManyGuestLogonsFault"] = reflect.TypeOf((*TooManyGuestLogonsFault)(nil)).Elem() -} - -type TooManyHosts struct { - HostConnectFault -} - -func init() { - t["TooManyHosts"] = reflect.TypeOf((*TooManyHosts)(nil)).Elem() -} - -type TooManyHostsFault TooManyHosts - -func init() { - t["TooManyHostsFault"] = reflect.TypeOf((*TooManyHostsFault)(nil)).Elem() -} - -type TooManyNativeCloneLevels struct { - FileFault -} - -func init() { - t["TooManyNativeCloneLevels"] = reflect.TypeOf((*TooManyNativeCloneLevels)(nil)).Elem() -} - -type TooManyNativeCloneLevelsFault TooManyNativeCloneLevels - -func init() { - t["TooManyNativeCloneLevelsFault"] = reflect.TypeOf((*TooManyNativeCloneLevelsFault)(nil)).Elem() -} - -type TooManyNativeClonesOnFile struct { - FileFault -} - -func init() { - t["TooManyNativeClonesOnFile"] = reflect.TypeOf((*TooManyNativeClonesOnFile)(nil)).Elem() -} - -type TooManyNativeClonesOnFileFault TooManyNativeClonesOnFile - -func init() { - t["TooManyNativeClonesOnFileFault"] = reflect.TypeOf((*TooManyNativeClonesOnFileFault)(nil)).Elem() -} - -type TooManySnapshotLevels struct { - SnapshotFault -} - -func init() { - t["TooManySnapshotLevels"] = reflect.TypeOf((*TooManySnapshotLevels)(nil)).Elem() -} - -type TooManySnapshotLevelsFault TooManySnapshotLevels - -func init() { - t["TooManySnapshotLevelsFault"] = reflect.TypeOf((*TooManySnapshotLevelsFault)(nil)).Elem() -} - -type ToolsAlreadyUpgraded struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsAlreadyUpgraded"] = reflect.TypeOf((*ToolsAlreadyUpgraded)(nil)).Elem() -} - -type ToolsAlreadyUpgradedFault ToolsAlreadyUpgraded - -func init() { - t["ToolsAlreadyUpgradedFault"] = reflect.TypeOf((*ToolsAlreadyUpgradedFault)(nil)).Elem() -} - -type ToolsAutoUpgradeNotSupported struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsAutoUpgradeNotSupported"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupported)(nil)).Elem() -} - -type ToolsAutoUpgradeNotSupportedFault ToolsAutoUpgradeNotSupported - -func init() { - t["ToolsAutoUpgradeNotSupportedFault"] = reflect.TypeOf((*ToolsAutoUpgradeNotSupportedFault)(nil)).Elem() -} - -type ToolsConfigInfo struct { - DynamicData - - ToolsVersion int32 `xml:"toolsVersion,omitempty"` - ToolsInstallType string `xml:"toolsInstallType,omitempty"` - AfterPowerOn *bool `xml:"afterPowerOn"` - AfterResume *bool `xml:"afterResume"` - BeforeGuestStandby *bool `xml:"beforeGuestStandby"` - BeforeGuestShutdown *bool `xml:"beforeGuestShutdown"` - BeforeGuestReboot *bool `xml:"beforeGuestReboot"` - ToolsUpgradePolicy string `xml:"toolsUpgradePolicy,omitempty"` - PendingCustomization string `xml:"pendingCustomization,omitempty"` - CustomizationKeyId *CryptoKeyId `xml:"customizationKeyId,omitempty"` - SyncTimeWithHostAllowed *bool `xml:"syncTimeWithHostAllowed"` - SyncTimeWithHost *bool `xml:"syncTimeWithHost"` - LastInstallInfo *ToolsConfigInfoToolsLastInstallInfo `xml:"lastInstallInfo,omitempty"` -} - -func init() { - t["ToolsConfigInfo"] = reflect.TypeOf((*ToolsConfigInfo)(nil)).Elem() -} - -type ToolsConfigInfoToolsLastInstallInfo struct { - DynamicData - - Counter int32 `xml:"counter"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["ToolsConfigInfoToolsLastInstallInfo"] = reflect.TypeOf((*ToolsConfigInfoToolsLastInstallInfo)(nil)).Elem() -} - -type ToolsImageCopyFailed struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsImageCopyFailed"] = reflect.TypeOf((*ToolsImageCopyFailed)(nil)).Elem() -} - -type ToolsImageCopyFailedFault ToolsImageCopyFailed - -func init() { - t["ToolsImageCopyFailedFault"] = reflect.TypeOf((*ToolsImageCopyFailedFault)(nil)).Elem() -} - -type ToolsImageNotAvailable struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsImageNotAvailable"] = reflect.TypeOf((*ToolsImageNotAvailable)(nil)).Elem() -} - -type ToolsImageNotAvailableFault ToolsImageNotAvailable - -func init() { - t["ToolsImageNotAvailableFault"] = reflect.TypeOf((*ToolsImageNotAvailableFault)(nil)).Elem() -} - -type ToolsImageSignatureCheckFailed struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsImageSignatureCheckFailed"] = reflect.TypeOf((*ToolsImageSignatureCheckFailed)(nil)).Elem() -} - -type ToolsImageSignatureCheckFailedFault ToolsImageSignatureCheckFailed - -func init() { - t["ToolsImageSignatureCheckFailedFault"] = reflect.TypeOf((*ToolsImageSignatureCheckFailedFault)(nil)).Elem() -} - -type ToolsInstallationInProgress struct { - MigrationFault -} - -func init() { - t["ToolsInstallationInProgress"] = reflect.TypeOf((*ToolsInstallationInProgress)(nil)).Elem() -} - -type ToolsInstallationInProgressFault ToolsInstallationInProgress - -func init() { - t["ToolsInstallationInProgressFault"] = reflect.TypeOf((*ToolsInstallationInProgressFault)(nil)).Elem() -} - -type ToolsUnavailable struct { - VimFault -} - -func init() { - t["ToolsUnavailable"] = reflect.TypeOf((*ToolsUnavailable)(nil)).Elem() -} - -type ToolsUnavailableFault ToolsUnavailable - -func init() { - t["ToolsUnavailableFault"] = reflect.TypeOf((*ToolsUnavailableFault)(nil)).Elem() -} - -type ToolsUpgradeCancelled struct { - VmToolsUpgradeFault -} - -func init() { - t["ToolsUpgradeCancelled"] = reflect.TypeOf((*ToolsUpgradeCancelled)(nil)).Elem() -} - -type ToolsUpgradeCancelledFault ToolsUpgradeCancelled - -func init() { - t["ToolsUpgradeCancelledFault"] = reflect.TypeOf((*ToolsUpgradeCancelledFault)(nil)).Elem() -} - -type TraversalSpec struct { - SelectionSpec - - Type string `xml:"type"` - Path string `xml:"path"` - Skip *bool `xml:"skip"` - SelectSet []BaseSelectionSpec `xml:"selectSet,omitempty,typeattr"` -} - -func init() { - t["TraversalSpec"] = reflect.TypeOf((*TraversalSpec)(nil)).Elem() -} - -type TurnDiskLocatorLedOffRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuids []string `xml:"scsiDiskUuids"` -} - -func init() { - t["TurnDiskLocatorLedOffRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOffRequestType)(nil)).Elem() -} - -type TurnDiskLocatorLedOff_Task TurnDiskLocatorLedOffRequestType - -func init() { - t["TurnDiskLocatorLedOff_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOff_Task)(nil)).Elem() -} - -type TurnDiskLocatorLedOff_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type TurnDiskLocatorLedOnRequestType struct { - This ManagedObjectReference `xml:"_this"` - ScsiDiskUuids []string `xml:"scsiDiskUuids"` -} - -func init() { - t["TurnDiskLocatorLedOnRequestType"] = reflect.TypeOf((*TurnDiskLocatorLedOnRequestType)(nil)).Elem() -} - -type TurnDiskLocatorLedOn_Task TurnDiskLocatorLedOnRequestType - -func init() { - t["TurnDiskLocatorLedOn_Task"] = reflect.TypeOf((*TurnDiskLocatorLedOn_Task)(nil)).Elem() -} - -type TurnDiskLocatorLedOn_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type TurnOffFaultToleranceForVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["TurnOffFaultToleranceForVMRequestType"] = reflect.TypeOf((*TurnOffFaultToleranceForVMRequestType)(nil)).Elem() -} - -type TurnOffFaultToleranceForVM_Task TurnOffFaultToleranceForVMRequestType - -func init() { - t["TurnOffFaultToleranceForVM_Task"] = reflect.TypeOf((*TurnOffFaultToleranceForVM_Task)(nil)).Elem() -} - -type TurnOffFaultToleranceForVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type TypeDescription struct { - Description - - Key string `xml:"key"` -} - -func init() { - t["TypeDescription"] = reflect.TypeOf((*TypeDescription)(nil)).Elem() -} - -type UnSupportedDatastoreForVFlash struct { - UnsupportedDatastore - - DatastoreName string `xml:"datastoreName"` - Type string `xml:"type"` -} - -func init() { - t["UnSupportedDatastoreForVFlash"] = reflect.TypeOf((*UnSupportedDatastoreForVFlash)(nil)).Elem() -} - -type UnSupportedDatastoreForVFlashFault UnSupportedDatastoreForVFlash - -func init() { - t["UnSupportedDatastoreForVFlashFault"] = reflect.TypeOf((*UnSupportedDatastoreForVFlashFault)(nil)).Elem() -} - -type UnassignUserFromGroup UnassignUserFromGroupRequestType - -func init() { - t["UnassignUserFromGroup"] = reflect.TypeOf((*UnassignUserFromGroup)(nil)).Elem() -} - -type UnassignUserFromGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - User string `xml:"user"` - Group string `xml:"group"` -} - -func init() { - t["UnassignUserFromGroupRequestType"] = reflect.TypeOf((*UnassignUserFromGroupRequestType)(nil)).Elem() -} - -type UnassignUserFromGroupResponse struct { -} - -type UnbindVnic UnbindVnicRequestType - -func init() { - t["UnbindVnic"] = reflect.TypeOf((*UnbindVnic)(nil)).Elem() -} - -type UnbindVnicRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaName string `xml:"iScsiHbaName"` - VnicDevice string `xml:"vnicDevice"` - Force bool `xml:"force"` -} - -func init() { - t["UnbindVnicRequestType"] = reflect.TypeOf((*UnbindVnicRequestType)(nil)).Elem() -} - -type UnbindVnicResponse struct { -} - -type UncommittedUndoableDisk struct { - MigrationFault -} - -func init() { - t["UncommittedUndoableDisk"] = reflect.TypeOf((*UncommittedUndoableDisk)(nil)).Elem() -} - -type UncommittedUndoableDiskFault UncommittedUndoableDisk - -func init() { - t["UncommittedUndoableDiskFault"] = reflect.TypeOf((*UncommittedUndoableDiskFault)(nil)).Elem() -} - -type UnconfiguredPropertyValue struct { - InvalidPropertyValue -} - -func init() { - t["UnconfiguredPropertyValue"] = reflect.TypeOf((*UnconfiguredPropertyValue)(nil)).Elem() -} - -type UnconfiguredPropertyValueFault UnconfiguredPropertyValue - -func init() { - t["UnconfiguredPropertyValueFault"] = reflect.TypeOf((*UnconfiguredPropertyValueFault)(nil)).Elem() -} - -type UncustomizableGuest struct { - CustomizationFault - - UncustomizableGuestOS string `xml:"uncustomizableGuestOS"` -} - -func init() { - t["UncustomizableGuest"] = reflect.TypeOf((*UncustomizableGuest)(nil)).Elem() -} - -type UncustomizableGuestFault UncustomizableGuest - -func init() { - t["UncustomizableGuestFault"] = reflect.TypeOf((*UncustomizableGuestFault)(nil)).Elem() -} - -type UnexpectedCustomizationFault struct { - CustomizationFault -} - -func init() { - t["UnexpectedCustomizationFault"] = reflect.TypeOf((*UnexpectedCustomizationFault)(nil)).Elem() -} - -type UnexpectedCustomizationFaultFault UnexpectedCustomizationFault - -func init() { - t["UnexpectedCustomizationFaultFault"] = reflect.TypeOf((*UnexpectedCustomizationFaultFault)(nil)).Elem() -} - -type UnexpectedFault struct { - RuntimeFault - - FaultName string `xml:"faultName"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["UnexpectedFault"] = reflect.TypeOf((*UnexpectedFault)(nil)).Elem() -} - -type UnexpectedFaultFault UnexpectedFault - -func init() { - t["UnexpectedFaultFault"] = reflect.TypeOf((*UnexpectedFaultFault)(nil)).Elem() -} - -type UninstallHostPatchRequestType struct { - This ManagedObjectReference `xml:"_this"` - BulletinIds []string `xml:"bulletinIds,omitempty"` - Spec *HostPatchManagerPatchManagerOperationSpec `xml:"spec,omitempty"` -} - -func init() { - t["UninstallHostPatchRequestType"] = reflect.TypeOf((*UninstallHostPatchRequestType)(nil)).Elem() -} - -type UninstallHostPatch_Task UninstallHostPatchRequestType - -func init() { - t["UninstallHostPatch_Task"] = reflect.TypeOf((*UninstallHostPatch_Task)(nil)).Elem() -} - -type UninstallHostPatch_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UninstallIoFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - CompRes ManagedObjectReference `xml:"compRes"` -} - -func init() { - t["UninstallIoFilterRequestType"] = reflect.TypeOf((*UninstallIoFilterRequestType)(nil)).Elem() -} - -type UninstallIoFilter_Task UninstallIoFilterRequestType - -func init() { - t["UninstallIoFilter_Task"] = reflect.TypeOf((*UninstallIoFilter_Task)(nil)).Elem() -} - -type UninstallIoFilter_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UninstallService UninstallServiceRequestType - -func init() { - t["UninstallService"] = reflect.TypeOf((*UninstallService)(nil)).Elem() -} - -type UninstallServiceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` -} - -func init() { - t["UninstallServiceRequestType"] = reflect.TypeOf((*UninstallServiceRequestType)(nil)).Elem() -} - -type UninstallServiceResponse struct { -} - -type UnlicensedVirtualMachinesEvent struct { - LicenseEvent - - Unlicensed int32 `xml:"unlicensed"` - Available int32 `xml:"available"` -} - -func init() { - t["UnlicensedVirtualMachinesEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesEvent)(nil)).Elem() -} - -type UnlicensedVirtualMachinesFoundEvent struct { - LicenseEvent - - Available int32 `xml:"available"` -} - -func init() { - t["UnlicensedVirtualMachinesFoundEvent"] = reflect.TypeOf((*UnlicensedVirtualMachinesFoundEvent)(nil)).Elem() -} - -type UnmapVmfsVolumeExRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid []string `xml:"vmfsUuid"` -} - -func init() { - t["UnmapVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmapVmfsVolumeExRequestType)(nil)).Elem() -} - -type UnmapVmfsVolumeEx_Task UnmapVmfsVolumeExRequestType - -func init() { - t["UnmapVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmapVmfsVolumeEx_Task)(nil)).Elem() -} - -type UnmapVmfsVolumeEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UnmarkServiceProviderEntities UnmarkServiceProviderEntitiesRequestType - -func init() { - t["UnmarkServiceProviderEntities"] = reflect.TypeOf((*UnmarkServiceProviderEntities)(nil)).Elem() -} - -type UnmarkServiceProviderEntitiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity []ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["UnmarkServiceProviderEntitiesRequestType"] = reflect.TypeOf((*UnmarkServiceProviderEntitiesRequestType)(nil)).Elem() -} - -type UnmarkServiceProviderEntitiesResponse struct { -} - -type UnmountDiskMappingRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mapping []VsanHostDiskMapping `xml:"mapping"` -} - -func init() { - t["UnmountDiskMappingRequestType"] = reflect.TypeOf((*UnmountDiskMappingRequestType)(nil)).Elem() -} - -type UnmountDiskMapping_Task UnmountDiskMappingRequestType - -func init() { - t["UnmountDiskMapping_Task"] = reflect.TypeOf((*UnmountDiskMapping_Task)(nil)).Elem() -} - -type UnmountDiskMapping_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UnmountForceMountedVmfsVolume UnmountForceMountedVmfsVolumeRequestType - -func init() { - t["UnmountForceMountedVmfsVolume"] = reflect.TypeOf((*UnmountForceMountedVmfsVolume)(nil)).Elem() -} - -type UnmountForceMountedVmfsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` -} - -func init() { - t["UnmountForceMountedVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountForceMountedVmfsVolumeRequestType)(nil)).Elem() -} - -type UnmountForceMountedVmfsVolumeResponse struct { -} - -type UnmountToolsInstaller UnmountToolsInstallerRequestType - -func init() { - t["UnmountToolsInstaller"] = reflect.TypeOf((*UnmountToolsInstaller)(nil)).Elem() -} - -type UnmountToolsInstallerRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["UnmountToolsInstallerRequestType"] = reflect.TypeOf((*UnmountToolsInstallerRequestType)(nil)).Elem() -} - -type UnmountToolsInstallerResponse struct { -} - -type UnmountVffsVolume UnmountVffsVolumeRequestType - -func init() { - t["UnmountVffsVolume"] = reflect.TypeOf((*UnmountVffsVolume)(nil)).Elem() -} - -type UnmountVffsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - VffsUuid string `xml:"vffsUuid"` -} - -func init() { - t["UnmountVffsVolumeRequestType"] = reflect.TypeOf((*UnmountVffsVolumeRequestType)(nil)).Elem() -} - -type UnmountVffsVolumeResponse struct { -} - -type UnmountVmfsVolume UnmountVmfsVolumeRequestType - -func init() { - t["UnmountVmfsVolume"] = reflect.TypeOf((*UnmountVmfsVolume)(nil)).Elem() -} - -type UnmountVmfsVolumeExRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid []string `xml:"vmfsUuid"` -} - -func init() { - t["UnmountVmfsVolumeExRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeExRequestType)(nil)).Elem() -} - -type UnmountVmfsVolumeEx_Task UnmountVmfsVolumeExRequestType - -func init() { - t["UnmountVmfsVolumeEx_Task"] = reflect.TypeOf((*UnmountVmfsVolumeEx_Task)(nil)).Elem() -} - -type UnmountVmfsVolumeEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UnmountVmfsVolumeRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` -} - -func init() { - t["UnmountVmfsVolumeRequestType"] = reflect.TypeOf((*UnmountVmfsVolumeRequestType)(nil)).Elem() -} - -type UnmountVmfsVolumeResponse struct { -} - -type UnrecognizedHost struct { - VimFault - - HostName string `xml:"hostName"` -} - -func init() { - t["UnrecognizedHost"] = reflect.TypeOf((*UnrecognizedHost)(nil)).Elem() -} - -type UnrecognizedHostFault UnrecognizedHost - -func init() { - t["UnrecognizedHostFault"] = reflect.TypeOf((*UnrecognizedHostFault)(nil)).Elem() -} - -type UnregisterAndDestroyRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["UnregisterAndDestroyRequestType"] = reflect.TypeOf((*UnregisterAndDestroyRequestType)(nil)).Elem() -} - -type UnregisterAndDestroy_Task UnregisterAndDestroyRequestType - -func init() { - t["UnregisterAndDestroy_Task"] = reflect.TypeOf((*UnregisterAndDestroy_Task)(nil)).Elem() -} - -type UnregisterAndDestroy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UnregisterExtension UnregisterExtensionRequestType - -func init() { - t["UnregisterExtension"] = reflect.TypeOf((*UnregisterExtension)(nil)).Elem() -} - -type UnregisterExtensionRequestType struct { - This ManagedObjectReference `xml:"_this"` - ExtensionKey string `xml:"extensionKey"` -} - -func init() { - t["UnregisterExtensionRequestType"] = reflect.TypeOf((*UnregisterExtensionRequestType)(nil)).Elem() -} - -type UnregisterExtensionResponse struct { -} - -type UnregisterHealthUpdateProvider UnregisterHealthUpdateProviderRequestType - -func init() { - t["UnregisterHealthUpdateProvider"] = reflect.TypeOf((*UnregisterHealthUpdateProvider)(nil)).Elem() -} - -type UnregisterHealthUpdateProviderRequestType struct { - This ManagedObjectReference `xml:"_this"` - ProviderId string `xml:"providerId"` -} - -func init() { - t["UnregisterHealthUpdateProviderRequestType"] = reflect.TypeOf((*UnregisterHealthUpdateProviderRequestType)(nil)).Elem() -} - -type UnregisterHealthUpdateProviderResponse struct { -} - -type UnregisterKmsCluster UnregisterKmsClusterRequestType - -func init() { - t["UnregisterKmsCluster"] = reflect.TypeOf((*UnregisterKmsCluster)(nil)).Elem() -} - -type UnregisterKmsClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - ClusterId KeyProviderId `xml:"clusterId"` -} - -func init() { - t["UnregisterKmsClusterRequestType"] = reflect.TypeOf((*UnregisterKmsClusterRequestType)(nil)).Elem() -} - -type UnregisterKmsClusterResponse struct { -} - -type UnregisterVM UnregisterVMRequestType - -func init() { - t["UnregisterVM"] = reflect.TypeOf((*UnregisterVM)(nil)).Elem() -} - -type UnregisterVMRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["UnregisterVMRequestType"] = reflect.TypeOf((*UnregisterVMRequestType)(nil)).Elem() -} - -type UnregisterVMResponse struct { -} - -type UnsharedSwapVMotionNotSupported struct { - MigrationFeatureNotSupported -} - -func init() { - t["UnsharedSwapVMotionNotSupported"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupported)(nil)).Elem() -} - -type UnsharedSwapVMotionNotSupportedFault UnsharedSwapVMotionNotSupported - -func init() { - t["UnsharedSwapVMotionNotSupportedFault"] = reflect.TypeOf((*UnsharedSwapVMotionNotSupportedFault)(nil)).Elem() -} - -type UnsupportedDatastore struct { - VmConfigFault - - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["UnsupportedDatastore"] = reflect.TypeOf((*UnsupportedDatastore)(nil)).Elem() -} - -type UnsupportedDatastoreFault BaseUnsupportedDatastore - -func init() { - t["UnsupportedDatastoreFault"] = reflect.TypeOf((*UnsupportedDatastoreFault)(nil)).Elem() -} - -type UnsupportedGuest struct { - InvalidVmConfig - - UnsupportedGuestOS string `xml:"unsupportedGuestOS"` -} - -func init() { - t["UnsupportedGuest"] = reflect.TypeOf((*UnsupportedGuest)(nil)).Elem() -} - -type UnsupportedGuestFault UnsupportedGuest - -func init() { - t["UnsupportedGuestFault"] = reflect.TypeOf((*UnsupportedGuestFault)(nil)).Elem() -} - -type UnsupportedVimApiVersion struct { - VimFault - - Version string `xml:"version,omitempty"` -} - -func init() { - t["UnsupportedVimApiVersion"] = reflect.TypeOf((*UnsupportedVimApiVersion)(nil)).Elem() -} - -type UnsupportedVimApiVersionFault UnsupportedVimApiVersion - -func init() { - t["UnsupportedVimApiVersionFault"] = reflect.TypeOf((*UnsupportedVimApiVersionFault)(nil)).Elem() -} - -type UnsupportedVmxLocation struct { - VmConfigFault -} - -func init() { - t["UnsupportedVmxLocation"] = reflect.TypeOf((*UnsupportedVmxLocation)(nil)).Elem() -} - -type UnsupportedVmxLocationFault UnsupportedVmxLocation - -func init() { - t["UnsupportedVmxLocationFault"] = reflect.TypeOf((*UnsupportedVmxLocationFault)(nil)).Elem() -} - -type UnusedVirtualDiskBlocksNotScrubbed struct { - DeviceBackingNotSupported -} - -func init() { - t["UnusedVirtualDiskBlocksNotScrubbed"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbed)(nil)).Elem() -} - -type UnusedVirtualDiskBlocksNotScrubbedFault UnusedVirtualDiskBlocksNotScrubbed - -func init() { - t["UnusedVirtualDiskBlocksNotScrubbedFault"] = reflect.TypeOf((*UnusedVirtualDiskBlocksNotScrubbedFault)(nil)).Elem() -} - -type UpdateAnswerFileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - ConfigSpec BaseAnswerFileCreateSpec `xml:"configSpec,typeattr"` -} - -func init() { - t["UpdateAnswerFileRequestType"] = reflect.TypeOf((*UpdateAnswerFileRequestType)(nil)).Elem() -} - -type UpdateAnswerFile_Task UpdateAnswerFileRequestType - -func init() { - t["UpdateAnswerFile_Task"] = reflect.TypeOf((*UpdateAnswerFile_Task)(nil)).Elem() -} - -type UpdateAnswerFile_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateAssignableHardwareConfig UpdateAssignableHardwareConfigRequestType - -func init() { - t["UpdateAssignableHardwareConfig"] = reflect.TypeOf((*UpdateAssignableHardwareConfig)(nil)).Elem() -} - -type UpdateAssignableHardwareConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config HostAssignableHardwareConfig `xml:"config"` -} - -func init() { - t["UpdateAssignableHardwareConfigRequestType"] = reflect.TypeOf((*UpdateAssignableHardwareConfigRequestType)(nil)).Elem() -} - -type UpdateAssignableHardwareConfigResponse struct { -} - -type UpdateAssignedLicense UpdateAssignedLicenseRequestType - -func init() { - t["UpdateAssignedLicense"] = reflect.TypeOf((*UpdateAssignedLicense)(nil)).Elem() -} - -type UpdateAssignedLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - Entity string `xml:"entity"` - LicenseKey string `xml:"licenseKey"` - EntityDisplayName string `xml:"entityDisplayName,omitempty"` -} - -func init() { - t["UpdateAssignedLicenseRequestType"] = reflect.TypeOf((*UpdateAssignedLicenseRequestType)(nil)).Elem() -} - -type UpdateAssignedLicenseResponse struct { - Returnval LicenseManagerLicenseInfo `xml:"returnval"` -} - -type UpdateAuthorizationRole UpdateAuthorizationRoleRequestType - -func init() { - t["UpdateAuthorizationRole"] = reflect.TypeOf((*UpdateAuthorizationRole)(nil)).Elem() -} - -type UpdateAuthorizationRoleRequestType struct { - This ManagedObjectReference `xml:"_this"` - RoleId int32 `xml:"roleId"` - NewName string `xml:"newName"` - PrivIds []string `xml:"privIds,omitempty"` -} - -func init() { - t["UpdateAuthorizationRoleRequestType"] = reflect.TypeOf((*UpdateAuthorizationRoleRequestType)(nil)).Elem() -} - -type UpdateAuthorizationRoleResponse struct { -} - -type UpdateBootDevice UpdateBootDeviceRequestType - -func init() { - t["UpdateBootDevice"] = reflect.TypeOf((*UpdateBootDevice)(nil)).Elem() -} - -type UpdateBootDeviceRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key string `xml:"key"` -} - -func init() { - t["UpdateBootDeviceRequestType"] = reflect.TypeOf((*UpdateBootDeviceRequestType)(nil)).Elem() -} - -type UpdateBootDeviceResponse struct { -} - -type UpdateChildResourceConfiguration UpdateChildResourceConfigurationRequestType - -func init() { - t["UpdateChildResourceConfiguration"] = reflect.TypeOf((*UpdateChildResourceConfiguration)(nil)).Elem() -} - -type UpdateChildResourceConfigurationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec []ResourceConfigSpec `xml:"spec"` -} - -func init() { - t["UpdateChildResourceConfigurationRequestType"] = reflect.TypeOf((*UpdateChildResourceConfigurationRequestType)(nil)).Elem() -} - -type UpdateChildResourceConfigurationResponse struct { -} - -type UpdateClusterProfile UpdateClusterProfileRequestType - -func init() { - t["UpdateClusterProfile"] = reflect.TypeOf((*UpdateClusterProfile)(nil)).Elem() -} - -type UpdateClusterProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config BaseClusterProfileConfigSpec `xml:"config,typeattr"` -} - -func init() { - t["UpdateClusterProfileRequestType"] = reflect.TypeOf((*UpdateClusterProfileRequestType)(nil)).Elem() -} - -type UpdateClusterProfileResponse struct { -} - -type UpdateConfig UpdateConfigRequestType - -func init() { - t["UpdateConfig"] = reflect.TypeOf((*UpdateConfig)(nil)).Elem() -} - -type UpdateConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name,omitempty"` - Config *ResourceConfigSpec `xml:"config,omitempty"` -} - -func init() { - t["UpdateConfigRequestType"] = reflect.TypeOf((*UpdateConfigRequestType)(nil)).Elem() -} - -type UpdateConfigResponse struct { -} - -type UpdateConsoleIpRouteConfig UpdateConsoleIpRouteConfigRequestType - -func init() { - t["UpdateConsoleIpRouteConfig"] = reflect.TypeOf((*UpdateConsoleIpRouteConfig)(nil)).Elem() -} - -type UpdateConsoleIpRouteConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config BaseHostIpRouteConfig `xml:"config,typeattr"` -} - -func init() { - t["UpdateConsoleIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateConsoleIpRouteConfigRequestType)(nil)).Elem() -} - -type UpdateConsoleIpRouteConfigResponse struct { -} - -type UpdateCounterLevelMapping UpdateCounterLevelMappingRequestType - -func init() { - t["UpdateCounterLevelMapping"] = reflect.TypeOf((*UpdateCounterLevelMapping)(nil)).Elem() -} - -type UpdateCounterLevelMappingRequestType struct { - This ManagedObjectReference `xml:"_this"` - CounterLevelMap []PerformanceManagerCounterLevelMapping `xml:"counterLevelMap"` -} - -func init() { - t["UpdateCounterLevelMappingRequestType"] = reflect.TypeOf((*UpdateCounterLevelMappingRequestType)(nil)).Elem() -} - -type UpdateCounterLevelMappingResponse struct { -} - -type UpdateDVSHealthCheckConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - HealthCheckConfig []BaseDVSHealthCheckConfig `xml:"healthCheckConfig,typeattr"` -} - -func init() { - t["UpdateDVSHealthCheckConfigRequestType"] = reflect.TypeOf((*UpdateDVSHealthCheckConfigRequestType)(nil)).Elem() -} - -type UpdateDVSHealthCheckConfig_Task UpdateDVSHealthCheckConfigRequestType - -func init() { - t["UpdateDVSHealthCheckConfig_Task"] = reflect.TypeOf((*UpdateDVSHealthCheckConfig_Task)(nil)).Elem() -} - -type UpdateDVSHealthCheckConfig_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateDVSLacpGroupConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - LacpGroupSpec []VMwareDvsLacpGroupSpec `xml:"lacpGroupSpec"` -} - -func init() { - t["UpdateDVSLacpGroupConfigRequestType"] = reflect.TypeOf((*UpdateDVSLacpGroupConfigRequestType)(nil)).Elem() -} - -type UpdateDVSLacpGroupConfig_Task UpdateDVSLacpGroupConfigRequestType - -func init() { - t["UpdateDVSLacpGroupConfig_Task"] = reflect.TypeOf((*UpdateDVSLacpGroupConfig_Task)(nil)).Elem() -} - -type UpdateDVSLacpGroupConfig_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateDateTime UpdateDateTimeRequestType - -func init() { - t["UpdateDateTime"] = reflect.TypeOf((*UpdateDateTime)(nil)).Elem() -} - -type UpdateDateTimeConfig UpdateDateTimeConfigRequestType - -func init() { - t["UpdateDateTimeConfig"] = reflect.TypeOf((*UpdateDateTimeConfig)(nil)).Elem() -} - -type UpdateDateTimeConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config HostDateTimeConfig `xml:"config"` -} - -func init() { - t["UpdateDateTimeConfigRequestType"] = reflect.TypeOf((*UpdateDateTimeConfigRequestType)(nil)).Elem() -} - -type UpdateDateTimeConfigResponse struct { -} - -type UpdateDateTimeRequestType struct { - This ManagedObjectReference `xml:"_this"` - DateTime time.Time `xml:"dateTime"` -} - -func init() { - t["UpdateDateTimeRequestType"] = reflect.TypeOf((*UpdateDateTimeRequestType)(nil)).Elem() -} - -type UpdateDateTimeResponse struct { -} - -type UpdateDefaultPolicy UpdateDefaultPolicyRequestType - -func init() { - t["UpdateDefaultPolicy"] = reflect.TypeOf((*UpdateDefaultPolicy)(nil)).Elem() -} - -type UpdateDefaultPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - DefaultPolicy HostFirewallDefaultPolicy `xml:"defaultPolicy"` -} - -func init() { - t["UpdateDefaultPolicyRequestType"] = reflect.TypeOf((*UpdateDefaultPolicyRequestType)(nil)).Elem() -} - -type UpdateDefaultPolicyResponse struct { -} - -type UpdateDiskPartitions UpdateDiskPartitionsRequestType - -func init() { - t["UpdateDiskPartitions"] = reflect.TypeOf((*UpdateDiskPartitions)(nil)).Elem() -} - -type UpdateDiskPartitionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - DevicePath string `xml:"devicePath"` - Spec HostDiskPartitionSpec `xml:"spec"` -} - -func init() { - t["UpdateDiskPartitionsRequestType"] = reflect.TypeOf((*UpdateDiskPartitionsRequestType)(nil)).Elem() -} - -type UpdateDiskPartitionsResponse struct { -} - -type UpdateDnsConfig UpdateDnsConfigRequestType - -func init() { - t["UpdateDnsConfig"] = reflect.TypeOf((*UpdateDnsConfig)(nil)).Elem() -} - -type UpdateDnsConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config BaseHostDnsConfig `xml:"config,typeattr"` -} - -func init() { - t["UpdateDnsConfigRequestType"] = reflect.TypeOf((*UpdateDnsConfigRequestType)(nil)).Elem() -} - -type UpdateDnsConfigResponse struct { -} - -type UpdateDvsCapability UpdateDvsCapabilityRequestType - -func init() { - t["UpdateDvsCapability"] = reflect.TypeOf((*UpdateDvsCapability)(nil)).Elem() -} - -type UpdateDvsCapabilityRequestType struct { - This ManagedObjectReference `xml:"_this"` - Capability DVSCapability `xml:"capability"` -} - -func init() { - t["UpdateDvsCapabilityRequestType"] = reflect.TypeOf((*UpdateDvsCapabilityRequestType)(nil)).Elem() -} - -type UpdateDvsCapabilityResponse struct { -} - -type UpdateExtension UpdateExtensionRequestType - -func init() { - t["UpdateExtension"] = reflect.TypeOf((*UpdateExtension)(nil)).Elem() -} - -type UpdateExtensionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Extension Extension `xml:"extension"` -} - -func init() { - t["UpdateExtensionRequestType"] = reflect.TypeOf((*UpdateExtensionRequestType)(nil)).Elem() -} - -type UpdateExtensionResponse struct { -} - -type UpdateFlags UpdateFlagsRequestType - -func init() { - t["UpdateFlags"] = reflect.TypeOf((*UpdateFlags)(nil)).Elem() -} - -type UpdateFlagsRequestType struct { - This ManagedObjectReference `xml:"_this"` - FlagInfo HostFlagInfo `xml:"flagInfo"` -} - -func init() { - t["UpdateFlagsRequestType"] = reflect.TypeOf((*UpdateFlagsRequestType)(nil)).Elem() -} - -type UpdateFlagsResponse struct { -} - -type UpdateGraphicsConfig UpdateGraphicsConfigRequestType - -func init() { - t["UpdateGraphicsConfig"] = reflect.TypeOf((*UpdateGraphicsConfig)(nil)).Elem() -} - -type UpdateGraphicsConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config HostGraphicsConfig `xml:"config"` -} - -func init() { - t["UpdateGraphicsConfigRequestType"] = reflect.TypeOf((*UpdateGraphicsConfigRequestType)(nil)).Elem() -} - -type UpdateGraphicsConfigResponse struct { -} - -type UpdateHostCustomizationsRequestType struct { - This ManagedObjectReference `xml:"_this"` - HostToConfigSpecMap []HostProfileManagerHostToConfigSpecMap `xml:"hostToConfigSpecMap,omitempty"` -} - -func init() { - t["UpdateHostCustomizationsRequestType"] = reflect.TypeOf((*UpdateHostCustomizationsRequestType)(nil)).Elem() -} - -type UpdateHostCustomizations_Task UpdateHostCustomizationsRequestType - -func init() { - t["UpdateHostCustomizations_Task"] = reflect.TypeOf((*UpdateHostCustomizations_Task)(nil)).Elem() -} - -type UpdateHostCustomizations_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateHostImageAcceptanceLevel UpdateHostImageAcceptanceLevelRequestType - -func init() { - t["UpdateHostImageAcceptanceLevel"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevel)(nil)).Elem() -} - -type UpdateHostImageAcceptanceLevelRequestType struct { - This ManagedObjectReference `xml:"_this"` - NewAcceptanceLevel string `xml:"newAcceptanceLevel"` -} - -func init() { - t["UpdateHostImageAcceptanceLevelRequestType"] = reflect.TypeOf((*UpdateHostImageAcceptanceLevelRequestType)(nil)).Elem() -} - -type UpdateHostImageAcceptanceLevelResponse struct { -} - -type UpdateHostProfile UpdateHostProfileRequestType - -func init() { - t["UpdateHostProfile"] = reflect.TypeOf((*UpdateHostProfile)(nil)).Elem() -} - -type UpdateHostProfileRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config BaseHostProfileConfigSpec `xml:"config,typeattr"` -} - -func init() { - t["UpdateHostProfileRequestType"] = reflect.TypeOf((*UpdateHostProfileRequestType)(nil)).Elem() -} - -type UpdateHostProfileResponse struct { -} - -type UpdateHostSpecification UpdateHostSpecificationRequestType - -func init() { - t["UpdateHostSpecification"] = reflect.TypeOf((*UpdateHostSpecification)(nil)).Elem() -} - -type UpdateHostSpecificationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - HostSpec HostSpecification `xml:"hostSpec"` -} - -func init() { - t["UpdateHostSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSpecificationRequestType)(nil)).Elem() -} - -type UpdateHostSpecificationResponse struct { -} - -type UpdateHostSubSpecification UpdateHostSubSpecificationRequestType - -func init() { - t["UpdateHostSubSpecification"] = reflect.TypeOf((*UpdateHostSubSpecification)(nil)).Elem() -} - -type UpdateHostSubSpecificationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host ManagedObjectReference `xml:"host"` - HostSubSpec HostSubSpecification `xml:"hostSubSpec"` -} - -func init() { - t["UpdateHostSubSpecificationRequestType"] = reflect.TypeOf((*UpdateHostSubSpecificationRequestType)(nil)).Elem() -} - -type UpdateHostSubSpecificationResponse struct { -} - -type UpdateHppMultipathLunPolicy UpdateHppMultipathLunPolicyRequestType - -func init() { - t["UpdateHppMultipathLunPolicy"] = reflect.TypeOf((*UpdateHppMultipathLunPolicy)(nil)).Elem() -} - -type UpdateHppMultipathLunPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunId string `xml:"lunId"` - Policy HostMultipathInfoHppLogicalUnitPolicy `xml:"policy"` -} - -func init() { - t["UpdateHppMultipathLunPolicyRequestType"] = reflect.TypeOf((*UpdateHppMultipathLunPolicyRequestType)(nil)).Elem() -} - -type UpdateHppMultipathLunPolicyResponse struct { -} - -type UpdateInternetScsiAdvancedOptions UpdateInternetScsiAdvancedOptionsRequestType - -func init() { - t["UpdateInternetScsiAdvancedOptions"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptions)(nil)).Elem() -} - -type UpdateInternetScsiAdvancedOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` - Options []HostInternetScsiHbaParamValue `xml:"options"` -} - -func init() { - t["UpdateInternetScsiAdvancedOptionsRequestType"] = reflect.TypeOf((*UpdateInternetScsiAdvancedOptionsRequestType)(nil)).Elem() -} - -type UpdateInternetScsiAdvancedOptionsResponse struct { -} - -type UpdateInternetScsiAlias UpdateInternetScsiAliasRequestType - -func init() { - t["UpdateInternetScsiAlias"] = reflect.TypeOf((*UpdateInternetScsiAlias)(nil)).Elem() -} - -type UpdateInternetScsiAliasRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - IScsiAlias string `xml:"iScsiAlias"` -} - -func init() { - t["UpdateInternetScsiAliasRequestType"] = reflect.TypeOf((*UpdateInternetScsiAliasRequestType)(nil)).Elem() -} - -type UpdateInternetScsiAliasResponse struct { -} - -type UpdateInternetScsiAuthenticationProperties UpdateInternetScsiAuthenticationPropertiesRequestType - -func init() { - t["UpdateInternetScsiAuthenticationProperties"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationProperties)(nil)).Elem() -} - -type UpdateInternetScsiAuthenticationPropertiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - AuthenticationProperties HostInternetScsiHbaAuthenticationProperties `xml:"authenticationProperties"` - TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` -} - -func init() { - t["UpdateInternetScsiAuthenticationPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiAuthenticationPropertiesRequestType)(nil)).Elem() -} - -type UpdateInternetScsiAuthenticationPropertiesResponse struct { -} - -type UpdateInternetScsiDigestProperties UpdateInternetScsiDigestPropertiesRequestType - -func init() { - t["UpdateInternetScsiDigestProperties"] = reflect.TypeOf((*UpdateInternetScsiDigestProperties)(nil)).Elem() -} - -type UpdateInternetScsiDigestPropertiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - TargetSet *HostInternetScsiHbaTargetSet `xml:"targetSet,omitempty"` - DigestProperties HostInternetScsiHbaDigestProperties `xml:"digestProperties"` -} - -func init() { - t["UpdateInternetScsiDigestPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDigestPropertiesRequestType)(nil)).Elem() -} - -type UpdateInternetScsiDigestPropertiesResponse struct { -} - -type UpdateInternetScsiDiscoveryProperties UpdateInternetScsiDiscoveryPropertiesRequestType - -func init() { - t["UpdateInternetScsiDiscoveryProperties"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryProperties)(nil)).Elem() -} - -type UpdateInternetScsiDiscoveryPropertiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - DiscoveryProperties HostInternetScsiHbaDiscoveryProperties `xml:"discoveryProperties"` -} - -func init() { - t["UpdateInternetScsiDiscoveryPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiDiscoveryPropertiesRequestType)(nil)).Elem() -} - -type UpdateInternetScsiDiscoveryPropertiesResponse struct { -} - -type UpdateInternetScsiIPProperties UpdateInternetScsiIPPropertiesRequestType - -func init() { - t["UpdateInternetScsiIPProperties"] = reflect.TypeOf((*UpdateInternetScsiIPProperties)(nil)).Elem() -} - -type UpdateInternetScsiIPPropertiesRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - IpProperties HostInternetScsiHbaIPProperties `xml:"ipProperties"` -} - -func init() { - t["UpdateInternetScsiIPPropertiesRequestType"] = reflect.TypeOf((*UpdateInternetScsiIPPropertiesRequestType)(nil)).Elem() -} - -type UpdateInternetScsiIPPropertiesResponse struct { -} - -type UpdateInternetScsiName UpdateInternetScsiNameRequestType - -func init() { - t["UpdateInternetScsiName"] = reflect.TypeOf((*UpdateInternetScsiName)(nil)).Elem() -} - -type UpdateInternetScsiNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - IScsiHbaDevice string `xml:"iScsiHbaDevice"` - IScsiName string `xml:"iScsiName"` -} - -func init() { - t["UpdateInternetScsiNameRequestType"] = reflect.TypeOf((*UpdateInternetScsiNameRequestType)(nil)).Elem() -} - -type UpdateInternetScsiNameResponse struct { -} - -type UpdateIpConfig UpdateIpConfigRequestType - -func init() { - t["UpdateIpConfig"] = reflect.TypeOf((*UpdateIpConfig)(nil)).Elem() -} - -type UpdateIpConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - IpConfig HostIpConfig `xml:"ipConfig"` -} - -func init() { - t["UpdateIpConfigRequestType"] = reflect.TypeOf((*UpdateIpConfigRequestType)(nil)).Elem() -} - -type UpdateIpConfigResponse struct { -} - -type UpdateIpPool UpdateIpPoolRequestType - -func init() { - t["UpdateIpPool"] = reflect.TypeOf((*UpdateIpPool)(nil)).Elem() -} - -type UpdateIpPoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - Dc ManagedObjectReference `xml:"dc"` - Pool IpPool `xml:"pool"` -} - -func init() { - t["UpdateIpPoolRequestType"] = reflect.TypeOf((*UpdateIpPoolRequestType)(nil)).Elem() -} - -type UpdateIpPoolResponse struct { -} - -type UpdateIpRouteConfig UpdateIpRouteConfigRequestType - -func init() { - t["UpdateIpRouteConfig"] = reflect.TypeOf((*UpdateIpRouteConfig)(nil)).Elem() -} - -type UpdateIpRouteConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config BaseHostIpRouteConfig `xml:"config,typeattr"` -} - -func init() { - t["UpdateIpRouteConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteConfigRequestType)(nil)).Elem() -} - -type UpdateIpRouteConfigResponse struct { -} - -type UpdateIpRouteTableConfig UpdateIpRouteTableConfigRequestType - -func init() { - t["UpdateIpRouteTableConfig"] = reflect.TypeOf((*UpdateIpRouteTableConfig)(nil)).Elem() -} - -type UpdateIpRouteTableConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config HostIpRouteTableConfig `xml:"config"` -} - -func init() { - t["UpdateIpRouteTableConfigRequestType"] = reflect.TypeOf((*UpdateIpRouteTableConfigRequestType)(nil)).Elem() -} - -type UpdateIpRouteTableConfigResponse struct { -} - -type UpdateIpmi UpdateIpmiRequestType - -func init() { - t["UpdateIpmi"] = reflect.TypeOf((*UpdateIpmi)(nil)).Elem() -} - -type UpdateIpmiRequestType struct { - This ManagedObjectReference `xml:"_this"` - IpmiInfo HostIpmiInfo `xml:"ipmiInfo"` -} - -func init() { - t["UpdateIpmiRequestType"] = reflect.TypeOf((*UpdateIpmiRequestType)(nil)).Elem() -} - -type UpdateIpmiResponse struct { -} - -type UpdateKmipServer UpdateKmipServerRequestType - -func init() { - t["UpdateKmipServer"] = reflect.TypeOf((*UpdateKmipServer)(nil)).Elem() -} - -type UpdateKmipServerRequestType struct { - This ManagedObjectReference `xml:"_this"` - Server KmipServerSpec `xml:"server"` -} - -func init() { - t["UpdateKmipServerRequestType"] = reflect.TypeOf((*UpdateKmipServerRequestType)(nil)).Elem() -} - -type UpdateKmipServerResponse struct { -} - -type UpdateKmsSignedCsrClientCert UpdateKmsSignedCsrClientCertRequestType - -func init() { - t["UpdateKmsSignedCsrClientCert"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCert)(nil)).Elem() -} - -type UpdateKmsSignedCsrClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` - Certificate string `xml:"certificate"` -} - -func init() { - t["UpdateKmsSignedCsrClientCertRequestType"] = reflect.TypeOf((*UpdateKmsSignedCsrClientCertRequestType)(nil)).Elem() -} - -type UpdateKmsSignedCsrClientCertResponse struct { -} - -type UpdateLicense UpdateLicenseRequestType - -func init() { - t["UpdateLicense"] = reflect.TypeOf((*UpdateLicense)(nil)).Elem() -} - -type UpdateLicenseLabel UpdateLicenseLabelRequestType - -func init() { - t["UpdateLicenseLabel"] = reflect.TypeOf((*UpdateLicenseLabel)(nil)).Elem() -} - -type UpdateLicenseLabelRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` - LabelKey string `xml:"labelKey"` - LabelValue string `xml:"labelValue"` -} - -func init() { - t["UpdateLicenseLabelRequestType"] = reflect.TypeOf((*UpdateLicenseLabelRequestType)(nil)).Elem() -} - -type UpdateLicenseLabelResponse struct { -} - -type UpdateLicenseRequestType struct { - This ManagedObjectReference `xml:"_this"` - LicenseKey string `xml:"licenseKey"` - Labels []KeyValue `xml:"labels,omitempty"` -} - -func init() { - t["UpdateLicenseRequestType"] = reflect.TypeOf((*UpdateLicenseRequestType)(nil)).Elem() -} - -type UpdateLicenseResponse struct { - Returnval LicenseManagerLicenseInfo `xml:"returnval"` -} - -type UpdateLinkedChildren UpdateLinkedChildrenRequestType - -func init() { - t["UpdateLinkedChildren"] = reflect.TypeOf((*UpdateLinkedChildren)(nil)).Elem() -} - -type UpdateLinkedChildrenRequestType struct { - This ManagedObjectReference `xml:"_this"` - AddChangeSet []VirtualAppLinkInfo `xml:"addChangeSet,omitempty"` - RemoveSet []ManagedObjectReference `xml:"removeSet,omitempty"` -} - -func init() { - t["UpdateLinkedChildrenRequestType"] = reflect.TypeOf((*UpdateLinkedChildrenRequestType)(nil)).Elem() -} - -type UpdateLinkedChildrenResponse struct { -} - -type UpdateLocalSwapDatastore UpdateLocalSwapDatastoreRequestType - -func init() { - t["UpdateLocalSwapDatastore"] = reflect.TypeOf((*UpdateLocalSwapDatastore)(nil)).Elem() -} - -type UpdateLocalSwapDatastoreRequestType struct { - This ManagedObjectReference `xml:"_this"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` -} - -func init() { - t["UpdateLocalSwapDatastoreRequestType"] = reflect.TypeOf((*UpdateLocalSwapDatastoreRequestType)(nil)).Elem() -} - -type UpdateLocalSwapDatastoreResponse struct { -} - -type UpdateLockdownExceptions UpdateLockdownExceptionsRequestType - -func init() { - t["UpdateLockdownExceptions"] = reflect.TypeOf((*UpdateLockdownExceptions)(nil)).Elem() -} - -type UpdateLockdownExceptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Users []string `xml:"users,omitempty"` -} - -func init() { - t["UpdateLockdownExceptionsRequestType"] = reflect.TypeOf((*UpdateLockdownExceptionsRequestType)(nil)).Elem() -} - -type UpdateLockdownExceptionsResponse struct { -} - -type UpdateModuleOptionString UpdateModuleOptionStringRequestType - -func init() { - t["UpdateModuleOptionString"] = reflect.TypeOf((*UpdateModuleOptionString)(nil)).Elem() -} - -type UpdateModuleOptionStringRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Options string `xml:"options"` -} - -func init() { - t["UpdateModuleOptionStringRequestType"] = reflect.TypeOf((*UpdateModuleOptionStringRequestType)(nil)).Elem() -} - -type UpdateModuleOptionStringResponse struct { -} - -type UpdateNetworkConfig UpdateNetworkConfigRequestType - -func init() { - t["UpdateNetworkConfig"] = reflect.TypeOf((*UpdateNetworkConfig)(nil)).Elem() -} - -type UpdateNetworkConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config HostNetworkConfig `xml:"config"` - ChangeMode string `xml:"changeMode"` -} - -func init() { - t["UpdateNetworkConfigRequestType"] = reflect.TypeOf((*UpdateNetworkConfigRequestType)(nil)).Elem() -} - -type UpdateNetworkConfigResponse struct { - Returnval HostNetworkConfigResult `xml:"returnval"` -} - -type UpdateNetworkResourcePool UpdateNetworkResourcePoolRequestType - -func init() { - t["UpdateNetworkResourcePool"] = reflect.TypeOf((*UpdateNetworkResourcePool)(nil)).Elem() -} - -type UpdateNetworkResourcePoolRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec []DVSNetworkResourcePoolConfigSpec `xml:"configSpec"` -} - -func init() { - t["UpdateNetworkResourcePoolRequestType"] = reflect.TypeOf((*UpdateNetworkResourcePoolRequestType)(nil)).Elem() -} - -type UpdateNetworkResourcePoolResponse struct { -} - -type UpdateOptions UpdateOptionsRequestType - -func init() { - t["UpdateOptions"] = reflect.TypeOf((*UpdateOptions)(nil)).Elem() -} - -type UpdateOptionsRequestType struct { - This ManagedObjectReference `xml:"_this"` - ChangedValue []BaseOptionValue `xml:"changedValue,typeattr"` -} - -func init() { - t["UpdateOptionsRequestType"] = reflect.TypeOf((*UpdateOptionsRequestType)(nil)).Elem() -} - -type UpdateOptionsResponse struct { -} - -type UpdatePassthruConfig UpdatePassthruConfigRequestType - -func init() { - t["UpdatePassthruConfig"] = reflect.TypeOf((*UpdatePassthruConfig)(nil)).Elem() -} - -type UpdatePassthruConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config []BaseHostPciPassthruConfig `xml:"config,typeattr"` -} - -func init() { - t["UpdatePassthruConfigRequestType"] = reflect.TypeOf((*UpdatePassthruConfigRequestType)(nil)).Elem() -} - -type UpdatePassthruConfigResponse struct { -} - -type UpdatePerfInterval UpdatePerfIntervalRequestType - -func init() { - t["UpdatePerfInterval"] = reflect.TypeOf((*UpdatePerfInterval)(nil)).Elem() -} - -type UpdatePerfIntervalRequestType struct { - This ManagedObjectReference `xml:"_this"` - Interval PerfInterval `xml:"interval"` -} - -func init() { - t["UpdatePerfIntervalRequestType"] = reflect.TypeOf((*UpdatePerfIntervalRequestType)(nil)).Elem() -} - -type UpdatePerfIntervalResponse struct { -} - -type UpdatePhysicalNicLinkSpeed UpdatePhysicalNicLinkSpeedRequestType - -func init() { - t["UpdatePhysicalNicLinkSpeed"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeed)(nil)).Elem() -} - -type UpdatePhysicalNicLinkSpeedRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` - LinkSpeed *PhysicalNicLinkInfo `xml:"linkSpeed,omitempty"` -} - -func init() { - t["UpdatePhysicalNicLinkSpeedRequestType"] = reflect.TypeOf((*UpdatePhysicalNicLinkSpeedRequestType)(nil)).Elem() -} - -type UpdatePhysicalNicLinkSpeedResponse struct { -} - -type UpdatePortGroup UpdatePortGroupRequestType - -func init() { - t["UpdatePortGroup"] = reflect.TypeOf((*UpdatePortGroup)(nil)).Elem() -} - -type UpdatePortGroupRequestType struct { - This ManagedObjectReference `xml:"_this"` - PgName string `xml:"pgName"` - Portgrp HostPortGroupSpec `xml:"portgrp"` -} - -func init() { - t["UpdatePortGroupRequestType"] = reflect.TypeOf((*UpdatePortGroupRequestType)(nil)).Elem() -} - -type UpdatePortGroupResponse struct { -} - -type UpdateProductLockerLocationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Path string `xml:"path"` -} - -func init() { - t["UpdateProductLockerLocationRequestType"] = reflect.TypeOf((*UpdateProductLockerLocationRequestType)(nil)).Elem() -} - -type UpdateProductLockerLocation_Task UpdateProductLockerLocationRequestType - -func init() { - t["UpdateProductLockerLocation_Task"] = reflect.TypeOf((*UpdateProductLockerLocation_Task)(nil)).Elem() -} - -type UpdateProductLockerLocation_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateProgress UpdateProgressRequestType - -func init() { - t["UpdateProgress"] = reflect.TypeOf((*UpdateProgress)(nil)).Elem() -} - -type UpdateProgressRequestType struct { - This ManagedObjectReference `xml:"_this"` - PercentDone int32 `xml:"percentDone"` -} - -func init() { - t["UpdateProgressRequestType"] = reflect.TypeOf((*UpdateProgressRequestType)(nil)).Elem() -} - -type UpdateProgressResponse struct { -} - -type UpdateReferenceHost UpdateReferenceHostRequestType - -func init() { - t["UpdateReferenceHost"] = reflect.TypeOf((*UpdateReferenceHost)(nil)).Elem() -} - -type UpdateReferenceHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["UpdateReferenceHostRequestType"] = reflect.TypeOf((*UpdateReferenceHostRequestType)(nil)).Elem() -} - -type UpdateReferenceHostResponse struct { -} - -type UpdateRuleset UpdateRulesetRequestType - -func init() { - t["UpdateRuleset"] = reflect.TypeOf((*UpdateRuleset)(nil)).Elem() -} - -type UpdateRulesetRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` - Spec HostFirewallRulesetRulesetSpec `xml:"spec"` -} - -func init() { - t["UpdateRulesetRequestType"] = reflect.TypeOf((*UpdateRulesetRequestType)(nil)).Elem() -} - -type UpdateRulesetResponse struct { -} - -type UpdateScsiLunDisplayName UpdateScsiLunDisplayNameRequestType - -func init() { - t["UpdateScsiLunDisplayName"] = reflect.TypeOf((*UpdateScsiLunDisplayName)(nil)).Elem() -} - -type UpdateScsiLunDisplayNameRequestType struct { - This ManagedObjectReference `xml:"_this"` - LunUuid string `xml:"lunUuid"` - DisplayName string `xml:"displayName"` -} - -func init() { - t["UpdateScsiLunDisplayNameRequestType"] = reflect.TypeOf((*UpdateScsiLunDisplayNameRequestType)(nil)).Elem() -} - -type UpdateScsiLunDisplayNameResponse struct { -} - -type UpdateSelfSignedClientCert UpdateSelfSignedClientCertRequestType - -func init() { - t["UpdateSelfSignedClientCert"] = reflect.TypeOf((*UpdateSelfSignedClientCert)(nil)).Elem() -} - -type UpdateSelfSignedClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` - Certificate string `xml:"certificate"` -} - -func init() { - t["UpdateSelfSignedClientCertRequestType"] = reflect.TypeOf((*UpdateSelfSignedClientCertRequestType)(nil)).Elem() -} - -type UpdateSelfSignedClientCertResponse struct { -} - -type UpdateServiceConsoleVirtualNic UpdateServiceConsoleVirtualNicRequestType - -func init() { - t["UpdateServiceConsoleVirtualNic"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNic)(nil)).Elem() -} - -type UpdateServiceConsoleVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` - Nic HostVirtualNicSpec `xml:"nic"` -} - -func init() { - t["UpdateServiceConsoleVirtualNicRequestType"] = reflect.TypeOf((*UpdateServiceConsoleVirtualNicRequestType)(nil)).Elem() -} - -type UpdateServiceConsoleVirtualNicResponse struct { -} - -type UpdateServiceMessage UpdateServiceMessageRequestType - -func init() { - t["UpdateServiceMessage"] = reflect.TypeOf((*UpdateServiceMessage)(nil)).Elem() -} - -type UpdateServiceMessageRequestType struct { - This ManagedObjectReference `xml:"_this"` - Message string `xml:"message"` -} - -func init() { - t["UpdateServiceMessageRequestType"] = reflect.TypeOf((*UpdateServiceMessageRequestType)(nil)).Elem() -} - -type UpdateServiceMessageResponse struct { -} - -type UpdateServicePolicy UpdateServicePolicyRequestType - -func init() { - t["UpdateServicePolicy"] = reflect.TypeOf((*UpdateServicePolicy)(nil)).Elem() -} - -type UpdateServicePolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id string `xml:"id"` - Policy string `xml:"policy"` -} - -func init() { - t["UpdateServicePolicyRequestType"] = reflect.TypeOf((*UpdateServicePolicyRequestType)(nil)).Elem() -} - -type UpdateServicePolicyResponse struct { -} - -type UpdateSet struct { - DynamicData - - Version string `xml:"version"` - FilterSet []PropertyFilterUpdate `xml:"filterSet,omitempty"` - Truncated *bool `xml:"truncated"` -} - -func init() { - t["UpdateSet"] = reflect.TypeOf((*UpdateSet)(nil)).Elem() -} - -type UpdateSoftwareInternetScsiEnabled UpdateSoftwareInternetScsiEnabledRequestType - -func init() { - t["UpdateSoftwareInternetScsiEnabled"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabled)(nil)).Elem() -} - -type UpdateSoftwareInternetScsiEnabledRequestType struct { - This ManagedObjectReference `xml:"_this"` - Enabled bool `xml:"enabled"` -} - -func init() { - t["UpdateSoftwareInternetScsiEnabledRequestType"] = reflect.TypeOf((*UpdateSoftwareInternetScsiEnabledRequestType)(nil)).Elem() -} - -type UpdateSoftwareInternetScsiEnabledResponse struct { -} - -type UpdateSystemResources UpdateSystemResourcesRequestType - -func init() { - t["UpdateSystemResources"] = reflect.TypeOf((*UpdateSystemResources)(nil)).Elem() -} - -type UpdateSystemResourcesRequestType struct { - This ManagedObjectReference `xml:"_this"` - ResourceInfo HostSystemResourceInfo `xml:"resourceInfo"` -} - -func init() { - t["UpdateSystemResourcesRequestType"] = reflect.TypeOf((*UpdateSystemResourcesRequestType)(nil)).Elem() -} - -type UpdateSystemResourcesResponse struct { -} - -type UpdateSystemSwapConfiguration UpdateSystemSwapConfigurationRequestType - -func init() { - t["UpdateSystemSwapConfiguration"] = reflect.TypeOf((*UpdateSystemSwapConfiguration)(nil)).Elem() -} - -type UpdateSystemSwapConfigurationRequestType struct { - This ManagedObjectReference `xml:"_this"` - SysSwapConfig HostSystemSwapConfiguration `xml:"sysSwapConfig"` -} - -func init() { - t["UpdateSystemSwapConfigurationRequestType"] = reflect.TypeOf((*UpdateSystemSwapConfigurationRequestType)(nil)).Elem() -} - -type UpdateSystemSwapConfigurationResponse struct { -} - -type UpdateSystemUsers UpdateSystemUsersRequestType - -func init() { - t["UpdateSystemUsers"] = reflect.TypeOf((*UpdateSystemUsers)(nil)).Elem() -} - -type UpdateSystemUsersRequestType struct { - This ManagedObjectReference `xml:"_this"` - Users []string `xml:"users,omitempty"` -} - -func init() { - t["UpdateSystemUsersRequestType"] = reflect.TypeOf((*UpdateSystemUsersRequestType)(nil)).Elem() -} - -type UpdateSystemUsersResponse struct { -} - -type UpdateUser UpdateUserRequestType - -func init() { - t["UpdateUser"] = reflect.TypeOf((*UpdateUser)(nil)).Elem() -} - -type UpdateUserRequestType struct { - This ManagedObjectReference `xml:"_this"` - User BaseHostAccountSpec `xml:"user,typeattr"` -} - -func init() { - t["UpdateUserRequestType"] = reflect.TypeOf((*UpdateUserRequestType)(nil)).Elem() -} - -type UpdateUserResponse struct { -} - -type UpdateVAppConfig UpdateVAppConfigRequestType - -func init() { - t["UpdateVAppConfig"] = reflect.TypeOf((*UpdateVAppConfig)(nil)).Elem() -} - -type UpdateVAppConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VAppConfigSpec `xml:"spec"` -} - -func init() { - t["UpdateVAppConfigRequestType"] = reflect.TypeOf((*UpdateVAppConfigRequestType)(nil)).Elem() -} - -type UpdateVAppConfigResponse struct { -} - -type UpdateVStorageInfrastructureObjectPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Spec VslmInfrastructureObjectPolicySpec `xml:"spec"` -} - -func init() { - t["UpdateVStorageInfrastructureObjectPolicyRequestType"] = reflect.TypeOf((*UpdateVStorageInfrastructureObjectPolicyRequestType)(nil)).Elem() -} - -type UpdateVStorageInfrastructureObjectPolicy_Task UpdateVStorageInfrastructureObjectPolicyRequestType - -func init() { - t["UpdateVStorageInfrastructureObjectPolicy_Task"] = reflect.TypeOf((*UpdateVStorageInfrastructureObjectPolicy_Task)(nil)).Elem() -} - -type UpdateVStorageInfrastructureObjectPolicy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateVStorageObjectCryptoRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - DisksCrypto *DiskCryptoSpec `xml:"disksCrypto,omitempty"` -} - -func init() { - t["UpdateVStorageObjectCryptoRequestType"] = reflect.TypeOf((*UpdateVStorageObjectCryptoRequestType)(nil)).Elem() -} - -type UpdateVStorageObjectCrypto_Task UpdateVStorageObjectCryptoRequestType - -func init() { - t["UpdateVStorageObjectCrypto_Task"] = reflect.TypeOf((*UpdateVStorageObjectCrypto_Task)(nil)).Elem() -} - -type UpdateVStorageObjectCrypto_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateVStorageObjectPolicyRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["UpdateVStorageObjectPolicyRequestType"] = reflect.TypeOf((*UpdateVStorageObjectPolicyRequestType)(nil)).Elem() -} - -type UpdateVStorageObjectPolicy_Task UpdateVStorageObjectPolicyRequestType - -func init() { - t["UpdateVStorageObjectPolicy_Task"] = reflect.TypeOf((*UpdateVStorageObjectPolicy_Task)(nil)).Elem() -} - -type UpdateVStorageObjectPolicy_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateVVolVirtualMachineFilesRequestType struct { - This ManagedObjectReference `xml:"_this"` - FailoverPair []DatastoreVVolContainerFailoverPair `xml:"failoverPair,omitempty"` -} - -func init() { - t["UpdateVVolVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVVolVirtualMachineFilesRequestType)(nil)).Elem() -} - -type UpdateVVolVirtualMachineFiles_Task UpdateVVolVirtualMachineFilesRequestType - -func init() { - t["UpdateVVolVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVVolVirtualMachineFiles_Task)(nil)).Elem() -} - -type UpdateVVolVirtualMachineFiles_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateVirtualMachineFilesRequestType struct { - This ManagedObjectReference `xml:"_this"` - MountPathDatastoreMapping []DatastoreMountPathDatastorePair `xml:"mountPathDatastoreMapping"` -} - -func init() { - t["UpdateVirtualMachineFilesRequestType"] = reflect.TypeOf((*UpdateVirtualMachineFilesRequestType)(nil)).Elem() -} - -type UpdateVirtualMachineFilesResult struct { - DynamicData - - FailedVmFile []UpdateVirtualMachineFilesResultFailedVmFileInfo `xml:"failedVmFile,omitempty"` -} - -func init() { - t["UpdateVirtualMachineFilesResult"] = reflect.TypeOf((*UpdateVirtualMachineFilesResult)(nil)).Elem() -} - -type UpdateVirtualMachineFilesResultFailedVmFileInfo struct { - DynamicData - - VmFile string `xml:"vmFile"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["UpdateVirtualMachineFilesResultFailedVmFileInfo"] = reflect.TypeOf((*UpdateVirtualMachineFilesResultFailedVmFileInfo)(nil)).Elem() -} - -type UpdateVirtualMachineFiles_Task UpdateVirtualMachineFilesRequestType - -func init() { - t["UpdateVirtualMachineFiles_Task"] = reflect.TypeOf((*UpdateVirtualMachineFiles_Task)(nil)).Elem() -} - -type UpdateVirtualMachineFiles_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdateVirtualNic UpdateVirtualNicRequestType - -func init() { - t["UpdateVirtualNic"] = reflect.TypeOf((*UpdateVirtualNic)(nil)).Elem() -} - -type UpdateVirtualNicRequestType struct { - This ManagedObjectReference `xml:"_this"` - Device string `xml:"device"` - Nic HostVirtualNicSpec `xml:"nic"` -} - -func init() { - t["UpdateVirtualNicRequestType"] = reflect.TypeOf((*UpdateVirtualNicRequestType)(nil)).Elem() -} - -type UpdateVirtualNicResponse struct { -} - -type UpdateVirtualSwitch UpdateVirtualSwitchRequestType - -func init() { - t["UpdateVirtualSwitch"] = reflect.TypeOf((*UpdateVirtualSwitch)(nil)).Elem() -} - -type UpdateVirtualSwitchRequestType struct { - This ManagedObjectReference `xml:"_this"` - VswitchName string `xml:"vswitchName"` - Spec HostVirtualSwitchSpec `xml:"spec"` -} - -func init() { - t["UpdateVirtualSwitchRequestType"] = reflect.TypeOf((*UpdateVirtualSwitchRequestType)(nil)).Elem() -} - -type UpdateVirtualSwitchResponse struct { -} - -type UpdateVmfsUnmapBandwidth UpdateVmfsUnmapBandwidthRequestType - -func init() { - t["UpdateVmfsUnmapBandwidth"] = reflect.TypeOf((*UpdateVmfsUnmapBandwidth)(nil)).Elem() -} - -type UpdateVmfsUnmapBandwidthRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` - UnmapBandwidthSpec VmfsUnmapBandwidthSpec `xml:"unmapBandwidthSpec"` -} - -func init() { - t["UpdateVmfsUnmapBandwidthRequestType"] = reflect.TypeOf((*UpdateVmfsUnmapBandwidthRequestType)(nil)).Elem() -} - -type UpdateVmfsUnmapBandwidthResponse struct { -} - -type UpdateVmfsUnmapPriority UpdateVmfsUnmapPriorityRequestType - -func init() { - t["UpdateVmfsUnmapPriority"] = reflect.TypeOf((*UpdateVmfsUnmapPriority)(nil)).Elem() -} - -type UpdateVmfsUnmapPriorityRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsUuid string `xml:"vmfsUuid"` - UnmapPriority string `xml:"unmapPriority"` -} - -func init() { - t["UpdateVmfsUnmapPriorityRequestType"] = reflect.TypeOf((*UpdateVmfsUnmapPriorityRequestType)(nil)).Elem() -} - -type UpdateVmfsUnmapPriorityResponse struct { -} - -type UpdateVsanRequestType struct { - This ManagedObjectReference `xml:"_this"` - Config VsanHostConfigInfo `xml:"config"` -} - -func init() { - t["UpdateVsanRequestType"] = reflect.TypeOf((*UpdateVsanRequestType)(nil)).Elem() -} - -type UpdateVsan_Task UpdateVsanRequestType - -func init() { - t["UpdateVsan_Task"] = reflect.TypeOf((*UpdateVsan_Task)(nil)).Elem() -} - -type UpdateVsan_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpdatedAgentBeingRestartedEvent struct { - HostEvent -} - -func init() { - t["UpdatedAgentBeingRestartedEvent"] = reflect.TypeOf((*UpdatedAgentBeingRestartedEvent)(nil)).Elem() -} - -type UpgradeEvent struct { - Event - - Message string `xml:"message"` -} - -func init() { - t["UpgradeEvent"] = reflect.TypeOf((*UpgradeEvent)(nil)).Elem() -} - -type UpgradeIoFilterRequestType struct { - This ManagedObjectReference `xml:"_this"` - FilterId string `xml:"filterId"` - CompRes ManagedObjectReference `xml:"compRes"` - VibUrl string `xml:"vibUrl"` -} - -func init() { - t["UpgradeIoFilterRequestType"] = reflect.TypeOf((*UpgradeIoFilterRequestType)(nil)).Elem() -} - -type UpgradeIoFilter_Task UpgradeIoFilterRequestType - -func init() { - t["UpgradeIoFilter_Task"] = reflect.TypeOf((*UpgradeIoFilter_Task)(nil)).Elem() -} - -type UpgradeIoFilter_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpgradeToolsRequestType struct { - This ManagedObjectReference `xml:"_this"` - InstallerOptions string `xml:"installerOptions,omitempty"` -} - -func init() { - t["UpgradeToolsRequestType"] = reflect.TypeOf((*UpgradeToolsRequestType)(nil)).Elem() -} - -type UpgradeTools_Task UpgradeToolsRequestType - -func init() { - t["UpgradeTools_Task"] = reflect.TypeOf((*UpgradeTools_Task)(nil)).Elem() -} - -type UpgradeTools_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpgradeVMRequestType struct { - This ManagedObjectReference `xml:"_this"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["UpgradeVMRequestType"] = reflect.TypeOf((*UpgradeVMRequestType)(nil)).Elem() -} - -type UpgradeVM_Task UpgradeVMRequestType - -func init() { - t["UpgradeVM_Task"] = reflect.TypeOf((*UpgradeVM_Task)(nil)).Elem() -} - -type UpgradeVM_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type UpgradeVmLayout UpgradeVmLayoutRequestType - -func init() { - t["UpgradeVmLayout"] = reflect.TypeOf((*UpgradeVmLayout)(nil)).Elem() -} - -type UpgradeVmLayoutRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["UpgradeVmLayoutRequestType"] = reflect.TypeOf((*UpgradeVmLayoutRequestType)(nil)).Elem() -} - -type UpgradeVmLayoutResponse struct { -} - -type UpgradeVmfs UpgradeVmfsRequestType - -func init() { - t["UpgradeVmfs"] = reflect.TypeOf((*UpgradeVmfs)(nil)).Elem() -} - -type UpgradeVmfsRequestType struct { - This ManagedObjectReference `xml:"_this"` - VmfsPath string `xml:"vmfsPath"` -} - -func init() { - t["UpgradeVmfsRequestType"] = reflect.TypeOf((*UpgradeVmfsRequestType)(nil)).Elem() -} - -type UpgradeVmfsResponse struct { -} - -type UpgradeVsanObjects UpgradeVsanObjectsRequestType - -func init() { - t["UpgradeVsanObjects"] = reflect.TypeOf((*UpgradeVsanObjects)(nil)).Elem() -} - -type UpgradeVsanObjectsRequestType struct { - This ManagedObjectReference `xml:"_this"` - Uuids []string `xml:"uuids"` - NewVersion int32 `xml:"newVersion"` -} - -func init() { - t["UpgradeVsanObjectsRequestType"] = reflect.TypeOf((*UpgradeVsanObjectsRequestType)(nil)).Elem() -} - -type UpgradeVsanObjectsResponse struct { - Returnval []HostVsanInternalSystemVsanObjectOperationResult `xml:"returnval,omitempty"` -} - -type UplinkPortMtuNotSupportEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["UplinkPortMtuNotSupportEvent"] = reflect.TypeOf((*UplinkPortMtuNotSupportEvent)(nil)).Elem() -} - -type UplinkPortMtuSupportEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["UplinkPortMtuSupportEvent"] = reflect.TypeOf((*UplinkPortMtuSupportEvent)(nil)).Elem() -} - -type UplinkPortVlanTrunkedEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["UplinkPortVlanTrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanTrunkedEvent)(nil)).Elem() -} - -type UplinkPortVlanUntrunkedEvent struct { - DvsHealthStatusChangeEvent -} - -func init() { - t["UplinkPortVlanUntrunkedEvent"] = reflect.TypeOf((*UplinkPortVlanUntrunkedEvent)(nil)).Elem() -} - -type UploadClientCert UploadClientCertRequestType - -func init() { - t["UploadClientCert"] = reflect.TypeOf((*UploadClientCert)(nil)).Elem() -} - -type UploadClientCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` - Certificate string `xml:"certificate"` - PrivateKey string `xml:"privateKey"` -} - -func init() { - t["UploadClientCertRequestType"] = reflect.TypeOf((*UploadClientCertRequestType)(nil)).Elem() -} - -type UploadClientCertResponse struct { -} - -type UploadKmipServerCert UploadKmipServerCertRequestType - -func init() { - t["UploadKmipServerCert"] = reflect.TypeOf((*UploadKmipServerCert)(nil)).Elem() -} - -type UploadKmipServerCertRequestType struct { - This ManagedObjectReference `xml:"_this"` - Cluster KeyProviderId `xml:"cluster"` - Certificate string `xml:"certificate"` -} - -func init() { - t["UploadKmipServerCertRequestType"] = reflect.TypeOf((*UploadKmipServerCertRequestType)(nil)).Elem() -} - -type UploadKmipServerCertResponse struct { -} - -type UsbScanCodeSpec struct { - DynamicData - - KeyEvents []UsbScanCodeSpecKeyEvent `xml:"keyEvents"` -} - -func init() { - t["UsbScanCodeSpec"] = reflect.TypeOf((*UsbScanCodeSpec)(nil)).Elem() -} - -type UsbScanCodeSpecKeyEvent struct { - DynamicData - - UsbHidCode int32 `xml:"usbHidCode"` - Modifiers *UsbScanCodeSpecModifierType `xml:"modifiers,omitempty"` -} - -func init() { - t["UsbScanCodeSpecKeyEvent"] = reflect.TypeOf((*UsbScanCodeSpecKeyEvent)(nil)).Elem() -} - -type UsbScanCodeSpecModifierType struct { - DynamicData - - LeftControl *bool `xml:"leftControl"` - LeftShift *bool `xml:"leftShift"` - LeftAlt *bool `xml:"leftAlt"` - LeftGui *bool `xml:"leftGui"` - RightControl *bool `xml:"rightControl"` - RightShift *bool `xml:"rightShift"` - RightAlt *bool `xml:"rightAlt"` - RightGui *bool `xml:"rightGui"` -} - -func init() { - t["UsbScanCodeSpecModifierType"] = reflect.TypeOf((*UsbScanCodeSpecModifierType)(nil)).Elem() -} - -type UserAssignedToGroup struct { - HostEvent - - UserLogin string `xml:"userLogin"` - Group string `xml:"group"` -} - -func init() { - t["UserAssignedToGroup"] = reflect.TypeOf((*UserAssignedToGroup)(nil)).Elem() -} - -type UserGroupProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["UserGroupProfile"] = reflect.TypeOf((*UserGroupProfile)(nil)).Elem() -} - -type UserInputRequiredParameterMetadata struct { - ProfilePolicyOptionMetadata - - UserInputParameter []ProfileParameterMetadata `xml:"userInputParameter,omitempty"` -} - -func init() { - t["UserInputRequiredParameterMetadata"] = reflect.TypeOf((*UserInputRequiredParameterMetadata)(nil)).Elem() -} - -type UserLoginSessionEvent struct { - SessionEvent - - IpAddress string `xml:"ipAddress"` - UserAgent string `xml:"userAgent,omitempty"` - Locale string `xml:"locale"` - SessionId string `xml:"sessionId"` -} - -func init() { - t["UserLoginSessionEvent"] = reflect.TypeOf((*UserLoginSessionEvent)(nil)).Elem() -} - -type UserLogoutSessionEvent struct { - SessionEvent - - IpAddress string `xml:"ipAddress,omitempty"` - UserAgent string `xml:"userAgent,omitempty"` - CallCount int64 `xml:"callCount,omitempty"` - SessionId string `xml:"sessionId,omitempty"` - LoginTime *time.Time `xml:"loginTime"` -} - -func init() { - t["UserLogoutSessionEvent"] = reflect.TypeOf((*UserLogoutSessionEvent)(nil)).Elem() -} - -type UserNotFound struct { - VimFault - - Principal string `xml:"principal"` - Unresolved bool `xml:"unresolved"` -} - -func init() { - t["UserNotFound"] = reflect.TypeOf((*UserNotFound)(nil)).Elem() -} - -type UserNotFoundFault UserNotFound - -func init() { - t["UserNotFoundFault"] = reflect.TypeOf((*UserNotFoundFault)(nil)).Elem() -} - -type UserPasswordChanged struct { - HostEvent - - UserLogin string `xml:"userLogin"` -} - -func init() { - t["UserPasswordChanged"] = reflect.TypeOf((*UserPasswordChanged)(nil)).Elem() -} - -type UserPrivilegeResult struct { - DynamicData - - Entity ManagedObjectReference `xml:"entity"` - Privileges []string `xml:"privileges,omitempty"` -} - -func init() { - t["UserPrivilegeResult"] = reflect.TypeOf((*UserPrivilegeResult)(nil)).Elem() -} - -type UserProfile struct { - ApplyProfile - - Key string `xml:"key"` -} - -func init() { - t["UserProfile"] = reflect.TypeOf((*UserProfile)(nil)).Elem() -} - -type UserSearchResult struct { - DynamicData - - Principal string `xml:"principal"` - FullName string `xml:"fullName,omitempty"` - Group bool `xml:"group"` -} - -func init() { - t["UserSearchResult"] = reflect.TypeOf((*UserSearchResult)(nil)).Elem() -} - -type UserSession struct { - DynamicData - - Key string `xml:"key"` - UserName string `xml:"userName"` - FullName string `xml:"fullName"` - LoginTime time.Time `xml:"loginTime"` - LastActiveTime time.Time `xml:"lastActiveTime"` - Locale string `xml:"locale"` - MessageLocale string `xml:"messageLocale"` - ExtensionSession *bool `xml:"extensionSession"` - IpAddress string `xml:"ipAddress,omitempty"` - UserAgent string `xml:"userAgent,omitempty"` - CallCount int64 `xml:"callCount,omitempty"` -} - -func init() { - t["UserSession"] = reflect.TypeOf((*UserSession)(nil)).Elem() -} - -type UserUnassignedFromGroup struct { - HostEvent - - UserLogin string `xml:"userLogin"` - Group string `xml:"group"` -} - -func init() { - t["UserUnassignedFromGroup"] = reflect.TypeOf((*UserUnassignedFromGroup)(nil)).Elem() -} - -type UserUpgradeEvent struct { - UpgradeEvent -} - -func init() { - t["UserUpgradeEvent"] = reflect.TypeOf((*UserUpgradeEvent)(nil)).Elem() -} - -type VASAStorageArray struct { - DynamicData - - Name string `xml:"name"` - Uuid string `xml:"uuid"` - VendorId string `xml:"vendorId"` - ModelId string `xml:"modelId"` - DiscoverySvcInfo []VASAStorageArrayDiscoverySvcInfo `xml:"discoverySvcInfo,omitempty"` -} - -func init() { - t["VASAStorageArray"] = reflect.TypeOf((*VASAStorageArray)(nil)).Elem() -} - -type VASAStorageArrayDiscoveryFcTransport struct { - DynamicData - - NodeWwn string `xml:"nodeWwn"` - PortWwn string `xml:"portWwn"` -} - -func init() { - t["VASAStorageArrayDiscoveryFcTransport"] = reflect.TypeOf((*VASAStorageArrayDiscoveryFcTransport)(nil)).Elem() -} - -type VASAStorageArrayDiscoveryIpTransport struct { - DynamicData - - IpAddress string `xml:"ipAddress"` - PortNumber string `xml:"portNumber,omitempty"` -} - -func init() { - t["VASAStorageArrayDiscoveryIpTransport"] = reflect.TypeOf((*VASAStorageArrayDiscoveryIpTransport)(nil)).Elem() -} - -type VASAStorageArrayDiscoverySvcInfo struct { - DynamicData - - PortType string `xml:"portType"` - SvcNqn string `xml:"svcNqn"` - IpInfo *VASAStorageArrayDiscoveryIpTransport `xml:"ipInfo,omitempty"` - FcInfo *VASAStorageArrayDiscoveryFcTransport `xml:"fcInfo,omitempty"` -} - -func init() { - t["VASAStorageArrayDiscoverySvcInfo"] = reflect.TypeOf((*VASAStorageArrayDiscoverySvcInfo)(nil)).Elem() -} - -type VAppCloneSpec struct { - DynamicData - - Location ManagedObjectReference `xml:"location"` - Host *ManagedObjectReference `xml:"host,omitempty"` - ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` - VmFolder *ManagedObjectReference `xml:"vmFolder,omitempty"` - NetworkMapping []VAppCloneSpecNetworkMappingPair `xml:"networkMapping,omitempty"` - Property []KeyValue `xml:"property,omitempty"` - ResourceMapping []VAppCloneSpecResourceMap `xml:"resourceMapping,omitempty"` - Provisioning string `xml:"provisioning,omitempty"` -} - -func init() { - t["VAppCloneSpec"] = reflect.TypeOf((*VAppCloneSpec)(nil)).Elem() -} - -type VAppCloneSpecNetworkMappingPair struct { - DynamicData - - Source ManagedObjectReference `xml:"source"` - Destination ManagedObjectReference `xml:"destination"` -} - -func init() { - t["VAppCloneSpecNetworkMappingPair"] = reflect.TypeOf((*VAppCloneSpecNetworkMappingPair)(nil)).Elem() -} - -type VAppCloneSpecResourceMap struct { - DynamicData - - Source ManagedObjectReference `xml:"source"` - Parent *ManagedObjectReference `xml:"parent,omitempty"` - ResourceSpec *ResourceConfigSpec `xml:"resourceSpec,omitempty"` - Location *ManagedObjectReference `xml:"location,omitempty"` -} - -func init() { - t["VAppCloneSpecResourceMap"] = reflect.TypeOf((*VAppCloneSpecResourceMap)(nil)).Elem() -} - -type VAppConfigFault struct { - VimFault -} - -func init() { - t["VAppConfigFault"] = reflect.TypeOf((*VAppConfigFault)(nil)).Elem() -} - -type VAppConfigFaultFault BaseVAppConfigFault - -func init() { - t["VAppConfigFaultFault"] = reflect.TypeOf((*VAppConfigFaultFault)(nil)).Elem() -} - -type VAppConfigInfo struct { - VmConfigInfo - - EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"` - Annotation string `xml:"annotation"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` -} - -func init() { - t["VAppConfigInfo"] = reflect.TypeOf((*VAppConfigInfo)(nil)).Elem() -} - -type VAppConfigSpec struct { - VmConfigSpec - - EntityConfig []VAppEntityConfigInfo `xml:"entityConfig,omitempty"` - Annotation string `xml:"annotation,omitempty"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` -} - -func init() { - t["VAppConfigSpec"] = reflect.TypeOf((*VAppConfigSpec)(nil)).Elem() -} - -type VAppEntityConfigInfo struct { - DynamicData - - Key *ManagedObjectReference `xml:"key,omitempty"` - Tag string `xml:"tag,omitempty"` - StartOrder int32 `xml:"startOrder,omitempty"` - StartDelay int32 `xml:"startDelay,omitempty"` - WaitingForGuest *bool `xml:"waitingForGuest"` - StartAction string `xml:"startAction,omitempty"` - StopDelay int32 `xml:"stopDelay,omitempty"` - StopAction string `xml:"stopAction,omitempty"` - DestroyWithParent *bool `xml:"destroyWithParent"` -} - -func init() { - t["VAppEntityConfigInfo"] = reflect.TypeOf((*VAppEntityConfigInfo)(nil)).Elem() -} - -type VAppIPAssignmentInfo struct { - DynamicData - - SupportedAllocationScheme []string `xml:"supportedAllocationScheme,omitempty"` - IpAllocationPolicy string `xml:"ipAllocationPolicy,omitempty"` - SupportedIpProtocol []string `xml:"supportedIpProtocol,omitempty"` - IpProtocol string `xml:"ipProtocol,omitempty"` -} - -func init() { - t["VAppIPAssignmentInfo"] = reflect.TypeOf((*VAppIPAssignmentInfo)(nil)).Elem() -} - -type VAppNotRunning struct { - VmConfigFault -} - -func init() { - t["VAppNotRunning"] = reflect.TypeOf((*VAppNotRunning)(nil)).Elem() -} - -type VAppNotRunningFault VAppNotRunning - -func init() { - t["VAppNotRunningFault"] = reflect.TypeOf((*VAppNotRunningFault)(nil)).Elem() -} - -type VAppOperationInProgress struct { - RuntimeFault -} - -func init() { - t["VAppOperationInProgress"] = reflect.TypeOf((*VAppOperationInProgress)(nil)).Elem() -} - -type VAppOperationInProgressFault VAppOperationInProgress - -func init() { - t["VAppOperationInProgressFault"] = reflect.TypeOf((*VAppOperationInProgressFault)(nil)).Elem() -} - -type VAppOvfSectionInfo struct { - DynamicData - - Key int32 `xml:"key,omitempty"` - Namespace string `xml:"namespace,omitempty"` - Type string `xml:"type,omitempty"` - AtEnvelopeLevel *bool `xml:"atEnvelopeLevel"` - Contents string `xml:"contents,omitempty"` -} - -func init() { - t["VAppOvfSectionInfo"] = reflect.TypeOf((*VAppOvfSectionInfo)(nil)).Elem() -} - -type VAppOvfSectionSpec struct { - ArrayUpdateSpec - - Info *VAppOvfSectionInfo `xml:"info,omitempty"` -} - -func init() { - t["VAppOvfSectionSpec"] = reflect.TypeOf((*VAppOvfSectionSpec)(nil)).Elem() -} - -type VAppProductInfo struct { - DynamicData - - Key int32 `xml:"key"` - ClassId string `xml:"classId,omitempty"` - InstanceId string `xml:"instanceId,omitempty"` - Name string `xml:"name,omitempty"` - Vendor string `xml:"vendor,omitempty"` - Version string `xml:"version,omitempty"` - FullVersion string `xml:"fullVersion,omitempty"` - VendorUrl string `xml:"vendorUrl,omitempty"` - ProductUrl string `xml:"productUrl,omitempty"` - AppUrl string `xml:"appUrl,omitempty"` -} - -func init() { - t["VAppProductInfo"] = reflect.TypeOf((*VAppProductInfo)(nil)).Elem() -} - -type VAppProductSpec struct { - ArrayUpdateSpec - - Info *VAppProductInfo `xml:"info,omitempty"` -} - -func init() { - t["VAppProductSpec"] = reflect.TypeOf((*VAppProductSpec)(nil)).Elem() -} - -type VAppPropertyFault struct { - VmConfigFault - - Id string `xml:"id"` - Category string `xml:"category"` - Label string `xml:"label"` - Type string `xml:"type"` - Value string `xml:"value"` -} - -func init() { - t["VAppPropertyFault"] = reflect.TypeOf((*VAppPropertyFault)(nil)).Elem() -} - -type VAppPropertyFaultFault BaseVAppPropertyFault - -func init() { - t["VAppPropertyFaultFault"] = reflect.TypeOf((*VAppPropertyFaultFault)(nil)).Elem() -} - -type VAppPropertyInfo struct { - DynamicData - - Key int32 `xml:"key"` - ClassId string `xml:"classId,omitempty"` - InstanceId string `xml:"instanceId,omitempty"` - Id string `xml:"id,omitempty"` - Category string `xml:"category,omitempty"` - Label string `xml:"label,omitempty"` - Type string `xml:"type,omitempty"` - TypeReference string `xml:"typeReference,omitempty"` - UserConfigurable *bool `xml:"userConfigurable"` - DefaultValue string `xml:"defaultValue,omitempty"` - Value string `xml:"value,omitempty"` - Description string `xml:"description,omitempty"` -} - -func init() { - t["VAppPropertyInfo"] = reflect.TypeOf((*VAppPropertyInfo)(nil)).Elem() -} - -type VAppPropertySpec struct { - ArrayUpdateSpec - - Info *VAppPropertyInfo `xml:"info,omitempty"` -} - -func init() { - t["VAppPropertySpec"] = reflect.TypeOf((*VAppPropertySpec)(nil)).Elem() -} - -type VAppTaskInProgress struct { - TaskInProgress -} - -func init() { - t["VAppTaskInProgress"] = reflect.TypeOf((*VAppTaskInProgress)(nil)).Elem() -} - -type VAppTaskInProgressFault VAppTaskInProgress - -func init() { - t["VAppTaskInProgressFault"] = reflect.TypeOf((*VAppTaskInProgressFault)(nil)).Elem() -} - -type VCenterUpdateVStorageObjectMetadataExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Metadata []KeyValue `xml:"metadata,omitempty"` - DeleteKeys []string `xml:"deleteKeys,omitempty"` -} - -func init() { - t["VCenterUpdateVStorageObjectMetadataExRequestType"] = reflect.TypeOf((*VCenterUpdateVStorageObjectMetadataExRequestType)(nil)).Elem() -} - -type VCenterUpdateVStorageObjectMetadataEx_Task VCenterUpdateVStorageObjectMetadataExRequestType - -func init() { - t["VCenterUpdateVStorageObjectMetadataEx_Task"] = reflect.TypeOf((*VCenterUpdateVStorageObjectMetadataEx_Task)(nil)).Elem() -} - -type VCenterUpdateVStorageObjectMetadataEx_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type VFlashCacheHotConfigNotSupported struct { - VmConfigFault -} - -func init() { - t["VFlashCacheHotConfigNotSupported"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupported)(nil)).Elem() -} - -type VFlashCacheHotConfigNotSupportedFault VFlashCacheHotConfigNotSupported - -func init() { - t["VFlashCacheHotConfigNotSupportedFault"] = reflect.TypeOf((*VFlashCacheHotConfigNotSupportedFault)(nil)).Elem() -} - -type VFlashModuleNotSupported struct { - VmConfigFault - - VmName string `xml:"vmName"` - ModuleName string `xml:"moduleName"` - Reason string `xml:"reason"` - HostName string `xml:"hostName"` -} - -func init() { - t["VFlashModuleNotSupported"] = reflect.TypeOf((*VFlashModuleNotSupported)(nil)).Elem() -} - -type VFlashModuleNotSupportedFault VFlashModuleNotSupported - -func init() { - t["VFlashModuleNotSupportedFault"] = reflect.TypeOf((*VFlashModuleNotSupportedFault)(nil)).Elem() -} - -type VFlashModuleVersionIncompatible struct { - VimFault - - ModuleName string `xml:"moduleName"` - VmRequestModuleVersion string `xml:"vmRequestModuleVersion"` - HostMinSupportedVerson string `xml:"hostMinSupportedVerson"` - HostModuleVersion string `xml:"hostModuleVersion"` -} - -func init() { - t["VFlashModuleVersionIncompatible"] = reflect.TypeOf((*VFlashModuleVersionIncompatible)(nil)).Elem() -} - -type VFlashModuleVersionIncompatibleFault VFlashModuleVersionIncompatible - -func init() { - t["VFlashModuleVersionIncompatibleFault"] = reflect.TypeOf((*VFlashModuleVersionIncompatibleFault)(nil)).Elem() -} - -type VMFSDatastoreCreatedEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` - DatastoreUrl string `xml:"datastoreUrl,omitempty"` -} - -func init() { - t["VMFSDatastoreCreatedEvent"] = reflect.TypeOf((*VMFSDatastoreCreatedEvent)(nil)).Elem() -} - -type VMFSDatastoreExpandedEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` -} - -func init() { - t["VMFSDatastoreExpandedEvent"] = reflect.TypeOf((*VMFSDatastoreExpandedEvent)(nil)).Elem() -} - -type VMFSDatastoreExtendedEvent struct { - HostEvent - - Datastore DatastoreEventArgument `xml:"datastore"` -} - -func init() { - t["VMFSDatastoreExtendedEvent"] = reflect.TypeOf((*VMFSDatastoreExtendedEvent)(nil)).Elem() -} - -type VMINotSupported struct { - DeviceNotSupported -} - -func init() { - t["VMINotSupported"] = reflect.TypeOf((*VMINotSupported)(nil)).Elem() -} - -type VMINotSupportedFault VMINotSupported - -func init() { - t["VMINotSupportedFault"] = reflect.TypeOf((*VMINotSupportedFault)(nil)).Elem() -} - -type VMOnConflictDVPort struct { - CannotAccessNetwork -} - -func init() { - t["VMOnConflictDVPort"] = reflect.TypeOf((*VMOnConflictDVPort)(nil)).Elem() -} - -type VMOnConflictDVPortFault VMOnConflictDVPort - -func init() { - t["VMOnConflictDVPortFault"] = reflect.TypeOf((*VMOnConflictDVPortFault)(nil)).Elem() -} - -type VMOnVirtualIntranet struct { - CannotAccessNetwork -} - -func init() { - t["VMOnVirtualIntranet"] = reflect.TypeOf((*VMOnVirtualIntranet)(nil)).Elem() -} - -type VMOnVirtualIntranetFault VMOnVirtualIntranet - -func init() { - t["VMOnVirtualIntranetFault"] = reflect.TypeOf((*VMOnVirtualIntranetFault)(nil)).Elem() -} - -type VMotionAcrossNetworkNotSupported struct { - MigrationFeatureNotSupported -} - -func init() { - t["VMotionAcrossNetworkNotSupported"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupported)(nil)).Elem() -} - -type VMotionAcrossNetworkNotSupportedFault VMotionAcrossNetworkNotSupported - -func init() { - t["VMotionAcrossNetworkNotSupportedFault"] = reflect.TypeOf((*VMotionAcrossNetworkNotSupportedFault)(nil)).Elem() -} - -type VMotionInterfaceIssue struct { - MigrationFault - - AtSourceHost bool `xml:"atSourceHost"` - FailedHost string `xml:"failedHost"` - FailedHostEntity *ManagedObjectReference `xml:"failedHostEntity,omitempty"` -} - -func init() { - t["VMotionInterfaceIssue"] = reflect.TypeOf((*VMotionInterfaceIssue)(nil)).Elem() -} - -type VMotionInterfaceIssueFault BaseVMotionInterfaceIssue - -func init() { - t["VMotionInterfaceIssueFault"] = reflect.TypeOf((*VMotionInterfaceIssueFault)(nil)).Elem() -} - -type VMotionLicenseExpiredEvent struct { - LicenseEvent -} - -func init() { - t["VMotionLicenseExpiredEvent"] = reflect.TypeOf((*VMotionLicenseExpiredEvent)(nil)).Elem() -} - -type VMotionLinkCapacityLow struct { - VMotionInterfaceIssue - - Network string `xml:"network"` -} - -func init() { - t["VMotionLinkCapacityLow"] = reflect.TypeOf((*VMotionLinkCapacityLow)(nil)).Elem() -} - -type VMotionLinkCapacityLowFault VMotionLinkCapacityLow - -func init() { - t["VMotionLinkCapacityLowFault"] = reflect.TypeOf((*VMotionLinkCapacityLowFault)(nil)).Elem() -} - -type VMotionLinkDown struct { - VMotionInterfaceIssue - - Network string `xml:"network"` -} - -func init() { - t["VMotionLinkDown"] = reflect.TypeOf((*VMotionLinkDown)(nil)).Elem() -} - -type VMotionLinkDownFault VMotionLinkDown - -func init() { - t["VMotionLinkDownFault"] = reflect.TypeOf((*VMotionLinkDownFault)(nil)).Elem() -} - -type VMotionNotConfigured struct { - VMotionInterfaceIssue -} - -func init() { - t["VMotionNotConfigured"] = reflect.TypeOf((*VMotionNotConfigured)(nil)).Elem() -} - -type VMotionNotConfiguredFault VMotionNotConfigured - -func init() { - t["VMotionNotConfiguredFault"] = reflect.TypeOf((*VMotionNotConfiguredFault)(nil)).Elem() -} - -type VMotionNotLicensed struct { - VMotionInterfaceIssue -} - -func init() { - t["VMotionNotLicensed"] = reflect.TypeOf((*VMotionNotLicensed)(nil)).Elem() -} - -type VMotionNotLicensedFault VMotionNotLicensed - -func init() { - t["VMotionNotLicensedFault"] = reflect.TypeOf((*VMotionNotLicensedFault)(nil)).Elem() -} - -type VMotionNotSupported struct { - VMotionInterfaceIssue -} - -func init() { - t["VMotionNotSupported"] = reflect.TypeOf((*VMotionNotSupported)(nil)).Elem() -} - -type VMotionNotSupportedFault VMotionNotSupported - -func init() { - t["VMotionNotSupportedFault"] = reflect.TypeOf((*VMotionNotSupportedFault)(nil)).Elem() -} - -type VMotionProtocolIncompatible struct { - MigrationFault -} - -func init() { - t["VMotionProtocolIncompatible"] = reflect.TypeOf((*VMotionProtocolIncompatible)(nil)).Elem() -} - -type VMotionProtocolIncompatibleFault VMotionProtocolIncompatible - -func init() { - t["VMotionProtocolIncompatibleFault"] = reflect.TypeOf((*VMotionProtocolIncompatibleFault)(nil)).Elem() -} - -type VMwareDVSConfigInfo struct { - DVSConfigInfo - - VspanSession []VMwareVspanSession `xml:"vspanSession,omitempty"` - PvlanConfig []VMwareDVSPvlanMapEntry `xml:"pvlanConfig,omitempty"` - MaxMtu int32 `xml:"maxMtu"` - LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` - IpfixConfig *VMwareIpfixConfig `xml:"ipfixConfig,omitempty"` - LacpGroupConfig []VMwareDvsLacpGroupConfig `xml:"lacpGroupConfig,omitempty"` - LacpApiVersion string `xml:"lacpApiVersion,omitempty"` - MulticastFilteringMode string `xml:"multicastFilteringMode,omitempty"` - NetworkOffloadSpecId string `xml:"networkOffloadSpecId,omitempty"` -} - -func init() { - t["VMwareDVSConfigInfo"] = reflect.TypeOf((*VMwareDVSConfigInfo)(nil)).Elem() -} - -type VMwareDVSConfigSpec struct { - DVSConfigSpec - - PvlanConfigSpec []VMwareDVSPvlanConfigSpec `xml:"pvlanConfigSpec,omitempty"` - VspanConfigSpec []VMwareDVSVspanConfigSpec `xml:"vspanConfigSpec,omitempty"` - MaxMtu int32 `xml:"maxMtu,omitempty"` - LinkDiscoveryProtocolConfig *LinkDiscoveryProtocolConfig `xml:"linkDiscoveryProtocolConfig,omitempty"` - IpfixConfig *VMwareIpfixConfig `xml:"ipfixConfig,omitempty"` - LacpApiVersion string `xml:"lacpApiVersion,omitempty"` - MulticastFilteringMode string `xml:"multicastFilteringMode,omitempty"` - NetworkOffloadSpecId string `xml:"networkOffloadSpecId,omitempty"` -} - -func init() { - t["VMwareDVSConfigSpec"] = reflect.TypeOf((*VMwareDVSConfigSpec)(nil)).Elem() -} - -type VMwareDVSFeatureCapability struct { - DVSFeatureCapability - - VspanSupported *bool `xml:"vspanSupported"` - LldpSupported *bool `xml:"lldpSupported"` - IpfixSupported *bool `xml:"ipfixSupported"` - IpfixCapability *VMwareDvsIpfixCapability `xml:"ipfixCapability,omitempty"` - MulticastSnoopingSupported *bool `xml:"multicastSnoopingSupported"` - VspanCapability *VMwareDVSVspanCapability `xml:"vspanCapability,omitempty"` - LacpCapability *VMwareDvsLacpCapability `xml:"lacpCapability,omitempty"` - DpuCapability *VMwareDvsDpuCapability `xml:"dpuCapability,omitempty"` - NsxSupported *bool `xml:"nsxSupported"` - MtuCapability *VMwareDvsMtuCapability `xml:"mtuCapability,omitempty"` -} - -func init() { - t["VMwareDVSFeatureCapability"] = reflect.TypeOf((*VMwareDVSFeatureCapability)(nil)).Elem() -} - -type VMwareDVSHealthCheckCapability struct { - DVSHealthCheckCapability - - VlanMtuSupported bool `xml:"vlanMtuSupported"` - TeamingSupported bool `xml:"teamingSupported"` -} - -func init() { - t["VMwareDVSHealthCheckCapability"] = reflect.TypeOf((*VMwareDVSHealthCheckCapability)(nil)).Elem() -} - -type VMwareDVSHealthCheckConfig struct { - DVSHealthCheckConfig -} - -func init() { - t["VMwareDVSHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSHealthCheckConfig)(nil)).Elem() -} - -type VMwareDVSMtuHealthCheckResult struct { - HostMemberUplinkHealthCheckResult - - MtuMismatch bool `xml:"mtuMismatch"` - VlanSupportSwitchMtu []NumericRange `xml:"vlanSupportSwitchMtu,omitempty"` - VlanNotSupportSwitchMtu []NumericRange `xml:"vlanNotSupportSwitchMtu,omitempty"` -} - -func init() { - t["VMwareDVSMtuHealthCheckResult"] = reflect.TypeOf((*VMwareDVSMtuHealthCheckResult)(nil)).Elem() -} - -type VMwareDVSPortSetting struct { - DVPortSetting - - Vlan BaseVmwareDistributedVirtualSwitchVlanSpec `xml:"vlan,omitempty,typeattr"` - QosTag *IntPolicy `xml:"qosTag,omitempty"` - UplinkTeamingPolicy *VmwareUplinkPortTeamingPolicy `xml:"uplinkTeamingPolicy,omitempty"` - SecurityPolicy *DVSSecurityPolicy `xml:"securityPolicy,omitempty"` - IpfixEnabled *BoolPolicy `xml:"ipfixEnabled,omitempty"` - TxUplink *BoolPolicy `xml:"txUplink,omitempty"` - LacpPolicy *VMwareUplinkLacpPolicy `xml:"lacpPolicy,omitempty"` - MacManagementPolicy *DVSMacManagementPolicy `xml:"macManagementPolicy,omitempty"` - VNI *IntPolicy `xml:"VNI,omitempty"` -} - -func init() { - t["VMwareDVSPortSetting"] = reflect.TypeOf((*VMwareDVSPortSetting)(nil)).Elem() -} - -type VMwareDVSPortgroupPolicy struct { - DVPortgroupPolicy - - VlanOverrideAllowed bool `xml:"vlanOverrideAllowed"` - UplinkTeamingOverrideAllowed bool `xml:"uplinkTeamingOverrideAllowed"` - SecurityPolicyOverrideAllowed bool `xml:"securityPolicyOverrideAllowed"` - IpfixOverrideAllowed *bool `xml:"ipfixOverrideAllowed"` - MacManagementOverrideAllowed *bool `xml:"macManagementOverrideAllowed"` -} - -func init() { - t["VMwareDVSPortgroupPolicy"] = reflect.TypeOf((*VMwareDVSPortgroupPolicy)(nil)).Elem() -} - -type VMwareDVSPvlanConfigSpec struct { - DynamicData - - PvlanEntry VMwareDVSPvlanMapEntry `xml:"pvlanEntry"` - Operation string `xml:"operation"` -} - -func init() { - t["VMwareDVSPvlanConfigSpec"] = reflect.TypeOf((*VMwareDVSPvlanConfigSpec)(nil)).Elem() -} - -type VMwareDVSPvlanMapEntry struct { - DynamicData - - PrimaryVlanId int32 `xml:"primaryVlanId"` - SecondaryVlanId int32 `xml:"secondaryVlanId"` - PvlanType string `xml:"pvlanType"` -} - -func init() { - t["VMwareDVSPvlanMapEntry"] = reflect.TypeOf((*VMwareDVSPvlanMapEntry)(nil)).Elem() -} - -type VMwareDVSTeamingHealthCheckConfig struct { - VMwareDVSHealthCheckConfig -} - -func init() { - t["VMwareDVSTeamingHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckConfig)(nil)).Elem() -} - -type VMwareDVSTeamingHealthCheckResult struct { - HostMemberHealthCheckResult - - TeamingStatus string `xml:"teamingStatus"` -} - -func init() { - t["VMwareDVSTeamingHealthCheckResult"] = reflect.TypeOf((*VMwareDVSTeamingHealthCheckResult)(nil)).Elem() -} - -type VMwareDVSVlanHealthCheckResult struct { - HostMemberUplinkHealthCheckResult - - TrunkedVlan []NumericRange `xml:"trunkedVlan,omitempty"` - UntrunkedVlan []NumericRange `xml:"untrunkedVlan,omitempty"` -} - -func init() { - t["VMwareDVSVlanHealthCheckResult"] = reflect.TypeOf((*VMwareDVSVlanHealthCheckResult)(nil)).Elem() -} - -type VMwareDVSVlanMtuHealthCheckConfig struct { - VMwareDVSHealthCheckConfig -} - -func init() { - t["VMwareDVSVlanMtuHealthCheckConfig"] = reflect.TypeOf((*VMwareDVSVlanMtuHealthCheckConfig)(nil)).Elem() -} - -type VMwareDVSVspanCapability struct { - DynamicData - - MixedDestSupported bool `xml:"mixedDestSupported"` - DvportSupported bool `xml:"dvportSupported"` - RemoteSourceSupported bool `xml:"remoteSourceSupported"` - RemoteDestSupported bool `xml:"remoteDestSupported"` - EncapRemoteSourceSupported bool `xml:"encapRemoteSourceSupported"` - ErspanProtocolSupported *bool `xml:"erspanProtocolSupported"` - MirrorNetstackSupported *bool `xml:"mirrorNetstackSupported"` -} - -func init() { - t["VMwareDVSVspanCapability"] = reflect.TypeOf((*VMwareDVSVspanCapability)(nil)).Elem() -} - -type VMwareDVSVspanConfigSpec struct { - DynamicData - - VspanSession VMwareVspanSession `xml:"vspanSession"` - Operation string `xml:"operation"` -} - -func init() { - t["VMwareDVSVspanConfigSpec"] = reflect.TypeOf((*VMwareDVSVspanConfigSpec)(nil)).Elem() -} - -type VMwareDvsDpuCapability struct { - DynamicData - - NetworkOffloadSupported *bool `xml:"networkOffloadSupported"` -} - -func init() { - t["VMwareDvsDpuCapability"] = reflect.TypeOf((*VMwareDvsDpuCapability)(nil)).Elem() -} - -type VMwareDvsIpfixCapability struct { - DynamicData - - IpfixSupported *bool `xml:"ipfixSupported"` - Ipv6ForIpfixSupported *bool `xml:"ipv6ForIpfixSupported"` - ObservationDomainIdSupported *bool `xml:"observationDomainIdSupported"` -} - -func init() { - t["VMwareDvsIpfixCapability"] = reflect.TypeOf((*VMwareDvsIpfixCapability)(nil)).Elem() -} - -type VMwareDvsLacpCapability struct { - DynamicData - - LacpSupported *bool `xml:"lacpSupported"` - MultiLacpGroupSupported *bool `xml:"multiLacpGroupSupported"` - LacpFastModeSupported *bool `xml:"lacpFastModeSupported"` -} - -func init() { - t["VMwareDvsLacpCapability"] = reflect.TypeOf((*VMwareDvsLacpCapability)(nil)).Elem() -} - -type VMwareDvsLacpGroupConfig struct { - DynamicData - - Key string `xml:"key,omitempty"` - Name string `xml:"name,omitempty"` - Mode string `xml:"mode,omitempty"` - UplinkNum int32 `xml:"uplinkNum,omitempty"` - LoadbalanceAlgorithm string `xml:"loadbalanceAlgorithm,omitempty"` - Vlan *VMwareDvsLagVlanConfig `xml:"vlan,omitempty"` - Ipfix *VMwareDvsLagIpfixConfig `xml:"ipfix,omitempty"` - UplinkName []string `xml:"uplinkName,omitempty"` - UplinkPortKey []string `xml:"uplinkPortKey,omitempty"` - TimeoutMode string `xml:"timeoutMode,omitempty"` -} - -func init() { - t["VMwareDvsLacpGroupConfig"] = reflect.TypeOf((*VMwareDvsLacpGroupConfig)(nil)).Elem() -} - -type VMwareDvsLacpGroupSpec struct { - DynamicData - - LacpGroupConfig VMwareDvsLacpGroupConfig `xml:"lacpGroupConfig"` - Operation string `xml:"operation"` -} - -func init() { - t["VMwareDvsLacpGroupSpec"] = reflect.TypeOf((*VMwareDvsLacpGroupSpec)(nil)).Elem() -} - -type VMwareDvsLagIpfixConfig struct { - DynamicData - - IpfixEnabled *bool `xml:"ipfixEnabled"` -} - -func init() { - t["VMwareDvsLagIpfixConfig"] = reflect.TypeOf((*VMwareDvsLagIpfixConfig)(nil)).Elem() -} - -type VMwareDvsLagVlanConfig struct { - DynamicData - - VlanId []NumericRange `xml:"vlanId,omitempty"` -} - -func init() { - t["VMwareDvsLagVlanConfig"] = reflect.TypeOf((*VMwareDvsLagVlanConfig)(nil)).Elem() -} - -type VMwareDvsMtuCapability struct { - DynamicData - - MinMtuSupported int32 `xml:"minMtuSupported"` - MaxMtuSupported int32 `xml:"maxMtuSupported"` -} - -func init() { - t["VMwareDvsMtuCapability"] = reflect.TypeOf((*VMwareDvsMtuCapability)(nil)).Elem() -} - -type VMwareIpfixConfig struct { - DynamicData - - CollectorIpAddress string `xml:"collectorIpAddress,omitempty"` - CollectorPort int32 `xml:"collectorPort,omitempty"` - ObservationDomainId int64 `xml:"observationDomainId,omitempty"` - ActiveFlowTimeout int32 `xml:"activeFlowTimeout"` - IdleFlowTimeout int32 `xml:"idleFlowTimeout"` - SamplingRate int32 `xml:"samplingRate"` - InternalFlowsOnly bool `xml:"internalFlowsOnly"` -} - -func init() { - t["VMwareIpfixConfig"] = reflect.TypeOf((*VMwareIpfixConfig)(nil)).Elem() -} - -type VMwareUplinkLacpPolicy struct { - InheritablePolicy - - Enable *BoolPolicy `xml:"enable,omitempty"` - Mode *StringPolicy `xml:"mode,omitempty"` -} - -func init() { - t["VMwareUplinkLacpPolicy"] = reflect.TypeOf((*VMwareUplinkLacpPolicy)(nil)).Elem() -} - -type VMwareUplinkPortOrderPolicy struct { - InheritablePolicy - - ActiveUplinkPort []string `xml:"activeUplinkPort,omitempty"` - StandbyUplinkPort []string `xml:"standbyUplinkPort,omitempty"` -} - -func init() { - t["VMwareUplinkPortOrderPolicy"] = reflect.TypeOf((*VMwareUplinkPortOrderPolicy)(nil)).Elem() -} - -type VMwareVspanPort struct { - DynamicData - - PortKey []string `xml:"portKey,omitempty"` - UplinkPortName []string `xml:"uplinkPortName,omitempty"` - WildcardPortConnecteeType []string `xml:"wildcardPortConnecteeType,omitempty"` - Vlans []int32 `xml:"vlans,omitempty"` - IpAddress []string `xml:"ipAddress,omitempty"` -} - -func init() { - t["VMwareVspanPort"] = reflect.TypeOf((*VMwareVspanPort)(nil)).Elem() -} - -type VMwareVspanSession struct { - DynamicData - - Key string `xml:"key,omitempty"` - Name string `xml:"name,omitempty"` - Description string `xml:"description,omitempty"` - Enabled bool `xml:"enabled"` - SourcePortTransmitted *VMwareVspanPort `xml:"sourcePortTransmitted,omitempty"` - SourcePortReceived *VMwareVspanPort `xml:"sourcePortReceived,omitempty"` - DestinationPort *VMwareVspanPort `xml:"destinationPort,omitempty"` - EncapsulationVlanId int32 `xml:"encapsulationVlanId,omitempty"` - StripOriginalVlan bool `xml:"stripOriginalVlan"` - MirroredPacketLength int32 `xml:"mirroredPacketLength,omitempty"` - NormalTrafficAllowed bool `xml:"normalTrafficAllowed"` - SessionType string `xml:"sessionType,omitempty"` - SamplingRate int32 `xml:"samplingRate,omitempty"` - EncapType string `xml:"encapType,omitempty"` - ErspanId int32 `xml:"erspanId,omitempty"` - ErspanCOS int32 `xml:"erspanCOS,omitempty"` - ErspanGraNanosec *bool `xml:"erspanGraNanosec"` - Netstack string `xml:"netstack,omitempty"` -} - -func init() { - t["VMwareVspanSession"] = reflect.TypeOf((*VMwareVspanSession)(nil)).Elem() -} - -type VStorageObject struct { - DynamicData - - Config VStorageObjectConfigInfo `xml:"config"` -} - -func init() { - t["VStorageObject"] = reflect.TypeOf((*VStorageObject)(nil)).Elem() -} - -type VStorageObjectAssociations struct { - DynamicData - - Id ID `xml:"id"` - VmDiskAssociations []VStorageObjectAssociationsVmDiskAssociations `xml:"vmDiskAssociations,omitempty"` - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["VStorageObjectAssociations"] = reflect.TypeOf((*VStorageObjectAssociations)(nil)).Elem() -} - -type VStorageObjectAssociationsVmDiskAssociations struct { - DynamicData - - VmId string `xml:"vmId"` - DiskKey int32 `xml:"diskKey"` -} - -func init() { - t["VStorageObjectAssociationsVmDiskAssociations"] = reflect.TypeOf((*VStorageObjectAssociationsVmDiskAssociations)(nil)).Elem() -} - -type VStorageObjectConfigInfo struct { - BaseConfigInfo - - CapacityInMB int64 `xml:"capacityInMB"` - ConsumptionType []string `xml:"consumptionType,omitempty"` - ConsumerId []ID `xml:"consumerId,omitempty"` -} - -func init() { - t["VStorageObjectConfigInfo"] = reflect.TypeOf((*VStorageObjectConfigInfo)(nil)).Elem() -} - -type VStorageObjectCreateSnapshotRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - Description string `xml:"description"` -} - -func init() { - t["VStorageObjectCreateSnapshotRequestType"] = reflect.TypeOf((*VStorageObjectCreateSnapshotRequestType)(nil)).Elem() -} - -type VStorageObjectCreateSnapshot_Task VStorageObjectCreateSnapshotRequestType - -func init() { - t["VStorageObjectCreateSnapshot_Task"] = reflect.TypeOf((*VStorageObjectCreateSnapshot_Task)(nil)).Elem() -} - -type VStorageObjectCreateSnapshot_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type VStorageObjectSnapshotDetails struct { - DynamicData - - Path string `xml:"path,omitempty"` - ChangedBlockTrackingId string `xml:"changedBlockTrackingId,omitempty"` -} - -func init() { - t["VStorageObjectSnapshotDetails"] = reflect.TypeOf((*VStorageObjectSnapshotDetails)(nil)).Elem() -} - -type VStorageObjectSnapshotInfo struct { - DynamicData - - Snapshots []VStorageObjectSnapshotInfoVStorageObjectSnapshot `xml:"snapshots,omitempty"` -} - -func init() { - t["VStorageObjectSnapshotInfo"] = reflect.TypeOf((*VStorageObjectSnapshotInfo)(nil)).Elem() -} - -type VStorageObjectSnapshotInfoVStorageObjectSnapshot struct { - DynamicData - - Id *ID `xml:"id,omitempty"` - BackingObjectId string `xml:"backingObjectId,omitempty"` - CreateTime time.Time `xml:"createTime"` - Description string `xml:"description"` -} - -func init() { - t["VStorageObjectSnapshotInfoVStorageObjectSnapshot"] = reflect.TypeOf((*VStorageObjectSnapshotInfoVStorageObjectSnapshot)(nil)).Elem() -} - -type VStorageObjectStateInfo struct { - DynamicData - - Tentative *bool `xml:"tentative"` -} - -func init() { - t["VStorageObjectStateInfo"] = reflect.TypeOf((*VStorageObjectStateInfo)(nil)).Elem() -} - -type VVolHostPE struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - ProtocolEndpoint []HostProtocolEndpoint `xml:"protocolEndpoint"` -} - -func init() { - t["VVolHostPE"] = reflect.TypeOf((*VVolHostPE)(nil)).Elem() -} - -type VVolVmConfigFileUpdateResult struct { - DynamicData - - SucceededVmConfigFile []KeyValue `xml:"succeededVmConfigFile,omitempty"` - FailedVmConfigFile []VVolVmConfigFileUpdateResultFailedVmConfigFileInfo `xml:"failedVmConfigFile,omitempty"` -} - -func init() { - t["VVolVmConfigFileUpdateResult"] = reflect.TypeOf((*VVolVmConfigFileUpdateResult)(nil)).Elem() -} - -type VVolVmConfigFileUpdateResultFailedVmConfigFileInfo struct { - DynamicData - - TargetConfigVVolId string `xml:"targetConfigVVolId"` - DsPath string `xml:"dsPath,omitempty"` - Fault LocalizedMethodFault `xml:"fault"` -} - -func init() { - t["VVolVmConfigFileUpdateResultFailedVmConfigFileInfo"] = reflect.TypeOf((*VVolVmConfigFileUpdateResultFailedVmConfigFileInfo)(nil)).Elem() -} - -type ValidateCredentialsInGuest ValidateCredentialsInGuestRequestType - -func init() { - t["ValidateCredentialsInGuest"] = reflect.TypeOf((*ValidateCredentialsInGuest)(nil)).Elem() -} - -type ValidateCredentialsInGuestRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm ManagedObjectReference `xml:"vm"` - Auth BaseGuestAuthentication `xml:"auth,typeattr"` -} - -func init() { - t["ValidateCredentialsInGuestRequestType"] = reflect.TypeOf((*ValidateCredentialsInGuestRequestType)(nil)).Elem() -} - -type ValidateCredentialsInGuestResponse struct { -} - -type ValidateHCIConfiguration ValidateHCIConfigurationRequestType - -func init() { - t["ValidateHCIConfiguration"] = reflect.TypeOf((*ValidateHCIConfiguration)(nil)).Elem() -} - -type ValidateHCIConfigurationRequestType struct { - This ManagedObjectReference `xml:"_this"` - HciConfigSpec *ClusterComputeResourceHCIConfigSpec `xml:"hciConfigSpec,omitempty"` - Hosts []ManagedObjectReference `xml:"hosts,omitempty"` -} - -func init() { - t["ValidateHCIConfigurationRequestType"] = reflect.TypeOf((*ValidateHCIConfigurationRequestType)(nil)).Elem() -} - -type ValidateHCIConfigurationResponse struct { - Returnval []BaseClusterComputeResourceValidationResultBase `xml:"returnval,omitempty,typeattr"` -} - -type ValidateHost ValidateHostRequestType - -func init() { - t["ValidateHost"] = reflect.TypeOf((*ValidateHost)(nil)).Elem() -} - -type ValidateHostProfileCompositionRequestType struct { - This ManagedObjectReference `xml:"_this"` - Source ManagedObjectReference `xml:"source"` - Targets []ManagedObjectReference `xml:"targets,omitempty"` - ToBeMerged *HostApplyProfile `xml:"toBeMerged,omitempty"` - ToReplaceWith *HostApplyProfile `xml:"toReplaceWith,omitempty"` - ToBeDeleted *HostApplyProfile `xml:"toBeDeleted,omitempty"` - EnableStatusToBeCopied *HostApplyProfile `xml:"enableStatusToBeCopied,omitempty"` - ErrorOnly *bool `xml:"errorOnly"` -} - -func init() { - t["ValidateHostProfileCompositionRequestType"] = reflect.TypeOf((*ValidateHostProfileCompositionRequestType)(nil)).Elem() -} - -type ValidateHostProfileComposition_Task ValidateHostProfileCompositionRequestType - -func init() { - t["ValidateHostProfileComposition_Task"] = reflect.TypeOf((*ValidateHostProfileComposition_Task)(nil)).Elem() -} - -type ValidateHostProfileComposition_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ValidateHostRequestType struct { - This ManagedObjectReference `xml:"_this"` - OvfDescriptor string `xml:"ovfDescriptor"` - Host ManagedObjectReference `xml:"host"` - Vhp OvfValidateHostParams `xml:"vhp"` -} - -func init() { - t["ValidateHostRequestType"] = reflect.TypeOf((*ValidateHostRequestType)(nil)).Elem() -} - -type ValidateHostResponse struct { - Returnval OvfValidateHostResult `xml:"returnval"` -} - -type ValidateMigration ValidateMigrationRequestType - -func init() { - t["ValidateMigration"] = reflect.TypeOf((*ValidateMigration)(nil)).Elem() -} - -type ValidateMigrationRequestType struct { - This ManagedObjectReference `xml:"_this"` - Vm []ManagedObjectReference `xml:"vm"` - State VirtualMachinePowerState `xml:"state,omitempty"` - TestType []string `xml:"testType,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` -} - -func init() { - t["ValidateMigrationRequestType"] = reflect.TypeOf((*ValidateMigrationRequestType)(nil)).Elem() -} - -type ValidateMigrationResponse struct { - Returnval []BaseEvent `xml:"returnval,omitempty,typeattr"` -} - -type ValidateStoragePodConfig ValidateStoragePodConfigRequestType - -func init() { - t["ValidateStoragePodConfig"] = reflect.TypeOf((*ValidateStoragePodConfig)(nil)).Elem() -} - -type ValidateStoragePodConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` - Pod ManagedObjectReference `xml:"pod"` - Spec StorageDrsConfigSpec `xml:"spec"` -} - -func init() { - t["ValidateStoragePodConfigRequestType"] = reflect.TypeOf((*ValidateStoragePodConfigRequestType)(nil)).Elem() -} - -type ValidateStoragePodConfigResponse struct { - Returnval *LocalizedMethodFault `xml:"returnval,omitempty"` -} - -type VasaProviderContainerSpec struct { - DynamicData - - VasaProviderInfo []VimVasaProviderInfo `xml:"vasaProviderInfo,omitempty"` - ScId string `xml:"scId"` - Deleted bool `xml:"deleted"` -} - -func init() { - t["VasaProviderContainerSpec"] = reflect.TypeOf((*VasaProviderContainerSpec)(nil)).Elem() -} - -type VcAgentUninstallFailedEvent struct { - HostEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VcAgentUninstallFailedEvent"] = reflect.TypeOf((*VcAgentUninstallFailedEvent)(nil)).Elem() -} - -type VcAgentUninstalledEvent struct { - HostEvent -} - -func init() { - t["VcAgentUninstalledEvent"] = reflect.TypeOf((*VcAgentUninstalledEvent)(nil)).Elem() -} - -type VcAgentUpgradeFailedEvent struct { - HostEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VcAgentUpgradeFailedEvent"] = reflect.TypeOf((*VcAgentUpgradeFailedEvent)(nil)).Elem() -} - -type VcAgentUpgradedEvent struct { - HostEvent -} - -func init() { - t["VcAgentUpgradedEvent"] = reflect.TypeOf((*VcAgentUpgradedEvent)(nil)).Elem() -} - -type VchaClusterConfigInfo struct { - DynamicData - - FailoverNodeInfo1 *FailoverNodeInfo `xml:"failoverNodeInfo1,omitempty"` - FailoverNodeInfo2 *FailoverNodeInfo `xml:"failoverNodeInfo2,omitempty"` - WitnessNodeInfo *WitnessNodeInfo `xml:"witnessNodeInfo,omitempty"` - State string `xml:"state"` -} - -func init() { - t["VchaClusterConfigInfo"] = reflect.TypeOf((*VchaClusterConfigInfo)(nil)).Elem() -} - -type VchaClusterConfigSpec struct { - DynamicData - - PassiveIp string `xml:"passiveIp"` - WitnessIp string `xml:"witnessIp"` -} - -func init() { - t["VchaClusterConfigSpec"] = reflect.TypeOf((*VchaClusterConfigSpec)(nil)).Elem() -} - -type VchaClusterDeploymentSpec struct { - DynamicData - - PassiveDeploymentSpec PassiveNodeDeploymentSpec `xml:"passiveDeploymentSpec"` - WitnessDeploymentSpec BaseNodeDeploymentSpec `xml:"witnessDeploymentSpec,typeattr"` - ActiveVcSpec SourceNodeSpec `xml:"activeVcSpec"` - ActiveVcNetworkConfig *ClusterNetworkConfigSpec `xml:"activeVcNetworkConfig,omitempty"` -} - -func init() { - t["VchaClusterDeploymentSpec"] = reflect.TypeOf((*VchaClusterDeploymentSpec)(nil)).Elem() -} - -type VchaClusterHealth struct { - DynamicData - - RuntimeInfo VchaClusterRuntimeInfo `xml:"runtimeInfo"` - HealthMessages []LocalizableMessage `xml:"healthMessages,omitempty"` - AdditionalInformation []LocalizableMessage `xml:"additionalInformation,omitempty"` -} - -func init() { - t["VchaClusterHealth"] = reflect.TypeOf((*VchaClusterHealth)(nil)).Elem() -} - -type VchaClusterNetworkSpec struct { - DynamicData - - WitnessNetworkSpec BaseNodeNetworkSpec `xml:"witnessNetworkSpec,typeattr"` - PassiveNetworkSpec PassiveNodeNetworkSpec `xml:"passiveNetworkSpec"` -} - -func init() { - t["VchaClusterNetworkSpec"] = reflect.TypeOf((*VchaClusterNetworkSpec)(nil)).Elem() -} - -type VchaClusterRuntimeInfo struct { - DynamicData - - ClusterState string `xml:"clusterState"` - NodeInfo []VchaNodeRuntimeInfo `xml:"nodeInfo,omitempty"` - ClusterMode string `xml:"clusterMode"` -} - -func init() { - t["VchaClusterRuntimeInfo"] = reflect.TypeOf((*VchaClusterRuntimeInfo)(nil)).Elem() -} - -type VchaNodeRuntimeInfo struct { - DynamicData - - NodeState string `xml:"nodeState"` - NodeRole string `xml:"nodeRole"` - NodeIp string `xml:"nodeIp"` -} - -func init() { - t["VchaNodeRuntimeInfo"] = reflect.TypeOf((*VchaNodeRuntimeInfo)(nil)).Elem() -} - -type VimAccountPasswordChangedEvent struct { - HostEvent -} - -func init() { - t["VimAccountPasswordChangedEvent"] = reflect.TypeOf((*VimAccountPasswordChangedEvent)(nil)).Elem() -} - -type VimFault struct { - MethodFault -} - -func init() { - t["VimFault"] = reflect.TypeOf((*VimFault)(nil)).Elem() -} - -type VimFaultFault BaseVimFault - -func init() { - t["VimFaultFault"] = reflect.TypeOf((*VimFaultFault)(nil)).Elem() -} - -type VimVasaProvider struct { - DynamicData - - Uid string `xml:"uid,omitempty"` - Url string `xml:"url"` - Name string `xml:"name,omitempty"` - SelfSignedCertificate string `xml:"selfSignedCertificate,omitempty"` -} - -func init() { - t["VimVasaProvider"] = reflect.TypeOf((*VimVasaProvider)(nil)).Elem() -} - -type VimVasaProviderInfo struct { - DynamicData - - Provider VimVasaProvider `xml:"provider"` - ArrayState []VimVasaProviderStatePerArray `xml:"arrayState,omitempty"` -} - -func init() { - t["VimVasaProviderInfo"] = reflect.TypeOf((*VimVasaProviderInfo)(nil)).Elem() -} - -type VimVasaProviderStatePerArray struct { - DynamicData - - Priority int32 `xml:"priority"` - ArrayId string `xml:"arrayId"` - Active bool `xml:"active"` -} - -func init() { - t["VimVasaProviderStatePerArray"] = reflect.TypeOf((*VimVasaProviderStatePerArray)(nil)).Elem() -} - -type VirtualAHCIController struct { - VirtualSATAController -} - -func init() { - t["VirtualAHCIController"] = reflect.TypeOf((*VirtualAHCIController)(nil)).Elem() -} - -type VirtualAHCIControllerOption struct { - VirtualSATAControllerOption -} - -func init() { - t["VirtualAHCIControllerOption"] = reflect.TypeOf((*VirtualAHCIControllerOption)(nil)).Elem() -} - -type VirtualAppImportSpec struct { - ImportSpec - - Name string `xml:"name"` - VAppConfigSpec VAppConfigSpec `xml:"vAppConfigSpec"` - ResourcePoolSpec ResourceConfigSpec `xml:"resourcePoolSpec"` - Child []BaseImportSpec `xml:"child,omitempty,typeattr"` -} - -func init() { - t["VirtualAppImportSpec"] = reflect.TypeOf((*VirtualAppImportSpec)(nil)).Elem() -} - -type VirtualAppLinkInfo struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - DestroyWithParent *bool `xml:"destroyWithParent"` -} - -func init() { - t["VirtualAppLinkInfo"] = reflect.TypeOf((*VirtualAppLinkInfo)(nil)).Elem() -} - -type VirtualAppSummary struct { - ResourcePoolSummary - - Product *VAppProductInfo `xml:"product,omitempty"` - VAppState VirtualAppVAppState `xml:"vAppState,omitempty"` - Suspended *bool `xml:"suspended"` - InstallBootRequired *bool `xml:"installBootRequired"` - InstanceUuid string `xml:"instanceUuid,omitempty"` -} - -func init() { - t["VirtualAppSummary"] = reflect.TypeOf((*VirtualAppSummary)(nil)).Elem() -} - -type VirtualBusLogicController struct { - VirtualSCSIController -} - -func init() { - t["VirtualBusLogicController"] = reflect.TypeOf((*VirtualBusLogicController)(nil)).Elem() -} - -type VirtualBusLogicControllerOption struct { - VirtualSCSIControllerOption -} - -func init() { - t["VirtualBusLogicControllerOption"] = reflect.TypeOf((*VirtualBusLogicControllerOption)(nil)).Elem() -} - -type VirtualCdrom struct { - VirtualDevice -} - -func init() { - t["VirtualCdrom"] = reflect.TypeOf((*VirtualCdrom)(nil)).Elem() -} - -type VirtualCdromAtapiBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualCdromAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromAtapiBackingInfo)(nil)).Elem() -} - -type VirtualCdromAtapiBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualCdromAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromAtapiBackingOption)(nil)).Elem() -} - -type VirtualCdromIsoBackingInfo struct { - VirtualDeviceFileBackingInfo -} - -func init() { - t["VirtualCdromIsoBackingInfo"] = reflect.TypeOf((*VirtualCdromIsoBackingInfo)(nil)).Elem() -} - -type VirtualCdromIsoBackingOption struct { - VirtualDeviceFileBackingOption -} - -func init() { - t["VirtualCdromIsoBackingOption"] = reflect.TypeOf((*VirtualCdromIsoBackingOption)(nil)).Elem() -} - -type VirtualCdromOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualCdromOption"] = reflect.TypeOf((*VirtualCdromOption)(nil)).Elem() -} - -type VirtualCdromPassthroughBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - Exclusive bool `xml:"exclusive"` -} - -func init() { - t["VirtualCdromPassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromPassthroughBackingInfo)(nil)).Elem() -} - -type VirtualCdromPassthroughBackingOption struct { - VirtualDeviceDeviceBackingOption - - Exclusive BoolOption `xml:"exclusive"` -} - -func init() { - t["VirtualCdromPassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromPassthroughBackingOption)(nil)).Elem() -} - -type VirtualCdromRemoteAtapiBackingInfo struct { - VirtualDeviceRemoteDeviceBackingInfo -} - -func init() { - t["VirtualCdromRemoteAtapiBackingInfo"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingInfo)(nil)).Elem() -} - -type VirtualCdromRemoteAtapiBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualCdromRemoteAtapiBackingOption"] = reflect.TypeOf((*VirtualCdromRemoteAtapiBackingOption)(nil)).Elem() -} - -type VirtualCdromRemotePassthroughBackingInfo struct { - VirtualDeviceRemoteDeviceBackingInfo - - Exclusive bool `xml:"exclusive"` -} - -func init() { - t["VirtualCdromRemotePassthroughBackingInfo"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingInfo)(nil)).Elem() -} - -type VirtualCdromRemotePassthroughBackingOption struct { - VirtualDeviceRemoteDeviceBackingOption - - Exclusive BoolOption `xml:"exclusive"` -} - -func init() { - t["VirtualCdromRemotePassthroughBackingOption"] = reflect.TypeOf((*VirtualCdromRemotePassthroughBackingOption)(nil)).Elem() -} - -type VirtualController struct { - VirtualDevice - - BusNumber int32 `xml:"busNumber"` - Device []int32 `xml:"device,omitempty"` -} - -func init() { - t["VirtualController"] = reflect.TypeOf((*VirtualController)(nil)).Elem() -} - -type VirtualControllerOption struct { - VirtualDeviceOption - - Devices IntOption `xml:"devices"` - SupportedDevice []string `xml:"supportedDevice,omitempty"` -} - -func init() { - t["VirtualControllerOption"] = reflect.TypeOf((*VirtualControllerOption)(nil)).Elem() -} - -type VirtualDevice struct { - DynamicData - - Key int32 `xml:"key"` - DeviceInfo BaseDescription `xml:"deviceInfo,omitempty,typeattr"` - Backing BaseVirtualDeviceBackingInfo `xml:"backing,omitempty,typeattr"` - Connectable *VirtualDeviceConnectInfo `xml:"connectable,omitempty"` - SlotInfo BaseVirtualDeviceBusSlotInfo `xml:"slotInfo,omitempty,typeattr"` - ControllerKey int32 `xml:"controllerKey,omitempty"` - UnitNumber *int32 `xml:"unitNumber"` - NumaNode int32 `xml:"numaNode,omitempty"` - DeviceGroupInfo *VirtualDeviceDeviceGroupInfo `xml:"deviceGroupInfo,omitempty"` -} - -func init() { - t["VirtualDevice"] = reflect.TypeOf((*VirtualDevice)(nil)).Elem() -} - -type VirtualDeviceBackingInfo struct { - DynamicData -} - -func init() { - t["VirtualDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceBackingInfo)(nil)).Elem() -} - -type VirtualDeviceBackingOption struct { - DynamicData - - Type string `xml:"type"` -} - -func init() { - t["VirtualDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceBackingOption)(nil)).Elem() -} - -type VirtualDeviceBusSlotInfo struct { - DynamicData -} - -func init() { - t["VirtualDeviceBusSlotInfo"] = reflect.TypeOf((*VirtualDeviceBusSlotInfo)(nil)).Elem() -} - -type VirtualDeviceBusSlotOption struct { - DynamicData - - Type string `xml:"type"` -} - -func init() { - t["VirtualDeviceBusSlotOption"] = reflect.TypeOf((*VirtualDeviceBusSlotOption)(nil)).Elem() -} - -type VirtualDeviceConfigSpec struct { - DynamicData - - Operation VirtualDeviceConfigSpecOperation `xml:"operation,omitempty"` - FileOperation VirtualDeviceConfigSpecFileOperation `xml:"fileOperation,omitempty"` - Device BaseVirtualDevice `xml:"device,typeattr"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Backing *VirtualDeviceConfigSpecBackingSpec `xml:"backing,omitempty"` - FilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"filterSpec,omitempty,typeattr"` - ChangeMode string `xml:"changeMode,omitempty"` -} - -func init() { - t["VirtualDeviceConfigSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpec)(nil)).Elem() -} - -type VirtualDeviceConfigSpecBackingSpec struct { - DynamicData - - Parent *VirtualDeviceConfigSpecBackingSpec `xml:"parent,omitempty"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` -} - -func init() { - t["VirtualDeviceConfigSpecBackingSpec"] = reflect.TypeOf((*VirtualDeviceConfigSpecBackingSpec)(nil)).Elem() -} - -type VirtualDeviceConnectInfo struct { - DynamicData - - MigrateConnect string `xml:"migrateConnect,omitempty"` - StartConnected bool `xml:"startConnected"` - AllowGuestControl bool `xml:"allowGuestControl"` - Connected bool `xml:"connected"` - Status string `xml:"status,omitempty"` -} - -func init() { - t["VirtualDeviceConnectInfo"] = reflect.TypeOf((*VirtualDeviceConnectInfo)(nil)).Elem() -} - -type VirtualDeviceConnectOption struct { - DynamicData - - StartConnected BoolOption `xml:"startConnected"` - AllowGuestControl BoolOption `xml:"allowGuestControl"` -} - -func init() { - t["VirtualDeviceConnectOption"] = reflect.TypeOf((*VirtualDeviceConnectOption)(nil)).Elem() -} - -type VirtualDeviceDeviceBackingInfo struct { - VirtualDeviceBackingInfo - - DeviceName string `xml:"deviceName"` - UseAutoDetect *bool `xml:"useAutoDetect"` -} - -func init() { - t["VirtualDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceDeviceBackingInfo)(nil)).Elem() -} - -type VirtualDeviceDeviceBackingOption struct { - VirtualDeviceBackingOption - - AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"` -} - -func init() { - t["VirtualDeviceDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceDeviceBackingOption)(nil)).Elem() -} - -type VirtualDeviceDeviceGroupInfo struct { - DynamicData - - GroupInstanceKey int32 `xml:"groupInstanceKey"` - SequenceId int32 `xml:"sequenceId"` -} - -func init() { - t["VirtualDeviceDeviceGroupInfo"] = reflect.TypeOf((*VirtualDeviceDeviceGroupInfo)(nil)).Elem() -} - -type VirtualDeviceFileBackingInfo struct { - VirtualDeviceBackingInfo - - FileName string `xml:"fileName"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - BackingObjectId string `xml:"backingObjectId,omitempty"` -} - -func init() { - t["VirtualDeviceFileBackingInfo"] = reflect.TypeOf((*VirtualDeviceFileBackingInfo)(nil)).Elem() -} - -type VirtualDeviceFileBackingOption struct { - VirtualDeviceBackingOption - - FileNameExtensions *ChoiceOption `xml:"fileNameExtensions,omitempty"` -} - -func init() { - t["VirtualDeviceFileBackingOption"] = reflect.TypeOf((*VirtualDeviceFileBackingOption)(nil)).Elem() -} - -type VirtualDeviceOption struct { - DynamicData - - Type string `xml:"type"` - ConnectOption *VirtualDeviceConnectOption `xml:"connectOption,omitempty"` - BusSlotOption *VirtualDeviceBusSlotOption `xml:"busSlotOption,omitempty"` - ControllerType string `xml:"controllerType,omitempty"` - AutoAssignController *BoolOption `xml:"autoAssignController,omitempty"` - BackingOption []BaseVirtualDeviceBackingOption `xml:"backingOption,omitempty,typeattr"` - DefaultBackingOptionIndex int32 `xml:"defaultBackingOptionIndex,omitempty"` - LicensingLimit []string `xml:"licensingLimit,omitempty"` - Deprecated bool `xml:"deprecated"` - PlugAndPlay bool `xml:"plugAndPlay"` - HotRemoveSupported *bool `xml:"hotRemoveSupported"` - NumaSupported *bool `xml:"numaSupported"` -} - -func init() { - t["VirtualDeviceOption"] = reflect.TypeOf((*VirtualDeviceOption)(nil)).Elem() -} - -type VirtualDevicePciBusSlotInfo struct { - VirtualDeviceBusSlotInfo - - PciSlotNumber int32 `xml:"pciSlotNumber"` -} - -func init() { - t["VirtualDevicePciBusSlotInfo"] = reflect.TypeOf((*VirtualDevicePciBusSlotInfo)(nil)).Elem() -} - -type VirtualDevicePipeBackingInfo struct { - VirtualDeviceBackingInfo - - PipeName string `xml:"pipeName"` -} - -func init() { - t["VirtualDevicePipeBackingInfo"] = reflect.TypeOf((*VirtualDevicePipeBackingInfo)(nil)).Elem() -} - -type VirtualDevicePipeBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualDevicePipeBackingOption"] = reflect.TypeOf((*VirtualDevicePipeBackingOption)(nil)).Elem() -} - -type VirtualDeviceRemoteDeviceBackingInfo struct { - VirtualDeviceBackingInfo - - DeviceName string `xml:"deviceName"` - UseAutoDetect *bool `xml:"useAutoDetect"` -} - -func init() { - t["VirtualDeviceRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingInfo)(nil)).Elem() -} - -type VirtualDeviceRemoteDeviceBackingOption struct { - VirtualDeviceBackingOption - - AutoDetectAvailable BoolOption `xml:"autoDetectAvailable"` -} - -func init() { - t["VirtualDeviceRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualDeviceRemoteDeviceBackingOption)(nil)).Elem() -} - -type VirtualDeviceURIBackingInfo struct { - VirtualDeviceBackingInfo - - ServiceURI string `xml:"serviceURI"` - Direction string `xml:"direction"` - ProxyURI string `xml:"proxyURI,omitempty"` -} - -func init() { - t["VirtualDeviceURIBackingInfo"] = reflect.TypeOf((*VirtualDeviceURIBackingInfo)(nil)).Elem() -} - -type VirtualDeviceURIBackingOption struct { - VirtualDeviceBackingOption - - Directions ChoiceOption `xml:"directions"` -} - -func init() { - t["VirtualDeviceURIBackingOption"] = reflect.TypeOf((*VirtualDeviceURIBackingOption)(nil)).Elem() -} - -type VirtualDisk struct { - VirtualDevice - - CapacityInKB int64 `xml:"capacityInKB"` - CapacityInBytes int64 `xml:"capacityInBytes,omitempty"` - Shares *SharesInfo `xml:"shares,omitempty"` - StorageIOAllocation *StorageIOAllocationInfo `xml:"storageIOAllocation,omitempty"` - DiskObjectId string `xml:"diskObjectId,omitempty"` - VFlashCacheConfigInfo *VirtualDiskVFlashCacheConfigInfo `xml:"vFlashCacheConfigInfo,omitempty"` - Iofilter []string `xml:"iofilter,omitempty"` - VDiskId *ID `xml:"vDiskId,omitempty"` - NativeUnmanagedLinkedClone *bool `xml:"nativeUnmanagedLinkedClone"` - IndependentFilters []BaseVirtualMachineBaseIndependentFilterSpec `xml:"independentFilters,omitempty,typeattr"` -} - -func init() { - t["VirtualDisk"] = reflect.TypeOf((*VirtualDisk)(nil)).Elem() -} - -type VirtualDiskAntiAffinityRuleSpec struct { - ClusterRuleInfo - - DiskId []int32 `xml:"diskId"` -} - -func init() { - t["VirtualDiskAntiAffinityRuleSpec"] = reflect.TypeOf((*VirtualDiskAntiAffinityRuleSpec)(nil)).Elem() -} - -type VirtualDiskBlocksNotFullyProvisioned struct { - DeviceBackingNotSupported -} - -func init() { - t["VirtualDiskBlocksNotFullyProvisioned"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisioned)(nil)).Elem() -} - -type VirtualDiskBlocksNotFullyProvisionedFault VirtualDiskBlocksNotFullyProvisioned - -func init() { - t["VirtualDiskBlocksNotFullyProvisionedFault"] = reflect.TypeOf((*VirtualDiskBlocksNotFullyProvisionedFault)(nil)).Elem() -} - -type VirtualDiskConfigSpec struct { - VirtualDeviceConfigSpec - - DiskMoveType string `xml:"diskMoveType,omitempty"` - MigrateCache *bool `xml:"migrateCache"` -} - -func init() { - t["VirtualDiskConfigSpec"] = reflect.TypeOf((*VirtualDiskConfigSpec)(nil)).Elem() -} - -type VirtualDiskDeltaDiskFormatsSupported struct { - DynamicData - - DatastoreType string `xml:"datastoreType"` - DeltaDiskFormat ChoiceOption `xml:"deltaDiskFormat"` -} - -func init() { - t["VirtualDiskDeltaDiskFormatsSupported"] = reflect.TypeOf((*VirtualDiskDeltaDiskFormatsSupported)(nil)).Elem() -} - -type VirtualDiskFlatVer1BackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - Split *bool `xml:"split"` - WriteThrough *bool `xml:"writeThrough"` - ContentId string `xml:"contentId,omitempty"` - Parent *VirtualDiskFlatVer1BackingInfo `xml:"parent,omitempty"` -} - -func init() { - t["VirtualDiskFlatVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingInfo)(nil)).Elem() -} - -type VirtualDiskFlatVer1BackingOption struct { - VirtualDeviceFileBackingOption - - DiskMode ChoiceOption `xml:"diskMode"` - Split BoolOption `xml:"split"` - WriteThrough BoolOption `xml:"writeThrough"` - Growable bool `xml:"growable"` -} - -func init() { - t["VirtualDiskFlatVer1BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer1BackingOption)(nil)).Elem() -} - -type VirtualDiskFlatVer2BackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - Split *bool `xml:"split"` - WriteThrough *bool `xml:"writeThrough"` - ThinProvisioned *bool `xml:"thinProvisioned"` - EagerlyScrub *bool `xml:"eagerlyScrub"` - Uuid string `xml:"uuid,omitempty"` - ContentId string `xml:"contentId,omitempty"` - ChangeId string `xml:"changeId,omitempty"` - Parent *VirtualDiskFlatVer2BackingInfo `xml:"parent,omitempty"` - DeltaDiskFormat string `xml:"deltaDiskFormat,omitempty"` - DigestEnabled *bool `xml:"digestEnabled"` - DeltaGrainSize int32 `xml:"deltaGrainSize,omitempty"` - DeltaDiskFormatVariant string `xml:"deltaDiskFormatVariant,omitempty"` - Sharing string `xml:"sharing,omitempty"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["VirtualDiskFlatVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingInfo)(nil)).Elem() -} - -type VirtualDiskFlatVer2BackingOption struct { - VirtualDeviceFileBackingOption - - DiskMode ChoiceOption `xml:"diskMode"` - Split BoolOption `xml:"split"` - WriteThrough BoolOption `xml:"writeThrough"` - Growable bool `xml:"growable"` - HotGrowable bool `xml:"hotGrowable"` - Uuid bool `xml:"uuid"` - ThinProvisioned *BoolOption `xml:"thinProvisioned,omitempty"` - EagerlyScrub *BoolOption `xml:"eagerlyScrub,omitempty"` - DeltaDiskFormat *ChoiceOption `xml:"deltaDiskFormat,omitempty"` - DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported,omitempty"` -} - -func init() { - t["VirtualDiskFlatVer2BackingOption"] = reflect.TypeOf((*VirtualDiskFlatVer2BackingOption)(nil)).Elem() -} - -type VirtualDiskId struct { - DynamicData - - Vm ManagedObjectReference `xml:"vm"` - DiskId int32 `xml:"diskId"` -} - -func init() { - t["VirtualDiskId"] = reflect.TypeOf((*VirtualDiskId)(nil)).Elem() -} - -type VirtualDiskLocalPMemBackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - Uuid string `xml:"uuid,omitempty"` - VolumeUUID string `xml:"volumeUUID,omitempty"` - ContentId string `xml:"contentId,omitempty"` -} - -func init() { - t["VirtualDiskLocalPMemBackingInfo"] = reflect.TypeOf((*VirtualDiskLocalPMemBackingInfo)(nil)).Elem() -} - -type VirtualDiskLocalPMemBackingOption struct { - VirtualDeviceFileBackingOption - - DiskMode ChoiceOption `xml:"diskMode"` - Growable bool `xml:"growable"` - HotGrowable bool `xml:"hotGrowable"` - Uuid bool `xml:"uuid"` -} - -func init() { - t["VirtualDiskLocalPMemBackingOption"] = reflect.TypeOf((*VirtualDiskLocalPMemBackingOption)(nil)).Elem() -} - -type VirtualDiskModeNotSupported struct { - DeviceNotSupported - - Mode string `xml:"mode"` -} - -func init() { - t["VirtualDiskModeNotSupported"] = reflect.TypeOf((*VirtualDiskModeNotSupported)(nil)).Elem() -} - -type VirtualDiskModeNotSupportedFault VirtualDiskModeNotSupported - -func init() { - t["VirtualDiskModeNotSupportedFault"] = reflect.TypeOf((*VirtualDiskModeNotSupportedFault)(nil)).Elem() -} - -type VirtualDiskOption struct { - VirtualDeviceOption - - CapacityInKB LongOption `xml:"capacityInKB"` - IoAllocationOption *StorageIOAllocationOption `xml:"ioAllocationOption,omitempty"` - VFlashCacheConfigOption *VirtualDiskOptionVFlashCacheConfigOption `xml:"vFlashCacheConfigOption,omitempty"` -} - -func init() { - t["VirtualDiskOption"] = reflect.TypeOf((*VirtualDiskOption)(nil)).Elem() -} - -type VirtualDiskOptionVFlashCacheConfigOption struct { - DynamicData - - CacheConsistencyType ChoiceOption `xml:"cacheConsistencyType"` - CacheMode ChoiceOption `xml:"cacheMode"` - ReservationInMB LongOption `xml:"reservationInMB"` - BlockSizeInKB LongOption `xml:"blockSizeInKB"` -} - -func init() { - t["VirtualDiskOptionVFlashCacheConfigOption"] = reflect.TypeOf((*VirtualDiskOptionVFlashCacheConfigOption)(nil)).Elem() -} - -type VirtualDiskPartitionedRawDiskVer2BackingInfo struct { - VirtualDiskRawDiskVer2BackingInfo - - Partition []int32 `xml:"partition"` -} - -func init() { - t["VirtualDiskPartitionedRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingInfo)(nil)).Elem() -} - -type VirtualDiskPartitionedRawDiskVer2BackingOption struct { - VirtualDiskRawDiskVer2BackingOption -} - -func init() { - t["VirtualDiskPartitionedRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskPartitionedRawDiskVer2BackingOption)(nil)).Elem() -} - -type VirtualDiskRawDiskMappingVer1BackingInfo struct { - VirtualDeviceFileBackingInfo - - LunUuid string `xml:"lunUuid,omitempty"` - DeviceName string `xml:"deviceName,omitempty"` - CompatibilityMode string `xml:"compatibilityMode,omitempty"` - DiskMode string `xml:"diskMode,omitempty"` - Uuid string `xml:"uuid,omitempty"` - ContentId string `xml:"contentId,omitempty"` - ChangeId string `xml:"changeId,omitempty"` - Parent *VirtualDiskRawDiskMappingVer1BackingInfo `xml:"parent,omitempty"` - DeltaDiskFormat string `xml:"deltaDiskFormat,omitempty"` - DeltaGrainSize int32 `xml:"deltaGrainSize,omitempty"` - Sharing string `xml:"sharing,omitempty"` -} - -func init() { - t["VirtualDiskRawDiskMappingVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingInfo)(nil)).Elem() -} - -type VirtualDiskRawDiskMappingVer1BackingOption struct { - VirtualDeviceDeviceBackingOption - - DescriptorFileNameExtensions *ChoiceOption `xml:"descriptorFileNameExtensions,omitempty"` - CompatibilityMode ChoiceOption `xml:"compatibilityMode"` - DiskMode ChoiceOption `xml:"diskMode"` - Uuid bool `xml:"uuid"` -} - -func init() { - t["VirtualDiskRawDiskMappingVer1BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskMappingVer1BackingOption)(nil)).Elem() -} - -type VirtualDiskRawDiskVer2BackingInfo struct { - VirtualDeviceDeviceBackingInfo - - DescriptorFileName string `xml:"descriptorFileName"` - Uuid string `xml:"uuid,omitempty"` - ChangeId string `xml:"changeId,omitempty"` - Sharing string `xml:"sharing,omitempty"` -} - -func init() { - t["VirtualDiskRawDiskVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingInfo)(nil)).Elem() -} - -type VirtualDiskRawDiskVer2BackingOption struct { - VirtualDeviceDeviceBackingOption - - DescriptorFileNameExtensions ChoiceOption `xml:"descriptorFileNameExtensions"` - Uuid bool `xml:"uuid"` -} - -func init() { - t["VirtualDiskRawDiskVer2BackingOption"] = reflect.TypeOf((*VirtualDiskRawDiskVer2BackingOption)(nil)).Elem() -} - -type VirtualDiskRuleSpec struct { - ClusterRuleInfo - - DiskRuleType string `xml:"diskRuleType"` - DiskId []int32 `xml:"diskId,omitempty"` -} - -func init() { - t["VirtualDiskRuleSpec"] = reflect.TypeOf((*VirtualDiskRuleSpec)(nil)).Elem() -} - -type VirtualDiskSeSparseBackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - WriteThrough *bool `xml:"writeThrough"` - Uuid string `xml:"uuid,omitempty"` - ContentId string `xml:"contentId,omitempty"` - ChangeId string `xml:"changeId,omitempty"` - Parent *VirtualDiskSeSparseBackingInfo `xml:"parent,omitempty"` - DeltaDiskFormat string `xml:"deltaDiskFormat,omitempty"` - DigestEnabled *bool `xml:"digestEnabled"` - GrainSize int32 `xml:"grainSize,omitempty"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["VirtualDiskSeSparseBackingInfo"] = reflect.TypeOf((*VirtualDiskSeSparseBackingInfo)(nil)).Elem() -} - -type VirtualDiskSeSparseBackingOption struct { - VirtualDeviceFileBackingOption - - DiskMode ChoiceOption `xml:"diskMode"` - WriteThrough BoolOption `xml:"writeThrough"` - Growable bool `xml:"growable"` - HotGrowable bool `xml:"hotGrowable"` - Uuid bool `xml:"uuid"` - DeltaDiskFormatsSupported []VirtualDiskDeltaDiskFormatsSupported `xml:"deltaDiskFormatsSupported"` -} - -func init() { - t["VirtualDiskSeSparseBackingOption"] = reflect.TypeOf((*VirtualDiskSeSparseBackingOption)(nil)).Elem() -} - -type VirtualDiskSparseVer1BackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - Split *bool `xml:"split"` - WriteThrough *bool `xml:"writeThrough"` - SpaceUsedInKB int64 `xml:"spaceUsedInKB,omitempty"` - ContentId string `xml:"contentId,omitempty"` - Parent *VirtualDiskSparseVer1BackingInfo `xml:"parent,omitempty"` -} - -func init() { - t["VirtualDiskSparseVer1BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingInfo)(nil)).Elem() -} - -type VirtualDiskSparseVer1BackingOption struct { - VirtualDeviceFileBackingOption - - DiskModes ChoiceOption `xml:"diskModes"` - Split BoolOption `xml:"split"` - WriteThrough BoolOption `xml:"writeThrough"` - Growable bool `xml:"growable"` -} - -func init() { - t["VirtualDiskSparseVer1BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer1BackingOption)(nil)).Elem() -} - -type VirtualDiskSparseVer2BackingInfo struct { - VirtualDeviceFileBackingInfo - - DiskMode string `xml:"diskMode"` - Split *bool `xml:"split"` - WriteThrough *bool `xml:"writeThrough"` - SpaceUsedInKB int64 `xml:"spaceUsedInKB,omitempty"` - Uuid string `xml:"uuid,omitempty"` - ContentId string `xml:"contentId,omitempty"` - ChangeId string `xml:"changeId,omitempty"` - Parent *VirtualDiskSparseVer2BackingInfo `xml:"parent,omitempty"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["VirtualDiskSparseVer2BackingInfo"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingInfo)(nil)).Elem() -} - -type VirtualDiskSparseVer2BackingOption struct { - VirtualDeviceFileBackingOption - - DiskMode ChoiceOption `xml:"diskMode"` - Split BoolOption `xml:"split"` - WriteThrough BoolOption `xml:"writeThrough"` - Growable bool `xml:"growable"` - HotGrowable bool `xml:"hotGrowable"` - Uuid bool `xml:"uuid"` -} - -func init() { - t["VirtualDiskSparseVer2BackingOption"] = reflect.TypeOf((*VirtualDiskSparseVer2BackingOption)(nil)).Elem() -} - -type VirtualDiskSpec struct { - DynamicData - - DiskType string `xml:"diskType"` - AdapterType string `xml:"adapterType"` -} - -func init() { - t["VirtualDiskSpec"] = reflect.TypeOf((*VirtualDiskSpec)(nil)).Elem() -} - -type VirtualDiskVFlashCacheConfigInfo struct { - DynamicData - - VFlashModule string `xml:"vFlashModule,omitempty"` - ReservationInMB int64 `xml:"reservationInMB,omitempty"` - CacheConsistencyType string `xml:"cacheConsistencyType,omitempty"` - CacheMode string `xml:"cacheMode,omitempty"` - BlockSizeInKB int64 `xml:"blockSizeInKB,omitempty"` -} - -func init() { - t["VirtualDiskVFlashCacheConfigInfo"] = reflect.TypeOf((*VirtualDiskVFlashCacheConfigInfo)(nil)).Elem() -} - -type VirtualE1000 struct { - VirtualEthernetCard -} - -func init() { - t["VirtualE1000"] = reflect.TypeOf((*VirtualE1000)(nil)).Elem() -} - -type VirtualE1000Option struct { - VirtualEthernetCardOption -} - -func init() { - t["VirtualE1000Option"] = reflect.TypeOf((*VirtualE1000Option)(nil)).Elem() -} - -type VirtualE1000e struct { - VirtualEthernetCard -} - -func init() { - t["VirtualE1000e"] = reflect.TypeOf((*VirtualE1000e)(nil)).Elem() -} - -type VirtualE1000eOption struct { - VirtualEthernetCardOption -} - -func init() { - t["VirtualE1000eOption"] = reflect.TypeOf((*VirtualE1000eOption)(nil)).Elem() -} - -type VirtualEnsoniq1371 struct { - VirtualSoundCard -} - -func init() { - t["VirtualEnsoniq1371"] = reflect.TypeOf((*VirtualEnsoniq1371)(nil)).Elem() -} - -type VirtualEnsoniq1371Option struct { - VirtualSoundCardOption -} - -func init() { - t["VirtualEnsoniq1371Option"] = reflect.TypeOf((*VirtualEnsoniq1371Option)(nil)).Elem() -} - -type VirtualEthernetCard struct { - VirtualDevice - - AddressType string `xml:"addressType,omitempty"` - MacAddress string `xml:"macAddress,omitempty"` - WakeOnLanEnabled *bool `xml:"wakeOnLanEnabled"` - ResourceAllocation *VirtualEthernetCardResourceAllocation `xml:"resourceAllocation,omitempty"` - ExternalId string `xml:"externalId,omitempty"` - UptCompatibilityEnabled *bool `xml:"uptCompatibilityEnabled"` -} - -func init() { - t["VirtualEthernetCard"] = reflect.TypeOf((*VirtualEthernetCard)(nil)).Elem() -} - -type VirtualEthernetCardDVPortBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualEthernetCardDVPortBackingOption"] = reflect.TypeOf((*VirtualEthernetCardDVPortBackingOption)(nil)).Elem() -} - -type VirtualEthernetCardDistributedVirtualPortBackingInfo struct { - VirtualDeviceBackingInfo - - Port DistributedVirtualSwitchPortConnection `xml:"port"` -} - -func init() { - t["VirtualEthernetCardDistributedVirtualPortBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardDistributedVirtualPortBackingInfo)(nil)).Elem() -} - -type VirtualEthernetCardLegacyNetworkBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualEthernetCardLegacyNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingInfo)(nil)).Elem() -} - -type VirtualEthernetCardLegacyNetworkBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualEthernetCardLegacyNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardLegacyNetworkBackingOption)(nil)).Elem() -} - -type VirtualEthernetCardNetworkBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - Network *ManagedObjectReference `xml:"network,omitempty"` - InPassthroughMode *bool `xml:"inPassthroughMode"` -} - -func init() { - t["VirtualEthernetCardNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingInfo)(nil)).Elem() -} - -type VirtualEthernetCardNetworkBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualEthernetCardNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardNetworkBackingOption)(nil)).Elem() -} - -type VirtualEthernetCardNotSupported struct { - DeviceNotSupported -} - -func init() { - t["VirtualEthernetCardNotSupported"] = reflect.TypeOf((*VirtualEthernetCardNotSupported)(nil)).Elem() -} - -type VirtualEthernetCardNotSupportedFault VirtualEthernetCardNotSupported - -func init() { - t["VirtualEthernetCardNotSupportedFault"] = reflect.TypeOf((*VirtualEthernetCardNotSupportedFault)(nil)).Elem() -} - -type VirtualEthernetCardOpaqueNetworkBackingInfo struct { - VirtualDeviceBackingInfo - - OpaqueNetworkId string `xml:"opaqueNetworkId"` - OpaqueNetworkType string `xml:"opaqueNetworkType"` -} - -func init() { - t["VirtualEthernetCardOpaqueNetworkBackingInfo"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingInfo)(nil)).Elem() -} - -type VirtualEthernetCardOpaqueNetworkBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualEthernetCardOpaqueNetworkBackingOption"] = reflect.TypeOf((*VirtualEthernetCardOpaqueNetworkBackingOption)(nil)).Elem() -} - -type VirtualEthernetCardOption struct { - VirtualDeviceOption - - SupportedOUI ChoiceOption `xml:"supportedOUI"` - MacType ChoiceOption `xml:"macType"` - WakeOnLanEnabled BoolOption `xml:"wakeOnLanEnabled"` - VmDirectPathGen2Supported *bool `xml:"vmDirectPathGen2Supported"` - UptCompatibilityEnabled *BoolOption `xml:"uptCompatibilityEnabled,omitempty"` -} - -func init() { - t["VirtualEthernetCardOption"] = reflect.TypeOf((*VirtualEthernetCardOption)(nil)).Elem() -} - -type VirtualEthernetCardResourceAllocation struct { - DynamicData - - Reservation *int64 `xml:"reservation"` - Share SharesInfo `xml:"share"` - Limit *int64 `xml:"limit"` -} - -func init() { - t["VirtualEthernetCardResourceAllocation"] = reflect.TypeOf((*VirtualEthernetCardResourceAllocation)(nil)).Elem() -} - -type VirtualFloppy struct { - VirtualDevice -} - -func init() { - t["VirtualFloppy"] = reflect.TypeOf((*VirtualFloppy)(nil)).Elem() -} - -type VirtualFloppyDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualFloppyDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyDeviceBackingInfo)(nil)).Elem() -} - -type VirtualFloppyDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualFloppyDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyDeviceBackingOption)(nil)).Elem() -} - -type VirtualFloppyImageBackingInfo struct { - VirtualDeviceFileBackingInfo -} - -func init() { - t["VirtualFloppyImageBackingInfo"] = reflect.TypeOf((*VirtualFloppyImageBackingInfo)(nil)).Elem() -} - -type VirtualFloppyImageBackingOption struct { - VirtualDeviceFileBackingOption -} - -func init() { - t["VirtualFloppyImageBackingOption"] = reflect.TypeOf((*VirtualFloppyImageBackingOption)(nil)).Elem() -} - -type VirtualFloppyOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualFloppyOption"] = reflect.TypeOf((*VirtualFloppyOption)(nil)).Elem() -} - -type VirtualFloppyRemoteDeviceBackingInfo struct { - VirtualDeviceRemoteDeviceBackingInfo -} - -func init() { - t["VirtualFloppyRemoteDeviceBackingInfo"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingInfo)(nil)).Elem() -} - -type VirtualFloppyRemoteDeviceBackingOption struct { - VirtualDeviceRemoteDeviceBackingOption -} - -func init() { - t["VirtualFloppyRemoteDeviceBackingOption"] = reflect.TypeOf((*VirtualFloppyRemoteDeviceBackingOption)(nil)).Elem() -} - -type VirtualHardware struct { - DynamicData - - NumCPU int32 `xml:"numCPU"` - NumCoresPerSocket int32 `xml:"numCoresPerSocket,omitempty"` - AutoCoresPerSocket *bool `xml:"autoCoresPerSocket"` - MemoryMB int32 `xml:"memoryMB"` - VirtualICH7MPresent *bool `xml:"virtualICH7MPresent"` - VirtualSMCPresent *bool `xml:"virtualSMCPresent"` - Device []BaseVirtualDevice `xml:"device,omitempty,typeattr"` - MotherboardLayout string `xml:"motherboardLayout,omitempty"` - SimultaneousThreads int32 `xml:"simultaneousThreads,omitempty"` -} - -func init() { - t["VirtualHardware"] = reflect.TypeOf((*VirtualHardware)(nil)).Elem() -} - -type VirtualHardwareCompatibilityIssue struct { - VmConfigFault -} - -func init() { - t["VirtualHardwareCompatibilityIssue"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssue)(nil)).Elem() -} - -type VirtualHardwareCompatibilityIssueFault BaseVirtualHardwareCompatibilityIssue - -func init() { - t["VirtualHardwareCompatibilityIssueFault"] = reflect.TypeOf((*VirtualHardwareCompatibilityIssueFault)(nil)).Elem() -} - -type VirtualHardwareOption struct { - DynamicData - - HwVersion int32 `xml:"hwVersion"` - VirtualDeviceOption []BaseVirtualDeviceOption `xml:"virtualDeviceOption,typeattr"` - DeviceListReadonly bool `xml:"deviceListReadonly"` - NumCPU []int32 `xml:"numCPU"` - NumCoresPerSocket *IntOption `xml:"numCoresPerSocket,omitempty"` - AutoCoresPerSocket *BoolOption `xml:"autoCoresPerSocket,omitempty"` - NumCpuReadonly bool `xml:"numCpuReadonly"` - MemoryMB LongOption `xml:"memoryMB"` - NumPCIControllers IntOption `xml:"numPCIControllers"` - NumIDEControllers IntOption `xml:"numIDEControllers"` - NumUSBControllers IntOption `xml:"numUSBControllers"` - NumUSBXHCIControllers *IntOption `xml:"numUSBXHCIControllers,omitempty"` - NumSIOControllers IntOption `xml:"numSIOControllers"` - NumPS2Controllers IntOption `xml:"numPS2Controllers"` - LicensingLimit []string `xml:"licensingLimit,omitempty"` - NumSupportedWwnPorts *IntOption `xml:"numSupportedWwnPorts,omitempty"` - NumSupportedWwnNodes *IntOption `xml:"numSupportedWwnNodes,omitempty"` - ResourceConfigOption *ResourceConfigOption `xml:"resourceConfigOption,omitempty"` - NumNVDIMMControllers *IntOption `xml:"numNVDIMMControllers,omitempty"` - NumTPMDevices *IntOption `xml:"numTPMDevices,omitempty"` - NumWDTDevices *IntOption `xml:"numWDTDevices,omitempty"` - NumPrecisionClockDevices *IntOption `xml:"numPrecisionClockDevices,omitempty"` - EpcMemoryMB *LongOption `xml:"epcMemoryMB,omitempty"` - AcpiHostBridgesFirmware []string `xml:"acpiHostBridgesFirmware,omitempty"` - NumCpuSimultaneousThreads *IntOption `xml:"numCpuSimultaneousThreads,omitempty"` - NumNumaNodes *IntOption `xml:"numNumaNodes,omitempty"` - NumDeviceGroups *IntOption `xml:"numDeviceGroups,omitempty"` - DeviceGroupTypes []string `xml:"deviceGroupTypes,omitempty"` -} - -func init() { - t["VirtualHardwareOption"] = reflect.TypeOf((*VirtualHardwareOption)(nil)).Elem() -} - -type VirtualHardwareVersionNotSupported struct { - VirtualHardwareCompatibilityIssue - - HostName string `xml:"hostName"` - Host ManagedObjectReference `xml:"host"` -} - -func init() { - t["VirtualHardwareVersionNotSupported"] = reflect.TypeOf((*VirtualHardwareVersionNotSupported)(nil)).Elem() -} - -type VirtualHardwareVersionNotSupportedFault VirtualHardwareVersionNotSupported - -func init() { - t["VirtualHardwareVersionNotSupportedFault"] = reflect.TypeOf((*VirtualHardwareVersionNotSupportedFault)(nil)).Elem() -} - -type VirtualHdAudioCard struct { - VirtualSoundCard -} - -func init() { - t["VirtualHdAudioCard"] = reflect.TypeOf((*VirtualHdAudioCard)(nil)).Elem() -} - -type VirtualHdAudioCardOption struct { - VirtualSoundCardOption -} - -func init() { - t["VirtualHdAudioCardOption"] = reflect.TypeOf((*VirtualHdAudioCardOption)(nil)).Elem() -} - -type VirtualIDEController struct { - VirtualController -} - -func init() { - t["VirtualIDEController"] = reflect.TypeOf((*VirtualIDEController)(nil)).Elem() -} - -type VirtualIDEControllerOption struct { - VirtualControllerOption - - NumIDEDisks IntOption `xml:"numIDEDisks"` - NumIDECdroms IntOption `xml:"numIDECdroms"` -} - -func init() { - t["VirtualIDEControllerOption"] = reflect.TypeOf((*VirtualIDEControllerOption)(nil)).Elem() -} - -type VirtualKeyboard struct { - VirtualDevice -} - -func init() { - t["VirtualKeyboard"] = reflect.TypeOf((*VirtualKeyboard)(nil)).Elem() -} - -type VirtualKeyboardOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualKeyboardOption"] = reflect.TypeOf((*VirtualKeyboardOption)(nil)).Elem() -} - -type VirtualLsiLogicController struct { - VirtualSCSIController -} - -func init() { - t["VirtualLsiLogicController"] = reflect.TypeOf((*VirtualLsiLogicController)(nil)).Elem() -} - -type VirtualLsiLogicControllerOption struct { - VirtualSCSIControllerOption -} - -func init() { - t["VirtualLsiLogicControllerOption"] = reflect.TypeOf((*VirtualLsiLogicControllerOption)(nil)).Elem() -} - -type VirtualLsiLogicSASController struct { - VirtualSCSIController -} - -func init() { - t["VirtualLsiLogicSASController"] = reflect.TypeOf((*VirtualLsiLogicSASController)(nil)).Elem() -} - -type VirtualLsiLogicSASControllerOption struct { - VirtualSCSIControllerOption -} - -func init() { - t["VirtualLsiLogicSASControllerOption"] = reflect.TypeOf((*VirtualLsiLogicSASControllerOption)(nil)).Elem() -} - -type VirtualMachineAffinityInfo struct { - DynamicData - - AffinitySet []int32 `xml:"affinitySet"` -} - -func init() { - t["VirtualMachineAffinityInfo"] = reflect.TypeOf((*VirtualMachineAffinityInfo)(nil)).Elem() -} - -type VirtualMachineBaseIndependentFilterSpec struct { - DynamicData -} - -func init() { - t["VirtualMachineBaseIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineBaseIndependentFilterSpec)(nil)).Elem() -} - -type VirtualMachineBootOptions struct { - DynamicData - - BootDelay int64 `xml:"bootDelay,omitempty"` - EnterBIOSSetup *bool `xml:"enterBIOSSetup"` - EfiSecureBootEnabled *bool `xml:"efiSecureBootEnabled"` - BootRetryEnabled *bool `xml:"bootRetryEnabled"` - BootRetryDelay int64 `xml:"bootRetryDelay,omitempty"` - BootOrder []BaseVirtualMachineBootOptionsBootableDevice `xml:"bootOrder,omitempty,typeattr"` - NetworkBootProtocol string `xml:"networkBootProtocol,omitempty"` -} - -func init() { - t["VirtualMachineBootOptions"] = reflect.TypeOf((*VirtualMachineBootOptions)(nil)).Elem() -} - -type VirtualMachineBootOptionsBootableCdromDevice struct { - VirtualMachineBootOptionsBootableDevice -} - -func init() { - t["VirtualMachineBootOptionsBootableCdromDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableCdromDevice)(nil)).Elem() -} - -type VirtualMachineBootOptionsBootableDevice struct { - DynamicData -} - -func init() { - t["VirtualMachineBootOptionsBootableDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDevice)(nil)).Elem() -} - -type VirtualMachineBootOptionsBootableDiskDevice struct { - VirtualMachineBootOptionsBootableDevice - - DeviceKey int32 `xml:"deviceKey"` -} - -func init() { - t["VirtualMachineBootOptionsBootableDiskDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableDiskDevice)(nil)).Elem() -} - -type VirtualMachineBootOptionsBootableEthernetDevice struct { - VirtualMachineBootOptionsBootableDevice - - DeviceKey int32 `xml:"deviceKey"` -} - -func init() { - t["VirtualMachineBootOptionsBootableEthernetDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableEthernetDevice)(nil)).Elem() -} - -type VirtualMachineBootOptionsBootableFloppyDevice struct { - VirtualMachineBootOptionsBootableDevice -} - -func init() { - t["VirtualMachineBootOptionsBootableFloppyDevice"] = reflect.TypeOf((*VirtualMachineBootOptionsBootableFloppyDevice)(nil)).Elem() -} - -type VirtualMachineCapability struct { - DynamicData - - SnapshotOperationsSupported bool `xml:"snapshotOperationsSupported"` - MultipleSnapshotsSupported bool `xml:"multipleSnapshotsSupported"` - SnapshotConfigSupported bool `xml:"snapshotConfigSupported"` - PoweredOffSnapshotsSupported bool `xml:"poweredOffSnapshotsSupported"` - MemorySnapshotsSupported bool `xml:"memorySnapshotsSupported"` - RevertToSnapshotSupported bool `xml:"revertToSnapshotSupported"` - QuiescedSnapshotsSupported bool `xml:"quiescedSnapshotsSupported"` - DisableSnapshotsSupported bool `xml:"disableSnapshotsSupported"` - LockSnapshotsSupported bool `xml:"lockSnapshotsSupported"` - ConsolePreferencesSupported bool `xml:"consolePreferencesSupported"` - CpuFeatureMaskSupported bool `xml:"cpuFeatureMaskSupported"` - S1AcpiManagementSupported bool `xml:"s1AcpiManagementSupported"` - SettingScreenResolutionSupported bool `xml:"settingScreenResolutionSupported"` - ToolsAutoUpdateSupported bool `xml:"toolsAutoUpdateSupported"` - VmNpivWwnSupported bool `xml:"vmNpivWwnSupported"` - NpivWwnOnNonRdmVmSupported bool `xml:"npivWwnOnNonRdmVmSupported"` - VmNpivWwnDisableSupported *bool `xml:"vmNpivWwnDisableSupported"` - VmNpivWwnUpdateSupported *bool `xml:"vmNpivWwnUpdateSupported"` - SwapPlacementSupported bool `xml:"swapPlacementSupported"` - ToolsSyncTimeSupported bool `xml:"toolsSyncTimeSupported"` - VirtualMmuUsageSupported bool `xml:"virtualMmuUsageSupported"` - DiskSharesSupported bool `xml:"diskSharesSupported"` - BootOptionsSupported bool `xml:"bootOptionsSupported"` - BootRetryOptionsSupported *bool `xml:"bootRetryOptionsSupported"` - SettingVideoRamSizeSupported bool `xml:"settingVideoRamSizeSupported"` - SettingDisplayTopologySupported *bool `xml:"settingDisplayTopologySupported"` - RecordReplaySupported *bool `xml:"recordReplaySupported"` - ChangeTrackingSupported *bool `xml:"changeTrackingSupported"` - MultipleCoresPerSocketSupported *bool `xml:"multipleCoresPerSocketSupported"` - HostBasedReplicationSupported *bool `xml:"hostBasedReplicationSupported"` - GuestAutoLockSupported *bool `xml:"guestAutoLockSupported"` - MemoryReservationLockSupported *bool `xml:"memoryReservationLockSupported"` - FeatureRequirementSupported *bool `xml:"featureRequirementSupported"` - PoweredOnMonitorTypeChangeSupported *bool `xml:"poweredOnMonitorTypeChangeSupported"` - SeSparseDiskSupported *bool `xml:"seSparseDiskSupported"` - NestedHVSupported *bool `xml:"nestedHVSupported"` - VPMCSupported *bool `xml:"vPMCSupported"` - SecureBootSupported *bool `xml:"secureBootSupported"` - PerVmEvcSupported *bool `xml:"perVmEvcSupported"` - VirtualMmuUsageIgnored *bool `xml:"virtualMmuUsageIgnored"` - VirtualExecUsageIgnored *bool `xml:"virtualExecUsageIgnored"` - DiskOnlySnapshotOnSuspendedVMSupported *bool `xml:"diskOnlySnapshotOnSuspendedVMSupported"` - SuspendToMemorySupported *bool `xml:"suspendToMemorySupported"` - ToolsSyncTimeAllowSupported *bool `xml:"toolsSyncTimeAllowSupported"` - SevSupported *bool `xml:"sevSupported"` - PmemFailoverSupported *bool `xml:"pmemFailoverSupported"` - RequireSgxAttestationSupported *bool `xml:"requireSgxAttestationSupported"` - ChangeModeDisksSupported *bool `xml:"changeModeDisksSupported"` -} - -func init() { - t["VirtualMachineCapability"] = reflect.TypeOf((*VirtualMachineCapability)(nil)).Elem() -} - -type VirtualMachineCdromInfo struct { - VirtualMachineTargetInfo - - Description string `xml:"description,omitempty"` -} - -func init() { - t["VirtualMachineCdromInfo"] = reflect.TypeOf((*VirtualMachineCdromInfo)(nil)).Elem() -} - -type VirtualMachineCertThumbprint struct { - DynamicData - - Thumbprint string `xml:"thumbprint"` - HashAlgorithm string `xml:"hashAlgorithm,omitempty"` -} - -func init() { - t["VirtualMachineCertThumbprint"] = reflect.TypeOf((*VirtualMachineCertThumbprint)(nil)).Elem() -} - -type VirtualMachineCloneSpec struct { - DynamicData - - Location VirtualMachineRelocateSpec `xml:"location"` - Template bool `xml:"template"` - Config *VirtualMachineConfigSpec `xml:"config,omitempty"` - Customization *CustomizationSpec `xml:"customization,omitempty"` - PowerOn bool `xml:"powerOn"` - Snapshot *ManagedObjectReference `xml:"snapshot,omitempty"` - Memory *bool `xml:"memory"` - TpmProvisionPolicy string `xml:"tpmProvisionPolicy,omitempty"` -} - -func init() { - t["VirtualMachineCloneSpec"] = reflect.TypeOf((*VirtualMachineCloneSpec)(nil)).Elem() -} - -type VirtualMachineConfigInfo struct { - DynamicData - - ChangeVersion string `xml:"changeVersion"` - Modified time.Time `xml:"modified"` - Name string `xml:"name"` - GuestFullName string `xml:"guestFullName"` - Version string `xml:"version"` - Uuid string `xml:"uuid"` - CreateDate *time.Time `xml:"createDate"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - NpivNodeWorldWideName []int64 `xml:"npivNodeWorldWideName,omitempty"` - NpivPortWorldWideName []int64 `xml:"npivPortWorldWideName,omitempty"` - NpivWorldWideNameType string `xml:"npivWorldWideNameType,omitempty"` - NpivDesiredNodeWwns int16 `xml:"npivDesiredNodeWwns,omitempty"` - NpivDesiredPortWwns int16 `xml:"npivDesiredPortWwns,omitempty"` - NpivTemporaryDisabled *bool `xml:"npivTemporaryDisabled"` - NpivOnNonRdmDisks *bool `xml:"npivOnNonRdmDisks"` - LocationId string `xml:"locationId,omitempty"` - Template bool `xml:"template"` - GuestId string `xml:"guestId"` - AlternateGuestName string `xml:"alternateGuestName"` - Annotation string `xml:"annotation,omitempty"` - Files VirtualMachineFileInfo `xml:"files"` - Tools *ToolsConfigInfo `xml:"tools,omitempty"` - Flags VirtualMachineFlagInfo `xml:"flags"` - ConsolePreferences *VirtualMachineConsolePreferences `xml:"consolePreferences,omitempty"` - DefaultPowerOps VirtualMachineDefaultPowerOpInfo `xml:"defaultPowerOps"` - RebootPowerOff *bool `xml:"rebootPowerOff"` - Hardware VirtualHardware `xml:"hardware"` - VcpuConfig []VirtualMachineVcpuConfig `xml:"vcpuConfig,omitempty"` - CpuAllocation *ResourceAllocationInfo `xml:"cpuAllocation,omitempty"` - MemoryAllocation *ResourceAllocationInfo `xml:"memoryAllocation,omitempty"` - LatencySensitivity *LatencySensitivity `xml:"latencySensitivity,omitempty"` - MemoryHotAddEnabled *bool `xml:"memoryHotAddEnabled"` - CpuHotAddEnabled *bool `xml:"cpuHotAddEnabled"` - CpuHotRemoveEnabled *bool `xml:"cpuHotRemoveEnabled"` - HotPlugMemoryLimit int64 `xml:"hotPlugMemoryLimit,omitempty"` - HotPlugMemoryIncrementSize int64 `xml:"hotPlugMemoryIncrementSize,omitempty"` - CpuAffinity *VirtualMachineAffinityInfo `xml:"cpuAffinity,omitempty"` - MemoryAffinity *VirtualMachineAffinityInfo `xml:"memoryAffinity,omitempty"` - NetworkShaper *VirtualMachineNetworkShaperInfo `xml:"networkShaper,omitempty"` - ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` - CpuFeatureMask []HostCpuIdInfo `xml:"cpuFeatureMask,omitempty"` - DatastoreUrl []VirtualMachineConfigInfoDatastoreUrlPair `xml:"datastoreUrl,omitempty"` - SwapPlacement string `xml:"swapPlacement,omitempty"` - BootOptions *VirtualMachineBootOptions `xml:"bootOptions,omitempty"` - FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` - RepConfig *ReplicationConfigSpec `xml:"repConfig,omitempty"` - VAppConfig BaseVmConfigInfo `xml:"vAppConfig,omitempty,typeattr"` - VAssertsEnabled *bool `xml:"vAssertsEnabled"` - ChangeTrackingEnabled *bool `xml:"changeTrackingEnabled"` - Firmware string `xml:"firmware,omitempty"` - MaxMksConnections int32 `xml:"maxMksConnections,omitempty"` - GuestAutoLockEnabled *bool `xml:"guestAutoLockEnabled"` - ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` - MemoryReservationLockedToMax *bool `xml:"memoryReservationLockedToMax"` - InitialOverhead *VirtualMachineConfigInfoOverheadInfo `xml:"initialOverhead,omitempty"` - NestedHVEnabled *bool `xml:"nestedHVEnabled"` - VPMCEnabled *bool `xml:"vPMCEnabled"` - ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo `xml:"scheduledHardwareUpgradeInfo,omitempty"` - ForkConfigInfo *VirtualMachineForkConfigInfo `xml:"forkConfigInfo,omitempty"` - VFlashCacheReservation int64 `xml:"vFlashCacheReservation,omitempty"` - VmxConfigChecksum []byte `xml:"vmxConfigChecksum,omitempty"` - MessageBusTunnelEnabled *bool `xml:"messageBusTunnelEnabled"` - VmStorageObjectId string `xml:"vmStorageObjectId,omitempty"` - SwapStorageObjectId string `xml:"swapStorageObjectId,omitempty"` - KeyId *CryptoKeyId `xml:"keyId,omitempty"` - GuestIntegrityInfo *VirtualMachineGuestIntegrityInfo `xml:"guestIntegrityInfo,omitempty"` - MigrateEncryption string `xml:"migrateEncryption,omitempty"` - SgxInfo *VirtualMachineSgxInfo `xml:"sgxInfo,omitempty"` - ContentLibItemInfo *VirtualMachineContentLibraryItemInfo `xml:"contentLibItemInfo,omitempty"` - FtEncryptionMode string `xml:"ftEncryptionMode,omitempty"` - GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"` - SevEnabled *bool `xml:"sevEnabled"` - NumaInfo *VirtualMachineVirtualNumaInfo `xml:"numaInfo,omitempty"` - PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"` - VmxStatsCollectionEnabled *bool `xml:"vmxStatsCollectionEnabled"` - VmOpNotificationToAppEnabled *bool `xml:"vmOpNotificationToAppEnabled"` - VmOpNotificationTimeout int64 `xml:"vmOpNotificationTimeout,omitempty"` - DeviceSwap *VirtualMachineVirtualDeviceSwap `xml:"deviceSwap,omitempty"` - Pmem *VirtualMachineVirtualPMem `xml:"pmem,omitempty"` - DeviceGroups *VirtualMachineVirtualDeviceGroups `xml:"deviceGroups,omitempty"` -} - -func init() { - t["VirtualMachineConfigInfo"] = reflect.TypeOf((*VirtualMachineConfigInfo)(nil)).Elem() -} - -type VirtualMachineConfigInfoDatastoreUrlPair struct { - DynamicData - - Name string `xml:"name"` - Url string `xml:"url"` -} - -func init() { - t["VirtualMachineConfigInfoDatastoreUrlPair"] = reflect.TypeOf((*VirtualMachineConfigInfoDatastoreUrlPair)(nil)).Elem() -} - -type VirtualMachineConfigInfoOverheadInfo struct { - DynamicData - - InitialMemoryReservation int64 `xml:"initialMemoryReservation,omitempty"` - InitialSwapReservation int64 `xml:"initialSwapReservation,omitempty"` -} - -func init() { - t["VirtualMachineConfigInfoOverheadInfo"] = reflect.TypeOf((*VirtualMachineConfigInfoOverheadInfo)(nil)).Elem() -} - -type VirtualMachineConfigOption struct { - DynamicData - - Version string `xml:"version"` - Description string `xml:"description"` - GuestOSDescriptor []GuestOsDescriptor `xml:"guestOSDescriptor"` - GuestOSDefaultIndex int32 `xml:"guestOSDefaultIndex"` - HardwareOptions VirtualHardwareOption `xml:"hardwareOptions"` - Capabilities VirtualMachineCapability `xml:"capabilities"` - Datastore DatastoreOption `xml:"datastore"` - DefaultDevice []BaseVirtualDevice `xml:"defaultDevice,omitempty,typeattr"` - SupportedMonitorType []string `xml:"supportedMonitorType"` - SupportedOvfEnvironmentTransport []string `xml:"supportedOvfEnvironmentTransport,omitempty"` - SupportedOvfInstallTransport []string `xml:"supportedOvfInstallTransport,omitempty"` - PropertyRelations []VirtualMachinePropertyRelation `xml:"propertyRelations,omitempty"` -} - -func init() { - t["VirtualMachineConfigOption"] = reflect.TypeOf((*VirtualMachineConfigOption)(nil)).Elem() -} - -type VirtualMachineConfigOptionDescriptor struct { - DynamicData - - Key string `xml:"key"` - Description string `xml:"description,omitempty"` - Host []ManagedObjectReference `xml:"host,omitempty"` - CreateSupported *bool `xml:"createSupported"` - DefaultConfigOption *bool `xml:"defaultConfigOption"` - RunSupported *bool `xml:"runSupported"` - UpgradeSupported *bool `xml:"upgradeSupported"` -} - -func init() { - t["VirtualMachineConfigOptionDescriptor"] = reflect.TypeOf((*VirtualMachineConfigOptionDescriptor)(nil)).Elem() -} - -type VirtualMachineConfigSpec struct { - DynamicData - - ChangeVersion string `xml:"changeVersion,omitempty"` - Name string `xml:"name,omitempty"` - Version string `xml:"version,omitempty"` - CreateDate *time.Time `xml:"createDate"` - Uuid string `xml:"uuid,omitempty"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - NpivNodeWorldWideName []int64 `xml:"npivNodeWorldWideName,omitempty"` - NpivPortWorldWideName []int64 `xml:"npivPortWorldWideName,omitempty"` - NpivWorldWideNameType string `xml:"npivWorldWideNameType,omitempty"` - NpivDesiredNodeWwns int16 `xml:"npivDesiredNodeWwns,omitempty"` - NpivDesiredPortWwns int16 `xml:"npivDesiredPortWwns,omitempty"` - NpivTemporaryDisabled *bool `xml:"npivTemporaryDisabled"` - NpivOnNonRdmDisks *bool `xml:"npivOnNonRdmDisks"` - NpivWorldWideNameOp string `xml:"npivWorldWideNameOp,omitempty"` - LocationId string `xml:"locationId,omitempty"` - GuestId string `xml:"guestId,omitempty"` - AlternateGuestName string `xml:"alternateGuestName,omitempty"` - Annotation string `xml:"annotation,omitempty"` - Files *VirtualMachineFileInfo `xml:"files,omitempty"` - Tools *ToolsConfigInfo `xml:"tools,omitempty"` - Flags *VirtualMachineFlagInfo `xml:"flags,omitempty"` - ConsolePreferences *VirtualMachineConsolePreferences `xml:"consolePreferences,omitempty"` - PowerOpInfo *VirtualMachineDefaultPowerOpInfo `xml:"powerOpInfo,omitempty"` - RebootPowerOff *bool `xml:"rebootPowerOff"` - NumCPUs int32 `xml:"numCPUs,omitempty"` - VcpuConfig []VirtualMachineVcpuConfig `xml:"vcpuConfig,omitempty"` - NumCoresPerSocket int32 `xml:"numCoresPerSocket,omitempty"` - MemoryMB int64 `xml:"memoryMB,omitempty"` - MemoryHotAddEnabled *bool `xml:"memoryHotAddEnabled"` - CpuHotAddEnabled *bool `xml:"cpuHotAddEnabled"` - CpuHotRemoveEnabled *bool `xml:"cpuHotRemoveEnabled"` - VirtualICH7MPresent *bool `xml:"virtualICH7MPresent"` - VirtualSMCPresent *bool `xml:"virtualSMCPresent"` - DeviceChange []BaseVirtualDeviceConfigSpec `xml:"deviceChange,omitempty,typeattr"` - CpuAllocation *ResourceAllocationInfo `xml:"cpuAllocation,omitempty"` - MemoryAllocation *ResourceAllocationInfo `xml:"memoryAllocation,omitempty"` - LatencySensitivity *LatencySensitivity `xml:"latencySensitivity,omitempty"` - CpuAffinity *VirtualMachineAffinityInfo `xml:"cpuAffinity,omitempty"` - MemoryAffinity *VirtualMachineAffinityInfo `xml:"memoryAffinity,omitempty"` - NetworkShaper *VirtualMachineNetworkShaperInfo `xml:"networkShaper,omitempty"` - CpuFeatureMask []VirtualMachineCpuIdInfoSpec `xml:"cpuFeatureMask,omitempty"` - ExtraConfig []BaseOptionValue `xml:"extraConfig,omitempty,typeattr"` - SwapPlacement string `xml:"swapPlacement,omitempty"` - BootOptions *VirtualMachineBootOptions `xml:"bootOptions,omitempty"` - VAppConfig BaseVmConfigSpec `xml:"vAppConfig,omitempty,typeattr"` - FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` - RepConfig *ReplicationConfigSpec `xml:"repConfig,omitempty"` - VAppConfigRemoved *bool `xml:"vAppConfigRemoved"` - VAssertsEnabled *bool `xml:"vAssertsEnabled"` - ChangeTrackingEnabled *bool `xml:"changeTrackingEnabled"` - Firmware string `xml:"firmware,omitempty"` - MaxMksConnections int32 `xml:"maxMksConnections,omitempty"` - GuestAutoLockEnabled *bool `xml:"guestAutoLockEnabled"` - ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` - MemoryReservationLockedToMax *bool `xml:"memoryReservationLockedToMax"` - NestedHVEnabled *bool `xml:"nestedHVEnabled"` - VPMCEnabled *bool `xml:"vPMCEnabled"` - ScheduledHardwareUpgradeInfo *ScheduledHardwareUpgradeInfo `xml:"scheduledHardwareUpgradeInfo,omitempty"` - VmProfile []BaseVirtualMachineProfileSpec `xml:"vmProfile,omitempty,typeattr"` - MessageBusTunnelEnabled *bool `xml:"messageBusTunnelEnabled"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` - MigrateEncryption string `xml:"migrateEncryption,omitempty"` - SgxInfo *VirtualMachineSgxInfo `xml:"sgxInfo,omitempty"` - FtEncryptionMode string `xml:"ftEncryptionMode,omitempty"` - GuestMonitoringModeInfo *VirtualMachineGuestMonitoringModeInfo `xml:"guestMonitoringModeInfo,omitempty"` - SevEnabled *bool `xml:"sevEnabled"` - VirtualNuma *VirtualMachineVirtualNuma `xml:"virtualNuma,omitempty"` - MotherboardLayout string `xml:"motherboardLayout,omitempty"` - PmemFailoverEnabled *bool `xml:"pmemFailoverEnabled"` - VmxStatsCollectionEnabled *bool `xml:"vmxStatsCollectionEnabled"` - VmOpNotificationToAppEnabled *bool `xml:"vmOpNotificationToAppEnabled"` - VmOpNotificationTimeout int64 `xml:"vmOpNotificationTimeout,omitempty"` - DeviceSwap *VirtualMachineVirtualDeviceSwap `xml:"deviceSwap,omitempty"` - SimultaneousThreads int32 `xml:"simultaneousThreads,omitempty"` - Pmem *VirtualMachineVirtualPMem `xml:"pmem,omitempty"` - DeviceGroups *VirtualMachineVirtualDeviceGroups `xml:"deviceGroups,omitempty"` -} - -func init() { - t["VirtualMachineConfigSpec"] = reflect.TypeOf((*VirtualMachineConfigSpec)(nil)).Elem() -} - -type VirtualMachineConfigSummary struct { - DynamicData - - Name string `xml:"name"` - Template bool `xml:"template"` - VmPathName string `xml:"vmPathName"` - MemorySizeMB int32 `xml:"memorySizeMB,omitempty"` - CpuReservation int32 `xml:"cpuReservation,omitempty"` - MemoryReservation int32 `xml:"memoryReservation,omitempty"` - NumCpu int32 `xml:"numCpu,omitempty"` - NumEthernetCards int32 `xml:"numEthernetCards,omitempty"` - NumVirtualDisks int32 `xml:"numVirtualDisks,omitempty"` - Uuid string `xml:"uuid,omitempty"` - InstanceUuid string `xml:"instanceUuid,omitempty"` - GuestId string `xml:"guestId,omitempty"` - GuestFullName string `xml:"guestFullName,omitempty"` - Annotation string `xml:"annotation,omitempty"` - Product *VAppProductInfo `xml:"product,omitempty"` - InstallBootRequired *bool `xml:"installBootRequired"` - FtInfo BaseFaultToleranceConfigInfo `xml:"ftInfo,omitempty,typeattr"` - ManagedBy *ManagedByInfo `xml:"managedBy,omitempty"` - TpmPresent *bool `xml:"tpmPresent"` - NumVmiopBackings int32 `xml:"numVmiopBackings,omitempty"` - HwVersion string `xml:"hwVersion,omitempty"` -} - -func init() { - t["VirtualMachineConfigSummary"] = reflect.TypeOf((*VirtualMachineConfigSummary)(nil)).Elem() -} - -type VirtualMachineConnection struct { - DynamicData - - Label string `xml:"label"` - Client string `xml:"client"` - UserName string `xml:"userName"` -} - -func init() { - t["VirtualMachineConnection"] = reflect.TypeOf((*VirtualMachineConnection)(nil)).Elem() -} - -type VirtualMachineConsolePreferences struct { - DynamicData - - PowerOnWhenOpened *bool `xml:"powerOnWhenOpened"` - EnterFullScreenOnPowerOn *bool `xml:"enterFullScreenOnPowerOn"` - CloseOnPowerOffOrSuspend *bool `xml:"closeOnPowerOffOrSuspend"` -} - -func init() { - t["VirtualMachineConsolePreferences"] = reflect.TypeOf((*VirtualMachineConsolePreferences)(nil)).Elem() -} - -type VirtualMachineContentLibraryItemInfo struct { - DynamicData - - ContentLibraryItemUuid string `xml:"contentLibraryItemUuid"` - ContentLibraryItemVersion string `xml:"contentLibraryItemVersion,omitempty"` -} - -func init() { - t["VirtualMachineContentLibraryItemInfo"] = reflect.TypeOf((*VirtualMachineContentLibraryItemInfo)(nil)).Elem() -} - -type VirtualMachineCpuIdInfoSpec struct { - ArrayUpdateSpec - - Info *HostCpuIdInfo `xml:"info,omitempty"` -} - -func init() { - t["VirtualMachineCpuIdInfoSpec"] = reflect.TypeOf((*VirtualMachineCpuIdInfoSpec)(nil)).Elem() -} - -type VirtualMachineDatastoreInfo struct { - VirtualMachineTargetInfo - - Datastore DatastoreSummary `xml:"datastore"` - Capability DatastoreCapability `xml:"capability"` - MaxFileSize int64 `xml:"maxFileSize"` - MaxVirtualDiskCapacity int64 `xml:"maxVirtualDiskCapacity,omitempty"` - MaxPhysicalRDMFileSize int64 `xml:"maxPhysicalRDMFileSize,omitempty"` - MaxVirtualRDMFileSize int64 `xml:"maxVirtualRDMFileSize,omitempty"` - Mode string `xml:"mode"` - VStorageSupport string `xml:"vStorageSupport,omitempty"` -} - -func init() { - t["VirtualMachineDatastoreInfo"] = reflect.TypeOf((*VirtualMachineDatastoreInfo)(nil)).Elem() -} - -type VirtualMachineDatastoreVolumeOption struct { - DynamicData - - FileSystemType string `xml:"fileSystemType"` - MajorVersion int32 `xml:"majorVersion,omitempty"` -} - -func init() { - t["VirtualMachineDatastoreVolumeOption"] = reflect.TypeOf((*VirtualMachineDatastoreVolumeOption)(nil)).Elem() -} - -type VirtualMachineDefaultPowerOpInfo struct { - DynamicData - - PowerOffType string `xml:"powerOffType,omitempty"` - SuspendType string `xml:"suspendType,omitempty"` - ResetType string `xml:"resetType,omitempty"` - DefaultPowerOffType string `xml:"defaultPowerOffType,omitempty"` - DefaultSuspendType string `xml:"defaultSuspendType,omitempty"` - DefaultResetType string `xml:"defaultResetType,omitempty"` - StandbyAction string `xml:"standbyAction,omitempty"` -} - -func init() { - t["VirtualMachineDefaultPowerOpInfo"] = reflect.TypeOf((*VirtualMachineDefaultPowerOpInfo)(nil)).Elem() -} - -type VirtualMachineDefaultProfileSpec struct { - VirtualMachineProfileSpec -} - -func init() { - t["VirtualMachineDefaultProfileSpec"] = reflect.TypeOf((*VirtualMachineDefaultProfileSpec)(nil)).Elem() -} - -type VirtualMachineDefinedProfileSpec struct { - VirtualMachineProfileSpec - - ProfileId string `xml:"profileId"` - ReplicationSpec *ReplicationSpec `xml:"replicationSpec,omitempty"` - ProfileData *VirtualMachineProfileRawData `xml:"profileData,omitempty"` - ProfileParams []KeyValue `xml:"profileParams,omitempty"` -} - -func init() { - t["VirtualMachineDefinedProfileSpec"] = reflect.TypeOf((*VirtualMachineDefinedProfileSpec)(nil)).Elem() -} - -type VirtualMachineDeviceRuntimeInfo struct { - DynamicData - - RuntimeState BaseVirtualMachineDeviceRuntimeInfoDeviceRuntimeState `xml:"runtimeState,typeattr"` - Key int32 `xml:"key"` -} - -func init() { - t["VirtualMachineDeviceRuntimeInfo"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfo)(nil)).Elem() -} - -type VirtualMachineDeviceRuntimeInfoDeviceRuntimeState struct { - DynamicData -} - -func init() { - t["VirtualMachineDeviceRuntimeInfoDeviceRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoDeviceRuntimeState)(nil)).Elem() -} - -type VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState struct { - VirtualMachineDeviceRuntimeInfoDeviceRuntimeState - - VmDirectPathGen2Active bool `xml:"vmDirectPathGen2Active"` - VmDirectPathGen2InactiveReasonVm []string `xml:"vmDirectPathGen2InactiveReasonVm,omitempty"` - VmDirectPathGen2InactiveReasonOther []string `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"` - VmDirectPathGen2InactiveReasonExtended string `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"` - Uptv2Active *bool `xml:"uptv2Active"` - Uptv2InactiveReasonVm []string `xml:"uptv2InactiveReasonVm,omitempty"` - Uptv2InactiveReasonOther []string `xml:"uptv2InactiveReasonOther,omitempty"` - ReservationStatus string `xml:"reservationStatus,omitempty"` - AttachmentStatus string `xml:"attachmentStatus,omitempty"` - FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` -} - -func init() { - t["VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState"] = reflect.TypeOf((*VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState)(nil)).Elem() -} - -type VirtualMachineDiskDeviceInfo struct { - VirtualMachineTargetInfo - - Capacity int64 `xml:"capacity,omitempty"` - Vm []ManagedObjectReference `xml:"vm,omitempty"` -} - -func init() { - t["VirtualMachineDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineDiskDeviceInfo)(nil)).Elem() -} - -type VirtualMachineDisplayTopology struct { - DynamicData - - X int32 `xml:"x"` - Y int32 `xml:"y"` - Width int32 `xml:"width"` - Height int32 `xml:"height"` -} - -func init() { - t["VirtualMachineDisplayTopology"] = reflect.TypeOf((*VirtualMachineDisplayTopology)(nil)).Elem() -} - -type VirtualMachineDvxClassInfo struct { - DynamicData - - DeviceClass BaseElementDescription `xml:"deviceClass,typeattr"` - VendorName string `xml:"vendorName"` - SriovNic bool `xml:"sriovNic"` - ConfigParams []OptionDef `xml:"configParams,omitempty"` -} - -func init() { - t["VirtualMachineDvxClassInfo"] = reflect.TypeOf((*VirtualMachineDvxClassInfo)(nil)).Elem() -} - -type VirtualMachineDynamicPassthroughInfo struct { - VirtualMachineTargetInfo - - VendorName string `xml:"vendorName"` - DeviceName string `xml:"deviceName"` - CustomLabel string `xml:"customLabel,omitempty"` - VendorId int32 `xml:"vendorId"` - DeviceId int32 `xml:"deviceId"` -} - -func init() { - t["VirtualMachineDynamicPassthroughInfo"] = reflect.TypeOf((*VirtualMachineDynamicPassthroughInfo)(nil)).Elem() -} - -type VirtualMachineEmptyIndependentFilterSpec struct { - VirtualMachineBaseIndependentFilterSpec -} - -func init() { - t["VirtualMachineEmptyIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineEmptyIndependentFilterSpec)(nil)).Elem() -} - -type VirtualMachineEmptyProfileSpec struct { - VirtualMachineProfileSpec -} - -func init() { - t["VirtualMachineEmptyProfileSpec"] = reflect.TypeOf((*VirtualMachineEmptyProfileSpec)(nil)).Elem() -} - -type VirtualMachineFeatureRequirement struct { - DynamicData - - Key string `xml:"key"` - FeatureName string `xml:"featureName"` - Value string `xml:"value"` -} - -func init() { - t["VirtualMachineFeatureRequirement"] = reflect.TypeOf((*VirtualMachineFeatureRequirement)(nil)).Elem() -} - -type VirtualMachineFileInfo struct { - DynamicData - - VmPathName string `xml:"vmPathName,omitempty"` - SnapshotDirectory string `xml:"snapshotDirectory,omitempty"` - SuspendDirectory string `xml:"suspendDirectory,omitempty"` - LogDirectory string `xml:"logDirectory,omitempty"` - FtMetadataDirectory string `xml:"ftMetadataDirectory,omitempty"` -} - -func init() { - t["VirtualMachineFileInfo"] = reflect.TypeOf((*VirtualMachineFileInfo)(nil)).Elem() -} - -type VirtualMachineFileLayout struct { - DynamicData - - ConfigFile []string `xml:"configFile,omitempty"` - LogFile []string `xml:"logFile,omitempty"` - Disk []VirtualMachineFileLayoutDiskLayout `xml:"disk,omitempty"` - Snapshot []VirtualMachineFileLayoutSnapshotLayout `xml:"snapshot,omitempty"` - SwapFile string `xml:"swapFile,omitempty"` -} - -func init() { - t["VirtualMachineFileLayout"] = reflect.TypeOf((*VirtualMachineFileLayout)(nil)).Elem() -} - -type VirtualMachineFileLayoutDiskLayout struct { - DynamicData - - Key int32 `xml:"key"` - DiskFile []string `xml:"diskFile"` -} - -func init() { - t["VirtualMachineFileLayoutDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutDiskLayout)(nil)).Elem() -} - -type VirtualMachineFileLayoutEx struct { - DynamicData - - File []VirtualMachineFileLayoutExFileInfo `xml:"file,omitempty"` - Disk []VirtualMachineFileLayoutExDiskLayout `xml:"disk,omitempty"` - Snapshot []VirtualMachineFileLayoutExSnapshotLayout `xml:"snapshot,omitempty"` - Timestamp time.Time `xml:"timestamp"` -} - -func init() { - t["VirtualMachineFileLayoutEx"] = reflect.TypeOf((*VirtualMachineFileLayoutEx)(nil)).Elem() -} - -type VirtualMachineFileLayoutExDiskLayout struct { - DynamicData - - Key int32 `xml:"key"` - Chain []VirtualMachineFileLayoutExDiskUnit `xml:"chain,omitempty"` -} - -func init() { - t["VirtualMachineFileLayoutExDiskLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskLayout)(nil)).Elem() -} - -type VirtualMachineFileLayoutExDiskUnit struct { - DynamicData - - FileKey []int32 `xml:"fileKey"` -} - -func init() { - t["VirtualMachineFileLayoutExDiskUnit"] = reflect.TypeOf((*VirtualMachineFileLayoutExDiskUnit)(nil)).Elem() -} - -type VirtualMachineFileLayoutExFileInfo struct { - DynamicData - - Key int32 `xml:"key"` - Name string `xml:"name"` - Type string `xml:"type"` - Size int64 `xml:"size"` - UniqueSize int64 `xml:"uniqueSize,omitempty"` - BackingObjectId string `xml:"backingObjectId,omitempty"` - Accessible *bool `xml:"accessible"` -} - -func init() { - t["VirtualMachineFileLayoutExFileInfo"] = reflect.TypeOf((*VirtualMachineFileLayoutExFileInfo)(nil)).Elem() -} - -type VirtualMachineFileLayoutExSnapshotLayout struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - DataKey int32 `xml:"dataKey"` - MemoryKey int32 `xml:"memoryKey,omitempty"` - Disk []VirtualMachineFileLayoutExDiskLayout `xml:"disk,omitempty"` -} - -func init() { - t["VirtualMachineFileLayoutExSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutExSnapshotLayout)(nil)).Elem() -} - -type VirtualMachineFileLayoutSnapshotLayout struct { - DynamicData - - Key ManagedObjectReference `xml:"key"` - SnapshotFile []string `xml:"snapshotFile"` -} - -func init() { - t["VirtualMachineFileLayoutSnapshotLayout"] = reflect.TypeOf((*VirtualMachineFileLayoutSnapshotLayout)(nil)).Elem() -} - -type VirtualMachineFlagInfo struct { - DynamicData - - DisableAcceleration *bool `xml:"disableAcceleration"` - EnableLogging *bool `xml:"enableLogging"` - UseToe *bool `xml:"useToe"` - RunWithDebugInfo *bool `xml:"runWithDebugInfo"` - MonitorType string `xml:"monitorType,omitempty"` - HtSharing string `xml:"htSharing,omitempty"` - SnapshotDisabled *bool `xml:"snapshotDisabled"` - SnapshotLocked *bool `xml:"snapshotLocked"` - DiskUuidEnabled *bool `xml:"diskUuidEnabled"` - VirtualMmuUsage string `xml:"virtualMmuUsage,omitempty"` - VirtualExecUsage string `xml:"virtualExecUsage,omitempty"` - SnapshotPowerOffBehavior string `xml:"snapshotPowerOffBehavior,omitempty"` - RecordReplayEnabled *bool `xml:"recordReplayEnabled"` - FaultToleranceType string `xml:"faultToleranceType,omitempty"` - CbrcCacheEnabled *bool `xml:"cbrcCacheEnabled"` - VvtdEnabled *bool `xml:"vvtdEnabled"` - VbsEnabled *bool `xml:"vbsEnabled"` -} - -func init() { - t["VirtualMachineFlagInfo"] = reflect.TypeOf((*VirtualMachineFlagInfo)(nil)).Elem() -} - -type VirtualMachineFloppyInfo struct { - VirtualMachineTargetInfo -} - -func init() { - t["VirtualMachineFloppyInfo"] = reflect.TypeOf((*VirtualMachineFloppyInfo)(nil)).Elem() -} - -type VirtualMachineForkConfigInfo struct { - DynamicData - - ParentEnabled *bool `xml:"parentEnabled"` - ChildForkGroupId string `xml:"childForkGroupId,omitempty"` - ParentForkGroupId string `xml:"parentForkGroupId,omitempty"` - ChildType string `xml:"childType,omitempty"` -} - -func init() { - t["VirtualMachineForkConfigInfo"] = reflect.TypeOf((*VirtualMachineForkConfigInfo)(nil)).Elem() -} - -type VirtualMachineGuestIntegrityInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` -} - -func init() { - t["VirtualMachineGuestIntegrityInfo"] = reflect.TypeOf((*VirtualMachineGuestIntegrityInfo)(nil)).Elem() -} - -type VirtualMachineGuestMonitoringModeInfo struct { - DynamicData - - GmmFile string `xml:"gmmFile,omitempty"` - GmmAppliance string `xml:"gmmAppliance,omitempty"` -} - -func init() { - t["VirtualMachineGuestMonitoringModeInfo"] = reflect.TypeOf((*VirtualMachineGuestMonitoringModeInfo)(nil)).Elem() -} - -type VirtualMachineGuestQuiesceSpec struct { - DynamicData - - Timeout int32 `xml:"timeout,omitempty"` -} - -func init() { - t["VirtualMachineGuestQuiesceSpec"] = reflect.TypeOf((*VirtualMachineGuestQuiesceSpec)(nil)).Elem() -} - -type VirtualMachineGuestSummary struct { - DynamicData - - GuestId string `xml:"guestId,omitempty"` - GuestFullName string `xml:"guestFullName,omitempty"` - ToolsStatus VirtualMachineToolsStatus `xml:"toolsStatus,omitempty"` - ToolsVersionStatus string `xml:"toolsVersionStatus,omitempty"` - ToolsVersionStatus2 string `xml:"toolsVersionStatus2,omitempty"` - ToolsRunningStatus string `xml:"toolsRunningStatus,omitempty"` - HostName string `xml:"hostName,omitempty"` - IpAddress string `xml:"ipAddress,omitempty"` - HwVersion string `xml:"hwVersion,omitempty"` -} - -func init() { - t["VirtualMachineGuestSummary"] = reflect.TypeOf((*VirtualMachineGuestSummary)(nil)).Elem() -} - -type VirtualMachineIdeDiskDeviceInfo struct { - VirtualMachineDiskDeviceInfo - - PartitionTable []VirtualMachineIdeDiskDevicePartitionInfo `xml:"partitionTable,omitempty"` -} - -func init() { - t["VirtualMachineIdeDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDeviceInfo)(nil)).Elem() -} - -type VirtualMachineIdeDiskDevicePartitionInfo struct { - DynamicData - - Id int32 `xml:"id"` - Capacity int32 `xml:"capacity"` -} - -func init() { - t["VirtualMachineIdeDiskDevicePartitionInfo"] = reflect.TypeOf((*VirtualMachineIdeDiskDevicePartitionInfo)(nil)).Elem() -} - -type VirtualMachineImportSpec struct { - ImportSpec - - ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"` - ResPoolEntity *ManagedObjectReference `xml:"resPoolEntity,omitempty"` -} - -func init() { - t["VirtualMachineImportSpec"] = reflect.TypeOf((*VirtualMachineImportSpec)(nil)).Elem() -} - -type VirtualMachineIndependentFilterSpec struct { - VirtualMachineBaseIndependentFilterSpec - - FilterName string `xml:"filterName"` - FilterClass string `xml:"filterClass,omitempty"` - FilterCapabilities []KeyValue `xml:"filterCapabilities,omitempty"` -} - -func init() { - t["VirtualMachineIndependentFilterSpec"] = reflect.TypeOf((*VirtualMachineIndependentFilterSpec)(nil)).Elem() -} - -type VirtualMachineInstantCloneSpec struct { - DynamicData - - Name string `xml:"name"` - Location VirtualMachineRelocateSpec `xml:"location"` - Config []BaseOptionValue `xml:"config,omitempty,typeattr"` - BiosUuid string `xml:"biosUuid,omitempty"` -} - -func init() { - t["VirtualMachineInstantCloneSpec"] = reflect.TypeOf((*VirtualMachineInstantCloneSpec)(nil)).Elem() -} - -type VirtualMachineLegacyNetworkSwitchInfo struct { - DynamicData - - Name string `xml:"name"` -} - -func init() { - t["VirtualMachineLegacyNetworkSwitchInfo"] = reflect.TypeOf((*VirtualMachineLegacyNetworkSwitchInfo)(nil)).Elem() -} - -type VirtualMachineMemoryReservationInfo struct { - DynamicData - - VirtualMachineMin int64 `xml:"virtualMachineMin"` - VirtualMachineMax int64 `xml:"virtualMachineMax"` - VirtualMachineReserved int64 `xml:"virtualMachineReserved"` - AllocationPolicy string `xml:"allocationPolicy"` -} - -func init() { - t["VirtualMachineMemoryReservationInfo"] = reflect.TypeOf((*VirtualMachineMemoryReservationInfo)(nil)).Elem() -} - -type VirtualMachineMemoryReservationSpec struct { - DynamicData - - VirtualMachineReserved int64 `xml:"virtualMachineReserved,omitempty"` - AllocationPolicy string `xml:"allocationPolicy,omitempty"` -} - -func init() { - t["VirtualMachineMemoryReservationSpec"] = reflect.TypeOf((*VirtualMachineMemoryReservationSpec)(nil)).Elem() -} - -type VirtualMachineMessage struct { - DynamicData - - Id string `xml:"id"` - Argument []AnyType `xml:"argument,omitempty,typeattr"` - Text string `xml:"text,omitempty"` -} - -func init() { - t["VirtualMachineMessage"] = reflect.TypeOf((*VirtualMachineMessage)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadata struct { - DynamicData - - VmId string `xml:"vmId"` - Metadata string `xml:"metadata,omitempty"` -} - -func init() { - t["VirtualMachineMetadataManagerVmMetadata"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadata)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadataInput struct { - DynamicData - - Operation string `xml:"operation"` - VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"` -} - -func init() { - t["VirtualMachineMetadataManagerVmMetadataInput"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataInput)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadataOwner struct { - DynamicData - - Name string `xml:"name"` -} - -func init() { - t["VirtualMachineMetadataManagerVmMetadataOwner"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataOwner)(nil)).Elem() -} - -type VirtualMachineMetadataManagerVmMetadataResult struct { - DynamicData - - VmMetadata VirtualMachineMetadataManagerVmMetadata `xml:"vmMetadata"` - Error *LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["VirtualMachineMetadataManagerVmMetadataResult"] = reflect.TypeOf((*VirtualMachineMetadataManagerVmMetadataResult)(nil)).Elem() -} - -type VirtualMachineMksConnection struct { - VirtualMachineConnection -} - -func init() { - t["VirtualMachineMksConnection"] = reflect.TypeOf((*VirtualMachineMksConnection)(nil)).Elem() -} - -type VirtualMachineMksTicket struct { - DynamicData - - Ticket string `xml:"ticket"` - CfgFile string `xml:"cfgFile"` - Host string `xml:"host,omitempty"` - Port int32 `xml:"port,omitempty"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` -} - -func init() { - t["VirtualMachineMksTicket"] = reflect.TypeOf((*VirtualMachineMksTicket)(nil)).Elem() -} - -type VirtualMachineNetworkInfo struct { - VirtualMachineTargetInfo - - Network BaseNetworkSummary `xml:"network,typeattr"` - Vswitch string `xml:"vswitch,omitempty"` -} - -func init() { - t["VirtualMachineNetworkInfo"] = reflect.TypeOf((*VirtualMachineNetworkInfo)(nil)).Elem() -} - -type VirtualMachineNetworkShaperInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - PeakBps int64 `xml:"peakBps,omitempty"` - AverageBps int64 `xml:"averageBps,omitempty"` - BurstSize int64 `xml:"burstSize,omitempty"` -} - -func init() { - t["VirtualMachineNetworkShaperInfo"] = reflect.TypeOf((*VirtualMachineNetworkShaperInfo)(nil)).Elem() -} - -type VirtualMachineParallelInfo struct { - VirtualMachineTargetInfo -} - -func init() { - t["VirtualMachineParallelInfo"] = reflect.TypeOf((*VirtualMachineParallelInfo)(nil)).Elem() -} - -type VirtualMachinePciPassthroughInfo struct { - VirtualMachineTargetInfo - - PciDevice HostPciDevice `xml:"pciDevice"` - SystemId string `xml:"systemId"` -} - -func init() { - t["VirtualMachinePciPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciPassthroughInfo)(nil)).Elem() -} - -type VirtualMachinePciSharedGpuPassthroughInfo struct { - VirtualMachineTargetInfo - - Vgpu string `xml:"vgpu"` -} - -func init() { - t["VirtualMachinePciSharedGpuPassthroughInfo"] = reflect.TypeOf((*VirtualMachinePciSharedGpuPassthroughInfo)(nil)).Elem() -} - -type VirtualMachinePrecisionClockInfo struct { - VirtualMachineTargetInfo - - SystemClockProtocol string `xml:"systemClockProtocol,omitempty"` -} - -func init() { - t["VirtualMachinePrecisionClockInfo"] = reflect.TypeOf((*VirtualMachinePrecisionClockInfo)(nil)).Elem() -} - -type VirtualMachineProfileDetails struct { - DynamicData - - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - DiskProfileDetails []VirtualMachineProfileDetailsDiskProfileDetails `xml:"diskProfileDetails,omitempty"` -} - -func init() { - t["VirtualMachineProfileDetails"] = reflect.TypeOf((*VirtualMachineProfileDetails)(nil)).Elem() -} - -type VirtualMachineProfileDetailsDiskProfileDetails struct { - DynamicData - - DiskId int32 `xml:"diskId"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineProfileDetailsDiskProfileDetails"] = reflect.TypeOf((*VirtualMachineProfileDetailsDiskProfileDetails)(nil)).Elem() -} - -type VirtualMachineProfileRawData struct { - DynamicData - - ExtensionKey string `xml:"extensionKey"` - ObjectData string `xml:"objectData,omitempty"` -} - -func init() { - t["VirtualMachineProfileRawData"] = reflect.TypeOf((*VirtualMachineProfileRawData)(nil)).Elem() -} - -type VirtualMachineProfileSpec struct { - DynamicData -} - -func init() { - t["VirtualMachineProfileSpec"] = reflect.TypeOf((*VirtualMachineProfileSpec)(nil)).Elem() -} - -type VirtualMachinePropertyRelation struct { - DynamicData - - Key DynamicProperty `xml:"key"` - Relations []DynamicProperty `xml:"relations,omitempty"` -} - -func init() { - t["VirtualMachinePropertyRelation"] = reflect.TypeOf((*VirtualMachinePropertyRelation)(nil)).Elem() -} - -type VirtualMachineQuestionInfo struct { - DynamicData - - Id string `xml:"id"` - Text string `xml:"text"` - Choice ChoiceOption `xml:"choice"` - Message []VirtualMachineMessage `xml:"message,omitempty"` -} - -func init() { - t["VirtualMachineQuestionInfo"] = reflect.TypeOf((*VirtualMachineQuestionInfo)(nil)).Elem() -} - -type VirtualMachineQuickStats struct { - DynamicData - - OverallCpuUsage int32 `xml:"overallCpuUsage,omitempty"` - OverallCpuDemand int32 `xml:"overallCpuDemand,omitempty"` - OverallCpuReadiness int32 `xml:"overallCpuReadiness,omitempty"` - GuestMemoryUsage int32 `xml:"guestMemoryUsage,omitempty"` - HostMemoryUsage int32 `xml:"hostMemoryUsage,omitempty"` - GuestHeartbeatStatus ManagedEntityStatus `xml:"guestHeartbeatStatus"` - DistributedCpuEntitlement int32 `xml:"distributedCpuEntitlement,omitempty"` - DistributedMemoryEntitlement int32 `xml:"distributedMemoryEntitlement,omitempty"` - StaticCpuEntitlement int32 `xml:"staticCpuEntitlement,omitempty"` - StaticMemoryEntitlement int32 `xml:"staticMemoryEntitlement,omitempty"` - GrantedMemory int32 `xml:"grantedMemory,omitempty"` - PrivateMemory int32 `xml:"privateMemory,omitempty"` - SharedMemory int32 `xml:"sharedMemory,omitempty"` - SwappedMemory int32 `xml:"swappedMemory,omitempty"` - BalloonedMemory int32 `xml:"balloonedMemory,omitempty"` - ConsumedOverheadMemory int32 `xml:"consumedOverheadMemory,omitempty"` - FtLogBandwidth int32 `xml:"ftLogBandwidth,omitempty"` - FtSecondaryLatency int32 `xml:"ftSecondaryLatency,omitempty"` - FtLatencyStatus ManagedEntityStatus `xml:"ftLatencyStatus,omitempty"` - CompressedMemory int64 `xml:"compressedMemory,omitempty"` - UptimeSeconds int32 `xml:"uptimeSeconds,omitempty"` - SsdSwappedMemory int64 `xml:"ssdSwappedMemory,omitempty"` - ActiveMemory int32 `xml:"activeMemory,omitempty"` - MemoryTierStats []VirtualMachineQuickStatsMemoryTierStats `xml:"memoryTierStats,omitempty"` -} - -func init() { - t["VirtualMachineQuickStats"] = reflect.TypeOf((*VirtualMachineQuickStats)(nil)).Elem() -} - -type VirtualMachineQuickStatsMemoryTierStats struct { - DynamicData - - MemoryTierType string `xml:"memoryTierType"` - ReadBandwidth int64 `xml:"readBandwidth"` -} - -func init() { - t["VirtualMachineQuickStatsMemoryTierStats"] = reflect.TypeOf((*VirtualMachineQuickStatsMemoryTierStats)(nil)).Elem() -} - -type VirtualMachineRelocateSpec struct { - DynamicData - - Service *ServiceLocator `xml:"service,omitempty"` - Folder *ManagedObjectReference `xml:"folder,omitempty"` - Datastore *ManagedObjectReference `xml:"datastore,omitempty"` - DiskMoveType string `xml:"diskMoveType,omitempty"` - Pool *ManagedObjectReference `xml:"pool,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Disk []VirtualMachineRelocateSpecDiskLocator `xml:"disk,omitempty"` - Transform VirtualMachineRelocateTransformation `xml:"transform,omitempty"` - DeviceChange []BaseVirtualDeviceConfigSpec `xml:"deviceChange,omitempty,typeattr"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - CryptoSpec BaseCryptoSpec `xml:"cryptoSpec,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineRelocateSpec"] = reflect.TypeOf((*VirtualMachineRelocateSpec)(nil)).Elem() -} - -type VirtualMachineRelocateSpecDiskLocator struct { - DynamicData - - DiskId int32 `xml:"diskId"` - Datastore ManagedObjectReference `xml:"datastore"` - DiskMoveType string `xml:"diskMoveType,omitempty"` - DiskBackingInfo BaseVirtualDeviceBackingInfo `xml:"diskBackingInfo,omitempty,typeattr"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Backing *VirtualMachineRelocateSpecDiskLocatorBackingSpec `xml:"backing,omitempty"` - FilterSpec []BaseVirtualMachineBaseIndependentFilterSpec `xml:"filterSpec,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineRelocateSpecDiskLocator"] = reflect.TypeOf((*VirtualMachineRelocateSpecDiskLocator)(nil)).Elem() -} - -type VirtualMachineRelocateSpecDiskLocatorBackingSpec struct { - DynamicData - - Parent *VirtualMachineRelocateSpecDiskLocatorBackingSpec `xml:"parent,omitempty"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineRelocateSpecDiskLocatorBackingSpec"] = reflect.TypeOf((*VirtualMachineRelocateSpecDiskLocatorBackingSpec)(nil)).Elem() -} - -type VirtualMachineRuntimeInfo struct { - DynamicData - - Device []VirtualMachineDeviceRuntimeInfo `xml:"device,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - ConnectionState VirtualMachineConnectionState `xml:"connectionState"` - PowerState VirtualMachinePowerState `xml:"powerState"` - VmFailoverInProgress *bool `xml:"vmFailoverInProgress"` - FaultToleranceState VirtualMachineFaultToleranceState `xml:"faultToleranceState,omitempty"` - DasVmProtection *VirtualMachineRuntimeInfoDasProtectionState `xml:"dasVmProtection,omitempty"` - ToolsInstallerMounted bool `xml:"toolsInstallerMounted"` - SuspendTime *time.Time `xml:"suspendTime"` - BootTime *time.Time `xml:"bootTime"` - SuspendInterval int64 `xml:"suspendInterval,omitempty"` - Question *VirtualMachineQuestionInfo `xml:"question,omitempty"` - MemoryOverhead int64 `xml:"memoryOverhead,omitempty"` - MaxCpuUsage int32 `xml:"maxCpuUsage,omitempty"` - MaxMemoryUsage int32 `xml:"maxMemoryUsage,omitempty"` - NumMksConnections int32 `xml:"numMksConnections"` - RecordReplayState VirtualMachineRecordReplayState `xml:"recordReplayState,omitempty"` - CleanPowerOff *bool `xml:"cleanPowerOff"` - NeedSecondaryReason string `xml:"needSecondaryReason,omitempty"` - OnlineStandby *bool `xml:"onlineStandby"` - MinRequiredEVCModeKey string `xml:"minRequiredEVCModeKey,omitempty"` - ConsolidationNeeded *bool `xml:"consolidationNeeded"` - OfflineFeatureRequirement []VirtualMachineFeatureRequirement `xml:"offlineFeatureRequirement,omitempty"` - FeatureRequirement []VirtualMachineFeatureRequirement `xml:"featureRequirement,omitempty"` - FeatureMask []HostFeatureMask `xml:"featureMask,omitempty"` - VFlashCacheAllocation int64 `xml:"vFlashCacheAllocation,omitempty"` - Paused *bool `xml:"paused"` - SnapshotInBackground *bool `xml:"snapshotInBackground"` - QuiescedForkParent *bool `xml:"quiescedForkParent"` - InstantCloneFrozen *bool `xml:"instantCloneFrozen"` - CryptoState string `xml:"cryptoState,omitempty"` - SuspendedToMemory *bool `xml:"suspendedToMemory"` - OpNotificationTimeout int64 `xml:"opNotificationTimeout,omitempty"` -} - -func init() { - t["VirtualMachineRuntimeInfo"] = reflect.TypeOf((*VirtualMachineRuntimeInfo)(nil)).Elem() -} - -type VirtualMachineRuntimeInfoDasProtectionState struct { - DynamicData - - DasProtected bool `xml:"dasProtected"` -} - -func init() { - t["VirtualMachineRuntimeInfoDasProtectionState"] = reflect.TypeOf((*VirtualMachineRuntimeInfoDasProtectionState)(nil)).Elem() -} - -type VirtualMachineScsiDiskDeviceInfo struct { - VirtualMachineDiskDeviceInfo - - Disk *HostScsiDisk `xml:"disk,omitempty"` - TransportHint string `xml:"transportHint,omitempty"` - LunNumber int32 `xml:"lunNumber,omitempty"` -} - -func init() { - t["VirtualMachineScsiDiskDeviceInfo"] = reflect.TypeOf((*VirtualMachineScsiDiskDeviceInfo)(nil)).Elem() -} - -type VirtualMachineScsiPassthroughInfo struct { - VirtualMachineTargetInfo - - ScsiClass string `xml:"scsiClass"` - Vendor string `xml:"vendor"` - PhysicalUnitNumber int32 `xml:"physicalUnitNumber"` -} - -func init() { - t["VirtualMachineScsiPassthroughInfo"] = reflect.TypeOf((*VirtualMachineScsiPassthroughInfo)(nil)).Elem() -} - -type VirtualMachineSerialInfo struct { - VirtualMachineTargetInfo -} - -func init() { - t["VirtualMachineSerialInfo"] = reflect.TypeOf((*VirtualMachineSerialInfo)(nil)).Elem() -} - -type VirtualMachineSgxInfo struct { - DynamicData - - EpcSize int64 `xml:"epcSize"` - FlcMode string `xml:"flcMode,omitempty"` - LePubKeyHash string `xml:"lePubKeyHash,omitempty"` - RequireAttestation *bool `xml:"requireAttestation"` -} - -func init() { - t["VirtualMachineSgxInfo"] = reflect.TypeOf((*VirtualMachineSgxInfo)(nil)).Elem() -} - -type VirtualMachineSgxTargetInfo struct { - VirtualMachineTargetInfo - - MaxEpcSize int64 `xml:"maxEpcSize"` - FlcModes []string `xml:"flcModes,omitempty"` - LePubKeyHashes []string `xml:"lePubKeyHashes,omitempty"` - RequireAttestationSupported *bool `xml:"requireAttestationSupported"` -} - -func init() { - t["VirtualMachineSgxTargetInfo"] = reflect.TypeOf((*VirtualMachineSgxTargetInfo)(nil)).Elem() -} - -type VirtualMachineSnapshotInfo struct { - DynamicData - - CurrentSnapshot *ManagedObjectReference `xml:"currentSnapshot,omitempty"` - RootSnapshotList []VirtualMachineSnapshotTree `xml:"rootSnapshotList"` -} - -func init() { - t["VirtualMachineSnapshotInfo"] = reflect.TypeOf((*VirtualMachineSnapshotInfo)(nil)).Elem() -} - -type VirtualMachineSnapshotTree struct { - DynamicData - - Snapshot ManagedObjectReference `xml:"snapshot"` - Vm ManagedObjectReference `xml:"vm"` - Name string `xml:"name"` - Description string `xml:"description"` - Id int32 `xml:"id,omitempty"` - CreateTime time.Time `xml:"createTime"` - State VirtualMachinePowerState `xml:"state"` - Quiesced bool `xml:"quiesced"` - BackupManifest string `xml:"backupManifest,omitempty"` - ChildSnapshotList []VirtualMachineSnapshotTree `xml:"childSnapshotList,omitempty"` - ReplaySupported *bool `xml:"replaySupported"` -} - -func init() { - t["VirtualMachineSnapshotTree"] = reflect.TypeOf((*VirtualMachineSnapshotTree)(nil)).Elem() -} - -type VirtualMachineSoundInfo struct { - VirtualMachineTargetInfo -} - -func init() { - t["VirtualMachineSoundInfo"] = reflect.TypeOf((*VirtualMachineSoundInfo)(nil)).Elem() -} - -type VirtualMachineSriovDevicePoolInfo struct { - DynamicData - - Key string `xml:"key"` -} - -func init() { - t["VirtualMachineSriovDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovDevicePoolInfo)(nil)).Elem() -} - -type VirtualMachineSriovInfo struct { - VirtualMachinePciPassthroughInfo - - VirtualFunction bool `xml:"virtualFunction"` - Pnic string `xml:"pnic,omitempty"` - DevicePool BaseVirtualMachineSriovDevicePoolInfo `xml:"devicePool,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineSriovInfo"] = reflect.TypeOf((*VirtualMachineSriovInfo)(nil)).Elem() -} - -type VirtualMachineSriovNetworkDevicePoolInfo struct { - VirtualMachineSriovDevicePoolInfo - - SwitchKey string `xml:"switchKey,omitempty"` - SwitchUuid string `xml:"switchUuid,omitempty"` -} - -func init() { - t["VirtualMachineSriovNetworkDevicePoolInfo"] = reflect.TypeOf((*VirtualMachineSriovNetworkDevicePoolInfo)(nil)).Elem() -} - -type VirtualMachineStorageInfo struct { - DynamicData - - PerDatastoreUsage []VirtualMachineUsageOnDatastore `xml:"perDatastoreUsage,omitempty"` - Timestamp time.Time `xml:"timestamp"` -} - -func init() { - t["VirtualMachineStorageInfo"] = reflect.TypeOf((*VirtualMachineStorageInfo)(nil)).Elem() -} - -type VirtualMachineStorageSummary struct { - DynamicData - - Committed int64 `xml:"committed"` - Uncommitted int64 `xml:"uncommitted"` - Unshared int64 `xml:"unshared"` - Timestamp time.Time `xml:"timestamp"` -} - -func init() { - t["VirtualMachineStorageSummary"] = reflect.TypeOf((*VirtualMachineStorageSummary)(nil)).Elem() -} - -type VirtualMachineSummary struct { - DynamicData - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Runtime VirtualMachineRuntimeInfo `xml:"runtime"` - Guest *VirtualMachineGuestSummary `xml:"guest,omitempty"` - Config VirtualMachineConfigSummary `xml:"config"` - Storage *VirtualMachineStorageSummary `xml:"storage,omitempty"` - QuickStats VirtualMachineQuickStats `xml:"quickStats"` - OverallStatus ManagedEntityStatus `xml:"overallStatus"` - CustomValue []BaseCustomFieldValue `xml:"customValue,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineSummary"] = reflect.TypeOf((*VirtualMachineSummary)(nil)).Elem() -} - -type VirtualMachineTargetInfo struct { - DynamicData - - Name string `xml:"name"` - ConfigurationTag []string `xml:"configurationTag,omitempty"` -} - -func init() { - t["VirtualMachineTargetInfo"] = reflect.TypeOf((*VirtualMachineTargetInfo)(nil)).Elem() -} - -type VirtualMachineTicket struct { - DynamicData - - Ticket string `xml:"ticket"` - CfgFile string `xml:"cfgFile"` - Host string `xml:"host,omitempty"` - Port int32 `xml:"port,omitempty"` - SslThumbprint string `xml:"sslThumbprint,omitempty"` - CertThumbprintList []VirtualMachineCertThumbprint `xml:"certThumbprintList,omitempty"` - Url string `xml:"url,omitempty"` -} - -func init() { - t["VirtualMachineTicket"] = reflect.TypeOf((*VirtualMachineTicket)(nil)).Elem() -} - -type VirtualMachineUsageOnDatastore struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - Committed int64 `xml:"committed"` - Uncommitted int64 `xml:"uncommitted"` - Unshared int64 `xml:"unshared"` -} - -func init() { - t["VirtualMachineUsageOnDatastore"] = reflect.TypeOf((*VirtualMachineUsageOnDatastore)(nil)).Elem() -} - -type VirtualMachineUsbInfo struct { - VirtualMachineTargetInfo - - Description string `xml:"description"` - Vendor int32 `xml:"vendor"` - Product int32 `xml:"product"` - PhysicalPath string `xml:"physicalPath"` - Family []string `xml:"family,omitempty"` - Speed []string `xml:"speed,omitempty"` - Summary *VirtualMachineSummary `xml:"summary,omitempty"` -} - -func init() { - t["VirtualMachineUsbInfo"] = reflect.TypeOf((*VirtualMachineUsbInfo)(nil)).Elem() -} - -type VirtualMachineVFlashModuleInfo struct { - VirtualMachineTargetInfo - - VFlashModule HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption `xml:"vFlashModule"` -} - -func init() { - t["VirtualMachineVFlashModuleInfo"] = reflect.TypeOf((*VirtualMachineVFlashModuleInfo)(nil)).Elem() -} - -type VirtualMachineVMCIDevice struct { - VirtualDevice - - Id int64 `xml:"id,omitempty"` - AllowUnrestrictedCommunication *bool `xml:"allowUnrestrictedCommunication"` - FilterEnable *bool `xml:"filterEnable"` - FilterInfo *VirtualMachineVMCIDeviceFilterInfo `xml:"filterInfo,omitempty"` -} - -func init() { - t["VirtualMachineVMCIDevice"] = reflect.TypeOf((*VirtualMachineVMCIDevice)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceFilterInfo struct { - DynamicData - - Filters []VirtualMachineVMCIDeviceFilterSpec `xml:"filters,omitempty"` -} - -func init() { - t["VirtualMachineVMCIDeviceFilterInfo"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterInfo)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceFilterSpec struct { - DynamicData - - Rank int64 `xml:"rank"` - Action string `xml:"action"` - Protocol string `xml:"protocol"` - Direction string `xml:"direction"` - LowerDstPortBoundary int64 `xml:"lowerDstPortBoundary,omitempty"` - UpperDstPortBoundary int64 `xml:"upperDstPortBoundary,omitempty"` -} - -func init() { - t["VirtualMachineVMCIDeviceFilterSpec"] = reflect.TypeOf((*VirtualMachineVMCIDeviceFilterSpec)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceOption struct { - VirtualDeviceOption - - AllowUnrestrictedCommunication BoolOption `xml:"allowUnrestrictedCommunication"` - FilterSpecOption *VirtualMachineVMCIDeviceOptionFilterSpecOption `xml:"filterSpecOption,omitempty"` - FilterSupported *BoolOption `xml:"filterSupported,omitempty"` -} - -func init() { - t["VirtualMachineVMCIDeviceOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOption)(nil)).Elem() -} - -type VirtualMachineVMCIDeviceOptionFilterSpecOption struct { - DynamicData - - Action ChoiceOption `xml:"action"` - Protocol ChoiceOption `xml:"protocol"` - Direction ChoiceOption `xml:"direction"` - LowerDstPortBoundary LongOption `xml:"lowerDstPortBoundary"` - UpperDstPortBoundary LongOption `xml:"upperDstPortBoundary"` -} - -func init() { - t["VirtualMachineVMCIDeviceOptionFilterSpecOption"] = reflect.TypeOf((*VirtualMachineVMCIDeviceOptionFilterSpecOption)(nil)).Elem() -} - -type VirtualMachineVMIROM struct { - VirtualDevice -} - -func init() { - t["VirtualMachineVMIROM"] = reflect.TypeOf((*VirtualMachineVMIROM)(nil)).Elem() -} - -type VirtualMachineVcpuConfig struct { - DynamicData - - LatencySensitivity *LatencySensitivity `xml:"latencySensitivity,omitempty"` -} - -func init() { - t["VirtualMachineVcpuConfig"] = reflect.TypeOf((*VirtualMachineVcpuConfig)(nil)).Elem() -} - -type VirtualMachineVendorDeviceGroupInfo struct { - VirtualMachineTargetInfo - - DeviceGroupName string `xml:"deviceGroupName"` - DeviceGroupDescription string `xml:"deviceGroupDescription,omitempty"` - ComponentDeviceInfo []VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo `xml:"componentDeviceInfo,omitempty"` -} - -func init() { - t["VirtualMachineVendorDeviceGroupInfo"] = reflect.TypeOf((*VirtualMachineVendorDeviceGroupInfo)(nil)).Elem() -} - -type VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo struct { - DynamicData - - Type string `xml:"type"` - VendorName string `xml:"vendorName"` - DeviceName string `xml:"deviceName"` - IsConfigurable bool `xml:"isConfigurable"` - Device BaseVirtualDevice `xml:"device,typeattr"` -} - -func init() { - t["VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo"] = reflect.TypeOf((*VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo)(nil)).Elem() -} - -type VirtualMachineVgpuDeviceInfo struct { - VirtualMachineTargetInfo - - DeviceName string `xml:"deviceName"` - DeviceVendorId int64 `xml:"deviceVendorId"` - MaxFbSizeInGib int64 `xml:"maxFbSizeInGib"` - TimeSlicedCapable bool `xml:"timeSlicedCapable"` - MigCapable bool `xml:"migCapable"` - ComputeProfileCapable bool `xml:"computeProfileCapable"` - QuadroProfileCapable bool `xml:"quadroProfileCapable"` -} - -func init() { - t["VirtualMachineVgpuDeviceInfo"] = reflect.TypeOf((*VirtualMachineVgpuDeviceInfo)(nil)).Elem() -} - -type VirtualMachineVgpuProfileInfo struct { - VirtualMachineTargetInfo - - ProfileName string `xml:"profileName"` - DeviceVendorId int64 `xml:"deviceVendorId"` - FbSizeInGib int64 `xml:"fbSizeInGib"` - ProfileSharing string `xml:"profileSharing"` - ProfileClass string `xml:"profileClass"` -} - -func init() { - t["VirtualMachineVgpuProfileInfo"] = reflect.TypeOf((*VirtualMachineVgpuProfileInfo)(nil)).Elem() -} - -type VirtualMachineVideoCard struct { - VirtualDevice - - VideoRamSizeInKB int64 `xml:"videoRamSizeInKB,omitempty"` - NumDisplays int32 `xml:"numDisplays,omitempty"` - UseAutoDetect *bool `xml:"useAutoDetect"` - Enable3DSupport *bool `xml:"enable3DSupport"` - Use3dRenderer string `xml:"use3dRenderer,omitempty"` - GraphicsMemorySizeInKB int64 `xml:"graphicsMemorySizeInKB,omitempty"` -} - -func init() { - t["VirtualMachineVideoCard"] = reflect.TypeOf((*VirtualMachineVideoCard)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceGroups struct { - DynamicData - - DeviceGroup []BaseVirtualMachineVirtualDeviceGroupsDeviceGroup `xml:"deviceGroup,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineVirtualDeviceGroups"] = reflect.TypeOf((*VirtualMachineVirtualDeviceGroups)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceGroupsDeviceGroup struct { - DynamicData - - GroupInstanceKey int32 `xml:"groupInstanceKey"` - DeviceInfo BaseDescription `xml:"deviceInfo,omitempty,typeattr"` -} - -func init() { - t["VirtualMachineVirtualDeviceGroupsDeviceGroup"] = reflect.TypeOf((*VirtualMachineVirtualDeviceGroupsDeviceGroup)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceGroupsVendorDeviceGroup struct { - VirtualMachineVirtualDeviceGroupsDeviceGroup - - DeviceGroupName string `xml:"deviceGroupName"` -} - -func init() { - t["VirtualMachineVirtualDeviceGroupsVendorDeviceGroup"] = reflect.TypeOf((*VirtualMachineVirtualDeviceGroupsVendorDeviceGroup)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceSwap struct { - DynamicData - - LsiToPvscsi *VirtualMachineVirtualDeviceSwapDeviceSwapInfo `xml:"lsiToPvscsi,omitempty"` -} - -func init() { - t["VirtualMachineVirtualDeviceSwap"] = reflect.TypeOf((*VirtualMachineVirtualDeviceSwap)(nil)).Elem() -} - -type VirtualMachineVirtualDeviceSwapDeviceSwapInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - Applicable *bool `xml:"applicable"` - Status string `xml:"status,omitempty"` -} - -func init() { - t["VirtualMachineVirtualDeviceSwapDeviceSwapInfo"] = reflect.TypeOf((*VirtualMachineVirtualDeviceSwapDeviceSwapInfo)(nil)).Elem() -} - -type VirtualMachineVirtualNuma struct { - DynamicData - - CoresPerNumaNode int32 `xml:"coresPerNumaNode,omitempty"` - ExposeVnumaOnCpuHotadd *bool `xml:"exposeVnumaOnCpuHotadd"` -} - -func init() { - t["VirtualMachineVirtualNuma"] = reflect.TypeOf((*VirtualMachineVirtualNuma)(nil)).Elem() -} - -type VirtualMachineVirtualNumaInfo struct { - DynamicData - - CoresPerNumaNode int32 `xml:"coresPerNumaNode,omitempty"` - AutoCoresPerNumaNode *bool `xml:"autoCoresPerNumaNode"` - VnumaOnCpuHotaddExposed *bool `xml:"vnumaOnCpuHotaddExposed"` -} - -func init() { - t["VirtualMachineVirtualNumaInfo"] = reflect.TypeOf((*VirtualMachineVirtualNumaInfo)(nil)).Elem() -} - -type VirtualMachineVirtualPMem struct { - DynamicData - - SnapshotMode string `xml:"snapshotMode,omitempty"` -} - -func init() { - t["VirtualMachineVirtualPMem"] = reflect.TypeOf((*VirtualMachineVirtualPMem)(nil)).Elem() -} - -type VirtualMachineWindowsQuiesceSpec struct { - VirtualMachineGuestQuiesceSpec - - VssBackupType int32 `xml:"vssBackupType,omitempty"` - VssBootableSystemState *bool `xml:"vssBootableSystemState"` - VssPartialFileSupport *bool `xml:"vssPartialFileSupport"` - VssBackupContext string `xml:"vssBackupContext,omitempty"` -} - -func init() { - t["VirtualMachineWindowsQuiesceSpec"] = reflect.TypeOf((*VirtualMachineWindowsQuiesceSpec)(nil)).Elem() -} - -type VirtualMachineWipeResult struct { - DynamicData - - DiskId int32 `xml:"diskId"` - ShrinkableDiskSpace int64 `xml:"shrinkableDiskSpace"` -} - -func init() { - t["VirtualMachineWipeResult"] = reflect.TypeOf((*VirtualMachineWipeResult)(nil)).Elem() -} - -type VirtualNVDIMM struct { - VirtualDevice - - CapacityInMB int64 `xml:"capacityInMB"` - ConfiguredCapacityInMB int64 `xml:"configuredCapacityInMB,omitempty"` -} - -func init() { - t["VirtualNVDIMM"] = reflect.TypeOf((*VirtualNVDIMM)(nil)).Elem() -} - -type VirtualNVDIMMBackingInfo struct { - VirtualDeviceFileBackingInfo - - Parent *VirtualNVDIMMBackingInfo `xml:"parent,omitempty"` - ChangeId string `xml:"changeId,omitempty"` -} - -func init() { - t["VirtualNVDIMMBackingInfo"] = reflect.TypeOf((*VirtualNVDIMMBackingInfo)(nil)).Elem() -} - -type VirtualNVDIMMController struct { - VirtualController -} - -func init() { - t["VirtualNVDIMMController"] = reflect.TypeOf((*VirtualNVDIMMController)(nil)).Elem() -} - -type VirtualNVDIMMControllerOption struct { - VirtualControllerOption - - NumNVDIMMControllers IntOption `xml:"numNVDIMMControllers"` -} - -func init() { - t["VirtualNVDIMMControllerOption"] = reflect.TypeOf((*VirtualNVDIMMControllerOption)(nil)).Elem() -} - -type VirtualNVDIMMOption struct { - VirtualDeviceOption - - CapacityInMB LongOption `xml:"capacityInMB"` - Growable bool `xml:"growable"` - HotGrowable bool `xml:"hotGrowable"` - GranularityInMB int64 `xml:"granularityInMB"` -} - -func init() { - t["VirtualNVDIMMOption"] = reflect.TypeOf((*VirtualNVDIMMOption)(nil)).Elem() -} - -type VirtualNVMEController struct { - VirtualController -} - -func init() { - t["VirtualNVMEController"] = reflect.TypeOf((*VirtualNVMEController)(nil)).Elem() -} - -type VirtualNVMEControllerOption struct { - VirtualControllerOption - - NumNVMEDisks IntOption `xml:"numNVMEDisks"` -} - -func init() { - t["VirtualNVMEControllerOption"] = reflect.TypeOf((*VirtualNVMEControllerOption)(nil)).Elem() -} - -type VirtualNicManagerNetConfig struct { - DynamicData - - NicType string `xml:"nicType"` - MultiSelectAllowed bool `xml:"multiSelectAllowed"` - CandidateVnic []HostVirtualNic `xml:"candidateVnic,omitempty"` - SelectedVnic []string `xml:"selectedVnic,omitempty"` -} - -func init() { - t["VirtualNicManagerNetConfig"] = reflect.TypeOf((*VirtualNicManagerNetConfig)(nil)).Elem() -} - -type VirtualPCIController struct { - VirtualController -} - -func init() { - t["VirtualPCIController"] = reflect.TypeOf((*VirtualPCIController)(nil)).Elem() -} - -type VirtualPCIControllerOption struct { - VirtualControllerOption - - NumSCSIControllers IntOption `xml:"numSCSIControllers"` - NumEthernetCards IntOption `xml:"numEthernetCards"` - NumVideoCards IntOption `xml:"numVideoCards"` - NumSoundCards IntOption `xml:"numSoundCards"` - NumVmiRoms IntOption `xml:"numVmiRoms"` - NumVmciDevices *IntOption `xml:"numVmciDevices,omitempty"` - NumPCIPassthroughDevices *IntOption `xml:"numPCIPassthroughDevices,omitempty"` - NumSasSCSIControllers *IntOption `xml:"numSasSCSIControllers,omitempty"` - NumVmxnet3EthernetCards *IntOption `xml:"numVmxnet3EthernetCards,omitempty"` - NumParaVirtualSCSIControllers *IntOption `xml:"numParaVirtualSCSIControllers,omitempty"` - NumSATAControllers *IntOption `xml:"numSATAControllers,omitempty"` - NumNVMEControllers *IntOption `xml:"numNVMEControllers,omitempty"` - NumVmxnet3VrdmaEthernetCards *IntOption `xml:"numVmxnet3VrdmaEthernetCards,omitempty"` -} - -func init() { - t["VirtualPCIControllerOption"] = reflect.TypeOf((*VirtualPCIControllerOption)(nil)).Elem() -} - -type VirtualPCIPassthrough struct { - VirtualDevice -} - -func init() { - t["VirtualPCIPassthrough"] = reflect.TypeOf((*VirtualPCIPassthrough)(nil)).Elem() -} - -type VirtualPCIPassthroughAllowedDevice struct { - DynamicData - - VendorId int32 `xml:"vendorId"` - DeviceId int32 `xml:"deviceId"` - SubVendorId int32 `xml:"subVendorId,omitempty"` - SubDeviceId int32 `xml:"subDeviceId,omitempty"` - RevisionId int16 `xml:"revisionId,omitempty"` -} - -func init() { - t["VirtualPCIPassthroughAllowedDevice"] = reflect.TypeOf((*VirtualPCIPassthroughAllowedDevice)(nil)).Elem() -} - -type VirtualPCIPassthroughDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - Id string `xml:"id"` - DeviceId string `xml:"deviceId"` - SystemId string `xml:"systemId"` - VendorId int16 `xml:"vendorId"` -} - -func init() { - t["VirtualPCIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingInfo)(nil)).Elem() -} - -type VirtualPCIPassthroughDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualPCIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughDeviceBackingOption)(nil)).Elem() -} - -type VirtualPCIPassthroughDvxBackingInfo struct { - VirtualDeviceBackingInfo - - DeviceClass string `xml:"deviceClass,omitempty"` - ConfigParams []BaseOptionValue `xml:"configParams,omitempty,typeattr"` -} - -func init() { - t["VirtualPCIPassthroughDvxBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughDvxBackingInfo)(nil)).Elem() -} - -type VirtualPCIPassthroughDvxBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualPCIPassthroughDvxBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughDvxBackingOption)(nil)).Elem() -} - -type VirtualPCIPassthroughDynamicBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - AllowedDevice []VirtualPCIPassthroughAllowedDevice `xml:"allowedDevice,omitempty"` - CustomLabel string `xml:"customLabel,omitempty"` - AssignedId string `xml:"assignedId,omitempty"` -} - -func init() { - t["VirtualPCIPassthroughDynamicBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughDynamicBackingInfo)(nil)).Elem() -} - -type VirtualPCIPassthroughDynamicBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualPCIPassthroughDynamicBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughDynamicBackingOption)(nil)).Elem() -} - -type VirtualPCIPassthroughOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualPCIPassthroughOption"] = reflect.TypeOf((*VirtualPCIPassthroughOption)(nil)).Elem() -} - -type VirtualPCIPassthroughPluginBackingInfo struct { - VirtualDeviceBackingInfo -} - -func init() { - t["VirtualPCIPassthroughPluginBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingInfo)(nil)).Elem() -} - -type VirtualPCIPassthroughPluginBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualPCIPassthroughPluginBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughPluginBackingOption)(nil)).Elem() -} - -type VirtualPCIPassthroughVmiopBackingInfo struct { - VirtualPCIPassthroughPluginBackingInfo - - Vgpu string `xml:"vgpu,omitempty"` - VgpuMigrateDataSizeMB int32 `xml:"vgpuMigrateDataSizeMB,omitempty"` - MigrateSupported *bool `xml:"migrateSupported"` - EnhancedMigrateCapability *bool `xml:"enhancedMigrateCapability"` -} - -func init() { - t["VirtualPCIPassthroughVmiopBackingInfo"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingInfo)(nil)).Elem() -} - -type VirtualPCIPassthroughVmiopBackingOption struct { - VirtualPCIPassthroughPluginBackingOption - - Vgpu StringOption `xml:"vgpu"` - MaxInstances int32 `xml:"maxInstances"` -} - -func init() { - t["VirtualPCIPassthroughVmiopBackingOption"] = reflect.TypeOf((*VirtualPCIPassthroughVmiopBackingOption)(nil)).Elem() -} - -type VirtualPCNet32 struct { - VirtualEthernetCard -} - -func init() { - t["VirtualPCNet32"] = reflect.TypeOf((*VirtualPCNet32)(nil)).Elem() -} - -type VirtualPCNet32Option struct { - VirtualEthernetCardOption - - SupportsMorphing bool `xml:"supportsMorphing"` -} - -func init() { - t["VirtualPCNet32Option"] = reflect.TypeOf((*VirtualPCNet32Option)(nil)).Elem() -} - -type VirtualPS2Controller struct { - VirtualController -} - -func init() { - t["VirtualPS2Controller"] = reflect.TypeOf((*VirtualPS2Controller)(nil)).Elem() -} - -type VirtualPS2ControllerOption struct { - VirtualControllerOption - - NumKeyboards IntOption `xml:"numKeyboards"` - NumPointingDevices IntOption `xml:"numPointingDevices"` -} - -func init() { - t["VirtualPS2ControllerOption"] = reflect.TypeOf((*VirtualPS2ControllerOption)(nil)).Elem() -} - -type VirtualParallelPort struct { - VirtualDevice -} - -func init() { - t["VirtualParallelPort"] = reflect.TypeOf((*VirtualParallelPort)(nil)).Elem() -} - -type VirtualParallelPortDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualParallelPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingInfo)(nil)).Elem() -} - -type VirtualParallelPortDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualParallelPortDeviceBackingOption"] = reflect.TypeOf((*VirtualParallelPortDeviceBackingOption)(nil)).Elem() -} - -type VirtualParallelPortFileBackingInfo struct { - VirtualDeviceFileBackingInfo -} - -func init() { - t["VirtualParallelPortFileBackingInfo"] = reflect.TypeOf((*VirtualParallelPortFileBackingInfo)(nil)).Elem() -} - -type VirtualParallelPortFileBackingOption struct { - VirtualDeviceFileBackingOption -} - -func init() { - t["VirtualParallelPortFileBackingOption"] = reflect.TypeOf((*VirtualParallelPortFileBackingOption)(nil)).Elem() -} - -type VirtualParallelPortOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualParallelPortOption"] = reflect.TypeOf((*VirtualParallelPortOption)(nil)).Elem() -} - -type VirtualPointingDevice struct { - VirtualDevice -} - -func init() { - t["VirtualPointingDevice"] = reflect.TypeOf((*VirtualPointingDevice)(nil)).Elem() -} - -type VirtualPointingDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption - - HostPointingDevice ChoiceOption `xml:"hostPointingDevice"` -} - -func init() { - t["VirtualPointingDeviceBackingOption"] = reflect.TypeOf((*VirtualPointingDeviceBackingOption)(nil)).Elem() -} - -type VirtualPointingDeviceDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - HostPointingDevice string `xml:"hostPointingDevice"` -} - -func init() { - t["VirtualPointingDeviceDeviceBackingInfo"] = reflect.TypeOf((*VirtualPointingDeviceDeviceBackingInfo)(nil)).Elem() -} - -type VirtualPointingDeviceOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualPointingDeviceOption"] = reflect.TypeOf((*VirtualPointingDeviceOption)(nil)).Elem() -} - -type VirtualPrecisionClock struct { - VirtualDevice -} - -func init() { - t["VirtualPrecisionClock"] = reflect.TypeOf((*VirtualPrecisionClock)(nil)).Elem() -} - -type VirtualPrecisionClockOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualPrecisionClockOption"] = reflect.TypeOf((*VirtualPrecisionClockOption)(nil)).Elem() -} - -type VirtualPrecisionClockSystemClockBackingInfo struct { - VirtualDeviceBackingInfo - - Protocol string `xml:"protocol,omitempty"` -} - -func init() { - t["VirtualPrecisionClockSystemClockBackingInfo"] = reflect.TypeOf((*VirtualPrecisionClockSystemClockBackingInfo)(nil)).Elem() -} - -type VirtualPrecisionClockSystemClockBackingOption struct { - VirtualDeviceBackingOption - - Protocol ChoiceOption `xml:"protocol"` -} - -func init() { - t["VirtualPrecisionClockSystemClockBackingOption"] = reflect.TypeOf((*VirtualPrecisionClockSystemClockBackingOption)(nil)).Elem() -} - -type VirtualSATAController struct { - VirtualController -} - -func init() { - t["VirtualSATAController"] = reflect.TypeOf((*VirtualSATAController)(nil)).Elem() -} - -type VirtualSATAControllerOption struct { - VirtualControllerOption - - NumSATADisks IntOption `xml:"numSATADisks"` - NumSATACdroms IntOption `xml:"numSATACdroms"` -} - -func init() { - t["VirtualSATAControllerOption"] = reflect.TypeOf((*VirtualSATAControllerOption)(nil)).Elem() -} - -type VirtualSCSIController struct { - VirtualController - - HotAddRemove *bool `xml:"hotAddRemove"` - SharedBus VirtualSCSISharing `xml:"sharedBus"` - ScsiCtlrUnitNumber int32 `xml:"scsiCtlrUnitNumber,omitempty"` -} - -func init() { - t["VirtualSCSIController"] = reflect.TypeOf((*VirtualSCSIController)(nil)).Elem() -} - -type VirtualSCSIControllerOption struct { - VirtualControllerOption - - NumSCSIDisks IntOption `xml:"numSCSIDisks"` - NumSCSICdroms IntOption `xml:"numSCSICdroms"` - NumSCSIPassthrough IntOption `xml:"numSCSIPassthrough"` - Sharing []VirtualSCSISharing `xml:"sharing"` - DefaultSharedIndex int32 `xml:"defaultSharedIndex"` - HotAddRemove BoolOption `xml:"hotAddRemove"` - ScsiCtlrUnitNumber int32 `xml:"scsiCtlrUnitNumber"` -} - -func init() { - t["VirtualSCSIControllerOption"] = reflect.TypeOf((*VirtualSCSIControllerOption)(nil)).Elem() -} - -type VirtualSCSIPassthrough struct { - VirtualDevice -} - -func init() { - t["VirtualSCSIPassthrough"] = reflect.TypeOf((*VirtualSCSIPassthrough)(nil)).Elem() -} - -type VirtualSCSIPassthroughDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualSCSIPassthroughDeviceBackingInfo"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingInfo)(nil)).Elem() -} - -type VirtualSCSIPassthroughDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualSCSIPassthroughDeviceBackingOption"] = reflect.TypeOf((*VirtualSCSIPassthroughDeviceBackingOption)(nil)).Elem() -} - -type VirtualSCSIPassthroughOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualSCSIPassthroughOption"] = reflect.TypeOf((*VirtualSCSIPassthroughOption)(nil)).Elem() -} - -type VirtualSIOController struct { - VirtualController -} - -func init() { - t["VirtualSIOController"] = reflect.TypeOf((*VirtualSIOController)(nil)).Elem() -} - -type VirtualSIOControllerOption struct { - VirtualControllerOption - - NumFloppyDrives IntOption `xml:"numFloppyDrives"` - NumSerialPorts IntOption `xml:"numSerialPorts"` - NumParallelPorts IntOption `xml:"numParallelPorts"` -} - -func init() { - t["VirtualSIOControllerOption"] = reflect.TypeOf((*VirtualSIOControllerOption)(nil)).Elem() -} - -type VirtualSerialPort struct { - VirtualDevice - - YieldOnPoll bool `xml:"yieldOnPoll"` -} - -func init() { - t["VirtualSerialPort"] = reflect.TypeOf((*VirtualSerialPort)(nil)).Elem() -} - -type VirtualSerialPortDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualSerialPortDeviceBackingInfo"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingInfo)(nil)).Elem() -} - -type VirtualSerialPortDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualSerialPortDeviceBackingOption"] = reflect.TypeOf((*VirtualSerialPortDeviceBackingOption)(nil)).Elem() -} - -type VirtualSerialPortFileBackingInfo struct { - VirtualDeviceFileBackingInfo -} - -func init() { - t["VirtualSerialPortFileBackingInfo"] = reflect.TypeOf((*VirtualSerialPortFileBackingInfo)(nil)).Elem() -} - -type VirtualSerialPortFileBackingOption struct { - VirtualDeviceFileBackingOption -} - -func init() { - t["VirtualSerialPortFileBackingOption"] = reflect.TypeOf((*VirtualSerialPortFileBackingOption)(nil)).Elem() -} - -type VirtualSerialPortOption struct { - VirtualDeviceOption - - YieldOnPoll BoolOption `xml:"yieldOnPoll"` -} - -func init() { - t["VirtualSerialPortOption"] = reflect.TypeOf((*VirtualSerialPortOption)(nil)).Elem() -} - -type VirtualSerialPortPipeBackingInfo struct { - VirtualDevicePipeBackingInfo - - Endpoint string `xml:"endpoint"` - NoRxLoss *bool `xml:"noRxLoss"` -} - -func init() { - t["VirtualSerialPortPipeBackingInfo"] = reflect.TypeOf((*VirtualSerialPortPipeBackingInfo)(nil)).Elem() -} - -type VirtualSerialPortPipeBackingOption struct { - VirtualDevicePipeBackingOption - - Endpoint ChoiceOption `xml:"endpoint"` - NoRxLoss BoolOption `xml:"noRxLoss"` -} - -func init() { - t["VirtualSerialPortPipeBackingOption"] = reflect.TypeOf((*VirtualSerialPortPipeBackingOption)(nil)).Elem() -} - -type VirtualSerialPortThinPrintBackingInfo struct { - VirtualDeviceBackingInfo -} - -func init() { - t["VirtualSerialPortThinPrintBackingInfo"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingInfo)(nil)).Elem() -} - -type VirtualSerialPortThinPrintBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualSerialPortThinPrintBackingOption"] = reflect.TypeOf((*VirtualSerialPortThinPrintBackingOption)(nil)).Elem() -} - -type VirtualSerialPortURIBackingInfo struct { - VirtualDeviceURIBackingInfo -} - -func init() { - t["VirtualSerialPortURIBackingInfo"] = reflect.TypeOf((*VirtualSerialPortURIBackingInfo)(nil)).Elem() -} - -type VirtualSerialPortURIBackingOption struct { - VirtualDeviceURIBackingOption -} - -func init() { - t["VirtualSerialPortURIBackingOption"] = reflect.TypeOf((*VirtualSerialPortURIBackingOption)(nil)).Elem() -} - -type VirtualSoundBlaster16 struct { - VirtualSoundCard -} - -func init() { - t["VirtualSoundBlaster16"] = reflect.TypeOf((*VirtualSoundBlaster16)(nil)).Elem() -} - -type VirtualSoundBlaster16Option struct { - VirtualSoundCardOption -} - -func init() { - t["VirtualSoundBlaster16Option"] = reflect.TypeOf((*VirtualSoundBlaster16Option)(nil)).Elem() -} - -type VirtualSoundCard struct { - VirtualDevice -} - -func init() { - t["VirtualSoundCard"] = reflect.TypeOf((*VirtualSoundCard)(nil)).Elem() -} - -type VirtualSoundCardDeviceBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualSoundCardDeviceBackingInfo"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingInfo)(nil)).Elem() -} - -type VirtualSoundCardDeviceBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualSoundCardDeviceBackingOption"] = reflect.TypeOf((*VirtualSoundCardDeviceBackingOption)(nil)).Elem() -} - -type VirtualSoundCardOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualSoundCardOption"] = reflect.TypeOf((*VirtualSoundCardOption)(nil)).Elem() -} - -type VirtualSriovEthernetCard struct { - VirtualEthernetCard - - AllowGuestOSMtuChange *bool `xml:"allowGuestOSMtuChange"` - SriovBacking *VirtualSriovEthernetCardSriovBackingInfo `xml:"sriovBacking,omitempty"` - DvxBackingInfo *VirtualPCIPassthroughDvxBackingInfo `xml:"dvxBackingInfo,omitempty"` -} - -func init() { - t["VirtualSriovEthernetCard"] = reflect.TypeOf((*VirtualSriovEthernetCard)(nil)).Elem() -} - -type VirtualSriovEthernetCardOption struct { - VirtualEthernetCardOption -} - -func init() { - t["VirtualSriovEthernetCardOption"] = reflect.TypeOf((*VirtualSriovEthernetCardOption)(nil)).Elem() -} - -type VirtualSriovEthernetCardSriovBackingInfo struct { - VirtualDeviceBackingInfo - - PhysicalFunctionBacking *VirtualPCIPassthroughDeviceBackingInfo `xml:"physicalFunctionBacking,omitempty"` - VirtualFunctionBacking *VirtualPCIPassthroughDeviceBackingInfo `xml:"virtualFunctionBacking,omitempty"` - VirtualFunctionIndex int32 `xml:"virtualFunctionIndex,omitempty"` -} - -func init() { - t["VirtualSriovEthernetCardSriovBackingInfo"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingInfo)(nil)).Elem() -} - -type VirtualSriovEthernetCardSriovBackingOption struct { - VirtualDeviceBackingOption -} - -func init() { - t["VirtualSriovEthernetCardSriovBackingOption"] = reflect.TypeOf((*VirtualSriovEthernetCardSriovBackingOption)(nil)).Elem() -} - -type VirtualSwitchProfile struct { - ApplyProfile - - Key string `xml:"key"` - Name string `xml:"name"` - Link LinkProfile `xml:"link"` - NumPorts NumPortsProfile `xml:"numPorts"` - NetworkPolicy NetworkPolicyProfile `xml:"networkPolicy"` -} - -func init() { - t["VirtualSwitchProfile"] = reflect.TypeOf((*VirtualSwitchProfile)(nil)).Elem() -} - -type VirtualSwitchSelectionProfile struct { - ApplyProfile -} - -func init() { - t["VirtualSwitchSelectionProfile"] = reflect.TypeOf((*VirtualSwitchSelectionProfile)(nil)).Elem() -} - -type VirtualTPM struct { - VirtualDevice - - EndorsementKeyCertificateSigningRequest [][]byte `xml:"endorsementKeyCertificateSigningRequest,omitempty"` - EndorsementKeyCertificate [][]byte `xml:"endorsementKeyCertificate,omitempty"` -} - -func init() { - t["VirtualTPM"] = reflect.TypeOf((*VirtualTPM)(nil)).Elem() -} - -type VirtualTPMOption struct { - VirtualDeviceOption - - SupportedFirmware []string `xml:"supportedFirmware,omitempty"` -} - -func init() { - t["VirtualTPMOption"] = reflect.TypeOf((*VirtualTPMOption)(nil)).Elem() -} - -type VirtualUSB struct { - VirtualDevice - - Connected bool `xml:"connected"` - Vendor int32 `xml:"vendor,omitempty"` - Product int32 `xml:"product,omitempty"` - Family []string `xml:"family,omitempty"` - Speed []string `xml:"speed,omitempty"` -} - -func init() { - t["VirtualUSB"] = reflect.TypeOf((*VirtualUSB)(nil)).Elem() -} - -type VirtualUSBController struct { - VirtualController - - AutoConnectDevices *bool `xml:"autoConnectDevices"` - EhciEnabled *bool `xml:"ehciEnabled"` -} - -func init() { - t["VirtualUSBController"] = reflect.TypeOf((*VirtualUSBController)(nil)).Elem() -} - -type VirtualUSBControllerOption struct { - VirtualControllerOption - - AutoConnectDevices BoolOption `xml:"autoConnectDevices"` - EhciSupported BoolOption `xml:"ehciSupported"` - SupportedSpeeds []string `xml:"supportedSpeeds,omitempty"` -} - -func init() { - t["VirtualUSBControllerOption"] = reflect.TypeOf((*VirtualUSBControllerOption)(nil)).Elem() -} - -type VirtualUSBControllerPciBusSlotInfo struct { - VirtualDevicePciBusSlotInfo - - EhciPciSlotNumber int32 `xml:"ehciPciSlotNumber,omitempty"` -} - -func init() { - t["VirtualUSBControllerPciBusSlotInfo"] = reflect.TypeOf((*VirtualUSBControllerPciBusSlotInfo)(nil)).Elem() -} - -type VirtualUSBOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualUSBOption"] = reflect.TypeOf((*VirtualUSBOption)(nil)).Elem() -} - -type VirtualUSBRemoteClientBackingInfo struct { - VirtualDeviceRemoteDeviceBackingInfo - - Hostname string `xml:"hostname"` -} - -func init() { - t["VirtualUSBRemoteClientBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingInfo)(nil)).Elem() -} - -type VirtualUSBRemoteClientBackingOption struct { - VirtualDeviceRemoteDeviceBackingOption -} - -func init() { - t["VirtualUSBRemoteClientBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteClientBackingOption)(nil)).Elem() -} - -type VirtualUSBRemoteHostBackingInfo struct { - VirtualDeviceDeviceBackingInfo - - Hostname string `xml:"hostname"` -} - -func init() { - t["VirtualUSBRemoteHostBackingInfo"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingInfo)(nil)).Elem() -} - -type VirtualUSBRemoteHostBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualUSBRemoteHostBackingOption"] = reflect.TypeOf((*VirtualUSBRemoteHostBackingOption)(nil)).Elem() -} - -type VirtualUSBUSBBackingInfo struct { - VirtualDeviceDeviceBackingInfo -} - -func init() { - t["VirtualUSBUSBBackingInfo"] = reflect.TypeOf((*VirtualUSBUSBBackingInfo)(nil)).Elem() -} - -type VirtualUSBUSBBackingOption struct { - VirtualDeviceDeviceBackingOption -} - -func init() { - t["VirtualUSBUSBBackingOption"] = reflect.TypeOf((*VirtualUSBUSBBackingOption)(nil)).Elem() -} - -type VirtualUSBXHCIController struct { - VirtualController - - AutoConnectDevices *bool `xml:"autoConnectDevices"` -} - -func init() { - t["VirtualUSBXHCIController"] = reflect.TypeOf((*VirtualUSBXHCIController)(nil)).Elem() -} - -type VirtualUSBXHCIControllerOption struct { - VirtualControllerOption - - AutoConnectDevices BoolOption `xml:"autoConnectDevices"` - SupportedSpeeds []string `xml:"supportedSpeeds"` -} - -func init() { - t["VirtualUSBXHCIControllerOption"] = reflect.TypeOf((*VirtualUSBXHCIControllerOption)(nil)).Elem() -} - -type VirtualVMIROMOption struct { - VirtualDeviceOption -} - -func init() { - t["VirtualVMIROMOption"] = reflect.TypeOf((*VirtualVMIROMOption)(nil)).Elem() -} - -type VirtualVideoCardOption struct { - VirtualDeviceOption - - VideoRamSizeInKB *LongOption `xml:"videoRamSizeInKB,omitempty"` - NumDisplays *IntOption `xml:"numDisplays,omitempty"` - UseAutoDetect *BoolOption `xml:"useAutoDetect,omitempty"` - Support3D *BoolOption `xml:"support3D,omitempty"` - Use3dRendererSupported *BoolOption `xml:"use3dRendererSupported,omitempty"` - GraphicsMemorySizeInKB *LongOption `xml:"graphicsMemorySizeInKB,omitempty"` - GraphicsMemorySizeSupported *BoolOption `xml:"graphicsMemorySizeSupported,omitempty"` -} - -func init() { - t["VirtualVideoCardOption"] = reflect.TypeOf((*VirtualVideoCardOption)(nil)).Elem() -} - -type VirtualVmxnet struct { - VirtualEthernetCard -} - -func init() { - t["VirtualVmxnet"] = reflect.TypeOf((*VirtualVmxnet)(nil)).Elem() -} - -type VirtualVmxnet2 struct { - VirtualVmxnet -} - -func init() { - t["VirtualVmxnet2"] = reflect.TypeOf((*VirtualVmxnet2)(nil)).Elem() -} - -type VirtualVmxnet2Option struct { - VirtualVmxnetOption -} - -func init() { - t["VirtualVmxnet2Option"] = reflect.TypeOf((*VirtualVmxnet2Option)(nil)).Elem() -} - -type VirtualVmxnet3 struct { - VirtualVmxnet - - Uptv2Enabled *bool `xml:"uptv2Enabled"` -} - -func init() { - t["VirtualVmxnet3"] = reflect.TypeOf((*VirtualVmxnet3)(nil)).Elem() -} - -type VirtualVmxnet3Option struct { - VirtualVmxnetOption - - Uptv2Enabled *BoolOption `xml:"uptv2Enabled,omitempty"` -} - -func init() { - t["VirtualVmxnet3Option"] = reflect.TypeOf((*VirtualVmxnet3Option)(nil)).Elem() -} - -type VirtualVmxnet3Vrdma struct { - VirtualVmxnet3 - - DeviceProtocol string `xml:"deviceProtocol,omitempty"` -} - -func init() { - t["VirtualVmxnet3Vrdma"] = reflect.TypeOf((*VirtualVmxnet3Vrdma)(nil)).Elem() -} - -type VirtualVmxnet3VrdmaOption struct { - VirtualVmxnet3Option - - DeviceProtocol *ChoiceOption `xml:"deviceProtocol,omitempty"` -} - -func init() { - t["VirtualVmxnet3VrdmaOption"] = reflect.TypeOf((*VirtualVmxnet3VrdmaOption)(nil)).Elem() -} - -type VirtualVmxnetOption struct { - VirtualEthernetCardOption -} - -func init() { - t["VirtualVmxnetOption"] = reflect.TypeOf((*VirtualVmxnetOption)(nil)).Elem() -} - -type VirtualWDT struct { - VirtualDevice - - RunOnBoot bool `xml:"runOnBoot"` - Running bool `xml:"running"` -} - -func init() { - t["VirtualWDT"] = reflect.TypeOf((*VirtualWDT)(nil)).Elem() -} - -type VirtualWDTOption struct { - VirtualDeviceOption - - RunOnBoot BoolOption `xml:"runOnBoot"` -} - -func init() { - t["VirtualWDTOption"] = reflect.TypeOf((*VirtualWDTOption)(nil)).Elem() -} - -type VlanProfile struct { - ApplyProfile -} - -func init() { - t["VlanProfile"] = reflect.TypeOf((*VlanProfile)(nil)).Elem() -} - -type VmAcquiredMksTicketEvent struct { - VmEvent -} - -func init() { - t["VmAcquiredMksTicketEvent"] = reflect.TypeOf((*VmAcquiredMksTicketEvent)(nil)).Elem() -} - -type VmAcquiredTicketEvent struct { - VmEvent - - TicketType string `xml:"ticketType"` -} - -func init() { - t["VmAcquiredTicketEvent"] = reflect.TypeOf((*VmAcquiredTicketEvent)(nil)).Elem() -} - -type VmAlreadyExistsInDatacenter struct { - InvalidFolder - - Host ManagedObjectReference `xml:"host"` - Hostname string `xml:"hostname"` - Vm []ManagedObjectReference `xml:"vm"` -} - -func init() { - t["VmAlreadyExistsInDatacenter"] = reflect.TypeOf((*VmAlreadyExistsInDatacenter)(nil)).Elem() -} - -type VmAlreadyExistsInDatacenterFault VmAlreadyExistsInDatacenter - -func init() { - t["VmAlreadyExistsInDatacenterFault"] = reflect.TypeOf((*VmAlreadyExistsInDatacenterFault)(nil)).Elem() -} - -type VmAutoRenameEvent struct { - VmEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["VmAutoRenameEvent"] = reflect.TypeOf((*VmAutoRenameEvent)(nil)).Elem() -} - -type VmBeingClonedEvent struct { - VmCloneEvent - - DestFolder FolderEventArgument `xml:"destFolder"` - DestName string `xml:"destName"` - DestHost HostEventArgument `xml:"destHost"` -} - -func init() { - t["VmBeingClonedEvent"] = reflect.TypeOf((*VmBeingClonedEvent)(nil)).Elem() -} - -type VmBeingClonedNoFolderEvent struct { - VmCloneEvent - - DestName string `xml:"destName"` - DestHost HostEventArgument `xml:"destHost"` -} - -func init() { - t["VmBeingClonedNoFolderEvent"] = reflect.TypeOf((*VmBeingClonedNoFolderEvent)(nil)).Elem() -} - -type VmBeingCreatedEvent struct { - VmEvent - - ConfigSpec *VirtualMachineConfigSpec `xml:"configSpec,omitempty"` -} - -func init() { - t["VmBeingCreatedEvent"] = reflect.TypeOf((*VmBeingCreatedEvent)(nil)).Elem() -} - -type VmBeingDeployedEvent struct { - VmEvent - - SrcTemplate VmEventArgument `xml:"srcTemplate"` -} - -func init() { - t["VmBeingDeployedEvent"] = reflect.TypeOf((*VmBeingDeployedEvent)(nil)).Elem() -} - -type VmBeingHotMigratedEvent struct { - VmEvent - - DestHost HostEventArgument `xml:"destHost"` - DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` - DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` -} - -func init() { - t["VmBeingHotMigratedEvent"] = reflect.TypeOf((*VmBeingHotMigratedEvent)(nil)).Elem() -} - -type VmBeingMigratedEvent struct { - VmEvent - - DestHost HostEventArgument `xml:"destHost"` - DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` - DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` -} - -func init() { - t["VmBeingMigratedEvent"] = reflect.TypeOf((*VmBeingMigratedEvent)(nil)).Elem() -} - -type VmBeingRelocatedEvent struct { - VmRelocateSpecEvent - - DestHost HostEventArgument `xml:"destHost"` - DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` - DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` -} - -func init() { - t["VmBeingRelocatedEvent"] = reflect.TypeOf((*VmBeingRelocatedEvent)(nil)).Elem() -} - -type VmCloneEvent struct { - VmEvent -} - -func init() { - t["VmCloneEvent"] = reflect.TypeOf((*VmCloneEvent)(nil)).Elem() -} - -type VmCloneFailedEvent struct { - VmCloneEvent - - DestFolder FolderEventArgument `xml:"destFolder"` - DestName string `xml:"destName"` - DestHost HostEventArgument `xml:"destHost"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmCloneFailedEvent"] = reflect.TypeOf((*VmCloneFailedEvent)(nil)).Elem() -} - -type VmClonedEvent struct { - VmCloneEvent - - SourceVm VmEventArgument `xml:"sourceVm"` -} - -func init() { - t["VmClonedEvent"] = reflect.TypeOf((*VmClonedEvent)(nil)).Elem() -} - -type VmConfigFault struct { - VimFault -} - -func init() { - t["VmConfigFault"] = reflect.TypeOf((*VmConfigFault)(nil)).Elem() -} - -type VmConfigFaultFault BaseVmConfigFault - -func init() { - t["VmConfigFaultFault"] = reflect.TypeOf((*VmConfigFaultFault)(nil)).Elem() -} - -type VmConfigFileEncryptionInfo struct { - DynamicData - - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["VmConfigFileEncryptionInfo"] = reflect.TypeOf((*VmConfigFileEncryptionInfo)(nil)).Elem() -} - -type VmConfigFileInfo struct { - FileInfo - - ConfigVersion int32 `xml:"configVersion,omitempty"` - Encryption *VmConfigFileEncryptionInfo `xml:"encryption,omitempty"` -} - -func init() { - t["VmConfigFileInfo"] = reflect.TypeOf((*VmConfigFileInfo)(nil)).Elem() -} - -type VmConfigFileQuery struct { - FileQuery - - Filter *VmConfigFileQueryFilter `xml:"filter,omitempty"` - Details *VmConfigFileQueryFlags `xml:"details,omitempty"` -} - -func init() { - t["VmConfigFileQuery"] = reflect.TypeOf((*VmConfigFileQuery)(nil)).Elem() -} - -type VmConfigFileQueryFilter struct { - DynamicData - - MatchConfigVersion []int32 `xml:"matchConfigVersion,omitempty"` - Encrypted *bool `xml:"encrypted"` -} - -func init() { - t["VmConfigFileQueryFilter"] = reflect.TypeOf((*VmConfigFileQueryFilter)(nil)).Elem() -} - -type VmConfigFileQueryFlags struct { - DynamicData - - ConfigVersion bool `xml:"configVersion"` - Encryption *bool `xml:"encryption"` -} - -func init() { - t["VmConfigFileQueryFlags"] = reflect.TypeOf((*VmConfigFileQueryFlags)(nil)).Elem() -} - -type VmConfigIncompatibleForFaultTolerance struct { - VmConfigFault - - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["VmConfigIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmConfigIncompatibleForFaultTolerance)(nil)).Elem() -} - -type VmConfigIncompatibleForFaultToleranceFault VmConfigIncompatibleForFaultTolerance - -func init() { - t["VmConfigIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmConfigIncompatibleForFaultToleranceFault)(nil)).Elem() -} - -type VmConfigIncompatibleForRecordReplay struct { - VmConfigFault - - Fault *LocalizedMethodFault `xml:"fault,omitempty"` -} - -func init() { - t["VmConfigIncompatibleForRecordReplay"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplay)(nil)).Elem() -} - -type VmConfigIncompatibleForRecordReplayFault VmConfigIncompatibleForRecordReplay - -func init() { - t["VmConfigIncompatibleForRecordReplayFault"] = reflect.TypeOf((*VmConfigIncompatibleForRecordReplayFault)(nil)).Elem() -} - -type VmConfigInfo struct { - DynamicData - - Product []VAppProductInfo `xml:"product,omitempty"` - Property []VAppPropertyInfo `xml:"property,omitempty"` - IpAssignment VAppIPAssignmentInfo `xml:"ipAssignment"` - Eula []string `xml:"eula,omitempty"` - OvfSection []VAppOvfSectionInfo `xml:"ovfSection,omitempty"` - OvfEnvironmentTransport []string `xml:"ovfEnvironmentTransport,omitempty"` - InstallBootRequired bool `xml:"installBootRequired"` - InstallBootStopDelay int32 `xml:"installBootStopDelay"` -} - -func init() { - t["VmConfigInfo"] = reflect.TypeOf((*VmConfigInfo)(nil)).Elem() -} - -type VmConfigMissingEvent struct { - VmEvent -} - -func init() { - t["VmConfigMissingEvent"] = reflect.TypeOf((*VmConfigMissingEvent)(nil)).Elem() -} - -type VmConfigSpec struct { - DynamicData - - Product []VAppProductSpec `xml:"product,omitempty"` - Property []VAppPropertySpec `xml:"property,omitempty"` - IpAssignment *VAppIPAssignmentInfo `xml:"ipAssignment,omitempty"` - Eula []string `xml:"eula,omitempty"` - OvfSection []VAppOvfSectionSpec `xml:"ovfSection,omitempty"` - OvfEnvironmentTransport []string `xml:"ovfEnvironmentTransport,omitempty"` - InstallBootRequired *bool `xml:"installBootRequired"` - InstallBootStopDelay int32 `xml:"installBootStopDelay,omitempty"` -} - -func init() { - t["VmConfigSpec"] = reflect.TypeOf((*VmConfigSpec)(nil)).Elem() -} - -type VmConnectedEvent struct { - VmEvent -} - -func init() { - t["VmConnectedEvent"] = reflect.TypeOf((*VmConnectedEvent)(nil)).Elem() -} - -type VmCreatedEvent struct { - VmEvent -} - -func init() { - t["VmCreatedEvent"] = reflect.TypeOf((*VmCreatedEvent)(nil)).Elem() -} - -type VmDasBeingResetEvent struct { - VmEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VmDasBeingResetEvent"] = reflect.TypeOf((*VmDasBeingResetEvent)(nil)).Elem() -} - -type VmDasBeingResetWithScreenshotEvent struct { - VmDasBeingResetEvent - - ScreenshotFilePath string `xml:"screenshotFilePath"` -} - -func init() { - t["VmDasBeingResetWithScreenshotEvent"] = reflect.TypeOf((*VmDasBeingResetWithScreenshotEvent)(nil)).Elem() -} - -type VmDasResetFailedEvent struct { - VmEvent -} - -func init() { - t["VmDasResetFailedEvent"] = reflect.TypeOf((*VmDasResetFailedEvent)(nil)).Elem() -} - -type VmDasUpdateErrorEvent struct { - VmEvent -} - -func init() { - t["VmDasUpdateErrorEvent"] = reflect.TypeOf((*VmDasUpdateErrorEvent)(nil)).Elem() -} - -type VmDasUpdateOkEvent struct { - VmEvent -} - -func init() { - t["VmDasUpdateOkEvent"] = reflect.TypeOf((*VmDasUpdateOkEvent)(nil)).Elem() -} - -type VmDateRolledBackEvent struct { - VmEvent -} - -func init() { - t["VmDateRolledBackEvent"] = reflect.TypeOf((*VmDateRolledBackEvent)(nil)).Elem() -} - -type VmDeployFailedEvent struct { - VmEvent - - DestDatastore BaseEntityEventArgument `xml:"destDatastore,typeattr"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmDeployFailedEvent"] = reflect.TypeOf((*VmDeployFailedEvent)(nil)).Elem() -} - -type VmDeployedEvent struct { - VmEvent - - SrcTemplate VmEventArgument `xml:"srcTemplate"` -} - -func init() { - t["VmDeployedEvent"] = reflect.TypeOf((*VmDeployedEvent)(nil)).Elem() -} - -type VmDisconnectedEvent struct { - VmEvent -} - -func init() { - t["VmDisconnectedEvent"] = reflect.TypeOf((*VmDisconnectedEvent)(nil)).Elem() -} - -type VmDiscoveredEvent struct { - VmEvent -} - -func init() { - t["VmDiscoveredEvent"] = reflect.TypeOf((*VmDiscoveredEvent)(nil)).Elem() -} - -type VmDiskFailedEvent struct { - VmEvent - - Disk string `xml:"disk"` - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmDiskFailedEvent"] = reflect.TypeOf((*VmDiskFailedEvent)(nil)).Elem() -} - -type VmDiskFileEncryptionInfo struct { - DynamicData - - KeyId *CryptoKeyId `xml:"keyId,omitempty"` -} - -func init() { - t["VmDiskFileEncryptionInfo"] = reflect.TypeOf((*VmDiskFileEncryptionInfo)(nil)).Elem() -} - -type VmDiskFileInfo struct { - FileInfo - - DiskType string `xml:"diskType,omitempty"` - CapacityKb int64 `xml:"capacityKb,omitempty"` - HardwareVersion int32 `xml:"hardwareVersion,omitempty"` - ControllerType string `xml:"controllerType,omitempty"` - DiskExtents []string `xml:"diskExtents,omitempty"` - Thin *bool `xml:"thin"` - Encryption *VmDiskFileEncryptionInfo `xml:"encryption,omitempty"` -} - -func init() { - t["VmDiskFileInfo"] = reflect.TypeOf((*VmDiskFileInfo)(nil)).Elem() -} - -type VmDiskFileQuery struct { - FileQuery - - Filter *VmDiskFileQueryFilter `xml:"filter,omitempty"` - Details *VmDiskFileQueryFlags `xml:"details,omitempty"` -} - -func init() { - t["VmDiskFileQuery"] = reflect.TypeOf((*VmDiskFileQuery)(nil)).Elem() -} - -type VmDiskFileQueryFilter struct { - DynamicData - - DiskType []string `xml:"diskType,omitempty"` - MatchHardwareVersion []int32 `xml:"matchHardwareVersion,omitempty"` - ControllerType []string `xml:"controllerType,omitempty"` - Thin *bool `xml:"thin"` - Encrypted *bool `xml:"encrypted"` -} - -func init() { - t["VmDiskFileQueryFilter"] = reflect.TypeOf((*VmDiskFileQueryFilter)(nil)).Elem() -} - -type VmDiskFileQueryFlags struct { - DynamicData - - DiskType bool `xml:"diskType"` - CapacityKb bool `xml:"capacityKb"` - HardwareVersion bool `xml:"hardwareVersion"` - ControllerType *bool `xml:"controllerType"` - DiskExtents *bool `xml:"diskExtents"` - Thin *bool `xml:"thin"` - Encryption *bool `xml:"encryption"` -} - -func init() { - t["VmDiskFileQueryFlags"] = reflect.TypeOf((*VmDiskFileQueryFlags)(nil)).Elem() -} - -type VmEmigratingEvent struct { - VmEvent -} - -func init() { - t["VmEmigratingEvent"] = reflect.TypeOf((*VmEmigratingEvent)(nil)).Elem() -} - -type VmEndRecordingEvent struct { - VmEvent -} - -func init() { - t["VmEndRecordingEvent"] = reflect.TypeOf((*VmEndRecordingEvent)(nil)).Elem() -} - -type VmEndReplayingEvent struct { - VmEvent -} - -func init() { - t["VmEndReplayingEvent"] = reflect.TypeOf((*VmEndReplayingEvent)(nil)).Elem() -} - -type VmEvent struct { - Event - - Template bool `xml:"template"` -} - -func init() { - t["VmEvent"] = reflect.TypeOf((*VmEvent)(nil)).Elem() -} - -type VmEventArgument struct { - EntityEventArgument - - Vm ManagedObjectReference `xml:"vm"` -} - -func init() { - t["VmEventArgument"] = reflect.TypeOf((*VmEventArgument)(nil)).Elem() -} - -type VmFailedMigrateEvent struct { - VmEvent - - DestHost HostEventArgument `xml:"destHost"` - Reason LocalizedMethodFault `xml:"reason"` - DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` - DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` -} - -func init() { - t["VmFailedMigrateEvent"] = reflect.TypeOf((*VmFailedMigrateEvent)(nil)).Elem() -} - -type VmFailedRelayoutEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedRelayoutEvent"] = reflect.TypeOf((*VmFailedRelayoutEvent)(nil)).Elem() -} - -type VmFailedRelayoutOnVmfs2DatastoreEvent struct { - VmEvent -} - -func init() { - t["VmFailedRelayoutOnVmfs2DatastoreEvent"] = reflect.TypeOf((*VmFailedRelayoutOnVmfs2DatastoreEvent)(nil)).Elem() -} - -type VmFailedStartingSecondaryEvent struct { - VmEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VmFailedStartingSecondaryEvent"] = reflect.TypeOf((*VmFailedStartingSecondaryEvent)(nil)).Elem() -} - -type VmFailedToPowerOffEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToPowerOffEvent"] = reflect.TypeOf((*VmFailedToPowerOffEvent)(nil)).Elem() -} - -type VmFailedToPowerOnEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToPowerOnEvent"] = reflect.TypeOf((*VmFailedToPowerOnEvent)(nil)).Elem() -} - -type VmFailedToRebootGuestEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToRebootGuestEvent"] = reflect.TypeOf((*VmFailedToRebootGuestEvent)(nil)).Elem() -} - -type VmFailedToResetEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToResetEvent"] = reflect.TypeOf((*VmFailedToResetEvent)(nil)).Elem() -} - -type VmFailedToShutdownGuestEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToShutdownGuestEvent"] = reflect.TypeOf((*VmFailedToShutdownGuestEvent)(nil)).Elem() -} - -type VmFailedToStandbyGuestEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToStandbyGuestEvent"] = reflect.TypeOf((*VmFailedToStandbyGuestEvent)(nil)).Elem() -} - -type VmFailedToSuspendEvent struct { - VmEvent - - Reason LocalizedMethodFault `xml:"reason"` -} - -func init() { - t["VmFailedToSuspendEvent"] = reflect.TypeOf((*VmFailedToSuspendEvent)(nil)).Elem() -} - -type VmFailedUpdatingSecondaryConfig struct { - VmEvent -} - -func init() { - t["VmFailedUpdatingSecondaryConfig"] = reflect.TypeOf((*VmFailedUpdatingSecondaryConfig)(nil)).Elem() -} - -type VmFailoverFailed struct { - VmEvent - - Reason *LocalizedMethodFault `xml:"reason,omitempty"` -} - -func init() { - t["VmFailoverFailed"] = reflect.TypeOf((*VmFailoverFailed)(nil)).Elem() -} - -type VmFaultToleranceConfigIssue struct { - VmFaultToleranceIssue - - Reason string `xml:"reason,omitempty"` - EntityName string `xml:"entityName,omitempty"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` -} - -func init() { - t["VmFaultToleranceConfigIssue"] = reflect.TypeOf((*VmFaultToleranceConfigIssue)(nil)).Elem() -} - -type VmFaultToleranceConfigIssueFault VmFaultToleranceConfigIssue - -func init() { - t["VmFaultToleranceConfigIssueFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueFault)(nil)).Elem() -} - -type VmFaultToleranceConfigIssueWrapper struct { - VmFaultToleranceIssue - - EntityName string `xml:"entityName,omitempty"` - Entity *ManagedObjectReference `xml:"entity,omitempty"` - Error *LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["VmFaultToleranceConfigIssueWrapper"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapper)(nil)).Elem() -} - -type VmFaultToleranceConfigIssueWrapperFault VmFaultToleranceConfigIssueWrapper - -func init() { - t["VmFaultToleranceConfigIssueWrapperFault"] = reflect.TypeOf((*VmFaultToleranceConfigIssueWrapperFault)(nil)).Elem() -} - -type VmFaultToleranceInvalidFileBacking struct { - VmFaultToleranceIssue - - BackingType string `xml:"backingType,omitempty"` - BackingFilename string `xml:"backingFilename,omitempty"` -} - -func init() { - t["VmFaultToleranceInvalidFileBacking"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBacking)(nil)).Elem() -} - -type VmFaultToleranceInvalidFileBackingFault VmFaultToleranceInvalidFileBacking - -func init() { - t["VmFaultToleranceInvalidFileBackingFault"] = reflect.TypeOf((*VmFaultToleranceInvalidFileBackingFault)(nil)).Elem() -} - -type VmFaultToleranceIssue struct { - VimFault -} - -func init() { - t["VmFaultToleranceIssue"] = reflect.TypeOf((*VmFaultToleranceIssue)(nil)).Elem() -} - -type VmFaultToleranceIssueFault BaseVmFaultToleranceIssue - -func init() { - t["VmFaultToleranceIssueFault"] = reflect.TypeOf((*VmFaultToleranceIssueFault)(nil)).Elem() -} - -type VmFaultToleranceOpIssuesList struct { - VmFaultToleranceIssue - - Errors []LocalizedMethodFault `xml:"errors,omitempty"` - Warnings []LocalizedMethodFault `xml:"warnings,omitempty"` -} - -func init() { - t["VmFaultToleranceOpIssuesList"] = reflect.TypeOf((*VmFaultToleranceOpIssuesList)(nil)).Elem() -} - -type VmFaultToleranceOpIssuesListFault VmFaultToleranceOpIssuesList - -func init() { - t["VmFaultToleranceOpIssuesListFault"] = reflect.TypeOf((*VmFaultToleranceOpIssuesListFault)(nil)).Elem() -} - -type VmFaultToleranceStateChangedEvent struct { - VmEvent - - OldState VirtualMachineFaultToleranceState `xml:"oldState"` - NewState VirtualMachineFaultToleranceState `xml:"newState"` -} - -func init() { - t["VmFaultToleranceStateChangedEvent"] = reflect.TypeOf((*VmFaultToleranceStateChangedEvent)(nil)).Elem() -} - -type VmFaultToleranceTooManyFtVcpusOnHost struct { - InsufficientResourcesFault - - HostName string `xml:"hostName,omitempty"` - MaxNumFtVcpus int32 `xml:"maxNumFtVcpus"` -} - -func init() { - t["VmFaultToleranceTooManyFtVcpusOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHost)(nil)).Elem() -} - -type VmFaultToleranceTooManyFtVcpusOnHostFault VmFaultToleranceTooManyFtVcpusOnHost - -func init() { - t["VmFaultToleranceTooManyFtVcpusOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyFtVcpusOnHostFault)(nil)).Elem() -} - -type VmFaultToleranceTooManyVMsOnHost struct { - InsufficientResourcesFault - - HostName string `xml:"hostName,omitempty"` - MaxNumFtVms int32 `xml:"maxNumFtVms"` -} - -func init() { - t["VmFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHost)(nil)).Elem() -} - -type VmFaultToleranceTooManyVMsOnHostFault VmFaultToleranceTooManyVMsOnHost - -func init() { - t["VmFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmFaultToleranceTooManyVMsOnHostFault)(nil)).Elem() -} - -type VmFaultToleranceTurnedOffEvent struct { - VmEvent -} - -func init() { - t["VmFaultToleranceTurnedOffEvent"] = reflect.TypeOf((*VmFaultToleranceTurnedOffEvent)(nil)).Elem() -} - -type VmFaultToleranceVmTerminatedEvent struct { - VmEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VmFaultToleranceVmTerminatedEvent"] = reflect.TypeOf((*VmFaultToleranceVmTerminatedEvent)(nil)).Elem() -} - -type VmGuestOSCrashedEvent struct { - VmEvent -} - -func init() { - t["VmGuestOSCrashedEvent"] = reflect.TypeOf((*VmGuestOSCrashedEvent)(nil)).Elem() -} - -type VmGuestRebootEvent struct { - VmEvent -} - -func init() { - t["VmGuestRebootEvent"] = reflect.TypeOf((*VmGuestRebootEvent)(nil)).Elem() -} - -type VmGuestShutdownEvent struct { - VmEvent -} - -func init() { - t["VmGuestShutdownEvent"] = reflect.TypeOf((*VmGuestShutdownEvent)(nil)).Elem() -} - -type VmGuestStandbyEvent struct { - VmEvent -} - -func init() { - t["VmGuestStandbyEvent"] = reflect.TypeOf((*VmGuestStandbyEvent)(nil)).Elem() -} - -type VmHealthMonitoringStateChangedEvent struct { - ClusterEvent - - State string `xml:"state"` - PrevState string `xml:"prevState,omitempty"` -} - -func init() { - t["VmHealthMonitoringStateChangedEvent"] = reflect.TypeOf((*VmHealthMonitoringStateChangedEvent)(nil)).Elem() -} - -type VmHostAffinityRuleViolation struct { - VmConfigFault - - VmName string `xml:"vmName"` - HostName string `xml:"hostName"` -} - -func init() { - t["VmHostAffinityRuleViolation"] = reflect.TypeOf((*VmHostAffinityRuleViolation)(nil)).Elem() -} - -type VmHostAffinityRuleViolationFault VmHostAffinityRuleViolation - -func init() { - t["VmHostAffinityRuleViolationFault"] = reflect.TypeOf((*VmHostAffinityRuleViolationFault)(nil)).Elem() -} - -type VmInstanceUuidAssignedEvent struct { - VmEvent - - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["VmInstanceUuidAssignedEvent"] = reflect.TypeOf((*VmInstanceUuidAssignedEvent)(nil)).Elem() -} - -type VmInstanceUuidChangedEvent struct { - VmEvent - - OldInstanceUuid string `xml:"oldInstanceUuid"` - NewInstanceUuid string `xml:"newInstanceUuid"` -} - -func init() { - t["VmInstanceUuidChangedEvent"] = reflect.TypeOf((*VmInstanceUuidChangedEvent)(nil)).Elem() -} - -type VmInstanceUuidConflictEvent struct { - VmEvent - - ConflictedVm VmEventArgument `xml:"conflictedVm"` - InstanceUuid string `xml:"instanceUuid"` -} - -func init() { - t["VmInstanceUuidConflictEvent"] = reflect.TypeOf((*VmInstanceUuidConflictEvent)(nil)).Elem() -} - -type VmLimitLicense struct { - NotEnoughLicenses - - Limit int32 `xml:"limit"` -} - -func init() { - t["VmLimitLicense"] = reflect.TypeOf((*VmLimitLicense)(nil)).Elem() -} - -type VmLimitLicenseFault VmLimitLicense - -func init() { - t["VmLimitLicenseFault"] = reflect.TypeOf((*VmLimitLicenseFault)(nil)).Elem() -} - -type VmLogFileInfo struct { - FileInfo -} - -func init() { - t["VmLogFileInfo"] = reflect.TypeOf((*VmLogFileInfo)(nil)).Elem() -} - -type VmLogFileQuery struct { - FileQuery -} - -func init() { - t["VmLogFileQuery"] = reflect.TypeOf((*VmLogFileQuery)(nil)).Elem() -} - -type VmMacAssignedEvent struct { - VmEvent - - Adapter string `xml:"adapter"` - Mac string `xml:"mac"` -} - -func init() { - t["VmMacAssignedEvent"] = reflect.TypeOf((*VmMacAssignedEvent)(nil)).Elem() -} - -type VmMacChangedEvent struct { - VmEvent - - Adapter string `xml:"adapter"` - OldMac string `xml:"oldMac"` - NewMac string `xml:"newMac"` -} - -func init() { - t["VmMacChangedEvent"] = reflect.TypeOf((*VmMacChangedEvent)(nil)).Elem() -} - -type VmMacConflictEvent struct { - VmEvent - - ConflictedVm VmEventArgument `xml:"conflictedVm"` - Mac string `xml:"mac"` -} - -func init() { - t["VmMacConflictEvent"] = reflect.TypeOf((*VmMacConflictEvent)(nil)).Elem() -} - -type VmMaxFTRestartCountReached struct { - VmEvent -} - -func init() { - t["VmMaxFTRestartCountReached"] = reflect.TypeOf((*VmMaxFTRestartCountReached)(nil)).Elem() -} - -type VmMaxRestartCountReached struct { - VmEvent -} - -func init() { - t["VmMaxRestartCountReached"] = reflect.TypeOf((*VmMaxRestartCountReached)(nil)).Elem() -} - -type VmMessageErrorEvent struct { - VmEvent - - Message string `xml:"message"` - MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` -} - -func init() { - t["VmMessageErrorEvent"] = reflect.TypeOf((*VmMessageErrorEvent)(nil)).Elem() -} - -type VmMessageEvent struct { - VmEvent - - Message string `xml:"message"` - MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` -} - -func init() { - t["VmMessageEvent"] = reflect.TypeOf((*VmMessageEvent)(nil)).Elem() -} - -type VmMessageWarningEvent struct { - VmEvent - - Message string `xml:"message"` - MessageInfo []VirtualMachineMessage `xml:"messageInfo,omitempty"` -} - -func init() { - t["VmMessageWarningEvent"] = reflect.TypeOf((*VmMessageWarningEvent)(nil)).Elem() -} - -type VmMetadataManagerFault struct { - VimFault -} - -func init() { - t["VmMetadataManagerFault"] = reflect.TypeOf((*VmMetadataManagerFault)(nil)).Elem() -} - -type VmMetadataManagerFaultFault VmMetadataManagerFault - -func init() { - t["VmMetadataManagerFaultFault"] = reflect.TypeOf((*VmMetadataManagerFaultFault)(nil)).Elem() -} - -type VmMigratedEvent struct { - VmEvent - - SourceHost HostEventArgument `xml:"sourceHost"` - SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"` - SourceDatastore *DatastoreEventArgument `xml:"sourceDatastore,omitempty"` -} - -func init() { - t["VmMigratedEvent"] = reflect.TypeOf((*VmMigratedEvent)(nil)).Elem() -} - -type VmMonitorIncompatibleForFaultTolerance struct { - VimFault -} - -func init() { - t["VmMonitorIncompatibleForFaultTolerance"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultTolerance)(nil)).Elem() -} - -type VmMonitorIncompatibleForFaultToleranceFault VmMonitorIncompatibleForFaultTolerance - -func init() { - t["VmMonitorIncompatibleForFaultToleranceFault"] = reflect.TypeOf((*VmMonitorIncompatibleForFaultToleranceFault)(nil)).Elem() -} - -type VmNoCompatibleHostForSecondaryEvent struct { - VmEvent -} - -func init() { - t["VmNoCompatibleHostForSecondaryEvent"] = reflect.TypeOf((*VmNoCompatibleHostForSecondaryEvent)(nil)).Elem() -} - -type VmNoNetworkAccessEvent struct { - VmEvent - - DestHost HostEventArgument `xml:"destHost"` -} - -func init() { - t["VmNoNetworkAccessEvent"] = reflect.TypeOf((*VmNoNetworkAccessEvent)(nil)).Elem() -} - -type VmNvramFileInfo struct { - FileInfo -} - -func init() { - t["VmNvramFileInfo"] = reflect.TypeOf((*VmNvramFileInfo)(nil)).Elem() -} - -type VmNvramFileQuery struct { - FileQuery -} - -func init() { - t["VmNvramFileQuery"] = reflect.TypeOf((*VmNvramFileQuery)(nil)).Elem() -} - -type VmOrphanedEvent struct { - VmEvent -} - -func init() { - t["VmOrphanedEvent"] = reflect.TypeOf((*VmOrphanedEvent)(nil)).Elem() -} - -type VmPodConfigForPlacement struct { - DynamicData - - StoragePod ManagedObjectReference `xml:"storagePod"` - Disk []PodDiskLocator `xml:"disk,omitempty"` - VmConfig *StorageDrsVmConfigInfo `xml:"vmConfig,omitempty"` - InterVmRule []BaseClusterRuleInfo `xml:"interVmRule,omitempty,typeattr"` -} - -func init() { - t["VmPodConfigForPlacement"] = reflect.TypeOf((*VmPodConfigForPlacement)(nil)).Elem() -} - -type VmPortGroupProfile struct { - PortGroupProfile -} - -func init() { - t["VmPortGroupProfile"] = reflect.TypeOf((*VmPortGroupProfile)(nil)).Elem() -} - -type VmPowerOffOnIsolationEvent struct { - VmPoweredOffEvent - - IsolatedHost HostEventArgument `xml:"isolatedHost"` -} - -func init() { - t["VmPowerOffOnIsolationEvent"] = reflect.TypeOf((*VmPowerOffOnIsolationEvent)(nil)).Elem() -} - -type VmPowerOnDisabled struct { - InvalidState -} - -func init() { - t["VmPowerOnDisabled"] = reflect.TypeOf((*VmPowerOnDisabled)(nil)).Elem() -} - -type VmPowerOnDisabledFault VmPowerOnDisabled - -func init() { - t["VmPowerOnDisabledFault"] = reflect.TypeOf((*VmPowerOnDisabledFault)(nil)).Elem() -} - -type VmPoweredOffEvent struct { - VmEvent -} - -func init() { - t["VmPoweredOffEvent"] = reflect.TypeOf((*VmPoweredOffEvent)(nil)).Elem() -} - -type VmPoweredOnEvent struct { - VmEvent -} - -func init() { - t["VmPoweredOnEvent"] = reflect.TypeOf((*VmPoweredOnEvent)(nil)).Elem() -} - -type VmPoweringOnWithCustomizedDVPortEvent struct { - VmEvent - - Vnic []VnicPortArgument `xml:"vnic"` -} - -func init() { - t["VmPoweringOnWithCustomizedDVPortEvent"] = reflect.TypeOf((*VmPoweringOnWithCustomizedDVPortEvent)(nil)).Elem() -} - -type VmPrimaryFailoverEvent struct { - VmEvent - - Reason string `xml:"reason,omitempty"` -} - -func init() { - t["VmPrimaryFailoverEvent"] = reflect.TypeOf((*VmPrimaryFailoverEvent)(nil)).Elem() -} - -type VmReconfiguredEvent struct { - VmEvent - - ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"` - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["VmReconfiguredEvent"] = reflect.TypeOf((*VmReconfiguredEvent)(nil)).Elem() -} - -type VmRegisteredEvent struct { - VmEvent -} - -func init() { - t["VmRegisteredEvent"] = reflect.TypeOf((*VmRegisteredEvent)(nil)).Elem() -} - -type VmRelayoutSuccessfulEvent struct { - VmEvent -} - -func init() { - t["VmRelayoutSuccessfulEvent"] = reflect.TypeOf((*VmRelayoutSuccessfulEvent)(nil)).Elem() -} - -type VmRelayoutUpToDateEvent struct { - VmEvent -} - -func init() { - t["VmRelayoutUpToDateEvent"] = reflect.TypeOf((*VmRelayoutUpToDateEvent)(nil)).Elem() -} - -type VmReloadFromPathEvent struct { - VmEvent - - ConfigPath string `xml:"configPath"` -} - -func init() { - t["VmReloadFromPathEvent"] = reflect.TypeOf((*VmReloadFromPathEvent)(nil)).Elem() -} - -type VmReloadFromPathFailedEvent struct { - VmEvent - - ConfigPath string `xml:"configPath"` -} - -func init() { - t["VmReloadFromPathFailedEvent"] = reflect.TypeOf((*VmReloadFromPathFailedEvent)(nil)).Elem() -} - -type VmRelocateFailedEvent struct { - VmRelocateSpecEvent - - DestHost HostEventArgument `xml:"destHost"` - Reason LocalizedMethodFault `xml:"reason"` - DestDatacenter *DatacenterEventArgument `xml:"destDatacenter,omitempty"` - DestDatastore *DatastoreEventArgument `xml:"destDatastore,omitempty"` -} - -func init() { - t["VmRelocateFailedEvent"] = reflect.TypeOf((*VmRelocateFailedEvent)(nil)).Elem() -} - -type VmRelocateSpecEvent struct { - VmEvent -} - -func init() { - t["VmRelocateSpecEvent"] = reflect.TypeOf((*VmRelocateSpecEvent)(nil)).Elem() -} - -type VmRelocatedEvent struct { - VmRelocateSpecEvent - - SourceHost HostEventArgument `xml:"sourceHost"` - SourceDatacenter *DatacenterEventArgument `xml:"sourceDatacenter,omitempty"` - SourceDatastore *DatastoreEventArgument `xml:"sourceDatastore,omitempty"` -} - -func init() { - t["VmRelocatedEvent"] = reflect.TypeOf((*VmRelocatedEvent)(nil)).Elem() -} - -type VmRemoteConsoleConnectedEvent struct { - VmEvent -} - -func init() { - t["VmRemoteConsoleConnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleConnectedEvent)(nil)).Elem() -} - -type VmRemoteConsoleDisconnectedEvent struct { - VmEvent -} - -func init() { - t["VmRemoteConsoleDisconnectedEvent"] = reflect.TypeOf((*VmRemoteConsoleDisconnectedEvent)(nil)).Elem() -} - -type VmRemovedEvent struct { - VmEvent -} - -func init() { - t["VmRemovedEvent"] = reflect.TypeOf((*VmRemovedEvent)(nil)).Elem() -} - -type VmRenamedEvent struct { - VmEvent - - OldName string `xml:"oldName"` - NewName string `xml:"newName"` -} - -func init() { - t["VmRenamedEvent"] = reflect.TypeOf((*VmRenamedEvent)(nil)).Elem() -} - -type VmRequirementsExceedCurrentEVCModeEvent struct { - VmEvent -} - -func init() { - t["VmRequirementsExceedCurrentEVCModeEvent"] = reflect.TypeOf((*VmRequirementsExceedCurrentEVCModeEvent)(nil)).Elem() -} - -type VmResettingEvent struct { - VmEvent -} - -func init() { - t["VmResettingEvent"] = reflect.TypeOf((*VmResettingEvent)(nil)).Elem() -} - -type VmResourcePoolMovedEvent struct { - VmEvent - - OldParent ResourcePoolEventArgument `xml:"oldParent"` - NewParent ResourcePoolEventArgument `xml:"newParent"` -} - -func init() { - t["VmResourcePoolMovedEvent"] = reflect.TypeOf((*VmResourcePoolMovedEvent)(nil)).Elem() -} - -type VmResourceReallocatedEvent struct { - VmEvent - - ConfigChanges *ChangesInfoEventArgument `xml:"configChanges,omitempty"` -} - -func init() { - t["VmResourceReallocatedEvent"] = reflect.TypeOf((*VmResourceReallocatedEvent)(nil)).Elem() -} - -type VmRestartedOnAlternateHostEvent struct { - VmPoweredOnEvent - - SourceHost HostEventArgument `xml:"sourceHost"` -} - -func init() { - t["VmRestartedOnAlternateHostEvent"] = reflect.TypeOf((*VmRestartedOnAlternateHostEvent)(nil)).Elem() -} - -type VmResumingEvent struct { - VmEvent -} - -func init() { - t["VmResumingEvent"] = reflect.TypeOf((*VmResumingEvent)(nil)).Elem() -} - -type VmSecondaryAddedEvent struct { - VmEvent -} - -func init() { - t["VmSecondaryAddedEvent"] = reflect.TypeOf((*VmSecondaryAddedEvent)(nil)).Elem() -} - -type VmSecondaryDisabledBySystemEvent struct { - VmEvent - - Reason *LocalizedMethodFault `xml:"reason,omitempty"` -} - -func init() { - t["VmSecondaryDisabledBySystemEvent"] = reflect.TypeOf((*VmSecondaryDisabledBySystemEvent)(nil)).Elem() -} - -type VmSecondaryDisabledEvent struct { - VmEvent -} - -func init() { - t["VmSecondaryDisabledEvent"] = reflect.TypeOf((*VmSecondaryDisabledEvent)(nil)).Elem() -} - -type VmSecondaryEnabledEvent struct { - VmEvent -} - -func init() { - t["VmSecondaryEnabledEvent"] = reflect.TypeOf((*VmSecondaryEnabledEvent)(nil)).Elem() -} - -type VmSecondaryStartedEvent struct { - VmEvent -} - -func init() { - t["VmSecondaryStartedEvent"] = reflect.TypeOf((*VmSecondaryStartedEvent)(nil)).Elem() -} - -type VmShutdownOnIsolationEvent struct { - VmPoweredOffEvent - - IsolatedHost HostEventArgument `xml:"isolatedHost"` - ShutdownResult string `xml:"shutdownResult,omitempty"` -} - -func init() { - t["VmShutdownOnIsolationEvent"] = reflect.TypeOf((*VmShutdownOnIsolationEvent)(nil)).Elem() -} - -type VmSmpFaultToleranceTooManyVMsOnHost struct { - InsufficientResourcesFault - - HostName string `xml:"hostName,omitempty"` - MaxNumSmpFtVms int32 `xml:"maxNumSmpFtVms"` -} - -func init() { - t["VmSmpFaultToleranceTooManyVMsOnHost"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHost)(nil)).Elem() -} - -type VmSmpFaultToleranceTooManyVMsOnHostFault VmSmpFaultToleranceTooManyVMsOnHost - -func init() { - t["VmSmpFaultToleranceTooManyVMsOnHostFault"] = reflect.TypeOf((*VmSmpFaultToleranceTooManyVMsOnHostFault)(nil)).Elem() -} - -type VmSnapshotFileInfo struct { - FileInfo -} - -func init() { - t["VmSnapshotFileInfo"] = reflect.TypeOf((*VmSnapshotFileInfo)(nil)).Elem() -} - -type VmSnapshotFileQuery struct { - FileQuery -} - -func init() { - t["VmSnapshotFileQuery"] = reflect.TypeOf((*VmSnapshotFileQuery)(nil)).Elem() -} - -type VmStartRecordingEvent struct { - VmEvent -} - -func init() { - t["VmStartRecordingEvent"] = reflect.TypeOf((*VmStartRecordingEvent)(nil)).Elem() -} - -type VmStartReplayingEvent struct { - VmEvent -} - -func init() { - t["VmStartReplayingEvent"] = reflect.TypeOf((*VmStartReplayingEvent)(nil)).Elem() -} - -type VmStartingEvent struct { - VmEvent -} - -func init() { - t["VmStartingEvent"] = reflect.TypeOf((*VmStartingEvent)(nil)).Elem() -} - -type VmStartingSecondaryEvent struct { - VmEvent -} - -func init() { - t["VmStartingSecondaryEvent"] = reflect.TypeOf((*VmStartingSecondaryEvent)(nil)).Elem() -} - -type VmStaticMacConflictEvent struct { - VmEvent - - ConflictedVm VmEventArgument `xml:"conflictedVm"` - Mac string `xml:"mac"` -} - -func init() { - t["VmStaticMacConflictEvent"] = reflect.TypeOf((*VmStaticMacConflictEvent)(nil)).Elem() -} - -type VmStoppingEvent struct { - VmEvent -} - -func init() { - t["VmStoppingEvent"] = reflect.TypeOf((*VmStoppingEvent)(nil)).Elem() -} - -type VmSuspendedEvent struct { - VmEvent -} - -func init() { - t["VmSuspendedEvent"] = reflect.TypeOf((*VmSuspendedEvent)(nil)).Elem() -} - -type VmSuspendingEvent struct { - VmEvent -} - -func init() { - t["VmSuspendingEvent"] = reflect.TypeOf((*VmSuspendingEvent)(nil)).Elem() -} - -type VmTimedoutStartingSecondaryEvent struct { - VmEvent - - Timeout int64 `xml:"timeout,omitempty"` -} - -func init() { - t["VmTimedoutStartingSecondaryEvent"] = reflect.TypeOf((*VmTimedoutStartingSecondaryEvent)(nil)).Elem() -} - -type VmToolsUpgradeFault struct { - VimFault -} - -func init() { - t["VmToolsUpgradeFault"] = reflect.TypeOf((*VmToolsUpgradeFault)(nil)).Elem() -} - -type VmToolsUpgradeFaultFault BaseVmToolsUpgradeFault - -func init() { - t["VmToolsUpgradeFaultFault"] = reflect.TypeOf((*VmToolsUpgradeFaultFault)(nil)).Elem() -} - -type VmUnsupportedStartingEvent struct { - VmStartingEvent - - GuestId string `xml:"guestId"` -} - -func init() { - t["VmUnsupportedStartingEvent"] = reflect.TypeOf((*VmUnsupportedStartingEvent)(nil)).Elem() -} - -type VmUpgradeCompleteEvent struct { - VmEvent - - Version string `xml:"version"` -} - -func init() { - t["VmUpgradeCompleteEvent"] = reflect.TypeOf((*VmUpgradeCompleteEvent)(nil)).Elem() -} - -type VmUpgradeFailedEvent struct { - VmEvent -} - -func init() { - t["VmUpgradeFailedEvent"] = reflect.TypeOf((*VmUpgradeFailedEvent)(nil)).Elem() -} - -type VmUpgradingEvent struct { - VmEvent - - Version string `xml:"version"` -} - -func init() { - t["VmUpgradingEvent"] = reflect.TypeOf((*VmUpgradingEvent)(nil)).Elem() -} - -type VmUuidAssignedEvent struct { - VmEvent - - Uuid string `xml:"uuid"` -} - -func init() { - t["VmUuidAssignedEvent"] = reflect.TypeOf((*VmUuidAssignedEvent)(nil)).Elem() -} - -type VmUuidChangedEvent struct { - VmEvent - - OldUuid string `xml:"oldUuid"` - NewUuid string `xml:"newUuid"` -} - -func init() { - t["VmUuidChangedEvent"] = reflect.TypeOf((*VmUuidChangedEvent)(nil)).Elem() -} - -type VmUuidConflictEvent struct { - VmEvent - - ConflictedVm VmEventArgument `xml:"conflictedVm"` - Uuid string `xml:"uuid"` -} - -func init() { - t["VmUuidConflictEvent"] = reflect.TypeOf((*VmUuidConflictEvent)(nil)).Elem() -} - -type VmValidateMaxDevice struct { - VimFault - - Device string `xml:"device"` - Max int32 `xml:"max"` - Count int32 `xml:"count"` -} - -func init() { - t["VmValidateMaxDevice"] = reflect.TypeOf((*VmValidateMaxDevice)(nil)).Elem() -} - -type VmValidateMaxDeviceFault VmValidateMaxDevice - -func init() { - t["VmValidateMaxDeviceFault"] = reflect.TypeOf((*VmValidateMaxDeviceFault)(nil)).Elem() -} - -type VmVnicPoolReservationViolationClearEvent struct { - DvsEvent - - VmVnicResourcePoolKey string `xml:"vmVnicResourcePoolKey"` - VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"` -} - -func init() { - t["VmVnicPoolReservationViolationClearEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationClearEvent)(nil)).Elem() -} - -type VmVnicPoolReservationViolationRaiseEvent struct { - DvsEvent - - VmVnicResourcePoolKey string `xml:"vmVnicResourcePoolKey"` - VmVnicResourcePoolName string `xml:"vmVnicResourcePoolName,omitempty"` -} - -func init() { - t["VmVnicPoolReservationViolationRaiseEvent"] = reflect.TypeOf((*VmVnicPoolReservationViolationRaiseEvent)(nil)).Elem() -} - -type VmWwnAssignedEvent struct { - VmEvent - - NodeWwns []int64 `xml:"nodeWwns"` - PortWwns []int64 `xml:"portWwns"` -} - -func init() { - t["VmWwnAssignedEvent"] = reflect.TypeOf((*VmWwnAssignedEvent)(nil)).Elem() -} - -type VmWwnChangedEvent struct { - VmEvent - - OldNodeWwns []int64 `xml:"oldNodeWwns,omitempty"` - OldPortWwns []int64 `xml:"oldPortWwns,omitempty"` - NewNodeWwns []int64 `xml:"newNodeWwns,omitempty"` - NewPortWwns []int64 `xml:"newPortWwns,omitempty"` -} - -func init() { - t["VmWwnChangedEvent"] = reflect.TypeOf((*VmWwnChangedEvent)(nil)).Elem() -} - -type VmWwnConflict struct { - InvalidVmConfig - - Vm *ManagedObjectReference `xml:"vm,omitempty"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Name string `xml:"name,omitempty"` - Wwn int64 `xml:"wwn,omitempty"` -} - -func init() { - t["VmWwnConflict"] = reflect.TypeOf((*VmWwnConflict)(nil)).Elem() -} - -type VmWwnConflictEvent struct { - VmEvent - - ConflictedVms []VmEventArgument `xml:"conflictedVms,omitempty"` - ConflictedHosts []HostEventArgument `xml:"conflictedHosts,omitempty"` - Wwn int64 `xml:"wwn"` -} - -func init() { - t["VmWwnConflictEvent"] = reflect.TypeOf((*VmWwnConflictEvent)(nil)).Elem() -} - -type VmWwnConflictFault VmWwnConflict - -func init() { - t["VmWwnConflictFault"] = reflect.TypeOf((*VmWwnConflictFault)(nil)).Elem() -} - -type VmfsAlreadyMounted struct { - VmfsMountFault -} - -func init() { - t["VmfsAlreadyMounted"] = reflect.TypeOf((*VmfsAlreadyMounted)(nil)).Elem() -} - -type VmfsAlreadyMountedFault VmfsAlreadyMounted - -func init() { - t["VmfsAlreadyMountedFault"] = reflect.TypeOf((*VmfsAlreadyMountedFault)(nil)).Elem() -} - -type VmfsAmbiguousMount struct { - VmfsMountFault -} - -func init() { - t["VmfsAmbiguousMount"] = reflect.TypeOf((*VmfsAmbiguousMount)(nil)).Elem() -} - -type VmfsAmbiguousMountFault VmfsAmbiguousMount - -func init() { - t["VmfsAmbiguousMountFault"] = reflect.TypeOf((*VmfsAmbiguousMountFault)(nil)).Elem() -} - -type VmfsConfigOption struct { - DynamicData - - BlockSizeOption int32 `xml:"blockSizeOption"` - UnmapGranularityOption []int32 `xml:"unmapGranularityOption,omitempty"` - UnmapBandwidthFixedValue *LongOption `xml:"unmapBandwidthFixedValue,omitempty"` - UnmapBandwidthDynamicMin *LongOption `xml:"unmapBandwidthDynamicMin,omitempty"` - UnmapBandwidthDynamicMax *LongOption `xml:"unmapBandwidthDynamicMax,omitempty"` - UnmapBandwidthIncrement int64 `xml:"unmapBandwidthIncrement,omitempty"` - UnmapBandwidthUltraLow int64 `xml:"unmapBandwidthUltraLow,omitempty"` -} - -func init() { - t["VmfsConfigOption"] = reflect.TypeOf((*VmfsConfigOption)(nil)).Elem() -} - -type VmfsDatastoreAllExtentOption struct { - VmfsDatastoreSingleExtentOption -} - -func init() { - t["VmfsDatastoreAllExtentOption"] = reflect.TypeOf((*VmfsDatastoreAllExtentOption)(nil)).Elem() -} - -type VmfsDatastoreBaseOption struct { - DynamicData - - Layout HostDiskPartitionLayout `xml:"layout"` - PartitionFormatChange *bool `xml:"partitionFormatChange"` -} - -func init() { - t["VmfsDatastoreBaseOption"] = reflect.TypeOf((*VmfsDatastoreBaseOption)(nil)).Elem() -} - -type VmfsDatastoreCreateSpec struct { - VmfsDatastoreSpec - - Partition HostDiskPartitionSpec `xml:"partition"` - Vmfs HostVmfsSpec `xml:"vmfs"` - Extent []HostScsiDiskPartition `xml:"extent,omitempty"` -} - -func init() { - t["VmfsDatastoreCreateSpec"] = reflect.TypeOf((*VmfsDatastoreCreateSpec)(nil)).Elem() -} - -type VmfsDatastoreExpandSpec struct { - VmfsDatastoreSpec - - Partition HostDiskPartitionSpec `xml:"partition"` - Extent HostScsiDiskPartition `xml:"extent"` -} - -func init() { - t["VmfsDatastoreExpandSpec"] = reflect.TypeOf((*VmfsDatastoreExpandSpec)(nil)).Elem() -} - -type VmfsDatastoreExtendSpec struct { - VmfsDatastoreSpec - - Partition HostDiskPartitionSpec `xml:"partition"` - Extent []HostScsiDiskPartition `xml:"extent"` -} - -func init() { - t["VmfsDatastoreExtendSpec"] = reflect.TypeOf((*VmfsDatastoreExtendSpec)(nil)).Elem() -} - -type VmfsDatastoreInfo struct { - DatastoreInfo - - MaxPhysicalRDMFileSize int64 `xml:"maxPhysicalRDMFileSize,omitempty"` - MaxVirtualRDMFileSize int64 `xml:"maxVirtualRDMFileSize,omitempty"` - Vmfs *HostVmfsVolume `xml:"vmfs,omitempty"` -} - -func init() { - t["VmfsDatastoreInfo"] = reflect.TypeOf((*VmfsDatastoreInfo)(nil)).Elem() -} - -type VmfsDatastoreMultipleExtentOption struct { - VmfsDatastoreBaseOption - - VmfsExtent []HostDiskPartitionBlockRange `xml:"vmfsExtent"` -} - -func init() { - t["VmfsDatastoreMultipleExtentOption"] = reflect.TypeOf((*VmfsDatastoreMultipleExtentOption)(nil)).Elem() -} - -type VmfsDatastoreOption struct { - DynamicData - - Info BaseVmfsDatastoreBaseOption `xml:"info,typeattr"` - Spec BaseVmfsDatastoreSpec `xml:"spec,typeattr"` -} - -func init() { - t["VmfsDatastoreOption"] = reflect.TypeOf((*VmfsDatastoreOption)(nil)).Elem() -} - -type VmfsDatastoreSingleExtentOption struct { - VmfsDatastoreBaseOption - - VmfsExtent HostDiskPartitionBlockRange `xml:"vmfsExtent"` -} - -func init() { - t["VmfsDatastoreSingleExtentOption"] = reflect.TypeOf((*VmfsDatastoreSingleExtentOption)(nil)).Elem() -} - -type VmfsDatastoreSpec struct { - DynamicData - - DiskUuid string `xml:"diskUuid"` -} - -func init() { - t["VmfsDatastoreSpec"] = reflect.TypeOf((*VmfsDatastoreSpec)(nil)).Elem() -} - -type VmfsMountFault struct { - HostConfigFault - - Uuid string `xml:"uuid"` -} - -func init() { - t["VmfsMountFault"] = reflect.TypeOf((*VmfsMountFault)(nil)).Elem() -} - -type VmfsMountFaultFault BaseVmfsMountFault - -func init() { - t["VmfsMountFaultFault"] = reflect.TypeOf((*VmfsMountFaultFault)(nil)).Elem() -} - -type VmfsUnmapBandwidthSpec struct { - DynamicData - - Policy string `xml:"policy"` - FixedValue int64 `xml:"fixedValue"` - DynamicMin int64 `xml:"dynamicMin"` - DynamicMax int64 `xml:"dynamicMax"` -} - -func init() { - t["VmfsUnmapBandwidthSpec"] = reflect.TypeOf((*VmfsUnmapBandwidthSpec)(nil)).Elem() -} - -type VmotionInterfaceNotEnabled struct { - HostPowerOpFailed -} - -func init() { - t["VmotionInterfaceNotEnabled"] = reflect.TypeOf((*VmotionInterfaceNotEnabled)(nil)).Elem() -} - -type VmotionInterfaceNotEnabledFault VmotionInterfaceNotEnabled - -func init() { - t["VmotionInterfaceNotEnabledFault"] = reflect.TypeOf((*VmotionInterfaceNotEnabledFault)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitchPvlanSpec struct { - VmwareDistributedVirtualSwitchVlanSpec - - PvlanId int32 `xml:"pvlanId"` -} - -func init() { - t["VmwareDistributedVirtualSwitchPvlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchPvlanSpec)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitchTrunkVlanSpec struct { - VmwareDistributedVirtualSwitchVlanSpec - - VlanId []NumericRange `xml:"vlanId,omitempty"` -} - -func init() { - t["VmwareDistributedVirtualSwitchTrunkVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchTrunkVlanSpec)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitchVlanIdSpec struct { - VmwareDistributedVirtualSwitchVlanSpec - - VlanId int32 `xml:"vlanId"` -} - -func init() { - t["VmwareDistributedVirtualSwitchVlanIdSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanIdSpec)(nil)).Elem() -} - -type VmwareDistributedVirtualSwitchVlanSpec struct { - InheritablePolicy -} - -func init() { - t["VmwareDistributedVirtualSwitchVlanSpec"] = reflect.TypeOf((*VmwareDistributedVirtualSwitchVlanSpec)(nil)).Elem() -} - -type VmwareUplinkPortTeamingPolicy struct { - InheritablePolicy - - Policy *StringPolicy `xml:"policy,omitempty"` - ReversePolicy *BoolPolicy `xml:"reversePolicy,omitempty"` - NotifySwitches *BoolPolicy `xml:"notifySwitches,omitempty"` - RollingOrder *BoolPolicy `xml:"rollingOrder,omitempty"` - FailureCriteria *DVSFailureCriteria `xml:"failureCriteria,omitempty"` - UplinkPortOrder *VMwareUplinkPortOrderPolicy `xml:"uplinkPortOrder,omitempty"` -} - -func init() { - t["VmwareUplinkPortTeamingPolicy"] = reflect.TypeOf((*VmwareUplinkPortTeamingPolicy)(nil)).Elem() -} - -type VnicPortArgument struct { - DynamicData - - Vnic string `xml:"vnic"` - Port DistributedVirtualSwitchPortConnection `xml:"port"` -} - -func init() { - t["VnicPortArgument"] = reflect.TypeOf((*VnicPortArgument)(nil)).Elem() -} - -type VolumeEditorError struct { - CustomizationFault -} - -func init() { - t["VolumeEditorError"] = reflect.TypeOf((*VolumeEditorError)(nil)).Elem() -} - -type VolumeEditorErrorFault VolumeEditorError - -func init() { - t["VolumeEditorErrorFault"] = reflect.TypeOf((*VolumeEditorErrorFault)(nil)).Elem() -} - -type VramLimitLicense struct { - NotEnoughLicenses - - Limit int32 `xml:"limit"` -} - -func init() { - t["VramLimitLicense"] = reflect.TypeOf((*VramLimitLicense)(nil)).Elem() -} - -type VramLimitLicenseFault VramLimitLicense - -func init() { - t["VramLimitLicenseFault"] = reflect.TypeOf((*VramLimitLicenseFault)(nil)).Elem() -} - -type VsanClusterConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - DefaultConfig *VsanClusterConfigInfoHostDefaultInfo `xml:"defaultConfig,omitempty"` - VsanEsaEnabled *bool `xml:"vsanEsaEnabled"` -} - -func init() { - t["VsanClusterConfigInfo"] = reflect.TypeOf((*VsanClusterConfigInfo)(nil)).Elem() -} - -type VsanClusterConfigInfoHostDefaultInfo struct { - DynamicData - - Uuid string `xml:"uuid,omitempty"` - AutoClaimStorage *bool `xml:"autoClaimStorage"` - ChecksumEnabled *bool `xml:"checksumEnabled"` -} - -func init() { - t["VsanClusterConfigInfoHostDefaultInfo"] = reflect.TypeOf((*VsanClusterConfigInfoHostDefaultInfo)(nil)).Elem() -} - -type VsanClusterUuidMismatch struct { - CannotMoveVsanEnabledHost - - HostClusterUuid string `xml:"hostClusterUuid"` - DestinationClusterUuid string `xml:"destinationClusterUuid"` -} - -func init() { - t["VsanClusterUuidMismatch"] = reflect.TypeOf((*VsanClusterUuidMismatch)(nil)).Elem() -} - -type VsanClusterUuidMismatchFault VsanClusterUuidMismatch - -func init() { - t["VsanClusterUuidMismatchFault"] = reflect.TypeOf((*VsanClusterUuidMismatchFault)(nil)).Elem() -} - -type VsanDatastoreInfo struct { - DatastoreInfo - - MembershipUuid string `xml:"membershipUuid,omitempty"` - AccessGenNo int32 `xml:"accessGenNo,omitempty"` -} - -func init() { - t["VsanDatastoreInfo"] = reflect.TypeOf((*VsanDatastoreInfo)(nil)).Elem() -} - -type VsanDiskFault struct { - VsanFault - - Device string `xml:"device,omitempty"` -} - -func init() { - t["VsanDiskFault"] = reflect.TypeOf((*VsanDiskFault)(nil)).Elem() -} - -type VsanDiskFaultFault BaseVsanDiskFault - -func init() { - t["VsanDiskFaultFault"] = reflect.TypeOf((*VsanDiskFaultFault)(nil)).Elem() -} - -type VsanFault struct { - VimFault -} - -func init() { - t["VsanFault"] = reflect.TypeOf((*VsanFault)(nil)).Elem() -} - -type VsanFaultFault BaseVsanFault - -func init() { - t["VsanFaultFault"] = reflect.TypeOf((*VsanFaultFault)(nil)).Elem() -} - -type VsanHostClusterStatus struct { - DynamicData - - Uuid string `xml:"uuid,omitempty"` - NodeUuid string `xml:"nodeUuid,omitempty"` - Health string `xml:"health"` - NodeState VsanHostClusterStatusState `xml:"nodeState"` - MemberUuid []string `xml:"memberUuid,omitempty"` -} - -func init() { - t["VsanHostClusterStatus"] = reflect.TypeOf((*VsanHostClusterStatus)(nil)).Elem() -} - -type VsanHostClusterStatusState struct { - DynamicData - - State string `xml:"state"` - Completion *VsanHostClusterStatusStateCompletionEstimate `xml:"completion,omitempty"` -} - -func init() { - t["VsanHostClusterStatusState"] = reflect.TypeOf((*VsanHostClusterStatusState)(nil)).Elem() -} - -type VsanHostClusterStatusStateCompletionEstimate struct { - DynamicData - - CompleteTime *time.Time `xml:"completeTime"` - PercentComplete int32 `xml:"percentComplete,omitempty"` -} - -func init() { - t["VsanHostClusterStatusStateCompletionEstimate"] = reflect.TypeOf((*VsanHostClusterStatusStateCompletionEstimate)(nil)).Elem() -} - -type VsanHostConfigInfo struct { - DynamicData - - Enabled *bool `xml:"enabled"` - HostSystem *ManagedObjectReference `xml:"hostSystem,omitempty"` - ClusterInfo *VsanHostConfigInfoClusterInfo `xml:"clusterInfo,omitempty"` - StorageInfo *VsanHostConfigInfoStorageInfo `xml:"storageInfo,omitempty"` - NetworkInfo *VsanHostConfigInfoNetworkInfo `xml:"networkInfo,omitempty"` - FaultDomainInfo *VsanHostFaultDomainInfo `xml:"faultDomainInfo,omitempty"` - VsanEsaEnabled *bool `xml:"vsanEsaEnabled"` -} - -func init() { - t["VsanHostConfigInfo"] = reflect.TypeOf((*VsanHostConfigInfo)(nil)).Elem() -} - -type VsanHostConfigInfoClusterInfo struct { - DynamicData - - Uuid string `xml:"uuid,omitempty"` - NodeUuid string `xml:"nodeUuid,omitempty"` -} - -func init() { - t["VsanHostConfigInfoClusterInfo"] = reflect.TypeOf((*VsanHostConfigInfoClusterInfo)(nil)).Elem() -} - -type VsanHostConfigInfoNetworkInfo struct { - DynamicData - - Port []VsanHostConfigInfoNetworkInfoPortConfig `xml:"port,omitempty"` -} - -func init() { - t["VsanHostConfigInfoNetworkInfo"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfo)(nil)).Elem() -} - -type VsanHostConfigInfoNetworkInfoPortConfig struct { - DynamicData - - IpConfig *VsanHostIpConfig `xml:"ipConfig,omitempty"` - Device string `xml:"device"` -} - -func init() { - t["VsanHostConfigInfoNetworkInfoPortConfig"] = reflect.TypeOf((*VsanHostConfigInfoNetworkInfoPortConfig)(nil)).Elem() -} - -type VsanHostConfigInfoStorageInfo struct { - DynamicData - - AutoClaimStorage *bool `xml:"autoClaimStorage"` - DiskMapping []VsanHostDiskMapping `xml:"diskMapping,omitempty"` - DiskMapInfo []VsanHostDiskMapInfo `xml:"diskMapInfo,omitempty"` - ChecksumEnabled *bool `xml:"checksumEnabled"` -} - -func init() { - t["VsanHostConfigInfoStorageInfo"] = reflect.TypeOf((*VsanHostConfigInfoStorageInfo)(nil)).Elem() -} - -type VsanHostDecommissionMode struct { - DynamicData - - ObjectAction string `xml:"objectAction"` -} - -func init() { - t["VsanHostDecommissionMode"] = reflect.TypeOf((*VsanHostDecommissionMode)(nil)).Elem() -} - -type VsanHostDiskMapInfo struct { - DynamicData - - Mapping VsanHostDiskMapping `xml:"mapping"` - Mounted bool `xml:"mounted"` -} - -func init() { - t["VsanHostDiskMapInfo"] = reflect.TypeOf((*VsanHostDiskMapInfo)(nil)).Elem() -} - -type VsanHostDiskMapResult struct { - DynamicData - - Mapping VsanHostDiskMapping `xml:"mapping"` - DiskResult []VsanHostDiskResult `xml:"diskResult,omitempty"` - Error *LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["VsanHostDiskMapResult"] = reflect.TypeOf((*VsanHostDiskMapResult)(nil)).Elem() -} - -type VsanHostDiskMapping struct { - DynamicData - - Ssd HostScsiDisk `xml:"ssd"` - NonSsd []HostScsiDisk `xml:"nonSsd"` -} - -func init() { - t["VsanHostDiskMapping"] = reflect.TypeOf((*VsanHostDiskMapping)(nil)).Elem() -} - -type VsanHostDiskResult struct { - DynamicData - - Disk HostScsiDisk `xml:"disk"` - State string `xml:"state"` - VsanUuid string `xml:"vsanUuid,omitempty"` - Error *LocalizedMethodFault `xml:"error,omitempty"` - Degraded *bool `xml:"degraded"` -} - -func init() { - t["VsanHostDiskResult"] = reflect.TypeOf((*VsanHostDiskResult)(nil)).Elem() -} - -type VsanHostFaultDomainInfo struct { - DynamicData - - Name string `xml:"name"` -} - -func init() { - t["VsanHostFaultDomainInfo"] = reflect.TypeOf((*VsanHostFaultDomainInfo)(nil)).Elem() -} - -type VsanHostIpConfig struct { - DynamicData - - UpstreamIpAddress string `xml:"upstreamIpAddress"` - DownstreamIpAddress string `xml:"downstreamIpAddress"` -} - -func init() { - t["VsanHostIpConfig"] = reflect.TypeOf((*VsanHostIpConfig)(nil)).Elem() -} - -type VsanHostMembershipInfo struct { - DynamicData - - NodeUuid string `xml:"nodeUuid"` - Hostname string `xml:"hostname"` -} - -func init() { - t["VsanHostMembershipInfo"] = reflect.TypeOf((*VsanHostMembershipInfo)(nil)).Elem() -} - -type VsanHostRuntimeInfo struct { - DynamicData - - MembershipList []VsanHostMembershipInfo `xml:"membershipList,omitempty"` - DiskIssues []VsanHostRuntimeInfoDiskIssue `xml:"diskIssues,omitempty"` - AccessGenNo int32 `xml:"accessGenNo,omitempty"` -} - -func init() { - t["VsanHostRuntimeInfo"] = reflect.TypeOf((*VsanHostRuntimeInfo)(nil)).Elem() -} - -type VsanHostRuntimeInfoDiskIssue struct { - DynamicData - - DiskId string `xml:"diskId"` - Issue string `xml:"issue"` -} - -func init() { - t["VsanHostRuntimeInfoDiskIssue"] = reflect.TypeOf((*VsanHostRuntimeInfoDiskIssue)(nil)).Elem() -} - -type VsanHostVsanDiskInfo struct { - DynamicData - - VsanUuid string `xml:"vsanUuid"` - FormatVersion int32 `xml:"formatVersion"` -} - -func init() { - t["VsanHostVsanDiskInfo"] = reflect.TypeOf((*VsanHostVsanDiskInfo)(nil)).Elem() -} - -type VsanIncompatibleDiskMapping struct { - VsanDiskFault -} - -func init() { - t["VsanIncompatibleDiskMapping"] = reflect.TypeOf((*VsanIncompatibleDiskMapping)(nil)).Elem() -} - -type VsanIncompatibleDiskMappingFault VsanIncompatibleDiskMapping - -func init() { - t["VsanIncompatibleDiskMappingFault"] = reflect.TypeOf((*VsanIncompatibleDiskMappingFault)(nil)).Elem() -} - -type VsanNewPolicyBatch struct { - DynamicData - - Size []int64 `xml:"size,omitempty"` - Policy string `xml:"policy,omitempty"` -} - -func init() { - t["VsanNewPolicyBatch"] = reflect.TypeOf((*VsanNewPolicyBatch)(nil)).Elem() -} - -type VsanPolicyChangeBatch struct { - DynamicData - - Uuid []string `xml:"uuid,omitempty"` - Policy string `xml:"policy,omitempty"` -} - -func init() { - t["VsanPolicyChangeBatch"] = reflect.TypeOf((*VsanPolicyChangeBatch)(nil)).Elem() -} - -type VsanPolicyCost struct { - DynamicData - - ChangeDataSize int64 `xml:"changeDataSize,omitempty"` - CurrentDataSize int64 `xml:"currentDataSize,omitempty"` - TempDataSize int64 `xml:"tempDataSize,omitempty"` - CopyDataSize int64 `xml:"copyDataSize,omitempty"` - ChangeFlashReadCacheSize int64 `xml:"changeFlashReadCacheSize,omitempty"` - CurrentFlashReadCacheSize int64 `xml:"currentFlashReadCacheSize,omitempty"` - CurrentDiskSpaceToAddressSpaceRatio float32 `xml:"currentDiskSpaceToAddressSpaceRatio,omitempty"` - DiskSpaceToAddressSpaceRatio float32 `xml:"diskSpaceToAddressSpaceRatio,omitempty"` -} - -func init() { - t["VsanPolicyCost"] = reflect.TypeOf((*VsanPolicyCost)(nil)).Elem() -} - -type VsanPolicySatisfiability struct { - DynamicData - - Uuid string `xml:"uuid,omitempty"` - IsSatisfiable bool `xml:"isSatisfiable"` - Reason *LocalizableMessage `xml:"reason,omitempty"` - Cost *VsanPolicyCost `xml:"cost,omitempty"` -} - -func init() { - t["VsanPolicySatisfiability"] = reflect.TypeOf((*VsanPolicySatisfiability)(nil)).Elem() -} - -type VsanUpgradeSystemAPIBrokenIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemAPIBrokenIssue"] = reflect.TypeOf((*VsanUpgradeSystemAPIBrokenIssue)(nil)).Elem() -} - -type VsanUpgradeSystemAutoClaimEnabledOnHostsIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemAutoClaimEnabledOnHostsIssue"] = reflect.TypeOf((*VsanUpgradeSystemAutoClaimEnabledOnHostsIssue)(nil)).Elem() -} - -type VsanUpgradeSystemHostsDisconnectedIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemHostsDisconnectedIssue"] = reflect.TypeOf((*VsanUpgradeSystemHostsDisconnectedIssue)(nil)).Elem() -} - -type VsanUpgradeSystemMissingHostsInClusterIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemMissingHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemMissingHostsInClusterIssue)(nil)).Elem() -} - -type VsanUpgradeSystemNetworkPartitionInfo struct { - DynamicData - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemNetworkPartitionInfo"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionInfo)(nil)).Elem() -} - -type VsanUpgradeSystemNetworkPartitionIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Partitions []VsanUpgradeSystemNetworkPartitionInfo `xml:"partitions"` -} - -func init() { - t["VsanUpgradeSystemNetworkPartitionIssue"] = reflect.TypeOf((*VsanUpgradeSystemNetworkPartitionIssue)(nil)).Elem() -} - -type VsanUpgradeSystemNotEnoughFreeCapacityIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - ReducedRedundancyUpgradePossible bool `xml:"reducedRedundancyUpgradePossible"` -} - -func init() { - t["VsanUpgradeSystemNotEnoughFreeCapacityIssue"] = reflect.TypeOf((*VsanUpgradeSystemNotEnoughFreeCapacityIssue)(nil)).Elem() -} - -type VsanUpgradeSystemPreflightCheckIssue struct { - DynamicData - - Msg string `xml:"msg"` -} - -func init() { - t["VsanUpgradeSystemPreflightCheckIssue"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckIssue)(nil)).Elem() -} - -type VsanUpgradeSystemPreflightCheckResult struct { - DynamicData - - Issues []BaseVsanUpgradeSystemPreflightCheckIssue `xml:"issues,omitempty,typeattr"` - DiskMappingToRestore *VsanHostDiskMapping `xml:"diskMappingToRestore,omitempty"` -} - -func init() { - t["VsanUpgradeSystemPreflightCheckResult"] = reflect.TypeOf((*VsanUpgradeSystemPreflightCheckResult)(nil)).Elem() -} - -type VsanUpgradeSystemRogueHostsInClusterIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Uuids []string `xml:"uuids"` -} - -func init() { - t["VsanUpgradeSystemRogueHostsInClusterIssue"] = reflect.TypeOf((*VsanUpgradeSystemRogueHostsInClusterIssue)(nil)).Elem() -} - -type VsanUpgradeSystemUpgradeHistoryDiskGroupOp struct { - VsanUpgradeSystemUpgradeHistoryItem - - Operation string `xml:"operation"` - DiskMapping VsanHostDiskMapping `xml:"diskMapping"` -} - -func init() { - t["VsanUpgradeSystemUpgradeHistoryDiskGroupOp"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryDiskGroupOp)(nil)).Elem() -} - -type VsanUpgradeSystemUpgradeHistoryItem struct { - DynamicData - - Timestamp time.Time `xml:"timestamp"` - Host *ManagedObjectReference `xml:"host,omitempty"` - Message string `xml:"message"` - Task *ManagedObjectReference `xml:"task,omitempty"` -} - -func init() { - t["VsanUpgradeSystemUpgradeHistoryItem"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryItem)(nil)).Elem() -} - -type VsanUpgradeSystemUpgradeHistoryPreflightFail struct { - VsanUpgradeSystemUpgradeHistoryItem - - PreflightResult VsanUpgradeSystemPreflightCheckResult `xml:"preflightResult"` -} - -func init() { - t["VsanUpgradeSystemUpgradeHistoryPreflightFail"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeHistoryPreflightFail)(nil)).Elem() -} - -type VsanUpgradeSystemUpgradeStatus struct { - DynamicData - - InProgress bool `xml:"inProgress"` - History []BaseVsanUpgradeSystemUpgradeHistoryItem `xml:"history,omitempty,typeattr"` - Aborted *bool `xml:"aborted"` - Completed *bool `xml:"completed"` - Progress int32 `xml:"progress,omitempty"` -} - -func init() { - t["VsanUpgradeSystemUpgradeStatus"] = reflect.TypeOf((*VsanUpgradeSystemUpgradeStatus)(nil)).Elem() -} - -type VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Uuids []string `xml:"uuids"` -} - -func init() { - t["VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue"] = reflect.TypeOf((*VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue)(nil)).Elem() -} - -type VsanUpgradeSystemWrongEsxVersionIssue struct { - VsanUpgradeSystemPreflightCheckIssue - - Hosts []ManagedObjectReference `xml:"hosts"` -} - -func init() { - t["VsanUpgradeSystemWrongEsxVersionIssue"] = reflect.TypeOf((*VsanUpgradeSystemWrongEsxVersionIssue)(nil)).Elem() -} - -type VslmCloneSpec struct { - VslmMigrateSpec - - Name string `xml:"name"` - KeepAfterDeleteVm *bool `xml:"keepAfterDeleteVm"` - Metadata []KeyValue `xml:"metadata,omitempty"` -} - -func init() { - t["VslmCloneSpec"] = reflect.TypeOf((*VslmCloneSpec)(nil)).Elem() -} - -type VslmCreateSpec struct { - DynamicData - - Name string `xml:"name"` - KeepAfterDeleteVm *bool `xml:"keepAfterDeleteVm"` - BackingSpec BaseVslmCreateSpecBackingSpec `xml:"backingSpec,typeattr"` - CapacityInMB int64 `xml:"capacityInMB"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Crypto BaseCryptoSpec `xml:"crypto,omitempty,typeattr"` - Metadata []KeyValue `xml:"metadata,omitempty"` -} - -func init() { - t["VslmCreateSpec"] = reflect.TypeOf((*VslmCreateSpec)(nil)).Elem() -} - -type VslmCreateSpecBackingSpec struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - Path string `xml:"path,omitempty"` -} - -func init() { - t["VslmCreateSpecBackingSpec"] = reflect.TypeOf((*VslmCreateSpecBackingSpec)(nil)).Elem() -} - -type VslmCreateSpecDiskFileBackingSpec struct { - VslmCreateSpecBackingSpec - - ProvisioningType string `xml:"provisioningType,omitempty"` -} - -func init() { - t["VslmCreateSpecDiskFileBackingSpec"] = reflect.TypeOf((*VslmCreateSpecDiskFileBackingSpec)(nil)).Elem() -} - -type VslmCreateSpecRawDiskMappingBackingSpec struct { - VslmCreateSpecBackingSpec - - LunUuid string `xml:"lunUuid"` - CompatibilityMode string `xml:"compatibilityMode"` -} - -func init() { - t["VslmCreateSpecRawDiskMappingBackingSpec"] = reflect.TypeOf((*VslmCreateSpecRawDiskMappingBackingSpec)(nil)).Elem() -} - -type VslmMigrateSpec struct { - DynamicData - - BackingSpec BaseVslmCreateSpecBackingSpec `xml:"backingSpec,typeattr"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` - Consolidate *bool `xml:"consolidate"` - DisksCrypto *DiskCryptoSpec `xml:"disksCrypto,omitempty"` -} - -func init() { - t["VslmMigrateSpec"] = reflect.TypeOf((*VslmMigrateSpec)(nil)).Elem() -} - -type VslmRelocateSpec struct { - VslmMigrateSpec -} - -func init() { - t["VslmRelocateSpec"] = reflect.TypeOf((*VslmRelocateSpec)(nil)).Elem() -} - -type VslmTagEntry struct { - DynamicData - - TagName string `xml:"tagName"` - ParentCategoryName string `xml:"parentCategoryName"` -} - -func init() { - t["VslmTagEntry"] = reflect.TypeOf((*VslmTagEntry)(nil)).Elem() -} - -type VspanDestPortConflict struct { - DvsFault - - VspanSessionKey1 string `xml:"vspanSessionKey1"` - VspanSessionKey2 string `xml:"vspanSessionKey2"` - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanDestPortConflict"] = reflect.TypeOf((*VspanDestPortConflict)(nil)).Elem() -} - -type VspanDestPortConflictFault VspanDestPortConflict - -func init() { - t["VspanDestPortConflictFault"] = reflect.TypeOf((*VspanDestPortConflictFault)(nil)).Elem() -} - -type VspanPortConflict struct { - DvsFault - - VspanSessionKey1 string `xml:"vspanSessionKey1"` - VspanSessionKey2 string `xml:"vspanSessionKey2"` - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanPortConflict"] = reflect.TypeOf((*VspanPortConflict)(nil)).Elem() -} - -type VspanPortConflictFault VspanPortConflict - -func init() { - t["VspanPortConflictFault"] = reflect.TypeOf((*VspanPortConflictFault)(nil)).Elem() -} - -type VspanPortMoveFault struct { - DvsFault - - SrcPortgroupName string `xml:"srcPortgroupName"` - DestPortgroupName string `xml:"destPortgroupName"` - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanPortMoveFault"] = reflect.TypeOf((*VspanPortMoveFault)(nil)).Elem() -} - -type VspanPortMoveFaultFault VspanPortMoveFault - -func init() { - t["VspanPortMoveFaultFault"] = reflect.TypeOf((*VspanPortMoveFaultFault)(nil)).Elem() -} - -type VspanPortPromiscChangeFault struct { - DvsFault - - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanPortPromiscChangeFault"] = reflect.TypeOf((*VspanPortPromiscChangeFault)(nil)).Elem() -} - -type VspanPortPromiscChangeFaultFault VspanPortPromiscChangeFault - -func init() { - t["VspanPortPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortPromiscChangeFaultFault)(nil)).Elem() -} - -type VspanPortgroupPromiscChangeFault struct { - DvsFault - - PortgroupName string `xml:"portgroupName"` -} - -func init() { - t["VspanPortgroupPromiscChangeFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFault)(nil)).Elem() -} - -type VspanPortgroupPromiscChangeFaultFault VspanPortgroupPromiscChangeFault - -func init() { - t["VspanPortgroupPromiscChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupPromiscChangeFaultFault)(nil)).Elem() -} - -type VspanPortgroupTypeChangeFault struct { - DvsFault - - PortgroupName string `xml:"portgroupName"` -} - -func init() { - t["VspanPortgroupTypeChangeFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFault)(nil)).Elem() -} - -type VspanPortgroupTypeChangeFaultFault VspanPortgroupTypeChangeFault - -func init() { - t["VspanPortgroupTypeChangeFaultFault"] = reflect.TypeOf((*VspanPortgroupTypeChangeFaultFault)(nil)).Elem() -} - -type VspanPromiscuousPortNotSupported struct { - DvsFault - - VspanSessionKey string `xml:"vspanSessionKey"` - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanPromiscuousPortNotSupported"] = reflect.TypeOf((*VspanPromiscuousPortNotSupported)(nil)).Elem() -} - -type VspanPromiscuousPortNotSupportedFault VspanPromiscuousPortNotSupported - -func init() { - t["VspanPromiscuousPortNotSupportedFault"] = reflect.TypeOf((*VspanPromiscuousPortNotSupportedFault)(nil)).Elem() -} - -type VspanSameSessionPortConflict struct { - DvsFault - - VspanSessionKey string `xml:"vspanSessionKey"` - PortKey string `xml:"portKey"` -} - -func init() { - t["VspanSameSessionPortConflict"] = reflect.TypeOf((*VspanSameSessionPortConflict)(nil)).Elem() -} - -type VspanSameSessionPortConflictFault VspanSameSessionPortConflict - -func init() { - t["VspanSameSessionPortConflictFault"] = reflect.TypeOf((*VspanSameSessionPortConflictFault)(nil)).Elem() -} - -type VstorageObjectVCenterQueryChangedDiskAreas VstorageObjectVCenterQueryChangedDiskAreasRequestType - -func init() { - t["VstorageObjectVCenterQueryChangedDiskAreas"] = reflect.TypeOf((*VstorageObjectVCenterQueryChangedDiskAreas)(nil)).Elem() -} - -type VstorageObjectVCenterQueryChangedDiskAreasRequestType struct { - This ManagedObjectReference `xml:"_this"` - Id ID `xml:"id"` - Datastore ManagedObjectReference `xml:"datastore"` - SnapshotId ID `xml:"snapshotId"` - StartOffset int64 `xml:"startOffset"` - ChangeId string `xml:"changeId"` -} - -func init() { - t["VstorageObjectVCenterQueryChangedDiskAreasRequestType"] = reflect.TypeOf((*VstorageObjectVCenterQueryChangedDiskAreasRequestType)(nil)).Elem() -} - -type VstorageObjectVCenterQueryChangedDiskAreasResponse struct { - Returnval DiskChangeInfo `xml:"returnval"` -} - -type VvolDatastoreInfo struct { - DatastoreInfo - - VvolDS *HostVvolVolume `xml:"vvolDS,omitempty"` -} - -func init() { - t["VvolDatastoreInfo"] = reflect.TypeOf((*VvolDatastoreInfo)(nil)).Elem() -} - -type WaitForUpdates WaitForUpdatesRequestType - -func init() { - t["WaitForUpdates"] = reflect.TypeOf((*WaitForUpdates)(nil)).Elem() -} - -type WaitForUpdatesEx WaitForUpdatesExRequestType - -func init() { - t["WaitForUpdatesEx"] = reflect.TypeOf((*WaitForUpdatesEx)(nil)).Elem() -} - -type WaitForUpdatesExRequestType struct { - This ManagedObjectReference `xml:"_this"` - Version string `xml:"version,omitempty"` - Options *WaitOptions `xml:"options,omitempty"` -} - -func init() { - t["WaitForUpdatesExRequestType"] = reflect.TypeOf((*WaitForUpdatesExRequestType)(nil)).Elem() -} - -type WaitForUpdatesExResponse struct { - Returnval *UpdateSet `xml:"returnval,omitempty"` -} - -type WaitForUpdatesRequestType struct { - This ManagedObjectReference `xml:"_this"` - Version string `xml:"version,omitempty"` -} - -func init() { - t["WaitForUpdatesRequestType"] = reflect.TypeOf((*WaitForUpdatesRequestType)(nil)).Elem() -} - -type WaitForUpdatesResponse struct { - Returnval UpdateSet `xml:"returnval"` -} - -type WaitOptions struct { - DynamicData - - MaxWaitSeconds *int32 `xml:"maxWaitSeconds"` - MaxObjectUpdates int32 `xml:"maxObjectUpdates,omitempty"` -} - -func init() { - t["WaitOptions"] = reflect.TypeOf((*WaitOptions)(nil)).Elem() -} - -type WakeOnLanNotSupported struct { - VirtualHardwareCompatibilityIssue -} - -func init() { - t["WakeOnLanNotSupported"] = reflect.TypeOf((*WakeOnLanNotSupported)(nil)).Elem() -} - -type WakeOnLanNotSupportedByVmotionNIC struct { - HostPowerOpFailed -} - -func init() { - t["WakeOnLanNotSupportedByVmotionNIC"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNIC)(nil)).Elem() -} - -type WakeOnLanNotSupportedByVmotionNICFault WakeOnLanNotSupportedByVmotionNIC - -func init() { - t["WakeOnLanNotSupportedByVmotionNICFault"] = reflect.TypeOf((*WakeOnLanNotSupportedByVmotionNICFault)(nil)).Elem() -} - -type WakeOnLanNotSupportedFault WakeOnLanNotSupported - -func init() { - t["WakeOnLanNotSupportedFault"] = reflect.TypeOf((*WakeOnLanNotSupportedFault)(nil)).Elem() -} - -type WarningUpgradeEvent struct { - UpgradeEvent -} - -func init() { - t["WarningUpgradeEvent"] = reflect.TypeOf((*WarningUpgradeEvent)(nil)).Elem() -} - -type WeeklyTaskScheduler struct { - DailyTaskScheduler - - Sunday bool `xml:"sunday"` - Monday bool `xml:"monday"` - Tuesday bool `xml:"tuesday"` - Wednesday bool `xml:"wednesday"` - Thursday bool `xml:"thursday"` - Friday bool `xml:"friday"` - Saturday bool `xml:"saturday"` -} - -func init() { - t["WeeklyTaskScheduler"] = reflect.TypeOf((*WeeklyTaskScheduler)(nil)).Elem() -} - -type WillLoseHAProtection struct { - MigrationFault - - Resolution string `xml:"resolution"` -} - -func init() { - t["WillLoseHAProtection"] = reflect.TypeOf((*WillLoseHAProtection)(nil)).Elem() -} - -type WillLoseHAProtectionFault WillLoseHAProtection - -func init() { - t["WillLoseHAProtectionFault"] = reflect.TypeOf((*WillLoseHAProtectionFault)(nil)).Elem() -} - -type WillModifyConfigCpuRequirements struct { - MigrationFault -} - -func init() { - t["WillModifyConfigCpuRequirements"] = reflect.TypeOf((*WillModifyConfigCpuRequirements)(nil)).Elem() -} - -type WillModifyConfigCpuRequirementsFault WillModifyConfigCpuRequirements - -func init() { - t["WillModifyConfigCpuRequirementsFault"] = reflect.TypeOf((*WillModifyConfigCpuRequirementsFault)(nil)).Elem() -} - -type WillResetSnapshotDirectory struct { - MigrationFault -} - -func init() { - t["WillResetSnapshotDirectory"] = reflect.TypeOf((*WillResetSnapshotDirectory)(nil)).Elem() -} - -type WillResetSnapshotDirectoryFault WillResetSnapshotDirectory - -func init() { - t["WillResetSnapshotDirectoryFault"] = reflect.TypeOf((*WillResetSnapshotDirectoryFault)(nil)).Elem() -} - -type WinNetBIOSConfigInfo struct { - NetBIOSConfigInfo - - PrimaryWINS string `xml:"primaryWINS"` - SecondaryWINS string `xml:"secondaryWINS,omitempty"` -} - -func init() { - t["WinNetBIOSConfigInfo"] = reflect.TypeOf((*WinNetBIOSConfigInfo)(nil)).Elem() -} - -type WipeDiskFault struct { - VimFault -} - -func init() { - t["WipeDiskFault"] = reflect.TypeOf((*WipeDiskFault)(nil)).Elem() -} - -type WipeDiskFaultFault WipeDiskFault - -func init() { - t["WipeDiskFaultFault"] = reflect.TypeOf((*WipeDiskFaultFault)(nil)).Elem() -} - -type WitnessNodeInfo struct { - DynamicData - - IpSettings CustomizationIPSettings `xml:"ipSettings"` - BiosUuid string `xml:"biosUuid,omitempty"` -} - -func init() { - t["WitnessNodeInfo"] = reflect.TypeOf((*WitnessNodeInfo)(nil)).Elem() -} - -type XmlToCustomizationSpecItem XmlToCustomizationSpecItemRequestType - -func init() { - t["XmlToCustomizationSpecItem"] = reflect.TypeOf((*XmlToCustomizationSpecItem)(nil)).Elem() -} - -type XmlToCustomizationSpecItemRequestType struct { - This ManagedObjectReference `xml:"_this"` - SpecItemXml string `xml:"specItemXml"` -} - -func init() { - t["XmlToCustomizationSpecItemRequestType"] = reflect.TypeOf((*XmlToCustomizationSpecItemRequestType)(nil)).Elem() -} - -type XmlToCustomizationSpecItemResponse struct { - Returnval CustomizationSpecItem `xml:"returnval"` -} - -type ZeroFillVirtualDiskRequestType struct { - This ManagedObjectReference `xml:"_this"` - Name string `xml:"name"` - Datacenter *ManagedObjectReference `xml:"datacenter,omitempty"` -} - -func init() { - t["ZeroFillVirtualDiskRequestType"] = reflect.TypeOf((*ZeroFillVirtualDiskRequestType)(nil)).Elem() -} - -type ZeroFillVirtualDisk_Task ZeroFillVirtualDiskRequestType - -func init() { - t["ZeroFillVirtualDisk_Task"] = reflect.TypeOf((*ZeroFillVirtualDisk_Task)(nil)).Elem() -} - -type ZeroFillVirtualDisk_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type ConfigureVchaRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigSpec VchaClusterConfigSpec `xml:"configSpec"` -} - -func init() { - t["configureVchaRequestType"] = reflect.TypeOf((*ConfigureVchaRequestType)(nil)).Elem() -} - -type ConfigureVcha_Task ConfigureVchaRequestType - -func init() { - t["configureVcha_Task"] = reflect.TypeOf((*ConfigureVcha_Task)(nil)).Elem() -} - -type ConfigureVcha_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreatePassiveNodeRequestType struct { - This ManagedObjectReference `xml:"_this"` - PassiveDeploymentSpec PassiveNodeDeploymentSpec `xml:"passiveDeploymentSpec"` - SourceVcSpec SourceNodeSpec `xml:"sourceVcSpec"` -} - -func init() { - t["createPassiveNodeRequestType"] = reflect.TypeOf((*CreatePassiveNodeRequestType)(nil)).Elem() -} - -type CreatePassiveNode_Task CreatePassiveNodeRequestType - -func init() { - t["createPassiveNode_Task"] = reflect.TypeOf((*CreatePassiveNode_Task)(nil)).Elem() -} - -type CreatePassiveNode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type CreateWitnessNodeRequestType struct { - This ManagedObjectReference `xml:"_this"` - WitnessDeploymentSpec BaseNodeDeploymentSpec `xml:"witnessDeploymentSpec,typeattr"` - SourceVcSpec SourceNodeSpec `xml:"sourceVcSpec"` -} - -func init() { - t["createWitnessNodeRequestType"] = reflect.TypeOf((*CreateWitnessNodeRequestType)(nil)).Elem() -} - -type CreateWitnessNode_Task CreateWitnessNodeRequestType - -func init() { - t["createWitnessNode_Task"] = reflect.TypeOf((*CreateWitnessNode_Task)(nil)).Elem() -} - -type CreateWitnessNode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DeployVchaRequestType struct { - This ManagedObjectReference `xml:"_this"` - DeploymentSpec VchaClusterDeploymentSpec `xml:"deploymentSpec"` -} - -func init() { - t["deployVchaRequestType"] = reflect.TypeOf((*DeployVchaRequestType)(nil)).Elem() -} - -type DeployVcha_Task DeployVchaRequestType - -func init() { - t["deployVcha_Task"] = reflect.TypeOf((*DeployVcha_Task)(nil)).Elem() -} - -type DeployVcha_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type DestroyVchaRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["destroyVchaRequestType"] = reflect.TypeOf((*DestroyVchaRequestType)(nil)).Elem() -} - -type DestroyVcha_Task DestroyVchaRequestType - -func init() { - t["destroyVcha_Task"] = reflect.TypeOf((*DestroyVcha_Task)(nil)).Elem() -} - -type DestroyVcha_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type FetchSoftwarePackages FetchSoftwarePackagesRequestType - -func init() { - t["fetchSoftwarePackages"] = reflect.TypeOf((*FetchSoftwarePackages)(nil)).Elem() -} - -type FetchSoftwarePackagesRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["fetchSoftwarePackagesRequestType"] = reflect.TypeOf((*FetchSoftwarePackagesRequestType)(nil)).Elem() -} - -type FetchSoftwarePackagesResponse struct { - Returnval []SoftwarePackage `xml:"returnval,omitempty"` -} - -type GetClusterMode GetClusterModeRequestType - -func init() { - t["getClusterMode"] = reflect.TypeOf((*GetClusterMode)(nil)).Elem() -} - -type GetClusterModeRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["getClusterModeRequestType"] = reflect.TypeOf((*GetClusterModeRequestType)(nil)).Elem() -} - -type GetClusterModeResponse struct { - Returnval string `xml:"returnval"` -} - -type GetVchaConfig GetVchaConfigRequestType - -func init() { - t["getVchaConfig"] = reflect.TypeOf((*GetVchaConfig)(nil)).Elem() -} - -type GetVchaConfigRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["getVchaConfigRequestType"] = reflect.TypeOf((*GetVchaConfigRequestType)(nil)).Elem() -} - -type GetVchaConfigResponse struct { - Returnval VchaClusterConfigInfo `xml:"returnval"` -} - -type InitiateFailoverRequestType struct { - This ManagedObjectReference `xml:"_this"` - Planned bool `xml:"planned"` -} - -func init() { - t["initiateFailoverRequestType"] = reflect.TypeOf((*InitiateFailoverRequestType)(nil)).Elem() -} - -type InitiateFailover_Task InitiateFailoverRequestType - -func init() { - t["initiateFailover_Task"] = reflect.TypeOf((*InitiateFailover_Task)(nil)).Elem() -} - -type InitiateFailover_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type InstallDate InstallDateRequestType - -func init() { - t["installDate"] = reflect.TypeOf((*InstallDate)(nil)).Elem() -} - -type InstallDateRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["installDateRequestType"] = reflect.TypeOf((*InstallDateRequestType)(nil)).Elem() -} - -type InstallDateResponse struct { - Returnval time.Time `xml:"returnval"` -} - -type PrepareVchaRequestType struct { - This ManagedObjectReference `xml:"_this"` - NetworkSpec VchaClusterNetworkSpec `xml:"networkSpec"` -} - -func init() { - t["prepareVchaRequestType"] = reflect.TypeOf((*PrepareVchaRequestType)(nil)).Elem() -} - -type PrepareVcha_Task PrepareVchaRequestType - -func init() { - t["prepareVcha_Task"] = reflect.TypeOf((*PrepareVcha_Task)(nil)).Elem() -} - -type PrepareVcha_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type QueryDatacenterConfigOptionDescriptor QueryDatacenterConfigOptionDescriptorRequestType - -func init() { - t["queryDatacenterConfigOptionDescriptor"] = reflect.TypeOf((*QueryDatacenterConfigOptionDescriptor)(nil)).Elem() -} - -type QueryDatacenterConfigOptionDescriptorRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["queryDatacenterConfigOptionDescriptorRequestType"] = reflect.TypeOf((*QueryDatacenterConfigOptionDescriptorRequestType)(nil)).Elem() -} - -type QueryDatacenterConfigOptionDescriptorResponse struct { - Returnval []VirtualMachineConfigOptionDescriptor `xml:"returnval,omitempty"` -} - -type ReloadVirtualMachineFromPathRequestType struct { - This ManagedObjectReference `xml:"_this"` - ConfigurationPath string `xml:"configurationPath"` -} - -func init() { - t["reloadVirtualMachineFromPathRequestType"] = reflect.TypeOf((*ReloadVirtualMachineFromPathRequestType)(nil)).Elem() -} - -type ReloadVirtualMachineFromPath_Task ReloadVirtualMachineFromPathRequestType - -func init() { - t["reloadVirtualMachineFromPath_Task"] = reflect.TypeOf((*ReloadVirtualMachineFromPath_Task)(nil)).Elem() -} - -type ReloadVirtualMachineFromPath_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SetClusterModeRequestType struct { - This ManagedObjectReference `xml:"_this"` - Mode string `xml:"mode"` -} - -func init() { - t["setClusterModeRequestType"] = reflect.TypeOf((*SetClusterModeRequestType)(nil)).Elem() -} - -type SetClusterMode_Task SetClusterModeRequestType - -func init() { - t["setClusterMode_Task"] = reflect.TypeOf((*SetClusterMode_Task)(nil)).Elem() -} - -type SetClusterMode_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type SetCustomValue SetCustomValueRequestType - -func init() { - t["setCustomValue"] = reflect.TypeOf((*SetCustomValue)(nil)).Elem() -} - -type SetCustomValueRequestType struct { - This ManagedObjectReference `xml:"_this"` - Key string `xml:"key"` - Value string `xml:"value"` -} - -func init() { - t["setCustomValueRequestType"] = reflect.TypeOf((*SetCustomValueRequestType)(nil)).Elem() -} - -type SetCustomValueResponse struct { -} - -type UnregisterVAppRequestType struct { - This ManagedObjectReference `xml:"_this"` -} - -func init() { - t["unregisterVAppRequestType"] = reflect.TypeOf((*UnregisterVAppRequestType)(nil)).Elem() -} - -type UnregisterVApp_Task UnregisterVAppRequestType - -func init() { - t["unregisterVApp_Task"] = reflect.TypeOf((*UnregisterVApp_Task)(nil)).Elem() -} - -type UnregisterVApp_TaskResponse struct { - Returnval ManagedObjectReference `xml:"returnval"` -} - -type VersionURI string - -func init() { - t["versionURI"] = reflect.TypeOf((*VersionURI)(nil)).Elem() -} - -type VslmInfrastructureObjectPolicy struct { - DynamicData - - Name string `xml:"name"` - BackingObjectId string `xml:"backingObjectId"` - ProfileId string `xml:"profileId"` - Error *LocalizedMethodFault `xml:"error,omitempty"` -} - -func init() { - t["vslmInfrastructureObjectPolicy"] = reflect.TypeOf((*VslmInfrastructureObjectPolicy)(nil)).Elem() -} - -type VslmInfrastructureObjectPolicySpec struct { - DynamicData - - Datastore ManagedObjectReference `xml:"datastore"` - Profile []BaseVirtualMachineProfileSpec `xml:"profile,omitempty,typeattr"` -} - -func init() { - t["vslmInfrastructureObjectPolicySpec"] = reflect.TypeOf((*VslmInfrastructureObjectPolicySpec)(nil)).Elem() -} - -type VslmVClockInfo struct { - DynamicData - - VClockTime int64 `xml:"vClockTime"` -} - -func init() { - t["vslmVClockInfo"] = reflect.TypeOf((*VslmVClockInfo)(nil)).Elem() -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/unreleased.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/unreleased.go deleted file mode 100644 index 72bc1082b876..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/types/unreleased.go +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (c) 2022 VMware, Inc. 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. -*/ - -package types - -import "reflect" - -type ArrayOfPlaceVmsXClusterResultPlacementFaults struct { - PlaceVmsXClusterResultPlacementFaults []PlaceVmsXClusterResultPlacementFaults `xml:"PlaceVmsXClusterResultPlacementFaults,omitempty"` -} - -func init() { - t["ArrayOfPlaceVmsXClusterResultPlacementFaults"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterResultPlacementFaults)(nil)).Elem() -} - -type ArrayOfPlaceVmsXClusterResultPlacementInfo struct { - PlaceVmsXClusterResultPlacementInfo []PlaceVmsXClusterResultPlacementInfo `xml:"PlaceVmsXClusterResultPlacementInfo,omitempty"` -} - -func init() { - t["ArrayOfPlaceVmsXClusterResultPlacementInfo"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterResultPlacementInfo)(nil)).Elem() -} - -type ArrayOfPlaceVmsXClusterSpecVmPlacementSpec struct { - PlaceVmsXClusterSpecVmPlacementSpec []PlaceVmsXClusterSpecVmPlacementSpec `xml:"PlaceVmsXClusterSpecVmPlacementSpec,omitempty"` -} - -func init() { - t["ArrayOfPlaceVmsXClusterSpecVmPlacementSpec"] = reflect.TypeOf((*ArrayOfPlaceVmsXClusterSpecVmPlacementSpec)(nil)).Elem() -} - -type PlaceVmsXCluster PlaceVmsXClusterRequestType - -func init() { - t["PlaceVmsXCluster"] = reflect.TypeOf((*PlaceVmsXCluster)(nil)).Elem() -} - -type PlaceVmsXClusterRequestType struct { - This ManagedObjectReference `xml:"_this"` - PlacementSpec PlaceVmsXClusterSpec `xml:"placementSpec"` -} - -func init() { - t["PlaceVmsXClusterRequestType"] = reflect.TypeOf((*PlaceVmsXClusterRequestType)(nil)).Elem() -} - -type PlaceVmsXClusterResponse struct { - Returnval PlaceVmsXClusterResult `xml:"returnval"` -} - -type PlaceVmsXClusterResult struct { - DynamicData - - PlacementInfos []PlaceVmsXClusterResultPlacementInfo `xml:"placementInfos,omitempty"` - Faults []PlaceVmsXClusterResultPlacementFaults `xml:"faults,omitempty"` -} - -func init() { - t["PlaceVmsXClusterResult"] = reflect.TypeOf((*PlaceVmsXClusterResult)(nil)).Elem() -} - -type PlaceVmsXClusterResultPlacementFaults struct { - DynamicData - - ResourcePool ManagedObjectReference `xml:"resourcePool"` - VmName string `xml:"vmName"` - Faults []LocalizedMethodFault `xml:"faults,omitempty"` -} - -func init() { - t["PlaceVmsXClusterResultPlacementFaults"] = reflect.TypeOf((*PlaceVmsXClusterResultPlacementFaults)(nil)).Elem() -} - -type PlaceVmsXClusterResultPlacementInfo struct { - DynamicData - - VmName string `xml:"vmName"` - Recommendation ClusterRecommendation `xml:"recommendation"` -} - -func init() { - t["PlaceVmsXClusterResultPlacementInfo"] = reflect.TypeOf((*PlaceVmsXClusterResultPlacementInfo)(nil)).Elem() -} - -type PlaceVmsXClusterSpec struct { - DynamicData - - ResourcePools []ManagedObjectReference `xml:"resourcePools,omitempty"` - VmPlacementSpecs []PlaceVmsXClusterSpecVmPlacementSpec `xml:"vmPlacementSpecs,omitempty"` - HostRecommRequired *bool `xml:"hostRecommRequired"` - DatastoreRecommRequired *bool `xml:"datastoreRecommRequired"` -} - -func init() { - t["PlaceVmsXClusterSpec"] = reflect.TypeOf((*PlaceVmsXClusterSpec)(nil)).Elem() -} - -type PlaceVmsXClusterSpecVmPlacementSpec struct { - DynamicData - - ConfigSpec VirtualMachineConfigSpec `xml:"configSpec"` -} - -func init() { - t["PlaceVmsXClusterSpecVmPlacementSpec"] = reflect.TypeOf((*PlaceVmsXClusterSpecVmPlacementSpec)(nil)).Elem() -} - -const RecommendationReasonCodeXClusterPlacement = RecommendationReasonCode("xClusterPlacement") diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE deleted file mode 100644 index 6a66aea5eafe..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/extras.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/extras.go deleted file mode 100644 index 9a15b7c8eb6d..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/extras.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright (c) 2014 VMware, Inc. 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. -*/ - -package xml - -import ( - "reflect" - "time" -) - -var xmlSchemaInstance = Name{Space: "http://www.w3.org/2001/XMLSchema-instance", Local: "type"} - -var xsiType = Name{Space: "xsi", Local: "type"} - -var stringToTypeMap = map[string]reflect.Type{ - "xsd:boolean": reflect.TypeOf((*bool)(nil)).Elem(), - "xsd:byte": reflect.TypeOf((*int8)(nil)).Elem(), - "xsd:short": reflect.TypeOf((*int16)(nil)).Elem(), - "xsd:int": reflect.TypeOf((*int32)(nil)).Elem(), - "xsd:long": reflect.TypeOf((*int64)(nil)).Elem(), - "xsd:unsignedByte": reflect.TypeOf((*uint8)(nil)).Elem(), - "xsd:unsignedShort": reflect.TypeOf((*uint16)(nil)).Elem(), - "xsd:unsignedInt": reflect.TypeOf((*uint32)(nil)).Elem(), - "xsd:unsignedLong": reflect.TypeOf((*uint64)(nil)).Elem(), - "xsd:float": reflect.TypeOf((*float32)(nil)).Elem(), - "xsd:double": reflect.TypeOf((*float64)(nil)).Elem(), - "xsd:string": reflect.TypeOf((*string)(nil)).Elem(), - "xsd:dateTime": reflect.TypeOf((*time.Time)(nil)).Elem(), - "xsd:base64Binary": reflect.TypeOf((*[]byte)(nil)).Elem(), -} - -// Return a reflect.Type for the specified type. Nil if unknown. -func stringToType(s string) reflect.Type { - return stringToTypeMap[s] -} - -// Return a string for the specified reflect.Type. Panic if unknown. -func typeToString(typ reflect.Type) string { - switch typ.Kind() { - case reflect.Bool: - return "xsd:boolean" - case reflect.Int8: - return "xsd:byte" - case reflect.Int16: - return "xsd:short" - case reflect.Int32: - return "xsd:int" - case reflect.Int, reflect.Int64: - return "xsd:long" - case reflect.Uint8: - return "xsd:unsignedByte" - case reflect.Uint16: - return "xsd:unsignedShort" - case reflect.Uint32: - return "xsd:unsignedInt" - case reflect.Uint, reflect.Uint64: - return "xsd:unsignedLong" - case reflect.Float32: - return "xsd:float" - case reflect.Float64: - return "xsd:double" - case reflect.String: - name := typ.Name() - if name == "string" { - return "xsd:string" - } - return name - case reflect.Struct: - if typ == stringToTypeMap["xsd:dateTime"] { - return "xsd:dateTime" - } - - // Expect any other struct to be handled... - return typ.Name() - case reflect.Slice: - if typ.Elem().Kind() == reflect.Uint8 { - return "xsd:base64Binary" - } - case reflect.Array: - if typ.Elem().Kind() == reflect.Uint8 { - return "xsd:base64Binary" - } - } - - panic("don't know what to do for type: " + typ.String()) -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go deleted file mode 100644 index c0c0a588bf5f..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/marshal.go +++ /dev/null @@ -1,1066 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bufio" - "bytes" - "encoding" - "fmt" - "io" - "reflect" - "strconv" - "strings" -) - -const ( - // Header is a generic XML header suitable for use with the output of Marshal. - // This is not automatically added to any output of this package, - // it is provided as a convenience. - Header = `` + "\n" -) - -// Marshal returns the XML encoding of v. -// -// Marshal handles an array or slice by marshaling each of the elements. -// Marshal handles a pointer by marshaling the value it points at or, if the -// pointer is nil, by writing nothing. Marshal handles an interface value by -// marshaling the value it contains or, if the interface value is nil, by -// writing nothing. Marshal handles all other data by writing one or more XML -// elements containing the data. -// -// The name for the XML elements is taken from, in order of preference: -// - the tag on the XMLName field, if the data is a struct -// - the value of the XMLName field of type Name -// - the tag of the struct field used to obtain the data -// - the name of the struct field used to obtain the data -// - the name of the marshaled type -// -// The XML element for a struct contains marshaled elements for each of the -// exported fields of the struct, with these exceptions: -// - the XMLName field, described above, is omitted. -// - a field with tag "-" is omitted. -// - a field with tag "name,attr" becomes an attribute with -// the given name in the XML element. -// - a field with tag ",attr" becomes an attribute with the -// field name in the XML element. -// - a field with tag ",chardata" is written as character data, -// not as an XML element. -// - a field with tag ",cdata" is written as character data -// wrapped in one or more tags, not as an XML element. -// - a field with tag ",innerxml" is written verbatim, not subject -// to the usual marshaling procedure. -// - a field with tag ",comment" is written as an XML comment, not -// subject to the usual marshaling procedure. It must not contain -// the "--" string within it. -// - a field with a tag including the "omitempty" option is omitted -// if the field value is empty. The empty values are false, 0, any -// nil pointer or interface value, and any array, slice, map, or -// string of length zero. -// - an anonymous struct field is handled as if the fields of its -// value were part of the outer struct. -// - a field implementing Marshaler is written by calling its MarshalXML -// method. -// - a field implementing encoding.TextMarshaler is written by encoding the -// result of its MarshalText method as text. -// -// If a field uses a tag "a>b>c", then the element c will be nested inside -// parent elements a and b. Fields that appear next to each other that name -// the same parent will be enclosed in one XML element. -// -// If the XML name for a struct field is defined by both the field tag and the -// struct's XMLName field, the names must match. -// -// See MarshalIndent for an example. -// -// Marshal will return an error if asked to marshal a channel, function, or map. -func Marshal(v interface{}) ([]byte, error) { - var b bytes.Buffer - if err := NewEncoder(&b).Encode(v); err != nil { - return nil, err - } - return b.Bytes(), nil -} - -// Marshaler is the interface implemented by objects that can marshal -// themselves into valid XML elements. -// -// MarshalXML encodes the receiver as zero or more XML elements. -// By convention, arrays or slices are typically encoded as a sequence -// of elements, one per entry. -// Using start as the element tag is not required, but doing so -// will enable Unmarshal to match the XML elements to the correct -// struct field. -// One common implementation strategy is to construct a separate -// value with a layout corresponding to the desired XML and then -// to encode it using e.EncodeElement. -// Another common strategy is to use repeated calls to e.EncodeToken -// to generate the XML output one token at a time. -// The sequence of encoded tokens must make up zero or more valid -// XML elements. -type Marshaler interface { - MarshalXML(e *Encoder, start StartElement) error -} - -// MarshalerAttr is the interface implemented by objects that can marshal -// themselves into valid XML attributes. -// -// MarshalXMLAttr returns an XML attribute with the encoded value of the receiver. -// Using name as the attribute name is not required, but doing so -// will enable Unmarshal to match the attribute to the correct -// struct field. -// If MarshalXMLAttr returns the zero attribute Attr{}, no attribute -// will be generated in the output. -// MarshalXMLAttr is used only for struct fields with the -// "attr" option in the field tag. -type MarshalerAttr interface { - MarshalXMLAttr(name Name) (Attr, error) -} - -// MarshalIndent works like Marshal, but each XML element begins on a new -// indented line that starts with prefix and is followed by one or more -// copies of indent according to the nesting depth. -func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { - var b bytes.Buffer - enc := NewEncoder(&b) - enc.Indent(prefix, indent) - if err := enc.Encode(v); err != nil { - return nil, err - } - return b.Bytes(), nil -} - -// An Encoder writes XML data to an output stream. -type Encoder struct { - p printer -} - -// NewEncoder returns a new encoder that writes to w. -func NewEncoder(w io.Writer) *Encoder { - e := &Encoder{printer{Writer: bufio.NewWriter(w)}} - e.p.encoder = e - return e -} - -// Indent sets the encoder to generate XML in which each element -// begins on a new indented line that starts with prefix and is followed by -// one or more copies of indent according to the nesting depth. -func (enc *Encoder) Indent(prefix, indent string) { - enc.p.prefix = prefix - enc.p.indent = indent -} - -// Encode writes the XML encoding of v to the stream. -// -// See the documentation for Marshal for details about the conversion -// of Go values to XML. -// -// Encode calls Flush before returning. -func (enc *Encoder) Encode(v interface{}) error { - err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil) - if err != nil { - return err - } - return enc.p.Flush() -} - -// EncodeElement writes the XML encoding of v to the stream, -// using start as the outermost tag in the encoding. -// -// See the documentation for Marshal for details about the conversion -// of Go values to XML. -// -// EncodeElement calls Flush before returning. -func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error { - err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start) - if err != nil { - return err - } - return enc.p.Flush() -} - -var ( - begComment = []byte("") - endProcInst = []byte("?>") -) - -// EncodeToken writes the given XML token to the stream. -// It returns an error if StartElement and EndElement tokens are not properly matched. -// -// EncodeToken does not call Flush, because usually it is part of a larger operation -// such as Encode or EncodeElement (or a custom Marshaler's MarshalXML invoked -// during those), and those will call Flush when finished. -// Callers that create an Encoder and then invoke EncodeToken directly, without -// using Encode or EncodeElement, need to call Flush when finished to ensure -// that the XML is written to the underlying writer. -// -// EncodeToken allows writing a ProcInst with Target set to "xml" only as the first token -// in the stream. -func (enc *Encoder) EncodeToken(t Token) error { - - p := &enc.p - switch t := t.(type) { - case StartElement: - if err := p.writeStart(&t); err != nil { - return err - } - case EndElement: - if err := p.writeEnd(t.Name); err != nil { - return err - } - case CharData: - escapeText(p, t, false) - case Comment: - if bytes.Contains(t, endComment) { - return fmt.Errorf("xml: EncodeToken of Comment containing --> marker") - } - p.WriteString("") - return p.cachedWriteError() - case ProcInst: - // First token to be encoded which is also a ProcInst with target of xml - // is the xml declaration. The only ProcInst where target of xml is allowed. - if t.Target == "xml" && p.Buffered() != 0 { - return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded") - } - if !isNameString(t.Target) { - return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target") - } - if bytes.Contains(t.Inst, endProcInst) { - return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker") - } - p.WriteString(" 0 { - p.WriteByte(' ') - p.Write(t.Inst) - } - p.WriteString("?>") - case Directive: - if !isValidDirective(t) { - return fmt.Errorf("xml: EncodeToken of Directive containing wrong < or > markers") - } - p.WriteString("") - default: - return fmt.Errorf("xml: EncodeToken of invalid token type") - - } - return p.cachedWriteError() -} - -// isValidDirective reports whether dir is a valid directive text, -// meaning angle brackets are matched, ignoring comments and strings. -func isValidDirective(dir Directive) bool { - var ( - depth int - inquote uint8 - incomment bool - ) - for i, c := range dir { - switch { - case incomment: - if c == '>' { - if n := 1 + i - len(endComment); n >= 0 && bytes.Equal(dir[n:i+1], endComment) { - incomment = false - } - } - // Just ignore anything in comment - case inquote != 0: - if c == inquote { - inquote = 0 - } - // Just ignore anything within quotes - case c == '\'' || c == '"': - inquote = c - case c == '<': - if i+len(begComment) < len(dir) && bytes.Equal(dir[i:i+len(begComment)], begComment) { - incomment = true - } else { - depth++ - } - case c == '>': - if depth == 0 { - return false - } - depth-- - } - } - return depth == 0 && inquote == 0 && !incomment -} - -// Flush flushes any buffered XML to the underlying writer. -// See the EncodeToken documentation for details about when it is necessary. -func (enc *Encoder) Flush() error { - return enc.p.Flush() -} - -type printer struct { - *bufio.Writer - encoder *Encoder - seq int - indent string - prefix string - depth int - indentedIn bool - putNewline bool - attrNS map[string]string // map prefix -> name space - attrPrefix map[string]string // map name space -> prefix - prefixes []string - tags []Name -} - -// createAttrPrefix finds the name space prefix attribute to use for the given name space, -// defining a new prefix if necessary. It returns the prefix. -func (p *printer) createAttrPrefix(url string) string { - if prefix := p.attrPrefix[url]; prefix != "" { - return prefix - } - - // The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml" - // and must be referred to that way. - // (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns", - // but users should not be trying to use that one directly - that's our job.) - if url == xmlURL { - return xmlPrefix - } - - // Need to define a new name space. - if p.attrPrefix == nil { - p.attrPrefix = make(map[string]string) - p.attrNS = make(map[string]string) - } - - // Pick a name. We try to use the final element of the path - // but fall back to _. - prefix := strings.TrimRight(url, "/") - if i := strings.LastIndex(prefix, "/"); i >= 0 { - prefix = prefix[i+1:] - } - if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") { - prefix = "_" - } - if strings.HasPrefix(prefix, "xml") { - // xmlanything is reserved. - prefix = "_" + prefix - } - if p.attrNS[prefix] != "" { - // Name is taken. Find a better one. - for p.seq++; ; p.seq++ { - if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" { - prefix = id - break - } - } - } - - p.attrPrefix[url] = prefix - p.attrNS[prefix] = url - - p.WriteString(`xmlns:`) - p.WriteString(prefix) - p.WriteString(`="`) - EscapeText(p, []byte(url)) - p.WriteString(`" `) - - p.prefixes = append(p.prefixes, prefix) - - return prefix -} - -// deleteAttrPrefix removes an attribute name space prefix. -func (p *printer) deleteAttrPrefix(prefix string) { - delete(p.attrPrefix, p.attrNS[prefix]) - delete(p.attrNS, prefix) -} - -func (p *printer) markPrefix() { - p.prefixes = append(p.prefixes, "") -} - -func (p *printer) popPrefix() { - for len(p.prefixes) > 0 { - prefix := p.prefixes[len(p.prefixes)-1] - p.prefixes = p.prefixes[:len(p.prefixes)-1] - if prefix == "" { - break - } - p.deleteAttrPrefix(prefix) - } -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem() - textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() -) - -// marshalValue writes one or more XML elements representing val. -// If val was obtained from a struct field, finfo must have its details. -func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error { - if startTemplate != nil && startTemplate.Name.Local == "" { - return fmt.Errorf("xml: EncodeElement of StartElement with missing name") - } - - if !val.IsValid() { - return nil - } - if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) { - return nil - } - - // Drill into interfaces and pointers. - // This can turn into an infinite loop given a cyclic chain, - // but it matches the Go 1 behavior. - for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { - if val.IsNil() { - return nil - } - val = val.Elem() - } - - kind := val.Kind() - typ := val.Type() - - // Check for marshaler. - if val.CanInterface() && typ.Implements(marshalerType) { - return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(marshalerType) { - return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate)) - } - } - - // Check for text marshaler. - if val.CanInterface() && typ.Implements(textMarshalerType) { - return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), defaultStart(typ, finfo, startTemplate)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), defaultStart(pv.Type(), finfo, startTemplate)) - } - } - - // Slices and arrays iterate over the elements. They do not have an enclosing tag. - if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 { - for i, n := 0, val.Len(); i < n; i++ { - if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil { - return err - } - } - return nil - } - - tinfo, err := getTypeInfo(typ) - if err != nil { - return err - } - - // Create start element. - // Precedence for the XML element name is: - // 0. startTemplate - // 1. XMLName field in underlying struct; - // 2. field name/tag in the struct field; and - // 3. type name - var start StartElement - - if startTemplate != nil { - start.Name = startTemplate.Name - start.Attr = append(start.Attr, startTemplate.Attr...) - } else if tinfo.xmlname != nil { - xmlname := tinfo.xmlname - if xmlname.name != "" { - start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name - } else { - fv := xmlname.value(val, dontInitNilPointers) - if v, ok := fv.Interface().(Name); ok && v.Local != "" { - start.Name = v - } - } - } - if start.Name.Local == "" && finfo != nil { - start.Name.Space, start.Name.Local = finfo.xmlns, finfo.name - } - if start.Name.Local == "" { - name := typ.Name() - if name == "" { - return &UnsupportedTypeError{typ} - } - start.Name.Local = name - } - - // Add type attribute if necessary - if finfo != nil && finfo.flags&fTypeAttr != 0 { - start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)}) - } - - // Attributes - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fAttr == 0 { - continue - } - fv := finfo.value(val, dontInitNilPointers) - - if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) { - continue - } - - if fv.Kind() == reflect.Interface && fv.IsNil() { - continue - } - - name := Name{Space: finfo.xmlns, Local: finfo.name} - if err := p.marshalAttr(&start, name, fv); err != nil { - return err - } - } - - if err := p.writeStart(&start); err != nil { - return err - } - - if val.Kind() == reflect.Struct { - err = p.marshalStruct(tinfo, val) - } else { - s, b, err1 := p.marshalSimple(typ, val) - if err1 != nil { - err = err1 - } else if b != nil { - EscapeText(p, b) - } else { - p.EscapeString(s) - } - } - if err != nil { - return err - } - - if err := p.writeEnd(start.Name); err != nil { - return err - } - - return p.cachedWriteError() -} - -// marshalAttr marshals an attribute with the given name and value, adding to start.Attr. -func (p *printer) marshalAttr(start *StartElement, name Name, val reflect.Value) error { - if val.CanInterface() && val.Type().Implements(marshalerAttrType) { - attr, err := val.Interface().(MarshalerAttr).MarshalXMLAttr(name) - if err != nil { - return err - } - if attr.Name.Local != "" { - start.Attr = append(start.Attr, attr) - } - return nil - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) { - attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name) - if err != nil { - return err - } - if attr.Name.Local != "" { - start.Attr = append(start.Attr, attr) - } - return nil - } - } - - if val.CanInterface() && val.Type().Implements(textMarshalerType) { - text, err := val.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - start.Attr = append(start.Attr, Attr{name, string(text)}) - return nil - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - text, err := pv.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - start.Attr = append(start.Attr, Attr{name, string(text)}) - return nil - } - } - - // Dereference or skip nil pointer, interface values. - switch val.Kind() { - case reflect.Ptr, reflect.Interface: - if val.IsNil() { - return nil - } - val = val.Elem() - } - - // Walk slices. - if val.Kind() == reflect.Slice && val.Type().Elem().Kind() != reflect.Uint8 { - n := val.Len() - for i := 0; i < n; i++ { - if err := p.marshalAttr(start, name, val.Index(i)); err != nil { - return err - } - } - return nil - } - - if val.Type() == attrType { - start.Attr = append(start.Attr, val.Interface().(Attr)) - return nil - } - - s, b, err := p.marshalSimple(val.Type(), val) - if err != nil { - return err - } - if b != nil { - s = string(b) - } - start.Attr = append(start.Attr, Attr{name, s}) - return nil -} - -// defaultStart returns the default start element to use, -// given the reflect type, field info, and start template. -func defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement { - var start StartElement - // Precedence for the XML element name is as above, - // except that we do not look inside structs for the first field. - if startTemplate != nil { - start.Name = startTemplate.Name - start.Attr = append(start.Attr, startTemplate.Attr...) - } else if finfo != nil && finfo.name != "" { - start.Name.Local = finfo.name - start.Name.Space = finfo.xmlns - } else if typ.Name() != "" { - start.Name.Local = typ.Name() - } else { - // Must be a pointer to a named type, - // since it has the Marshaler methods. - start.Name.Local = typ.Elem().Name() - } - - // Add type attribute if necessary - if finfo != nil && finfo.flags&fTypeAttr != 0 { - start.Attr = append(start.Attr, Attr{xmlSchemaInstance, typeToString(typ)}) - } - - return start -} - -// marshalInterface marshals a Marshaler interface value. -func (p *printer) marshalInterface(val Marshaler, start StartElement) error { - // Push a marker onto the tag stack so that MarshalXML - // cannot close the XML tags that it did not open. - p.tags = append(p.tags, Name{}) - n := len(p.tags) - - err := val.MarshalXML(p.encoder, start) - if err != nil { - return err - } - - // Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark. - if len(p.tags) > n { - return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local) - } - p.tags = p.tags[:n-1] - return nil -} - -// marshalTextInterface marshals a TextMarshaler interface value. -func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error { - if err := p.writeStart(&start); err != nil { - return err - } - text, err := val.MarshalText() - if err != nil { - return err - } - EscapeText(p, text) - return p.writeEnd(start.Name) -} - -// writeStart writes the given start element. -func (p *printer) writeStart(start *StartElement) error { - if start.Name.Local == "" { - return fmt.Errorf("xml: start tag with no name") - } - - p.tags = append(p.tags, start.Name) - p.markPrefix() - - p.writeIndent(1) - p.WriteByte('<') - p.WriteString(start.Name.Local) - - if start.Name.Space != "" { - p.WriteString(` xmlns="`) - p.EscapeString(start.Name.Space) - p.WriteByte('"') - } - - // Attributes - for _, attr := range start.Attr { - name := attr.Name - if name.Local == "" { - continue - } - p.WriteByte(' ') - if name.Space != "" { - p.WriteString(p.createAttrPrefix(name.Space)) - p.WriteByte(':') - } - p.WriteString(name.Local) - p.WriteString(`="`) - p.EscapeString(attr.Value) - p.WriteByte('"') - } - p.WriteByte('>') - return nil -} - -func (p *printer) writeEnd(name Name) error { - if name.Local == "" { - return fmt.Errorf("xml: end tag with no name") - } - if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" { - return fmt.Errorf("xml: end tag without start tag", name.Local) - } - if top := p.tags[len(p.tags)-1]; top != name { - if top.Local != name.Local { - return fmt.Errorf("xml: end tag does not match start tag <%s>", name.Local, top.Local) - } - return fmt.Errorf("xml: end tag in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space) - } - p.tags = p.tags[:len(p.tags)-1] - - p.writeIndent(-1) - p.WriteByte('<') - p.WriteByte('/') - p.WriteString(name.Local) - p.WriteByte('>') - p.popPrefix() - return nil -} - -func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) { - switch val.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return strconv.FormatInt(val.Int(), 10), nil, nil - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return strconv.FormatUint(val.Uint(), 10), nil, nil - case reflect.Float32, reflect.Float64: - return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil - case reflect.String: - return val.String(), nil, nil - case reflect.Bool: - return strconv.FormatBool(val.Bool()), nil, nil - case reflect.Array: - if typ.Elem().Kind() != reflect.Uint8 { - break - } - // [...]byte - var bytes []byte - if val.CanAddr() { - bytes = val.Slice(0, val.Len()).Bytes() - } else { - bytes = make([]byte, val.Len()) - reflect.Copy(reflect.ValueOf(bytes), val) - } - return "", bytes, nil - case reflect.Slice: - if typ.Elem().Kind() != reflect.Uint8 { - break - } - // []byte - return "", val.Bytes(), nil - } - return "", nil, &UnsupportedTypeError{typ} -} - -var ddBytes = []byte("--") - -// indirect drills into interfaces and pointers, returning the pointed-at value. -// If it encounters a nil interface or pointer, indirect returns that nil value. -// This can turn into an infinite loop given a cyclic chain, -// but it matches the Go 1 behavior. -func indirect(vf reflect.Value) reflect.Value { - for vf.Kind() == reflect.Interface || vf.Kind() == reflect.Ptr { - if vf.IsNil() { - return vf - } - vf = vf.Elem() - } - return vf -} - -func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error { - s := parentStack{p: p} - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fAttr != 0 { - continue - } - vf := finfo.value(val, dontInitNilPointers) - if !vf.IsValid() { - // The field is behind an anonymous struct field that's - // nil. Skip it. - continue - } - - switch finfo.flags & fMode { - case fCDATA, fCharData: - emit := EscapeText - if finfo.flags&fMode == fCDATA { - emit = emitCDATA - } - if err := s.trim(finfo.parents); err != nil { - return err - } - if vf.CanInterface() && vf.Type().Implements(textMarshalerType) { - data, err := vf.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - if err := emit(p, data); err != nil { - return err - } - continue - } - if vf.CanAddr() { - pv := vf.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - data, err := pv.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - if err := emit(p, data); err != nil { - return err - } - continue - } - } - - var scratch [64]byte - vf = indirect(vf) - switch vf.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if err := emit(p, strconv.AppendInt(scratch[:0], vf.Int(), 10)); err != nil { - return err - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - if err := emit(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10)); err != nil { - return err - } - case reflect.Float32, reflect.Float64: - if err := emit(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits())); err != nil { - return err - } - case reflect.Bool: - if err := emit(p, strconv.AppendBool(scratch[:0], vf.Bool())); err != nil { - return err - } - case reflect.String: - if err := emit(p, []byte(vf.String())); err != nil { - return err - } - case reflect.Slice: - if elem, ok := vf.Interface().([]byte); ok { - if err := emit(p, elem); err != nil { - return err - } - } - } - continue - - case fComment: - if err := s.trim(finfo.parents); err != nil { - return err - } - vf = indirect(vf) - k := vf.Kind() - if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) { - return fmt.Errorf("xml: bad type for comment field of %s", val.Type()) - } - if vf.Len() == 0 { - continue - } - p.writeIndent(0) - p.WriteString("" is invalid grammar. Make it "- -->" - p.WriteByte(' ') - } - p.WriteString("-->") - continue - - case fInnerXML: - vf = indirect(vf) - iface := vf.Interface() - switch raw := iface.(type) { - case []byte: - p.Write(raw) - continue - case string: - p.WriteString(raw) - continue - } - - case fElement, fElement | fAny: - if err := s.trim(finfo.parents); err != nil { - return err - } - if len(finfo.parents) > len(s.stack) { - if vf.Kind() != reflect.Ptr && vf.Kind() != reflect.Interface || !vf.IsNil() { - if err := s.push(finfo.parents[len(s.stack):]); err != nil { - return err - } - } - } - } - if err := p.marshalValue(vf, finfo, nil); err != nil { - return err - } - } - s.trim(nil) - return p.cachedWriteError() -} - -// return the bufio Writer's cached write error -func (p *printer) cachedWriteError() error { - _, err := p.Write(nil) - return err -} - -func (p *printer) writeIndent(depthDelta int) { - if len(p.prefix) == 0 && len(p.indent) == 0 { - return - } - if depthDelta < 0 { - p.depth-- - if p.indentedIn { - p.indentedIn = false - return - } - p.indentedIn = false - } - if p.putNewline { - p.WriteByte('\n') - } else { - p.putNewline = true - } - if len(p.prefix) > 0 { - p.WriteString(p.prefix) - } - if len(p.indent) > 0 { - for i := 0; i < p.depth; i++ { - p.WriteString(p.indent) - } - } - if depthDelta > 0 { - p.depth++ - p.indentedIn = true - } -} - -type parentStack struct { - p *printer - stack []string -} - -// trim updates the XML context to match the longest common prefix of the stack -// and the given parents. A closing tag will be written for every parent -// popped. Passing a zero slice or nil will close all the elements. -func (s *parentStack) trim(parents []string) error { - split := 0 - for ; split < len(parents) && split < len(s.stack); split++ { - if parents[split] != s.stack[split] { - break - } - } - for i := len(s.stack) - 1; i >= split; i-- { - if err := s.p.writeEnd(Name{Local: s.stack[i]}); err != nil { - return err - } - } - s.stack = s.stack[:split] - return nil -} - -// push adds parent elements to the stack and writes open tags. -func (s *parentStack) push(parents []string) error { - for i := 0; i < len(parents); i++ { - if err := s.p.writeStart(&StartElement{Name: Name{Local: parents[i]}}); err != nil { - return err - } - } - s.stack = append(s.stack, parents...) - return nil -} - -// UnsupportedTypeError is returned when Marshal encounters a type -// that cannot be converted into XML. -type UnsupportedTypeError struct { - Type reflect.Type -} - -func (e *UnsupportedTypeError) Error() string { - return "xml: unsupported type: " + e.Type.String() -} - -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/read.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/read.go deleted file mode 100644 index ea61352f6db3..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/read.go +++ /dev/null @@ -1,837 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bytes" - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" -) - -// BUG(rsc): Mapping between XML elements and data structures is inherently flawed: -// an XML element is an order-dependent collection of anonymous -// values, while a data structure is an order-independent collection -// of named values. -// See package json for a textual representation more suitable -// to data structures. - -// Unmarshal parses the XML-encoded data and stores the result in -// the value pointed to by v, which must be an arbitrary struct, -// slice, or string. Well-formed data that does not fit into v is -// discarded. -// -// Because Unmarshal uses the reflect package, it can only assign -// to exported (upper case) fields. Unmarshal uses a case-sensitive -// comparison to match XML element names to tag values and struct -// field names. -// -// Unmarshal maps an XML element to a struct using the following rules. -// In the rules, the tag of a field refers to the value associated with the -// key 'xml' in the struct field's tag (see the example above). -// -// * If the struct has a field of type []byte or string with tag -// ",innerxml", Unmarshal accumulates the raw XML nested inside the -// element in that field. The rest of the rules still apply. -// -// * If the struct has a field named XMLName of type Name, -// Unmarshal records the element name in that field. -// -// * If the XMLName field has an associated tag of the form -// "name" or "namespace-URL name", the XML element must have -// the given name (and, optionally, name space) or else Unmarshal -// returns an error. -// -// * If the XML element has an attribute whose name matches a -// struct field name with an associated tag containing ",attr" or -// the explicit name in a struct field tag of the form "name,attr", -// Unmarshal records the attribute value in that field. -// -// * If the XML element has an attribute not handled by the previous -// rule and the struct has a field with an associated tag containing -// ",any,attr", Unmarshal records the attribute value in the first -// such field. -// -// * If the XML element contains character data, that data is -// accumulated in the first struct field that has tag ",chardata". -// The struct field may have type []byte or string. -// If there is no such field, the character data is discarded. -// -// * If the XML element contains comments, they are accumulated in -// the first struct field that has tag ",comment". The struct -// field may have type []byte or string. If there is no such -// field, the comments are discarded. -// -// * If the XML element contains a sub-element whose name matches -// the prefix of a tag formatted as "a" or "a>b>c", unmarshal -// will descend into the XML structure looking for elements with the -// given names, and will map the innermost elements to that struct -// field. A tag starting with ">" is equivalent to one starting -// with the field name followed by ">". -// -// * If the XML element contains a sub-element whose name matches -// a struct field's XMLName tag and the struct field has no -// explicit name tag as per the previous rule, unmarshal maps -// the sub-element to that struct field. -// -// * If the XML element contains a sub-element whose name matches a -// field without any mode flags (",attr", ",chardata", etc), Unmarshal -// maps the sub-element to that struct field. -// -// * If the XML element contains a sub-element that hasn't matched any -// of the above rules and the struct has a field with tag ",any", -// unmarshal maps the sub-element to that struct field. -// -// * An anonymous struct field is handled as if the fields of its -// value were part of the outer struct. -// -// * A struct field with tag "-" is never unmarshaled into. -// -// If Unmarshal encounters a field type that implements the Unmarshaler -// interface, Unmarshal calls its UnmarshalXML method to produce the value from -// the XML element. Otherwise, if the value implements -// encoding.TextUnmarshaler, Unmarshal calls that value's UnmarshalText method. -// -// Unmarshal maps an XML element to a string or []byte by saving the -// concatenation of that element's character data in the string or -// []byte. The saved []byte is never nil. -// -// Unmarshal maps an attribute value to a string or []byte by saving -// the value in the string or slice. -// -// Unmarshal maps an attribute value to an Attr by saving the attribute, -// including its name, in the Attr. -// -// Unmarshal maps an XML element or attribute value to a slice by -// extending the length of the slice and mapping the element or attribute -// to the newly created value. -// -// Unmarshal maps an XML element or attribute value to a bool by -// setting it to the boolean value represented by the string. Whitespace -// is trimmed and ignored. -// -// Unmarshal maps an XML element or attribute value to an integer or -// floating-point field by setting the field to the result of -// interpreting the string value in decimal. There is no check for -// overflow. Whitespace is trimmed and ignored. -// -// Unmarshal maps an XML element to a Name by recording the element -// name. -// -// Unmarshal maps an XML element to a pointer by setting the pointer -// to a freshly allocated value and then mapping the element to that value. -// -// A missing element or empty attribute value will be unmarshaled as a zero value. -// If the field is a slice, a zero value will be appended to the field. Otherwise, the -// field will be set to its zero value. -func Unmarshal(data []byte, v interface{}) error { - return NewDecoder(bytes.NewReader(data)).Decode(v) -} - -// Decode works like Unmarshal, except it reads the decoder -// stream to find the start element. -func (d *Decoder) Decode(v interface{}) error { - return d.DecodeElement(v, nil) -} - -// DecodeElement works like Unmarshal except that it takes -// a pointer to the start XML element to decode into v. -// It is useful when a client reads some raw XML tokens itself -// but also wants to defer to Unmarshal for some elements. -func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error { - val := reflect.ValueOf(v) - if val.Kind() != reflect.Ptr { - return errors.New("non-pointer passed to Unmarshal") - } - return d.unmarshal(val.Elem(), start) -} - -// An UnmarshalError represents an error in the unmarshaling process. -type UnmarshalError string - -func (e UnmarshalError) Error() string { return string(e) } - -// Unmarshaler is the interface implemented by objects that can unmarshal -// an XML element description of themselves. -// -// UnmarshalXML decodes a single XML element -// beginning with the given start element. -// If it returns an error, the outer call to Unmarshal stops and -// returns that error. -// UnmarshalXML must consume exactly one XML element. -// One common implementation strategy is to unmarshal into -// a separate value with a layout matching the expected XML -// using d.DecodeElement, and then to copy the data from -// that value into the receiver. -// Another common strategy is to use d.Token to process the -// XML object one token at a time. -// UnmarshalXML may not use d.RawToken. -type Unmarshaler interface { - UnmarshalXML(d *Decoder, start StartElement) error -} - -// UnmarshalerAttr is the interface implemented by objects that can unmarshal -// an XML attribute description of themselves. -// -// UnmarshalXMLAttr decodes a single XML attribute. -// If it returns an error, the outer call to Unmarshal stops and -// returns that error. -// UnmarshalXMLAttr is used only for struct fields with the -// "attr" option in the field tag. -type UnmarshalerAttr interface { - UnmarshalXMLAttr(attr Attr) error -} - -// receiverType returns the receiver type to use in an expression like "%s.MethodName". -func receiverType(val interface{}) string { - t := reflect.TypeOf(val) - if t.Name() != "" { - return t.String() - } - return "(" + t.String() + ")" -} - -// unmarshalInterface unmarshals a single XML element into val. -// start is the opening tag of the element. -func (d *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error { - // Record that decoder must stop at end tag corresponding to start. - d.pushEOF() - - d.unmarshalDepth++ - err := val.UnmarshalXML(d, *start) - d.unmarshalDepth-- - if err != nil { - d.popEOF() - return err - } - - if !d.popEOF() { - return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local) - } - - return nil -} - -// unmarshalTextInterface unmarshals a single XML element into val. -// The chardata contained in the element (but not its children) -// is passed to the text unmarshaler. -func (d *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler) error { - var buf []byte - depth := 1 - for depth > 0 { - t, err := d.Token() - if err != nil { - return err - } - switch t := t.(type) { - case CharData: - if depth == 1 { - buf = append(buf, t...) - } - case StartElement: - depth++ - case EndElement: - depth-- - } - } - return val.UnmarshalText(buf) -} - -// unmarshalAttr unmarshals a single XML attribute into val. -func (d *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error { - if val.Kind() == reflect.Ptr { - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - val = val.Elem() - } - if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) { - return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) - } - } - - // Not an UnmarshalerAttr; try encoding.TextUnmarshaler. - if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) - } - } - - if val.Type().Kind() == reflect.Slice && val.Type().Elem().Kind() != reflect.Uint8 { - // Slice of element values. - // Grow slice. - n := val.Len() - val.Set(reflect.Append(val, reflect.Zero(val.Type().Elem()))) - - // Recur to read element into slice. - if err := d.unmarshalAttr(val.Index(n), attr); err != nil { - val.SetLen(n) - return err - } - return nil - } - - if val.Type() == attrType { - val.Set(reflect.ValueOf(attr)) - return nil - } - - return copyValue(val, []byte(attr.Value)) -} - -var ( - attrType = reflect.TypeOf(Attr{}) - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() - unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem() - textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() -) - -// Find reflect.Type for an element's type attribute. -func (p *Decoder) typeForElement(val reflect.Value, start *StartElement) reflect.Type { - t := "" - for _, a := range start.Attr { - if a.Name == xmlSchemaInstance || a.Name == xsiType { - t = a.Value - break - } - } - - if t == "" { - // No type attribute; fall back to looking up type by interface name. - t = val.Type().Name() - } - - // Maybe the type is a basic xsd:* type. - typ := stringToType(t) - if typ != nil { - return typ - } - - // Maybe the type is a custom type. - if p.TypeFunc != nil { - if typ, ok := p.TypeFunc(t); ok { - return typ - } - } - - return nil -} - -// Unmarshal a single XML element into val. -func (d *Decoder) unmarshal(val reflect.Value, start *StartElement) error { - // Find start element if we need it. - if start == nil { - for { - tok, err := d.Token() - if err != nil { - return err - } - if t, ok := tok.(StartElement); ok { - start = &t - break - } - } - } - - // Try to figure out type for empty interface values. - if val.Kind() == reflect.Interface && val.IsNil() { - typ := d.typeForElement(val, start) - if typ != nil { - pval := reflect.New(typ).Elem() - err := d.unmarshal(pval, start) - if err != nil { - return err - } - - for i := 0; i < 2; i++ { - if typ.Implements(val.Type()) { - val.Set(pval) - return nil - } - - typ = reflect.PtrTo(typ) - pval = pval.Addr() - } - - val.Set(pval) - return nil - } - } - - // Load value from interface, but only if the result will be - // usefully addressable. - if val.Kind() == reflect.Interface && !val.IsNil() { - e := val.Elem() - if e.Kind() == reflect.Ptr && !e.IsNil() { - val = e - } - } - - if val.Kind() == reflect.Ptr { - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - val = val.Elem() - } - - if val.CanInterface() && val.Type().Implements(unmarshalerType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return d.unmarshalInterface(val.Interface().(Unmarshaler), start) - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { - return d.unmarshalInterface(pv.Interface().(Unmarshaler), start) - } - } - - if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { - return d.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler)) - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - return d.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler)) - } - } - - var ( - data []byte - saveData reflect.Value - comment []byte - saveComment reflect.Value - saveXML reflect.Value - saveXMLIndex int - saveXMLData []byte - saveAny reflect.Value - sv reflect.Value - tinfo *typeInfo - err error - ) - - switch v := val; v.Kind() { - default: - return errors.New("unknown type " + v.Type().String()) - - case reflect.Interface: - // TODO: For now, simply ignore the field. In the near - // future we may choose to unmarshal the start - // element on it, if not nil. - return d.Skip() - - case reflect.Slice: - typ := v.Type() - if typ.Elem().Kind() == reflect.Uint8 { - // []byte - saveData = v - break - } - - // Slice of element values. - // Grow slice. - n := v.Len() - v.Set(reflect.Append(val, reflect.Zero(v.Type().Elem()))) - - // Recur to read element into slice. - if err := d.unmarshal(v.Index(n), start); err != nil { - v.SetLen(n) - return err - } - return nil - - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String: - saveData = v - - case reflect.Struct: - typ := v.Type() - if typ == nameType { - v.Set(reflect.ValueOf(start.Name)) - break - } - - sv = v - tinfo, err = getTypeInfo(typ) - if err != nil { - return err - } - - // Validate and assign element name. - if tinfo.xmlname != nil { - finfo := tinfo.xmlname - if finfo.name != "" && finfo.name != start.Name.Local { - return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">") - } - if finfo.xmlns != "" && finfo.xmlns != start.Name.Space { - e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " - if start.Name.Space == "" { - e += "no name space" - } else { - e += start.Name.Space - } - return UnmarshalError(e) - } - fv := finfo.value(sv, initNilPointers) - if _, ok := fv.Interface().(Name); ok { - fv.Set(reflect.ValueOf(start.Name)) - } - } - - // Assign attributes. - for _, a := range start.Attr { - handled := false - any := -1 - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - switch finfo.flags & fMode { - case fAttr: - strv := finfo.value(sv, initNilPointers) - if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) { - needTypeAttr := (finfo.flags & fTypeAttr) != 0 - // HACK: avoid using xsi:type value for a "type" attribute, such as ManagedObjectReference.Type for example. - if needTypeAttr || (a.Name != xmlSchemaInstance && a.Name != xsiType) { - if err := d.unmarshalAttr(strv, a); err != nil { - return err - } - } - handled = true - } - - case fAny | fAttr: - if any == -1 { - any = i - } - } - } - if !handled && any >= 0 { - finfo := &tinfo.fields[any] - strv := finfo.value(sv, initNilPointers) - if err := d.unmarshalAttr(strv, a); err != nil { - return err - } - } - } - - // Determine whether we need to save character data or comments. - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - switch finfo.flags & fMode { - case fCDATA, fCharData: - if !saveData.IsValid() { - saveData = finfo.value(sv, initNilPointers) - } - - case fComment: - if !saveComment.IsValid() { - saveComment = finfo.value(sv, initNilPointers) - } - - case fAny, fAny | fElement: - if !saveAny.IsValid() { - saveAny = finfo.value(sv, initNilPointers) - } - - case fInnerXML: - if !saveXML.IsValid() { - saveXML = finfo.value(sv, initNilPointers) - if d.saved == nil { - saveXMLIndex = 0 - d.saved = new(bytes.Buffer) - } else { - saveXMLIndex = d.savedOffset() - } - } - } - } - } - - // Find end element. - // Process sub-elements along the way. -Loop: - for { - var savedOffset int - if saveXML.IsValid() { - savedOffset = d.savedOffset() - } - tok, err := d.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case StartElement: - consumed := false - if sv.IsValid() { - consumed, err = d.unmarshalPath(tinfo, sv, nil, &t) - if err != nil { - return err - } - if !consumed && saveAny.IsValid() { - consumed = true - if err := d.unmarshal(saveAny, &t); err != nil { - return err - } - } - } - if !consumed { - if err := d.Skip(); err != nil { - return err - } - } - - case EndElement: - if saveXML.IsValid() { - saveXMLData = d.saved.Bytes()[saveXMLIndex:savedOffset] - if saveXMLIndex == 0 { - d.saved = nil - } - } - break Loop - - case CharData: - if saveData.IsValid() { - data = append(data, t...) - } - - case Comment: - if saveComment.IsValid() { - comment = append(comment, t...) - } - } - } - - if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) { - if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return err - } - saveData = reflect.Value{} - } - - if saveData.IsValid() && saveData.CanAddr() { - pv := saveData.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return err - } - saveData = reflect.Value{} - } - } - - if err := copyValue(saveData, data); err != nil { - return err - } - - switch t := saveComment; t.Kind() { - case reflect.String: - t.SetString(string(comment)) - case reflect.Slice: - t.Set(reflect.ValueOf(comment)) - } - - switch t := saveXML; t.Kind() { - case reflect.String: - t.SetString(string(saveXMLData)) - case reflect.Slice: - if t.Type().Elem().Kind() == reflect.Uint8 { - t.Set(reflect.ValueOf(saveXMLData)) - } - } - - return nil -} - -func copyValue(dst reflect.Value, src []byte) (err error) { - dst0 := dst - - if dst.Kind() == reflect.Ptr { - if dst.IsNil() { - dst.Set(reflect.New(dst.Type().Elem())) - } - dst = dst.Elem() - } - - // Save accumulated data. - switch dst.Kind() { - case reflect.Invalid: - // Probably a comment. - default: - return errors.New("cannot unmarshal into " + dst0.Type().String()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if len(src) == 0 { - dst.SetInt(0) - return nil - } - itmp, err := strconv.ParseInt(strings.TrimSpace(string(src)), 10, dst.Type().Bits()) - if err != nil { - return err - } - dst.SetInt(itmp) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - var utmp uint64 - if len(src) > 0 && src[0] == '-' { - // Negative value for unsigned field. - // Assume it was serialized following two's complement. - itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits()) - if err != nil { - return err - } - // Reinterpret value based on type width. - switch dst.Type().Bits() { - case 8: - utmp = uint64(uint8(itmp)) - case 16: - utmp = uint64(uint16(itmp)) - case 32: - utmp = uint64(uint32(itmp)) - case 64: - utmp = uint64(uint64(itmp)) - } - } else { - if len(src) == 0 { - dst.SetUint(0) - return nil - } - - utmp, err = strconv.ParseUint(strings.TrimSpace(string(src)), 10, dst.Type().Bits()) - if err != nil { - return err - } - } - dst.SetUint(utmp) - case reflect.Float32, reflect.Float64: - if len(src) == 0 { - dst.SetFloat(0) - return nil - } - ftmp, err := strconv.ParseFloat(strings.TrimSpace(string(src)), dst.Type().Bits()) - if err != nil { - return err - } - dst.SetFloat(ftmp) - case reflect.Bool: - if len(src) == 0 { - dst.SetBool(false) - return nil - } - value, err := strconv.ParseBool(strings.TrimSpace(string(src))) - if err != nil { - return err - } - dst.SetBool(value) - case reflect.String: - dst.SetString(string(src)) - case reflect.Slice: - if len(src) == 0 { - // non-nil to flag presence - src = []byte{} - } - dst.SetBytes(src) - } - return nil -} - -// unmarshalPath walks down an XML structure looking for wanted -// paths, and calls unmarshal on them. -// The consumed result tells whether XML elements have been consumed -// from the Decoder until start's matching end element, or if it's -// still untouched because start is uninteresting for sv's fields. -func (d *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) { - recurse := false -Loop: - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space { - continue - } - for j := range parents { - if parents[j] != finfo.parents[j] { - continue Loop - } - } - if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local { - // It's a perfect match, unmarshal the field. - return true, d.unmarshal(finfo.value(sv, initNilPointers), start) - } - if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local { - // It's a prefix for the field. Break and recurse - // since it's not ok for one field path to be itself - // the prefix for another field path. - recurse = true - - // We can reuse the same slice as long as we - // don't try to append to it. - parents = finfo.parents[:len(parents)+1] - break - } - } - if !recurse { - // We have no business with this element. - return false, nil - } - // The element is not a perfect match for any field, but one - // or more fields have the path to this element as a parent - // prefix. Recurse and attempt to match these. - for { - var tok Token - tok, err = d.Token() - if err != nil { - return true, err - } - switch t := tok.(type) { - case StartElement: - consumed2, err := d.unmarshalPath(tinfo, sv, parents, &t) - if err != nil { - return true, err - } - if !consumed2 { - if err := d.Skip(); err != nil { - return true, err - } - } - case EndElement: - return true, nil - } - } -} - -// Skip reads tokens until it has consumed the end element -// matching the most recent start element already consumed. -// It recurs if it encounters a start element, so it can be used to -// skip nested structures. -// It returns nil if it finds an end element matching the start -// element; otherwise it returns an error describing the problem. -func (d *Decoder) Skip() error { - for { - tok, err := d.Token() - if err != nil { - return err - } - switch tok.(type) { - case StartElement: - if err := d.Skip(); err != nil { - return err - } - case EndElement: - return nil - } - } -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go deleted file mode 100644 index 5eb0b4e5fdff..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/typeinfo.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "fmt" - "reflect" - "strings" - "sync" -) - -// typeInfo holds details for the xml representation of a type. -type typeInfo struct { - xmlname *fieldInfo - fields []fieldInfo -} - -// fieldInfo holds details for the xml representation of a single field. -type fieldInfo struct { - idx []int - name string - xmlns string - flags fieldFlags - parents []string -} - -type fieldFlags int - -const ( - fElement fieldFlags = 1 << iota - fAttr - fCDATA - fCharData - fInnerXML - fComment - fAny - - fOmitEmpty - fTypeAttr - - fMode = fElement | fAttr | fCDATA | fCharData | fInnerXML | fComment | fAny - - xmlName = "XMLName" -) - -var tinfoMap sync.Map // map[reflect.Type]*typeInfo - -var nameType = reflect.TypeOf(Name{}) - -// getTypeInfo returns the typeInfo structure with details necessary -// for marshaling and unmarshaling typ. -func getTypeInfo(typ reflect.Type) (*typeInfo, error) { - if ti, ok := tinfoMap.Load(typ); ok { - return ti.(*typeInfo), nil - } - - tinfo := &typeInfo{} - if typ.Kind() == reflect.Struct && typ != nameType { - n := typ.NumField() - for i := 0; i < n; i++ { - f := typ.Field(i) - if (f.PkgPath != "" && !f.Anonymous) || f.Tag.Get("xml") == "-" { - continue // Private field - } - - // For embedded structs, embed its fields. - if f.Anonymous { - t := f.Type - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - if t.Kind() == reflect.Struct { - inner, err := getTypeInfo(t) - if err != nil { - return nil, err - } - if tinfo.xmlname == nil { - tinfo.xmlname = inner.xmlname - } - for _, finfo := range inner.fields { - finfo.idx = append([]int{i}, finfo.idx...) - if err := addFieldInfo(typ, tinfo, &finfo); err != nil { - return nil, err - } - } - continue - } - } - - finfo, err := structFieldInfo(typ, &f) - if err != nil { - return nil, err - } - - if f.Name == xmlName { - tinfo.xmlname = finfo - continue - } - - // Add the field if it doesn't conflict with other fields. - if err := addFieldInfo(typ, tinfo, finfo); err != nil { - return nil, err - } - } - } - - ti, _ := tinfoMap.LoadOrStore(typ, tinfo) - return ti.(*typeInfo), nil -} - -// structFieldInfo builds and returns a fieldInfo for f. -func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) { - finfo := &fieldInfo{idx: f.Index} - - // Split the tag from the xml namespace if necessary. - tag := f.Tag.Get("xml") - if i := strings.Index(tag, " "); i >= 0 { - finfo.xmlns, tag = tag[:i], tag[i+1:] - } - - // Parse flags. - tokens := strings.Split(tag, ",") - if len(tokens) == 1 { - finfo.flags = fElement - } else { - tag = tokens[0] - for _, flag := range tokens[1:] { - switch flag { - case "attr": - finfo.flags |= fAttr - case "cdata": - finfo.flags |= fCDATA - case "chardata": - finfo.flags |= fCharData - case "innerxml": - finfo.flags |= fInnerXML - case "comment": - finfo.flags |= fComment - case "any": - finfo.flags |= fAny - case "omitempty": - finfo.flags |= fOmitEmpty - case "typeattr": - finfo.flags |= fTypeAttr - } - } - - // Validate the flags used. - valid := true - switch mode := finfo.flags & fMode; mode { - case 0: - finfo.flags |= fElement - case fAttr, fCDATA, fCharData, fInnerXML, fComment, fAny, fAny | fAttr: - if f.Name == xmlName || tag != "" && mode != fAttr { - valid = false - } - default: - // This will also catch multiple modes in a single field. - valid = false - } - if finfo.flags&fMode == fAny { - finfo.flags |= fElement - } - if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 { - valid = false - } - if !valid { - return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q", - f.Name, typ, f.Tag.Get("xml")) - } - } - - // Use of xmlns without a name is not allowed. - if finfo.xmlns != "" && tag == "" { - return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q", - f.Name, typ, f.Tag.Get("xml")) - } - - if f.Name == xmlName { - // The XMLName field records the XML element name. Don't - // process it as usual because its name should default to - // empty rather than to the field name. - finfo.name = tag - return finfo, nil - } - - if tag == "" { - // If the name part of the tag is completely empty, get - // default from XMLName of underlying struct if feasible, - // or field name otherwise. - if xmlname := lookupXMLName(f.Type); xmlname != nil { - finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name - } else { - finfo.name = f.Name - } - return finfo, nil - } - - // Prepare field name and parents. - parents := strings.Split(tag, ">") - if parents[0] == "" { - parents[0] = f.Name - } - if parents[len(parents)-1] == "" { - return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ) - } - finfo.name = parents[len(parents)-1] - if len(parents) > 1 { - if (finfo.flags & fElement) == 0 { - return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ",")) - } - finfo.parents = parents[:len(parents)-1] - } - - // If the field type has an XMLName field, the names must match - // so that the behavior of both marshaling and unmarshaling - // is straightforward and unambiguous. - if finfo.flags&fElement != 0 { - ftyp := f.Type - xmlname := lookupXMLName(ftyp) - if xmlname != nil && xmlname.name != finfo.name { - return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName", - finfo.name, typ, f.Name, xmlname.name, ftyp) - } - } - return finfo, nil -} - -// lookupXMLName returns the fieldInfo for typ's XMLName field -// in case it exists and has a valid xml field tag, otherwise -// it returns nil. -func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) { - for typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - if typ.Kind() != reflect.Struct { - return nil - } - for i, n := 0, typ.NumField(); i < n; i++ { - f := typ.Field(i) - if f.Name != xmlName { - continue - } - finfo, err := structFieldInfo(typ, &f) - if err == nil && finfo.name != "" { - return finfo - } - // Also consider errors as a non-existent field tag - // and let getTypeInfo itself report the error. - break - } - return nil -} - -func min(a, b int) int { - if a <= b { - return a - } - return b -} - -// addFieldInfo adds finfo to tinfo.fields if there are no -// conflicts, or if conflicts arise from previous fields that were -// obtained from deeper embedded structures than finfo. In the latter -// case, the conflicting entries are dropped. -// A conflict occurs when the path (parent + name) to a field is -// itself a prefix of another path, or when two paths match exactly. -// It is okay for field paths to share a common, shorter prefix. -func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error { - var conflicts []int -Loop: - // First, figure all conflicts. Most working code will have none. - for i := range tinfo.fields { - oldf := &tinfo.fields[i] - if oldf.flags&fMode != newf.flags&fMode { - continue - } - if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns { - continue - } - minl := min(len(newf.parents), len(oldf.parents)) - for p := 0; p < minl; p++ { - if oldf.parents[p] != newf.parents[p] { - continue Loop - } - } - if len(oldf.parents) > len(newf.parents) { - if oldf.parents[len(newf.parents)] == newf.name { - conflicts = append(conflicts, i) - } - } else if len(oldf.parents) < len(newf.parents) { - if newf.parents[len(oldf.parents)] == oldf.name { - conflicts = append(conflicts, i) - } - } else { - if newf.name == oldf.name { - conflicts = append(conflicts, i) - } - } - } - // Without conflicts, add the new field and return. - if conflicts == nil { - tinfo.fields = append(tinfo.fields, *newf) - return nil - } - - // If any conflict is shallower, ignore the new field. - // This matches the Go field resolution on embedding. - for _, i := range conflicts { - if len(tinfo.fields[i].idx) < len(newf.idx) { - return nil - } - } - - // Otherwise, if any of them is at the same depth level, it's an error. - for _, i := range conflicts { - oldf := &tinfo.fields[i] - if len(oldf.idx) == len(newf.idx) { - f1 := typ.FieldByIndex(oldf.idx) - f2 := typ.FieldByIndex(newf.idx) - return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")} - } - } - - // Otherwise, the new field is shallower, and thus takes precedence, - // so drop the conflicting fields from tinfo and append the new one. - for c := len(conflicts) - 1; c >= 0; c-- { - i := conflicts[c] - copy(tinfo.fields[i:], tinfo.fields[i+1:]) - tinfo.fields = tinfo.fields[:len(tinfo.fields)-1] - } - tinfo.fields = append(tinfo.fields, *newf) - return nil -} - -// A TagPathError represents an error in the unmarshaling process -// caused by the use of field tags with conflicting paths. -type TagPathError struct { - Struct reflect.Type - Field1, Tag1 string - Field2, Tag2 string -} - -func (e *TagPathError) Error() string { - return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2) -} - -const ( - initNilPointers = true - dontInitNilPointers = false -) - -// value returns v's field value corresponding to finfo. -// It's equivalent to v.FieldByIndex(finfo.idx), but when passed -// initNilPointers, it initializes and dereferences pointers as necessary. -// When passed dontInitNilPointers and a nil pointer is reached, the function -// returns a zero reflect.Value. -func (finfo *fieldInfo) value(v reflect.Value, shouldInitNilPointers bool) reflect.Value { - for i, x := range finfo.idx { - if i > 0 { - t := v.Type() - if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { - if v.IsNil() { - if !shouldInitNilPointers { - return reflect.Value{} - } - v.Set(reflect.New(v.Type().Elem())) - } - v = v.Elem() - } - } - v = v.Field(x) - } - return v -} diff --git a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/xml.go b/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/xml.go deleted file mode 100644 index 28631bdfe4aa..000000000000 --- a/cluster-autoscaler/vendor/github.com/vmware/govmomi/vim25/xml/xml.go +++ /dev/null @@ -1,2056 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xml implements a simple XML 1.0 parser that -// understands XML name spaces. -package xml - -// References: -// Annotated XML spec: https://www.xml.com/axml/testaxml.htm -// XML name spaces: https://www.w3.org/TR/REC-xml-names/ - -// TODO(rsc): -// Test error handling. - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "reflect" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// A SyntaxError represents a syntax error in the XML input stream. -type SyntaxError struct { - Msg string - Line int -} - -func (e *SyntaxError) Error() string { - return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg -} - -// A Name represents an XML name (Local) annotated -// with a name space identifier (Space). -// In tokens returned by Decoder.Token, the Space identifier -// is given as a canonical URL, not the short prefix used -// in the document being parsed. -type Name struct { - Space, Local string -} - -// An Attr represents an attribute in an XML element (Name=Value). -type Attr struct { - Name Name - Value string -} - -// A Token is an interface holding one of the token types: -// StartElement, EndElement, CharData, Comment, ProcInst, or Directive. -type Token interface{} - -// A StartElement represents an XML start element. -type StartElement struct { - Name Name - Attr []Attr -} - -// Copy creates a new copy of StartElement. -func (e StartElement) Copy() StartElement { - attrs := make([]Attr, len(e.Attr)) - copy(attrs, e.Attr) - e.Attr = attrs - return e -} - -// End returns the corresponding XML end element. -func (e StartElement) End() EndElement { - return EndElement{e.Name} -} - -// An EndElement represents an XML end element. -type EndElement struct { - Name Name -} - -// A CharData represents XML character data (raw text), -// in which XML escape sequences have been replaced by -// the characters they represent. -type CharData []byte - -func makeCopy(b []byte) []byte { - b1 := make([]byte, len(b)) - copy(b1, b) - return b1 -} - -// Copy creates a new copy of CharData. -func (c CharData) Copy() CharData { return CharData(makeCopy(c)) } - -// A Comment represents an XML comment of the form . -// The bytes do not include the comment markers. -type Comment []byte - -// Copy creates a new copy of Comment. -func (c Comment) Copy() Comment { return Comment(makeCopy(c)) } - -// A ProcInst represents an XML processing instruction of the form -type ProcInst struct { - Target string - Inst []byte -} - -// Copy creates a new copy of ProcInst. -func (p ProcInst) Copy() ProcInst { - p.Inst = makeCopy(p.Inst) - return p -} - -// A Directive represents an XML directive of the form . -// The bytes do not include the markers. -type Directive []byte - -// Copy creates a new copy of Directive. -func (d Directive) Copy() Directive { return Directive(makeCopy(d)) } - -// CopyToken returns a copy of a Token. -func CopyToken(t Token) Token { - switch v := t.(type) { - case CharData: - return v.Copy() - case Comment: - return v.Copy() - case Directive: - return v.Copy() - case ProcInst: - return v.Copy() - case StartElement: - return v.Copy() - } - return t -} - -// A TokenReader is anything that can decode a stream of XML tokens, including a -// Decoder. -// -// When Token encounters an error or end-of-file condition after successfully -// reading a token, it returns the token. It may return the (non-nil) error from -// the same call or return the error (and a nil token) from a subsequent call. -// An instance of this general case is that a TokenReader returning a non-nil -// token at the end of the token stream may return either io.EOF or a nil error. -// The next Read should return nil, io.EOF. -// -// Implementations of Token are discouraged from returning a nil token with a -// nil error. Callers should treat a return of nil, nil as indicating that -// nothing happened; in particular it does not indicate EOF. -type TokenReader interface { - Token() (Token, error) -} - -// A Decoder represents an XML parser reading a particular input stream. -// The parser assumes that its input is encoded in UTF-8. -type Decoder struct { - // Strict defaults to true, enforcing the requirements - // of the XML specification. - // If set to false, the parser allows input containing common - // mistakes: - // * If an element is missing an end tag, the parser invents - // end tags as necessary to keep the return values from Token - // properly balanced. - // * In attribute values and character data, unknown or malformed - // character entities (sequences beginning with &) are left alone. - // - // Setting: - // - // d.Strict = false - // d.AutoClose = xml.HTMLAutoClose - // d.Entity = xml.HTMLEntity - // - // creates a parser that can handle typical HTML. - // - // Strict mode does not enforce the requirements of the XML name spaces TR. - // In particular it does not reject name space tags using undefined prefixes. - // Such tags are recorded with the unknown prefix as the name space URL. - Strict bool - - // When Strict == false, AutoClose indicates a set of elements to - // consider closed immediately after they are opened, regardless - // of whether an end element is present. - AutoClose []string - - // Entity can be used to map non-standard entity names to string replacements. - // The parser behaves as if these standard mappings are present in the map, - // regardless of the actual map content: - // - // "lt": "<", - // "gt": ">", - // "amp": "&", - // "apos": "'", - // "quot": `"`, - Entity map[string]string - - // CharsetReader, if non-nil, defines a function to generate - // charset-conversion readers, converting from the provided - // non-UTF-8 charset into UTF-8. If CharsetReader is nil or - // returns an error, parsing stops with an error. One of the - // CharsetReader's result values must be non-nil. - CharsetReader func(charset string, input io.Reader) (io.Reader, error) - - // DefaultSpace sets the default name space used for unadorned tags, - // as if the entire XML stream were wrapped in an element containing - // the attribute xmlns="DefaultSpace". - DefaultSpace string - - // TypeFunc is used to map type names to actual types. - TypeFunc func(string) (reflect.Type, bool) - - r io.ByteReader - t TokenReader - buf bytes.Buffer - saved *bytes.Buffer - stk *stack - free *stack - needClose bool - toClose Name - nextToken Token - nextByte int - ns map[string]string - err error - line int - offset int64 - unmarshalDepth int -} - -// NewDecoder creates a new XML parser reading from r. -// If r does not implement io.ByteReader, NewDecoder will -// do its own buffering. -func NewDecoder(r io.Reader) *Decoder { - d := &Decoder{ - ns: make(map[string]string), - nextByte: -1, - line: 1, - Strict: true, - } - d.switchToReader(r) - return d -} - -// NewTokenDecoder creates a new XML parser using an underlying token stream. -func NewTokenDecoder(t TokenReader) *Decoder { - // Is it already a Decoder? - if d, ok := t.(*Decoder); ok { - return d - } - d := &Decoder{ - ns: make(map[string]string), - t: t, - nextByte: -1, - line: 1, - Strict: true, - } - return d -} - -// Token returns the next XML token in the input stream. -// At the end of the input stream, Token returns nil, io.EOF. -// -// Slices of bytes in the returned token data refer to the -// parser's internal buffer and remain valid only until the next -// call to Token. To acquire a copy of the bytes, call CopyToken -// or the token's Copy method. -// -// Token expands self-closing elements such as
    -// into separate start and end elements returned by successive calls. -// -// Token guarantees that the StartElement and EndElement -// tokens it returns are properly nested and matched: -// if Token encounters an unexpected end element -// or EOF before all expected end elements, -// it will return an error. -// -// Token implements XML name spaces as described by -// https://www.w3.org/TR/REC-xml-names/. Each of the -// Name structures contained in the Token has the Space -// set to the URL identifying its name space when known. -// If Token encounters an unrecognized name space prefix, -// it uses the prefix as the Space rather than report an error. -func (d *Decoder) Token() (Token, error) { - var t Token - var err error - if d.stk != nil && d.stk.kind == stkEOF { - return nil, io.EOF - } - if d.nextToken != nil { - t = d.nextToken - d.nextToken = nil - } else if t, err = d.rawToken(); err != nil { - switch { - case err == io.EOF && d.t != nil: - err = nil - case err == io.EOF && d.stk != nil && d.stk.kind != stkEOF: - err = d.syntaxError("unexpected EOF") - } - return t, err - } - - if !d.Strict { - if t1, ok := d.autoClose(t); ok { - d.nextToken = t - t = t1 - } - } - switch t1 := t.(type) { - case StartElement: - // In XML name spaces, the translations listed in the - // attributes apply to the element name and - // to the other attribute names, so process - // the translations first. - for _, a := range t1.Attr { - if a.Name.Space == xmlnsPrefix { - v, ok := d.ns[a.Name.Local] - d.pushNs(a.Name.Local, v, ok) - d.ns[a.Name.Local] = a.Value - } - if a.Name.Space == "" && a.Name.Local == xmlnsPrefix { - // Default space for untagged names - v, ok := d.ns[""] - d.pushNs("", v, ok) - d.ns[""] = a.Value - } - } - - d.translate(&t1.Name, true) - for i := range t1.Attr { - d.translate(&t1.Attr[i].Name, false) - } - d.pushElement(t1.Name) - t = t1 - - case EndElement: - d.translate(&t1.Name, true) - if !d.popElement(&t1) { - return nil, d.err - } - t = t1 - } - return t, err -} - -const ( - xmlURL = "http://www.w3.org/XML/1998/namespace" - xmlnsPrefix = "xmlns" - xmlPrefix = "xml" -) - -// Apply name space translation to name n. -// The default name space (for Space=="") -// applies only to element names, not to attribute names. -func (d *Decoder) translate(n *Name, isElementName bool) { - switch { - case n.Space == xmlnsPrefix: - return - case n.Space == "" && !isElementName: - return - case n.Space == xmlPrefix: - n.Space = xmlURL - case n.Space == "" && n.Local == xmlnsPrefix: - return - } - if v, ok := d.ns[n.Space]; ok { - n.Space = v - } else if n.Space == "" { - n.Space = d.DefaultSpace - } -} - -func (d *Decoder) switchToReader(r io.Reader) { - // Get efficient byte at a time reader. - // Assume that if reader has its own - // ReadByte, it's efficient enough. - // Otherwise, use bufio. - if rb, ok := r.(io.ByteReader); ok { - d.r = rb - } else { - d.r = bufio.NewReader(r) - } -} - -// Parsing state - stack holds old name space translations -// and the current set of open elements. The translations to pop when -// ending a given tag are *below* it on the stack, which is -// more work but forced on us by XML. -type stack struct { - next *stack - kind int - name Name - ok bool -} - -const ( - stkStart = iota - stkNs - stkEOF -) - -func (d *Decoder) push(kind int) *stack { - s := d.free - if s != nil { - d.free = s.next - } else { - s = new(stack) - } - s.next = d.stk - s.kind = kind - d.stk = s - return s -} - -func (d *Decoder) pop() *stack { - s := d.stk - if s != nil { - d.stk = s.next - s.next = d.free - d.free = s - } - return s -} - -// Record that after the current element is finished -// (that element is already pushed on the stack) -// Token should return EOF until popEOF is called. -func (d *Decoder) pushEOF() { - // Walk down stack to find Start. - // It might not be the top, because there might be stkNs - // entries above it. - start := d.stk - for start.kind != stkStart { - start = start.next - } - // The stkNs entries below a start are associated with that - // element too; skip over them. - for start.next != nil && start.next.kind == stkNs { - start = start.next - } - s := d.free - if s != nil { - d.free = s.next - } else { - s = new(stack) - } - s.kind = stkEOF - s.next = start.next - start.next = s -} - -// Undo a pushEOF. -// The element must have been finished, so the EOF should be at the top of the stack. -func (d *Decoder) popEOF() bool { - if d.stk == nil || d.stk.kind != stkEOF { - return false - } - d.pop() - return true -} - -// Record that we are starting an element with the given name. -func (d *Decoder) pushElement(name Name) { - s := d.push(stkStart) - s.name = name -} - -// Record that we are changing the value of ns[local]. -// The old value is url, ok. -func (d *Decoder) pushNs(local string, url string, ok bool) { - s := d.push(stkNs) - s.name.Local = local - s.name.Space = url - s.ok = ok -} - -// Creates a SyntaxError with the current line number. -func (d *Decoder) syntaxError(msg string) error { - return &SyntaxError{Msg: msg, Line: d.line} -} - -// Record that we are ending an element with the given name. -// The name must match the record at the top of the stack, -// which must be a pushElement record. -// After popping the element, apply any undo records from -// the stack to restore the name translations that existed -// before we saw this element. -func (d *Decoder) popElement(t *EndElement) bool { - s := d.pop() - name := t.Name - switch { - case s == nil || s.kind != stkStart: - d.err = d.syntaxError("unexpected end element ") - return false - case s.name.Local != name.Local: - if !d.Strict { - d.needClose = true - d.toClose = t.Name - t.Name = s.name - return true - } - d.err = d.syntaxError("element <" + s.name.Local + "> closed by ") - return false - case s.name.Space != name.Space: - d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + - "closed by in space " + name.Space) - return false - } - - // Pop stack until a Start or EOF is on the top, undoing the - // translations that were associated with the element we just closed. - for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF { - s := d.pop() - if s.ok { - d.ns[s.name.Local] = s.name.Space - } else { - delete(d.ns, s.name.Local) - } - } - - return true -} - -// If the top element on the stack is autoclosing and -// t is not the end tag, invent the end tag. -func (d *Decoder) autoClose(t Token) (Token, bool) { - if d.stk == nil || d.stk.kind != stkStart { - return nil, false - } - name := strings.ToLower(d.stk.name.Local) - for _, s := range d.AutoClose { - if strings.ToLower(s) == name { - // This one should be auto closed if t doesn't close it. - et, ok := t.(EndElement) - if !ok || et.Name.Local != name { - return EndElement{d.stk.name}, true - } - break - } - } - return nil, false -} - -var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method") - -// RawToken is like Token but does not verify that -// start and end elements match and does not translate -// name space prefixes to their corresponding URLs. -func (d *Decoder) RawToken() (Token, error) { - if d.unmarshalDepth > 0 { - return nil, errRawToken - } - return d.rawToken() -} - -func (d *Decoder) rawToken() (Token, error) { - if d.t != nil { - return d.t.Token() - } - if d.err != nil { - return nil, d.err - } - if d.needClose { - // The last element we read was self-closing and - // we returned just the StartElement half. - // Return the EndElement half now. - d.needClose = false - return EndElement{d.toClose}, nil - } - - b, ok := d.getc() - if !ok { - return nil, d.err - } - - if b != '<' { - // Text section. - d.ungetc(b) - data := d.text(-1, false) - if data == nil { - return nil, d.err - } - return CharData(data), nil - } - - if b, ok = d.mustgetc(); !ok { - return nil, d.err - } - switch b { - case '/': - // ' { - d.err = d.syntaxError("invalid characters between ") - return nil, d.err - } - return EndElement{name}, nil - - case '?': - // ' { - break - } - b0 = b - } - data := d.buf.Bytes() - data = data[0 : len(data)-2] // chop ?> - - if target == "xml" { - content := string(data) - ver := procInst("version", content) - if ver != "" && ver != "1.0" { - d.err = fmt.Errorf("xml: unsupported version %q; only version 1.0 is supported", ver) - return nil, d.err - } - enc := procInst("encoding", content) - if enc != "" && enc != "utf-8" && enc != "UTF-8" && !strings.EqualFold(enc, "utf-8") { - if d.CharsetReader == nil { - d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc) - return nil, d.err - } - newr, err := d.CharsetReader(enc, d.r.(io.Reader)) - if err != nil { - d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err) - return nil, d.err - } - if newr == nil { - panic("CharsetReader returned a nil Reader for charset " + enc) - } - d.switchToReader(newr) - } - } - return ProcInst{target, data}, nil - - case '!': - // ' { - d.err = d.syntaxError( - `invalid sequence "--" not allowed in comments`) - return nil, d.err - } - break - } - b0, b1 = b1, b - } - data := d.buf.Bytes() - data = data[0 : len(data)-3] // chop --> - return Comment(data), nil - - case '[': // . - data := d.text(-1, true) - if data == nil { - return nil, d.err - } - return CharData(data), nil - } - - // Probably a directive: , , etc. - // We don't care, but accumulate for caller. Quoted angle - // brackets do not count for nesting. - d.buf.Reset() - d.buf.WriteByte(b) - inquote := uint8(0) - depth := 0 - for { - if b, ok = d.mustgetc(); !ok { - return nil, d.err - } - if inquote == 0 && b == '>' && depth == 0 { - break - } - HandleB: - d.buf.WriteByte(b) - switch { - case b == inquote: - inquote = 0 - - case inquote != 0: - // in quotes, no special action - - case b == '\'' || b == '"': - inquote = b - - case b == '>' && inquote == 0: - depth-- - - case b == '<' && inquote == 0: - // Look for